提交修改
This commit is contained in:
parent
edcdc2808b
commit
25ca4ccb31
@ -283,7 +283,9 @@ const toHome = (item) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const goOrder = () => {
|
const goOrder = () => {
|
||||||
navigateTo('/pages/unlock/index');
|
uni.switchTab({
|
||||||
|
url: `/pages/unlock/index`,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -68,10 +68,13 @@ export const useMainStore = defineStore('main', () => {
|
|||||||
const logOut = ()=>{
|
const logOut = ()=>{
|
||||||
storeState.value.token = ''
|
storeState.value.token = ''
|
||||||
storeState.value.userInfo = {}
|
storeState.value.userInfo = {}
|
||||||
|
// 如果是开发环境 就不清token 避免开发的时候后端服务没起来 每次都要重新登录
|
||||||
|
if(process.env.NODE_ENV !== 'development'){
|
||||||
uni.removeStorage({
|
uni.removeStorage({
|
||||||
key:'token'
|
key:'token'
|
||||||
}); // 清除缓存
|
}); // 清除缓存
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const setLocation = (location) => {
|
const setLocation = (location) => {
|
||||||
storeState.value.location = location;
|
storeState.value.location = location;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user