Commit d36ebe78 authored by 肖健's avatar 肖健

token存储key更改,旧的token存在就退出登录(防止pk_key存在自动登录)

parent c02a5a0c
<script>
let plugin = requirePlugin('loginPlugin');
export default {
onLaunch: function () {
uni.hideTabBar()
......@@ -6,6 +7,14 @@ export default {
const info = uni.getSystemInfoSync()
// 设置状态栏高度(H5顶部无状态栏小程序有状态栏需要撑起高度)
uni.setStorageSync('statusBarHeight',info.statusBarHeight)
let oldToken = uni.getStorageSync('userToken')
if(oldToken) {
uni.removeStorageSync('userToken')
plugin.logout().then((res) => {
});
}
},
onShow: function () {
uni.hideHomeButton()
......
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