Преглед на файлове

破玩意,接口乱七八糟的,等着吧

Va преди 7 години
родител
ревизия
ac89d72478
променени са 3 файла, в които са добавени 41 реда и са изтрити 26 реда
  1. 2 2
      index.html
  2. 5 5
      src/views/home/home.vue
  3. 34 19
      src/views/home/login.vue

+ 2 - 2
index.html

@@ -4,9 +4,9 @@
     <meta charset="utf-8">
     <title>FX66</title>
     <!-- <link rel="stylesheet" href="//at.alicdn.com/t/font_407855_jeeqd33yfnefjemi.css"> -->
-    <link rel="stylesheet" href="//at.alicdn.com/t/font_438855_ofee4hcmy90jxlxr.css">
+    <link rel="stylesheet" href="//at.alicdn.com/t/font_407855_l3g3bgth88ttvs4i.css">
     <link rel="stylesheet" type="text/css" href="static/css/inputemail.css">
-    <link rel="stylesheet" href="//at.alicdn.com/t/font_407855_vlnrdmhjgj0s5rk9.css"> 
+    <link rel="stylesheet" href="//at.alicdn.com/t/font_438855_8lesnfpjz35idx6r.css"> 
   </head>
   <body>
     <div id="app"></div>

+ 5 - 5
src/views/home/home.vue

@@ -131,7 +131,7 @@ export default{
           {
             name:"USDT",
             coinname:"USDT",
-            coin:"icon-USDT3",
+            coin:"icon-meiyuan",
             state:0,
           },
           {
@@ -168,7 +168,7 @@ export default{
           {
             name:"零币",
             coinname:"ZEC",
-            coin:"icon-ZEC3",
+            coin:"icon-ZEC1",
             state:0,
           },
           /*{
@@ -218,10 +218,10 @@ export default{
   mounted(){
     this.$nextTick(()=>{
       this.windowScroll();
-      this.getHomeMarket();
-      this.requtime=setInterval(()=>{
+      //this.getHomeMarket();
+      /*this.requtime=setInterval(()=>{
         this.getHomeMarket();
-      },5000);
+      },5000);*/
     })
   },
   methods:{

+ 34 - 19
src/views/home/login.vue

@@ -80,15 +80,15 @@
           </span>
           <input class="input" v-model="loginParam.username" type="text" :placeholder="tipWord">
         </div>
-        <!-- <div class="login-line">
+        <div class="login-line">
           <span><i class="iconfont icon-mima"></i></span>
           <input class="input" v-model="loginParam.password" type="password" placeholder="请输入您的密码">
-        </div> -->
-        <div class="yanz-line">
-          <input class="input" type="text" v-model="loginParam.password" placeholder="请输入验证码">
-          <button v-if="codestate===0" @click="sendLoginCode()">发送验证码</button>
-          <button :class="{bgGrey:codestate===1}" v-if="codestate===1">已发送{{secondNum}}</button>
         </div>
+       <!--  <div class="yanz-line">
+         <input class="input" type="text" v-model="loginParam.password" placeholder="请输入验证码">
+         <button v-if="codestate===0" @click="sendLoginCode()">发送验证码</button>
+         <button :class="{bgGrey:codestate===1}" v-if="codestate===1">已发送{{secondNum}}</button>
+       </div> -->
         <div class="tip-line">
           <span class="cursor" @click="toForgetPassWord()">忘记密码?</span>
           <div class="switch-box">
@@ -153,10 +153,10 @@
           <p class="warning" v-show="messageCodeisError">*短信验证码错误</p>
         </div>
         <div class="submit-line">
-          <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
+          <!-- <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
             <span v-if="codestate===0" @click="pwdSend()">发送邮件</span>
             <span v-if="codestate===1">已发送{{secondNum}}</span>
-          </el-button>
+          </el-button> -->
           <el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">修改密码</el-button>
         </div>
       </div>
@@ -176,11 +176,11 @@
           </div>                
         </div>
         <div class="submit-line">
-          <el-button class="loginBtn cursor" @click="" v-if="operateType=='email'" :loading="codeLoad">
+          <el-button class="loginBtn cursor" @click="" :loading="codeLoad">
             <span v-if="codestate===0" @click="pwdSend()">发送邮件</span>
             <span v-if="codestate===1">已发送{{secondNum}}</span>
           </el-button>
-          <el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">发送邮件</el-button>
+          <!-- <el-button class="loginBtn cursor" @click="reSetPwd" v-if="operateType=='mobile'" :loading="setLoad">发送邮件</el-button> -->
         </div>
       </div>
     </div>
@@ -284,9 +284,10 @@ export default{
         this.setParam[x]="";
       }    
     },
-    loginTab(val){    
+    loginTab(val){
+      console.log("val:"+val);
       this.area="86";
-      this.operateType="mobile";
+      //this.operateType="mobile";
       /*if(val!=2){
         this.operateType="mobile";
       }*/
@@ -300,7 +301,7 @@ export default{
           this.regParam[x]="";
         }
       }
-      if(val==2){
+      if(val===2||val===4){
         for(let x in this.setParam){
           this.setParam[x]="";
         }
@@ -327,22 +328,27 @@ export default{
     toForgetPassWord(){
       if(this.operateType=='mobile'){
         this.loginTab = 2;
+        this.operateType='mobile'
       }else if(this.operateType=='email'){
         this.loginTab = 4;
+        this.operateType='email'
       }
       
     },
     //正则表达式验证手机号码是否正确
     checkPhoneNumber(){
-      if(!(/^1[3|5|7|8][0-9]\d{4,8}$/.test(this.regParam.email))&&this.regParam.email!=''){
-        this.isError = true;
-        return false;
-      }else{
-        this.isError = false;
+      if(this.operateType == 'mobile'){
+        if(!(/^1[3|5|7|8][0-9]\d{4,8}$/.test(this.regParam.email))&&this.regParam.email!=''){
+          this.isError = true;
+          return false;
+        }else{
+          this.isError = false;
+        }
       }
     },
     //重置密码
     reSetPwd(){
+      console.log("this.operateType :"+this.operateType);
       if(this.setParam.resettoken==""){
         this.$notify({
           title: '提示',
@@ -405,6 +411,8 @@ export default{
     },
     //发送验证码
     pwdSend(){
+      //this.operateType = "email"
+      console.log("this.operateType :"+this.operateType);
       if(this.setParam.username==""){
         this.$notify({
           title: '提示',
@@ -583,7 +591,14 @@ export default{
         if(data.code==200){         
           this.gologin('reg');
           this.isRegisted = false;
-        }else if(data.code == 1001){  //code=1001 代表该邮箱已被注册
+          this.$notify({
+            title: '成功',
+            message: '注册成功!',
+            type: 'success',
+            duration:'1500'
+          })
+          this.loginTab = 1;
+        }else if(data.code == 1001&&this.operateType == 'email'){  //code=1001 代表该邮箱已被注册
           this.isRegisted = true;
         }
       })