diff --git a/src/router/modules/root.js b/src/router/modules/root.js
index 19d3ced..0886ffa 100644
--- a/src/router/modules/root.js
+++ b/src/router/modules/root.js
@@ -29,6 +29,11 @@ export default [
meta: {requireLogin: false},
component: () => import(/* webpackChunkName: 'root' */ '@/views/account/ForgetPwd')
},
+ {
+ path: '/account/validate',
+ meta: {requireLogin: true},
+ component: () => import(/* webpackChunkName: 'root' */ '@/views/account/validate')
+ },
{
path: '/enterprise',
meta: {requireLogin: false},
diff --git a/src/utils/plugins.js b/src/utils/plugins.js
index c8fb3db..b46fdff 100644
--- a/src/utils/plugins.js
+++ b/src/utils/plugins.js
@@ -4,7 +4,6 @@ import Vue from 'vue';
const preventReClick= Vue.directive('preventReClick', {
inserted (el, binding) {
el.addEventListener('click', () => {
- console.log('aaa')
if (!el.disabled) {
el.disabled = true
setTimeout(() => {
diff --git a/src/views/account/member.vue b/src/views/account/member.vue
index 2c1edeb..fc76999 100644
--- a/src/views/account/member.vue
+++ b/src/views/account/member.vue
@@ -108,7 +108,18 @@
{{ userInfo.wxName }}(已绑定)
- 绑定
+ 绑定
+
+
+
@@ -216,7 +227,7 @@
width="450px"
center
>
-
@@ -225,7 +236,8 @@
@@ -329,6 +341,8 @@ export default {
{required: true, trigger: 'blur', validator: validateRePass}
]
},
+ bindWxDialogVisible: false,
+ bindWxQrcode: false,
editNameDialogVisible: false,
pwdDialogVisible: false,
phoneDialogVisible: false,
@@ -341,12 +355,17 @@ export default {
password: '',
repeatPassword: ''
},
- showUploadAvatar: false
+ showUploadAvatar: false,
+ bindWxTimer: null
}
},
created() {
this.queryUserInfo()
this.getQQLoginAuthorizeUrl()
+ this.getBindWxQrCode()
+ },
+ destroyed() {
+ clearInterval(this.bindWxTimer)
},
methods: {
queryUserInfo() {
@@ -364,6 +383,11 @@ export default {
getUploadUrl() {
return `${process.env.VUE_APP_API_ROOT}/user/file/upload`
},
+ getBindWxQrCode() {
+ this.$api.get('/user/bind/wx/qrcode').then(res => {
+ this.bindWxQrcode = res.data
+ })
+ },
updateUserPwdHandle() {
this.$refs['updatePassWordForm'].validate(valid => {
if (valid) {
@@ -380,10 +404,13 @@ export default {
},
sendUpdateEmail() {
- this.$api.get('/user/update-email/msg', {params: {email: this.userInfoForm.email}}).then(res => {
- if (res.data) {
- this.msgSuccess('发送成功')
-
+ this.$refs['updateEmailForm'].validateField('email', err => {
+ if (!err) {
+ this.$api.get('/user/update-email/msg', {params: {email: this.userInfoForm.email}}).then(res => {
+ if (res.data) {
+ this.msgSuccess('发送成功,请去您的邮箱查看')
+ }
+ })
}
})
},
@@ -433,6 +460,21 @@ export default {
}
})
},
+ bindWxHandle() {
+ this.bindWxDialogVisible = true
+ this.bindWxTimer = setInterval(() => {
+ this.$api.get('/user/current/detail').then(res => {
+ if (res.data) {
+ let {wxName} = res.data
+ if (wxName) {
+ this.msgSuccess('绑定成功')
+ this.userInfo.wxName = wxName
+ this.bindWxDialogVisible = false
+ }
+ }
+ })
+ }, 5 * 1000)
+ },
cropUploadSuccess(res) {
console.log(res)
this.userInfoForm.avatar = res.data
@@ -526,7 +568,11 @@ export default {
ul li:last-child {
border-bottom: none;
}
+ ul li:hover {
+ background-color: transparent;
+ }
.is-active {
+ background-color: transparent;
font-weight: bold;
}
}
diff --git a/src/views/account/validate.vue b/src/views/account/validate.vue
new file mode 100644
index 0000000..105f14a
--- /dev/null
+++ b/src/views/account/validate.vue
@@ -0,0 +1,36 @@
+
+
+
+ 绑定邮箱失败,可能是超出绑定时间或者是该邮箱已被绑定等,请稍后重试!
+
+
+
+
+