提交修改

This commit is contained in:
有果 2026-05-15 13:33:26 +08:00
parent edcdc2808b
commit 25ca4ccb31
2 changed files with 9 additions and 4 deletions

View File

@ -283,7 +283,9 @@ const toHome = (item) => {
} }
const goOrder = () => { const goOrder = () => {
navigateTo('/pages/unlock/index'); uni.switchTab({
url: `/pages/unlock/index`,
});
} }

View File

@ -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;