|
@@ -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>
|