qingjiang

qingjiang

V2EX member #618521, joined on 2023-03-13 10:18:07 +08:00
qingjiang's recent replies
来自站点:bestaigate.top ,我的 id 是:1504
ID: 1504
Jan 2
Replied to a topic by uni 程序员 我的两条 vibe coding 姿势技巧
分层,解耦算垃圾堆吗
Feb 16, 2025
Replied to a topic by tw93 Markdown 你是不是也在找一个好用的 Markdown 编辑器?
支持 windows 就好了
Jun 22, 2024
Replied to a topic by qingjiang 信息安全 使用 frp 被攻击如何解决?
好,大家的建议我都试试
Jun 19, 2024
Replied to a topic by diagnostics Java 有多少人还在用 Maven 构建项目?
android studio 使用 gradle 构建的,有时候没整明白,也只会配置相应环境

gradle 查阅资料比较少

maven 对 java 开发相对友好点

maven 参考资料比较多
Jun 19, 2024
Replied to a topic by qingjiang 信息安全 使用 frp 被攻击如何解决?
@Yukineko 好,我试试
Mar 13, 2024
Replied to a topic by qingjiang 程序员 求:有没有会 ant design pro v6 的
我自己打自己脸了,接口请求路径是 /login/account ,之前是 /login
服了啥也不懂,突然悟了

const authHeaderInterceptor = (url: string, options: RequestConfig) => {
console.log('authHeaderInterceptor url, options: ', url, options );
console.log('url.indexOf: ',url.indexOf('/login/') +",", url.indexOf('/login/account'));
// 如果是登录页面,不需要添加 token

if (url.indexOf('/login/account') !== -1 || url.indexOf('/login/logout') !== -1) {
return {
url: `${url}`,
options: { ...options, interceptors: true },
};
} else {
const token = getToken();
console.log('url, token: ', url, token);
let authHeader = {};
// 如果 token 存在,就添加到请求头
if (token) {
authHeader = { Authorization: `Bearer ${token}` };
}

return {
url: `${url}`,
options: { ...options, interceptors: true, headers: authHeader },
};
}
};
谢谢大家的帮忙,解决了
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5230 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 01:14 · PVG 09:14 · LAX 18:14 · JFK 21:14
♥ Do have faith in what you're doing.