Commit 44811ba5 by wangjian

1

parent 118faf20
......@@ -86,7 +86,7 @@
this.getUserInfo()
console.log(this.$store.state);
if (this.$store.state.selectAccount) {
this.$store.commit('refreshSelectAccount', true)
this.$store.commit('refreshSelectAccount', false)
this.toast('账号切换成功')
}
},
......
......@@ -29,6 +29,7 @@
this.$net.post('/staff/password/setting', {from: 'my', pwd: this.pwd, randomCode: this.randomCode})
.then(res => {
if (res.code == 200) {
this.$store.commit('refreshSetPwdSuccess', true)
this.$router.pop()
} else {
this.toast(res.message)
......
......@@ -34,8 +34,14 @@
hasPwd: this.$store.state.userInfo.settingCheckCode === 1
}
},
onLoad(options) {
},
onShow() {
this.hasPwd = this.$store.state.userInfo.settingCheckCode === 1
if (this.$store.state.setPwdSuccess) {
this.$store.commit('refreshSetPwdSuccess', false)
this.toast('支付密码设置成功')
}
},
methods: {
changePwd() {
......
......@@ -13,7 +13,8 @@ const store = createStore({
isLogin: false,
userInfo: {},
submitGoods: {},
selectAccount: false
selectAccount: false,
setPwdSuccess: false
},
mutations: {
refreshUserLogin(state, isLogin) {
......@@ -27,6 +28,9 @@ const store = createStore({
},
refreshSelectAccount(state, value) {
state.selectAccount = value
},
refreshSetPwdSuccess(state, value) {
state.setPwdSuccess = value
}
},
getters: {
......
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