Commit 2700e536 authored by 李苏's avatar 李苏 💬

Gtoken

parent 038220d9
......@@ -9,7 +9,7 @@ let apiUrl = configService.apiUrl;
const getTokenStorage = () => {
let token = ''
try{
token = uni.getStorageSync(ACCESS_TOKEN)
token = uni.getStorageSync('Gtoken')
}catch(e){
//TODO handle the exception
console.log("getTokenStorage",token)
......@@ -50,7 +50,7 @@ uni.getStorageInfo({
})
config.header = {
...config.header,
'X-Access-Token':getTokenStorage()
'Gtoken':getTokenStorage()
}
/*
if (!token) { // 如果token不存在,调用cancel 会取消本次请求,但是该函数的catch() 仍会执行
......
......@@ -223,6 +223,16 @@
"password":""
})
}
uni.setStorage({
key:'Gtoken',
data:res.data.data.token,
success:function(){
},
fail() {
}
})
uni.setStorage({
key:'url_ley',
data:s,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment