Commit 44811ba5 by wangjian

1

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