瀏覽代碼

处理部分bug

Administrator 7 年之前
父節點
當前提交
6f97ba1f05

+ 56 - 0
assets/scss/mobileCommon.scss

@@ -120,3 +120,59 @@
     color:#8b8b8b;
   }
 }
+
+::-webkit-scrollbar {
+  width: 0;
+  height: 1px;
+}
+::-webkit-scrollbar-thumb {
+  border-radius: 5px;
+  -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
+  background: rgba(0, 0, 0, 0.2);
+}
+.passwd {
+  font-size: .14rem;
+  color: #a0a0a0;
+  margin: .2rem auto;
+  text-align: right;
+}
+.itemgreen{
+  color:#2d8cf0;
+}
+.listitem {
+  height: 1rem;
+  line-height: 1rem;
+  border-bottom: solid 1px #eee;
+  text-align: center;
+  &:first-child {
+    border-top: solid 1px #eee;
+  }
+}
+.mint-popup {
+  width: 100%;
+  height: 100%;
+  background-color: #fff;
+}
+.mint-popup .mint-button {
+  position: absolute;
+  width: 90%;
+  top: 50%;
+  left: 5%;
+  transform: translateY(-50%);
+}
+
+.mint-button .mint-button-text{
+  margin: 0;
+  font-weight: normal;
+}
+.login-btn{
+  margin-top:.9rem;
+  border-top:1px solid #bfbfbf;
+  text-align: center;
+  padding-top:.3rem;
+  p{
+    color:#a1a1a1;
+    font-size: .26rem;
+    margin-bottom:.4rem;
+  }
+}

+ 1 - 59
components/mobile/loginMobile.vue

@@ -6,7 +6,7 @@
   <div class="page-part">
     <mt-field placeholder="密码" v-model="login.password" type="password"></mt-field>
     <template>
-      <p class="pwd"><a href="/reset/forgetPasswordValidationAccount" class="rgba">忘记密码?</a></p>
+      <p class="passwd"><a href="/reset/forgetPasswordValidationAccount" class="rgba">忘记密码?</a></p>
     </template>
   </div>
   <template v-if="showCheckCode">
@@ -187,61 +187,3 @@
     }
   }
 </script>
-
-<style type="text/scss" lang="scss">
-  ::-webkit-scrollbar {
-    width: 0;
-    height: 1px;
-  }
-  ::-webkit-scrollbar-thumb {
-    border-radius: 5px;
-    -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
-    background: rgba(0, 0, 0, 0.2);
-  }
-  .pwd {
-    font-size: .14rem;
-    color: #a0a0a0;
-    margin: .2rem auto;
-    text-align: right;
-  }
-  .itemgreen{
-    color:#2d8cf0;
-  }
-  .listitem {
-    height: 1rem;
-    line-height: 1rem;
-    border-bottom: solid 1px #eee;
-    text-align: center;
-    &:first-child {
-      border-top: solid 1px #eee;
-    }
-  }
-  .mint-popup {
-    width: 100%;
-    height: 100%;
-    background-color: #fff;
-  }
-  .mint-popup .mint-button {
-    position: absolute;
-    width: 90%;
-    top: 50%;
-    left: 5%;
-    transform: translateY(-50%);
-  }
-
-  .mint-button .mint-button-text{
-    margin: 0;
-    font-weight: normal;
-  }
-.login-btn{
-  margin-top:.9rem;
-  border-top:1px solid #bfbfbf;
-  text-align: center;
-  padding-top:.3rem;
-  p{
-    color:#a1a1a1;
-    font-size: .26rem;
-    margin-bottom:.4rem;
-  }
-}
-</style>

+ 15 - 15
components/mobile/registerEnterprise/index.vue

@@ -40,13 +40,13 @@
                     @blur.native.capture="validateSpaceName"></mt-field>
         </div>
         <div class="page-part">
