商品团购分享处理

This commit is contained in:
2024-06-07 14:10:43 +08:00
parent 613c0df738
commit 4b4ee44242
10 changed files with 53 additions and 26 deletions

View File

@@ -132,3 +132,9 @@ export function copy(content: string) {
}
});
}
export function getQueryParam(queryParams: string, key: string) {
let regex = new RegExp('(?:[?&]|^)' + key + '=([^&]+)'),
match = queryParams.match(regex);
return match && match[1];
}

View File

@@ -61,7 +61,7 @@ function responseInterceptors() {
}
// 登录状态失效,重新登录
if(data.code === 4011 || data?.retcode === 4011) {
if(data?.code === 401 || data?.code === 4011 || data?.retcode === 4011) {
// 是否在获取token中,防止重复获取
if(!isRefreshing) {
// 修改登录状态为true