diff --git a/src/components/GlobalHeader/ChangePassword.vue b/src/components/GlobalHeader/ChangePassword.vue index fd1879f..930ee5d 100644 --- a/src/components/GlobalHeader/ChangePassword.vue +++ b/src/components/GlobalHeader/ChangePassword.vue @@ -220,13 +220,17 @@ export default { if (!err) { this.btnLoading = true state.passwordLevelChecked = false - this.$store.dispatch('ChangePassword', values).then(res => { - this.btnLoading = false - this.$message.success('修改密码成功') - this.$store.dispatch('Logout').then(() => { - this.$router.push({ name: 'login' }) + this.$store + .dispatch('ChangePassword', values) + .then(res => { + this.$message.success('修改密码成功') + this.$store.dispatch('Logout').then(() => { + this.$router.push({ name: 'login' }) + }) + }) + .finally(() => { + this.btnLoading = false }) - }) } }) } diff --git a/src/store/modules/user.js b/src/store/modules/user.js index bd2d3d5..07a26eb 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -93,6 +93,8 @@ const user = { password: data.password }).then(res => { resolve(res) + }).finally((error)=>{ + reject(error) }) } catch (error) { reject(error) diff --git a/src/views/mypractice/index.vue b/src/views/mypractice/index.vue index 95a2612..45f90ce 100644 --- a/src/views/mypractice/index.vue +++ b/src/views/mypractice/index.vue @@ -70,7 +70,7 @@ export default { courseType: '' // 课程分类 }, queryOptions: [ - { type: 'select-dic-tree', placeholder: '课程分类', key: 'courseType', options: [] } + { type: 'select-dic-tree', width: '200', placeholder: '课程分类', key: 'courseType', options: [] } ] } },