unknown 3 jaren geleden
bovenliggende
commit
89bc4a4872
1 gewijzigde bestanden met toevoegingen van 65 en 41 verwijderingen
  1. 65 41
      src/containers/register/register.vue

+ 65 - 41
src/containers/register/register.vue

@@ -7,12 +7,37 @@
   <div class="main">
     <navbar :user="user"></navbar>
     <div class="main-reg">
-
       <form ref="regForm" style="margin: 50px auto;">
         <!-- active0 -->
-        <ul class="fhlist">
+        <ul class="fhlist" style="width: 600px;margin:0 auto">
           <li class="mt10">
-            <span class="title"><em class="fvx">*</em>证件姓名</span>
+            <span class="title">
+              <em class="fvx">*</em>手机号</span>
+
+            <input type="text" name="phone" v-model="phone" class="ui-ipt iptform" :disabled="!!count" placeholder="输入手机">
+
+            <span class="formver ng-scope" v-if="phone && phone.length!=11">
+              <span class="p-ico ico-formver"></span>
+              <span class="p-ico ico-worm"></span>请输入合法手机
+            </span>
+          </li>
+
+          <li class="mt10">
+            <span class="title"><em class="fvx">*</em>校验码</span>
+            <input type="text" name="code" v-model="code" class="ui-ipt iptform2" placeholder="输入校验码">
+
+            <el-button class="auth-code" type="primary" v-if="phone.length!=11" disabled>校验码</el-button>
+            <el-button class="auth-code" type="primary" v-else-if="!count" @click="getCode()">校验码</el-button>
+            <el-button class="auth-code" type="primary" disabled v-else>{{count}} s</el-button>
+
+            <!-- <span class="formver ng-scope" v-if="phone.length==11 && code.length<4">
+                    <span class="p-ico ico-formver"></span>
+                    <span class="p-ico ico-worm"></span>请输入校验码
+                  </span> -->
+          </li>
+
+          <li class="mt10">
+            <span class="title"><em class="fvx">*</em>姓名</span>
             <input type="text" name="name" v-model="name" class="ui-ipt iptform" placeholder="输入真实姓名" clearable>
           </li>
 
@@ -27,29 +52,25 @@
           </li>
 
           <li class="mt10">
-            <span class="title">
-              <em class="fvx">*</em>手机号</span>
-
-            <input type="text" name="phone" v-model="phone" class="ui-ipt iptform" :disabled="!!count" placeholder="输入手机" >
-
-            <span class="formver ng-scope" v-if="phone && phone.length!=11">
-              <span class="p-ico ico-formver"></span>
-              <span class="p-ico ico-worm"></span>请输入合法手机
-            </span>
-
-            <el-button class="auth-code" type="primary" v-else-if="!count"  @click="getCode()">短信校验码</el-button>
-            <el-button class="auth-code" type="primary" disabled v-else>{{count}} s</el-button>
+            <span class="title"><em class="fvx">*</em>学历</span>
+            <input type="text" name="education" v-model="education" class="ui-ipt iptform" placeholder="输入学历" clearable>
           </li>
 
+
           <li class="mt10">
-            <span class="title"><em class="fvx">*</em>校验码</span>
-            <input type="text" name="code" v-model="code" class="ui-ipt iptform" placeholder="输入校验码">
-            <span class="formver ng-scope" v-if="phone.length==11 && code.length<4">
-              <span class="p-ico ico-formver"></span>
-              <span class="p-ico ico-worm"></span>请输入校验码
-            </span>
+            <span class="title"><em class="fvx">*</em>工作单位</span>
+            <input type="text" name="company" v-model="company" class="ui-ipt iptform" placeholder="输入工作单位" clearable>
           </li>
 
+
+          <!--          <li class="mt10">
+                  <span class="title"><em class="fvx">*</em>证书编号</span>
+                  <input type="text" name="rzCode" v-model="rzCode" class="ui-ipt iptform" placeholder="输入证书编号" clearable>
+                </li> -->
+
+
+
+
           <li class="mb5">
             <span class="title">
               <em class="fvx">*</em>账户密码</span>
@@ -90,7 +111,7 @@
 
           <li class="m-t-20">
             <span class="title">&nbsp;</span>
-            <input class="ui-btn btn-r" type="button" value="提 交" :disabled="!cansubmit()"  @click="submitData()" >
+            <input class="ui-btn btn-r" type="button" value="提 交" :disabled="!cansubmit()" @click="submitData()">
           </li>
         </ul>
       </form>
@@ -99,9 +120,10 @@
   </div>
 </template>
 <script>
-
-import data from "@/components/data/data.js";
-  import { httpServer } from "@/components/httpServer/httpServer.js";
+  import data from "@/components/data/data.js";
+  import {
+    httpServer
+  } from "@/components/httpServer/httpServer.js";
   import navbar from "@/components/nav/navbar.vue";
   import md5 from 'js-md5'
   export default {
@@ -113,18 +135,18 @@ import data from "@/components/data/data.js";
         user: {
           nickname: ''
         },
-        count:0,
+        count: 0,
         name: '',
         passwordLevel: 'sick',
         password: '',
 
         confirmPassword: '',
         phone: '',
-        code:"",
+        code: "",
         err: '',
         cardId: '',
         timer: false,
-        rules: data.rulesData( this.validatePass )
+        rules: data.rulesData(this.validatePass)
       };
     },
     watch: {
@@ -197,30 +219,32 @@ import data from "@/components/data/data.js";
         if (!this.checkPhone()) return;
         let phone = this.phone
 
-        httpServer("Auth.getCode", {phone}).then(res => {
-          if( res.code == 200){
+        httpServer("Auth.getCode", {
+          phone
+        }).then(res => {
+          if (res.code == 200) {
             this.$message.successMsg("发送成功", 1)
             this.startTimer()
           }
         })
       },
-      startTimer(){
+      startTimer() {
         const TIME_COUNT = 60; //更改倒计时时间
-        if( this.timer) clearInterval( this.timer );
+        if (this.timer) clearInterval(this.timer);
         this.count = TIME_COUNT;
         this.timer = setInterval(() => {
-            if (this.count > 0 ) {
-              this.count--;
-            } else {
-              clearInterval(this.timer); // 清除定时器
-              this.timer = null;
-              this.count = 0;
-            }
-          }, 1000)
+          if (this.count > 0) {
+            this.count--;
+          } else {
+            clearInterval(this.timer); // 清除定时器
+            this.timer = null;
+            this.count = 0;
+          }
+        }, 1000)
       },
       cansubmit() {
         if (this.isPhoneErr()) return false;
-        if (this.cardId.length!=18) return false;
+        if (this.cardId.length != 18) return false;
         if (!this.name) return false;
         if (!this.password || this.password != this.confirmPassword) return false;
         if (this.password.length < 6) return false;