环卫车小程序前端代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

35 lines
517 B

export default {
state: {
token:"",
userInfo : {}, //用户信息
},
mutations: {
onAuth(state){
},
setUserInfo(state,obj){
state.userInfo = obj.userInfo
state.token = obj.token
},
logout(state){
uni.showModal({
title: '确认退出登录吗',
success(r) {
if(r.confirm){
state.userInfo = {}
state.token = ""
uni.removeStorageSync('token')
uni.redirectTo({
url: '/pages/index/index'
})
}
}
})
},
},
actions: {}
}