From 373bae166a95aef9863686a23fa5493f7dc55b0f Mon Sep 17 00:00:00 2001 From: wangfs <15029758498@163.com> Date: Mon, 7 Sep 2020 16:23:27 +0800 Subject: [PATCH] 登陆验证码提交 --- src/api/mycar.js | 14 ++++++++++++++ src/store/modules/user.js | 2 +- src/views/login/index.vue | 10 +++++++--- src/views/mycar/index.vue | 65 ++++++++++++++++++++++++++++++++++++++++++----------------------- src/views/myevaluate/index.vue | 9 +++++---- 5 files changed, 69 insertions(+), 31 deletions(-) diff --git a/src/api/mycar.js b/src/api/mycar.js index 5a18ec8..a5f81e3 100644 --- a/src/api/mycar.js +++ b/src/api/mycar.js @@ -35,3 +35,17 @@ export function unboundCarNum(params) { } +/** + * 校验车牌号是否被其他人绑定 + * @param params + */ +export function checkCarNumIsbind(params) { + return request({ + url: '/personCarNumPc/checkCarNumIsbind', + method: 'post', + data:params + }) +} + + + diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 2994bb3..a650d6c 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -33,7 +33,7 @@ const actions = { const { data } = response commit('SET_TOKEN', data.token) setToken(data.token) - resolve() + resolve(response) }).catch(error => { reject(error) }) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 655b588..25f89cf 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -169,9 +169,13 @@ export default { this.$refs.loginForm.validate(valid => { if (valid) { this.loading = true - this.$store.dispatch('user/login', this.loginForm).then(() => { - this.$router.push({ path: this.redirect || '/' }) - this.loading = false + this.$store.dispatch('user/login', this.loginForm).then((reponse) => { + if(reponse.code =='8888'){ + this.$router.push({ path: this.redirect || '/' }) + } + + this.loading = false + }).catch(() => { this.loading = false }) diff --git a/src/views/mycar/index.vue b/src/views/mycar/index.vue index fa26f20..23bdea2 100644 --- a/src/views/mycar/index.vue +++ b/src/views/mycar/index.vue @@ -67,7 +67,7 @@