Browse Source

Merge branch 'activityCenter'

c4az6 4 years ago
parent
commit
9f0c76002f
1 changed files with 4 additions and 8 deletions
  1. 4 8
      src/views/doctorRegister/doctorRegister/doctorRegister.vue

+ 4 - 8
src/views/doctorRegister/doctorRegister/doctorRegister.vue

@@ -71,6 +71,7 @@ import { reqDoctorRegister, reqGetImgCode, reqSendSMS, reqVerifyCode } from '../
 export default {
   data() {
     return {
+      redirectCode: '', // 从cookie中获取的跳转code值
       // 手机号
       tel: "",
       // 图片验证码值
@@ -111,14 +112,8 @@ export default {
         duration: 30000,
         forbidClick: true
       })
-      const { data: result } = await reqDoctorRegister({ phone: this.tel })
-      if (result.success !== 1)   {
-        this.$toast(result.message);
-        if(result.messageCode == 1101){
-          return ;
-        }
-      }
-
+      const { data: result } = await reqDoctorRegister({ phone: this.tel, redirectCode:this.redirectCode })
+      if (result.success !== 1) return this.$toast(result.message)
       this.$toast(result.message)
       setTimeout(() => {
         this.$toast.clear()
@@ -235,6 +230,7 @@ export default {
   },
   created() {
     this.getCode()
+    this.redirectCode = this.getCookie('redirectCode')
     this.$toast('欢迎进入注册页面')
     this.id = window.sessionStorage.getItem('id')
   }