fix token bug
This commit is contained in:
parent
fc24fe6e02
commit
27bb29b7a2
@ -32,12 +32,14 @@ const request = new Request({
|
||||
// response.config.headers["Authorization"] = response.data.data.Token;
|
||||
// }
|
||||
if (response.data.code === 401) {
|
||||
const id = uni.getStorageSync("id",id);
|
||||
const pid = uni.getStorageSync("pid",pid);
|
||||
console.log("id",id)
|
||||
uni.clearStorageSync()
|
||||
const params = new URLSearchParams(window.location.search)
|
||||
const id = params.get('id')
|
||||
const pid = params.get('pid')
|
||||
uni.navigateTo({
|
||||
url: "/pages/login/index?id=" + id + "&pid=" + pid,
|
||||
url: "/pages/login/index?id="+id+'&pid='+pid,
|
||||
});
|
||||
return false
|
||||
}
|
||||
if ([200, 201, 204].includes(response.status)) {
|
||||
return response.config.responseType === "blob" ? response : response;
|
||||
|
Loading…
Reference in New Issue
Block a user