Browse Source

CRM_12.9 bug修复

hbchen 1 year ago
parent
commit
cdc26e63fe

+ 11 - 0
src/utils/constant.js

@@ -0,0 +1,11 @@
+// 电话区号
+export const TEL_CODE_ARR=[
+  { value: '86', label: '+86' },
+  { value: '852', label: "+852" },
+  { value: '886', label: '+886' },
+  { value: '1', label: '+1' },
+  { value: '65', label: '+65' },
+  { value: '62', label: '+62' },
+  { value:'081',label: '+081' },
+  { value:'44',label: '+44' }
+]

+ 3 - 13
src/views/verification/bindPhoneNo.vue

@@ -4,6 +4,7 @@ import {ElMessage,ElMessageBox} from 'element-plus'
 import { useRouter } from 'vue-router';
 import {CaretBottom} from '@element-plus/icons-vue'
 import {smsCodeSend,bindMobile,modifyMobile} from '@/api/auth.js'
+import { TEL_CODE_ARR } from '../../utils/constant';
 
   const router = useRouter()
 
@@ -15,17 +16,6 @@ import {smsCodeSend,bindMobile,modifyMobile} from '@/api/auth.js'
   
   const userInfo = localStorage.getItem('user_info')?JSON.parse(localStorage.getItem('user_info')):{}
 
