一点小优化
This commit is contained in:
@ -101,9 +101,11 @@
|
||||
uni.removeStorageSync("token")
|
||||
uni.removeStorageSync("clientID")
|
||||
uni.removeStorageSync("tokenTime")
|
||||
this.phone= uni.getStorageInfoSync('phone');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
},
|
||||
methods: {
|
||||
// 验证码密码切换
|
||||
@ -237,6 +239,7 @@
|
||||
uni.setStorageSync('token', res.data.access_token) // 缓存token
|
||||
uni.setStorageSync('clientID', res.data.client_id) // 缓存token
|
||||
uni.setStorageSync('tokenTime', new Date().getTime() + 86400000); //过期时间
|
||||
uni.setStorageSync('phone',this.phone);
|
||||
uni.showToast({
|
||||
title: '登录成功',
|
||||
icon: 'success'
|
||||
|
||||
Reference in New Issue
Block a user