Selaa lähdekoodia

Merge branch 'master' of https://dev.33.cn/tenggouwa/agent

tenggouwa 7 vuotta sitten
vanhempi
commit
c98706c6a0
3 muutettua tiedostoa jossa 54 lisäystä ja 46 poistoa
  1. 3 1
      src/assets/js/common.js
  2. 4 0
      src/config/api-config.js
  3. 47 45
      src/views/home/login.vue

+ 3 - 1
src/assets/js/common.js

@@ -257,6 +257,7 @@ var sendEmail=function(that,params,success){
         type: 'success',
         duration:'2000'
       });
+      //that.gid = res.data.gid;
       that.codestate=1;
       that.secondNum=60;
       clearInterval(that.reltime);
@@ -352,7 +353,8 @@ var sublogion=function(_this,pageindex,params,success){
   //   }
   // },'POST');
 }
-var subloginup=function(_this,params,success){//注册
+//注册
+var subloginup=function(_this,params,success){
   ajax(_this,_this.extendApi.userLoginUp,params,function(data){
     if(typeof(success)==="function"){
       success(data);

+ 4 - 0
src/config/api-config.js

@@ -16,6 +16,10 @@ export default {
  *代理商接口
  *(新版)
  */
+    newRegist: apiUrl.baseNewUrl + '/broker/member/register', //注册
+
+    newLogin: apiUrl.baseNewUrl + '/broker/member/login',  //登录
+
     applyCountry: apiUrl.baseNewUrl+'/api/data/city',//获取省市接口
 
     applyToAgent: apiUrl.baseNewUrl+'/broker/member/apply',//申请成为经纪人

+ 47 - 45
src/views/home/login.vue

@@ -529,42 +529,43 @@ export default{
     },
     //注册按钮
     goreg(){
-      if(this.regParam.email==""){
-        this.$notify({
-          title: '提示',
-          message: this.tipWord,
-          type: 'warning',
-          duration:'1500'
-        })
-        return false;
-      };
-      if(this.regParam.code==""){
-        this.$notify({
-          title: '提示',
-          message: '验证码不能为空',
-          type: 'warning',
-          duration:'1500'
-        })
-        return false;
-      };
-      if(this.regParam.password==""){
-        this.$notify({
-          title: '提示',
-          message: '密码不能为空',
-          type: 'warning',
-          duration:'1500'
-        })
-        return false;
-      };
-      if(this.tipNeed==false){
-        this.$notify({
-          title: '提示',
-          message: '请阅读风险提示',
-          type: 'warning',
-          duration:'1500'
-        })
-        return false;
-      }
+      //验证输入
+        if(this.regParam.email==""){
+          this.$notify({
+            title: '提示',
+            message: this.tipWord,
+            type: 'warning',
+            duration:'1500'
+          })
+          return false;
+        };
+        if(this.regParam.code==""){
+          this.$notify({
+            title: '提示',
+            message: '验证码不能为空',
+            type: 'warning',
+            duration:'1500'
+          })
+          return false;
+        };
+        if(this.regParam.password==""){
+          this.$notify({
+            title: '提示',
+            message: '密码不能为空',
+            type: 'warning',
+            duration:'1500'
+          })
+          return false;
+        };
+        if(this.tipNeed==false){
+          this.$notify({
+            title: '提示',
+            message: '请阅读风险提示',
+            type: 'warning',
+            duration:'1500'
+          })
+          return false;
+        }
       let param={};
       if(this.operateType=="email"){
         param={
@@ -572,17 +573,19 @@ export default{
           'password':this.regParam.password,
           'code':this.regParam.code,
           'type':"email",
-          "checkmethod":"data",
+          'checkmethod':"data",
+          'platform':'fx66',
         };
       }
       else{
         param={
-          mobile:this.regParam.email,
-          password:this.regParam.password,
-          code:this.regParam.code,
-          checkmethod:"data",
-          type:"sms",
-          area:this.area,
+          'mobile':this.regParam.email,
+          'password':this.regParam.password,
+          'code':this.regParam.code,
+          'checkmethod':"data",
+          'type':"sms",
+          'area':this.area,
+          'platform':'fx66',
         };
       }
       this.regLoad=true;
@@ -590,7 +593,7 @@ export default{
         this.regLoad=false;
         if(data.code==200){         
           this.gologin('reg');
-          this.isRegisted = false;
+          this.isRegisted = false; 
           this.$notify({
             title: '成功',
             message: '注册成功!',
@@ -908,5 +911,4 @@ export default{
     }
   }
 }
-
 </style>