-  const telCodeArr=[
-    { value: '86', label: '+86' },
-    { value: '852', label: "+852" },
-    { value: '886', label: '+886' },
-    { value: '1', label: '+1' },
-    { value: '65', label: '+65' },
-    { value: '62', label: '+62' },
-    { value:'081',label: '+081' },
-    { value:'44',label: '+44' }
-  ]
-
   const bindPhone=reactive({
     form:{
       newPhoneNo:'',
@@ -162,7 +152,7 @@ import {smsCodeSend,bindMobile,modifyMobile} from '@/api/auth.js'
           <el-form-item prop="newPhoneNo" ref="newPhoneNoRef" size="large">
             <div class="phone-item">
               <el-select v-model="bindPhone.form.newPhoneNoPre" size="large" style="max-width: 90px;margin-right: 10px;" placeholder="Please select">
-                <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
               </el-select>
               <el-input v-model.trim="bindPhone.form.newPhoneNo" size="large" style="flex-grow: 1;" placeholder="Please enter your phone number">
                 <template #suffix>
@@ -189,7 +179,7 @@ import {smsCodeSend,bindMobile,modifyMobile} from '@/api/auth.js'
               <span style="margin-right: 10px;">Area Code</span>
               <el-select v-model="bindPhone.form.newPhoneNoPre" :suffix-icon="CaretBottom"
               style="max-width: 60px;" placeholder="Please select" size="large">
-                <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
               </el-select>
             </template>
               <el-input v-model.trim="bindPhone.form.newPhoneNo" size="large" style="flex-grow: 1;" placeholder="Please enter your phone number">

+ 20 - 29
src/views/verification/login.vue

@@ -1,13 +1,14 @@
 <script setup>
 import {ref,reactive} from 'vue'
 import {ElMessageBox,ElMessage} from 'element-plus'
+import md5 from 'md5';
 import { useRouter } from 'vue-router';
 import {CaretBottom} from '@element-plus/icons-vue'
 import {loginApi,registerApi,emailCodeSend} from '@/api/auth.js'
 import { passwordDigitValidator } from './utils/validators';
 // passwordDigitValidator-密码6位
+import { TEL_CODE_ARR } from '../../utils/constant';
 
-import md5 from 'md5';
 
   const router = useRouter()
   const loginFormRef=ref(null)
@@ -22,16 +23,6 @@ import md5 from 'md5';
     phonePre:'86',
     password:'',
   })
-  const telCodeArr=[
-    { value: '86', label: '+86' },
-    { value: '852', label: "+852" },
-    { value: '886', label: '+886' },
-    { value: '1', label: '+1' },
-    { value: '65', label: '+65' },
-    { value: '62', label: '+62' },
-    { value:'081',label: '+081' },
-    { value:'44',label: '+44' }
-  ]
 
   // 隐私政策是否阅读
   const hasChecked=ref(false)
@@ -62,10 +53,10 @@ import md5 from 'md5';
     }
     refTemp.validate(valid =>{
       if(valid){
-        if(!hasChecked.value){
-          ElMessage.warning('Please check the Privacy policy')
-          return
-        }
+        // if(!hasChecked.value){
+        //   ElMessage.warning('Please check the Privacy policy')
+        //   return
+        // }
         let params={
           CountryCode:loginForm.phonePre,
           Account:loginType.value==1?loginForm.email:loginForm.phone,
@@ -192,10 +183,10 @@ import md5 from 'md5';
           step.value=2
           return
         }
-        if(!hasChecked.value){
-          ElMessage.warning('Please check the Privacy policy')
-          return
-        }
+        // if(!hasChecked.value){
+        //   ElMessage.warning('Please check the Privacy policy')
+        //   return
+        // }
         let params={
           CompanyName:registerForm.companyName,
           Name:registerForm.userName,
@@ -248,14 +239,14 @@ import md5 from 'md5';
               <el-form-item prop="phone" v-else >
                 <div class="phone-item">
                   <el-select v-model="loginForm.phonePre" style="max-width: 90px;margin-right: 10px;" placeholder="Please select" size="large">
-                    <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                    <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
                   </el-select>
                   <el-input v-model.trim="loginForm.phone" style="flex-grow: 1;" placeholder="Please enter your phone number" size="large">
                   </el-input>
                 </div>
               </el-form-item>
               <el-form-item prop="password" style="width: 360px;">
-                <el-input v-model="loginForm.password" size="large" type="password" placeholder="Please enter at least 6 passwords"></el-input>
+                <el-input v-model="loginForm.password" size="large" type="password" placeholder="Please enter a password"></el-input>
               </el-form-item>
             </el-form>
             <div class="register-message-row">
@@ -267,10 +258,10 @@ import md5 from 'md5';
               </div>
             </div>
             <el-button class="submit-button" type="primary" size="large" @click="login">Log in now</el-button>
-            <div class="privacy-policy">
+            <!-- <div class="privacy-policy">
               <el-checkbox v-model="hasChecked" label="I have read and agree" style="color:#333333"></el-checkbox>
               <span @click="privacyPolicy" class="policy">the Horizon Insights Privacy Policy</span>
-            </div>
+            </div> -->
             <div class="login-hint">For technical assistance, please contact stephanie@hzinsights.com</div>
           </div>
         </div>
@@ -304,13 +295,13 @@ import md5 from 'md5';
                 <span style="margin-right: 10px;">Area Code</span>
                 <el-select v-model="loginForm.phonePre" :suffix-icon="CaretBottom"
                 style="max-width: 55px;" placeholder="Please select" size="large">
-                  <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                  <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
                 </el-select>
               </template>
               <el-input v-model.trim="loginForm.phone" style="flex-grow: 1;" placeholder="Please enter your phone number" size="large"></el-input>
             </el-form-item>
             <el-form-item prop="password" label="Password" size="large">
-              <el-input v-model="loginForm.password" size="large"  type="password" placeholder="Please enter at least 6 passwords"></el-input>
+              <el-input v-model="loginForm.password" size="large"  type="password" placeholder="Please enter a password"></el-input>
             </el-form-item>
           </el-form>
           <div class="mobile-login-type-change">
@@ -318,10 +309,10 @@ import md5 from 'md5';
             <span @click="psdMissingPageGo" style="color:#1856A7">Forgot your password?</span>
           </div>
           <el-button type="primary" class="submit-button" @click="login" size="large">Log in now</el-button>
-          <div class="privacy-policy">
+          <!-- <div class="privacy-policy">
             <el-checkbox v-model="hasChecked" label="I have read and agree"></el-checkbox>
             <span @click="privacyPolicy" class="policy">the Horizon Insights Privacy Policy</span>
-          </div>
+          </div> -->
           <div class="mobile-login-hint">For technical assistance, please contact stephanie@hzinsights.com</div>
         </div>
         <!-- 注册 -->
@@ -355,10 +346,10 @@ import md5 from 'md5';
           </el-form>
           <el-button type="primary" class="submit-button" @click="register" size="large" v-if="step==1">Next</el-button>
           <el-button type="primary" class="submit-button" size="large" v-if="step==2" @click="register">Submit</el-button>
-          <div class="privacy-policy" v-if="step==2">
+          <!-- <div class="privacy-policy" v-if="step==2">
             <el-checkbox v-model="hasChecked" label="I have read and agree" style="color:#333333" ></el-checkbox>
             <span @click="privacyPolicy" class="policy">the Horizon Insights Privacy Policy</span>
-          </div>
+          </div> -->
           <div class="mobile-login-hint">For technical assistance, please contact stephanie@hzinsights.com</div>
         </div>
       </div>

+ 4 - 13
src/views/verification/passwordMissing.vue

@@ -6,7 +6,7 @@ import {CaretBottom} from '@element-plus/icons-vue'
 import {smsCodeSend,emailCodeSend,psdMissingApi} from '@/api/auth.js'
 import md5 from 'md5';
 import { passwordDigitValidator } from './utils/validators';
-
+import { TEL_CODE_ARR } from '../../utils/constant';
 
   const router = useRouter()
 
@@ -15,16 +15,7 @@ import { passwordDigitValidator } from './utils/validators';
   const isPhone=()=>{
     return !(window.innerWidth>768)
   }
-  const telCodeArr=[
-    { value: '86', label: '+86' },
-    { value: '852', label: "+852" },
-    { value: '886', label: '+886' },
-    { value: '1', label: '+1' },
-    { value: '65', label: '+65' },
-    { value: '62', label: '+62' },
-    { value:'081',label: '+081' },
-    { value:'44',label: '+44' }
-  ]
+
   const psdMissing=reactive({
     form:{
       email:'',
@@ -199,7 +190,7 @@ const changeLoginType=(type)=>{
           <el-form-item prop="phone" v-if="loginType==2">
             <div class="phone-item">
               <el-select v-model="psdMissing.form.phonePre" size="large" style="max-width: 90px;margin-right: 10px;" placeholder="Please select">
-                <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
               </el-select>
               <el-input v-model.trim="psdMissing.form.phone" size="large" style="flex-grow: 1;height: 40px;" placeholder="Please enter your phone number">
                 <template #suffix>
@@ -237,7 +228,7 @@ const changeLoginType=(type)=>{
               <span style="margin-right: 10px;">Area Code</span>
               <el-select v-model="psdMissing.form.phonePre" :suffix-icon="CaretBottom"
               style="max-width: 55px;" placeholder="Please select" size="large">
-                <el-option :label="item.label" :value="item.value" v-for="item in telCodeArr" />
+                <el-option :label="item.label" :value="item.value" v-for="item in TEL_CODE_ARR" />
               </el-select>
             </template>
             <el-input v-model.trim="psdMissing.form.phone" size="large" style="flex-grow: 1;height: 40px;" placeholder="Please enter your phone number">

+ 7 - 7
src/views/verification/register.vue

@@ -10,7 +10,7 @@ import { passwordDigitValidator } from './utils/validators';
   const router = useRouter()
 
   const registerRef = ref(null)
-  const phoneRef = ref(null)
+  
   // 隐私政策是否阅读
   const hasChecked=ref(false)
   const register=reactive({
@@ -84,10 +84,10 @@ import { passwordDigitValidator } from './utils/validators';
   const registerSubmit=()=>{
     registerRef.value.validate(valid=>{
       if(valid){
-        if(!hasChecked.value){
-          ElMessage.warning('Please check the Privacy policy')
-          return
-        }
+        // if(!hasChecked.value){
+        //   ElMessage.warning('Please check the Privacy policy')
+        //   return
+        // }
         let params={
           CompanyName:register.form.companyName,
           Name:register.form.userName,
@@ -163,10 +163,10 @@ import { passwordDigitValidator } from './utils/validators';
         </el-form>
         <el-button type="primary" @click="registerSubmit" class="register-button" size="large">Submit</el-button>
         <div class="login-row">Existing account <span @click="loginPageGo">Log in instead</span></div>
-        <div class="privacy-policy">
+        <!-- <div class="privacy-policy">
           <el-checkbox v-model="hasChecked" label="I have read and agree" style="color:#333333"></el-checkbox>
           <span @click="privacyPolicy" class="policy">the Horizon Insights Privacy Policy</span>
-        </div>
+        </div> -->
         <div class="question-hint">For technical assistance, please contact stephanie@hzinsights.com</div>
       </div>
     </div>