修改密码
+🗺️ 桂林中学毕业生去向分布图
@@ -30,6 +59,7 @@ export default { }, data() { return { + password: "", snackbar: { show: false, text: '', @@ -52,6 +82,27 @@ export default { go(url) { // this.displayInnerWindow = url window.open(url, '_blank') + }, + + updatePassword() { + if (this.password.length < 6) { + this.toast('密码长度至少为6位') + return + } + this.$axios.put('/v1/account/update-pwd', { + "new_passwd": this.password + }) + .then(res => { + if (res.data.code === 0) { + this.toast('密码修改成功', 'success') + } else { + this.toast('密码修改失败:' + res.data.msg) + } + }) + .catch(err => { + this.toast('失败:' + err.response.data.msg) + console.error(err) + }) } } } @@ -60,6 +111,7 @@ export default { \ No newline at end of file diff --git a/frontend/src/pages/world.vue b/frontend/src/pages/world.vue index 6571d3b..a7da93e 100644 --- a/frontend/src/pages/world.vue +++ b/frontend/src/pages/world.vue @@ -1,23 +1,21 @@前面的区域,以后再来探索吧