-          <mt-field placeholder="营业照号"
+          <mt-field placeholder="营业照号"
                     v-model="step2.businessCode"
                     :state="state.businessCode"
                     @blur.native.capture="validateBusinessCode"></mt-field>
         </div>
         <div class="page-part" v-if="!hasRegister">
-          <mt-field placeholder="管理员号码"
+          <mt-field placeholder="管理员姓名"
                     v-model="step2.vipName"
                     :state="state.vipName"
                     @blur.native.capture="validateVipName"></mt-field>
@@ -413,30 +413,30 @@
       // 企业注册
       sureRegister () {
         if (!this.hasRegister) {
-          if (!this.state.spaceName === 'success' &&
-            !this.state.businessCode === 'success' &&
-            !this.state.vipName === 'success' &&
-            !this.state.password === 'success' &&
-            !this.state.confirm === 'success' &&
-            !this.state.email === 'success') {
+          if (this.state.spaceName !== 'success' &&
+            this.state.businessCode !== 'success' &&
+            this.state.vipName !== 'success' &&
+            this.state.password !== 'success' &&
+            this.state.confirm !== 'success' &&
+            this.state.email !== 'success') {
             this.downToast('请确认填写部分是否有误')
           } else {
             this.sbmitRegister()
           }
         } else {
           if (!this.hasEmail) {
-            if (!this.state.spaceName === 'success' &&
-              !this.state.businessCode === 'success' &&
-              !this.state.password === 'success' &&
-              !this.state.email === 'success') {
+            if (this.state.spaceName !== 'success' &&
+              this.state.businessCode !== 'success' &&
+              this.state.password !== 'success' &&
+              this.state.email !== 'success') {
               this.downToast('请确认填写部分是否有误')
             } else {
               this.sbmitRegister()
             }
           } else {
-            if (!this.state.spaceName === 'success' &&
-              !this.state.businessCode === 'success' &&
-              !this.state.password === 'success') {
+            if (this.state.spaceName !== 'success' &&
+              this.state.businessCode !== 'success' &&
+              this.state.password !== 'success') {
               this.downToast('请确认填写部分是否有误')
             } else {
               this.sbmitRegister()

+ 16 - 10
components/mobile/registerPersonal/index.vue

@@ -14,6 +14,7 @@
       <div class="page-part">
         <mt-field :state="state.password"
                   placeholder="密码"
+                  :attr="{ maxlength: 20 }"
                   v-model="password"
                   @input.native="codePwd"
                   type="password"
@@ -104,12 +105,17 @@
       codePwd () {
         let reg1 = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z])(?=.*[A-Z]))|((?=.*[0-9])((?=.*[a-zA-Z]))(?=.*[^a-zA-Z0-9]))).*$/
         let reg2 = /^(?=.{8,20})(((?=.*[0-9])(?=.*[a-z]))|((?=.*[0-9])(?=.*[A-Z]))).*$/
-        if (reg1.test(this.password)) {
-          this.step = '强'
-        } else if (reg2.test(this.password)) {
-          this.step = '中'
+        let count = this.password.length
+        if (count >= 20) {
+          this.downToast('密码须为8-20字符的英文、数字混合')
         } else {
-          this.step = '弱'
+          if (reg1.test(this.password)) {
+            this.step = '强'
+          } else if (reg2.test(this.password)) {
+            this.step = '中'
+          } else {
+            this.step = '弱'
+          }
         }
       },
       // 验证密码格式
@@ -233,11 +239,11 @@
       },
       // 表单提交
       submit () {
-        if (!this.state.vipName === 'success' &&
-          !this.state.password === 'success' &&
-          !this.state.confirm === 'success' &&
-          !this.state.mobile === 'success' &&
-          !this.state.token === 'success') {
+        if (this.state.vipName !== 'success' &&
+          this.state.password !== 'success' &&
+          this.state.confirm !== 'success' &&
+          this.state.mobile !== 'success' &&
+          this.state.token !== 'success') {
           this.downToast('请确认填写部分是否有误')
         } else if (this.checked === false) {
           this.downToast('您对阅读条款未做勾选')