1
This commit is contained in:
parent
7647a92bd6
commit
069e51d3cf
@ -86,23 +86,10 @@
|
||||
console.log('请求成功', rex)
|
||||
if (rex.data.code == 200) {
|
||||
|
||||
uni.setStorageSync('App-Token', rex.data.token);
|
||||
if (this.returnUrl) {
|
||||
uni.navigateBack()
|
||||
} else {
|
||||
this.userinfo()
|
||||
console.log('跳转');
|
||||
}
|
||||
}
|
||||
if (rex.data.code == 500) {
|
||||
uni.clearStorageSync();
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: rex.data.msg
|
||||
})
|
||||
console.log('走错误请求');
|
||||
|
||||
uni.setStorageSync('App-Token', rex.data.data.token);
|
||||
|
||||
}
|
||||
console.log("swq",uni.getStorageSync('App-Token'));
|
||||
},
|
||||
fail: (res) => {
|
||||
console.log("fail", res);
|
||||
|
Loading…
Reference in New Issue
Block a user