Forráskód Böngészése

fix:修改国内电商C端登录校验异常提示

lazy 2 hete%!(EXTRA string=óta)
szülő
commit
56223336f5

+ 7 - 5
src/views/login/components/AmountCalculation.vue

@@ -78,15 +78,17 @@ export default {
 
       const res = this.ruleForm.amount * (1 - this.ruleForm.backRate / 100) * 5
 
-      if (res >= 0 && res <= 500000) {
+      const calcAmount = Math.floor(res)
+
+      if (calcAmount >= 0 && calcAmount <= 500000) {
         this.totalAmount = 500000
-      } else if (res > 500000 && res <= 1000000) {
+      } else if (calcAmount > 500000 && calcAmount <= 1000000) {
         this.totalAmount = 1000000
-      } else if (res > 1000000 && res <= 1500000) {
+      } else if (calcAmount > 1000000 && calcAmount <= 1500000) {
         this.totalAmount = 1500000
-      } else if (res > 1500000 && res <= 2000000) {
+      } else if (calcAmount > 1500000 && calcAmount <= 2000000) {
         this.totalAmount = 2000000
-      } else if (res > 2000000) {
+      } else if (calcAmount > 2000000) {
         this.totalAmount = 3000000
       }
 

+ 5 - 0
src/views/login/components/LoginContent.vue

@@ -177,6 +177,11 @@ export default {
       this.$refs.loginForm.resetFields()
     },
     handleLogin() {
+      if (this.showVerifyLogin) {
+        this.loginFormRules['password'][0].message = '请输入密码'
+      } else {
+        this.loginFormRules['password'][0].message = '请输入验证码'
+      }
       this.$refs.loginForm.validate(valid => {
         if (valid) {
           this.loading = true

+ 5 - 2
src/views/myAccount/components/PersonalInformation.vue

@@ -4,8 +4,8 @@
       <el-divider />
       <i class="iconfont" :class="item.icon" style="font-size: 26px; margin-left: 20px;" />
       <span style="margin-left: 20px;">{{ item.name }}</span>
-      <span v-if="!ruleForm.email" style="margin-left: 20px; color: #666666">{{ item.desc }}</span>
-      <span v-if="ruleForm.email" style="margin-left: 20px; color: #666666">{{ item.prompt }}</span>
+      <span v-if="!interfaceEmail" style="margin-left: 20px; color: #666666">{{ item.desc }}</span>
+      <span v-if="interfaceEmail" style="margin-left: 20px; color: #666666">{{ item.prompt }}</span>
     </div>
     <el-divider />
     <cy-dialog ref="phonebinding" title="手机绑定">
@@ -182,6 +182,7 @@ export default {
         email: '',
         emailCode: ''
       },
+      interfaceEmail: '',
       rules: {},
       phonebinding: 0,
       password: 0,
@@ -195,6 +196,7 @@ export default {
       handler(newV) {
         if (this.deatilsInfo && Object.keys(newV).length) {
           const { mobile, email } = JSON.parse(JSON.stringify(newV))
+          this.interfaceEmail = email
           this.ruleForm = {
             passwordMobile: mobile,
             emailMobile: mobile,
@@ -329,6 +331,7 @@ export default {
       emailBind(params).then(() => {
         this.$message.success('邮箱绑定成功')
         this.$refs.emailbinding.show = false
+        this.$router.go(0)
       })
     },
     passwordConsistency() {