|
@@ -1,8 +1,6 @@
|
|
|
<template>
|
|
|
<div class="visitor-login-page">
|
|
|
- <div class="page-head">
|
|
|
- <img class="head-icon" src="@/assets/images/login/login-return.png" @click="router.go(-1)" alt="404">
|
|
|
- </div>
|
|
|
+ <HeadComponent ref="childRef" :headinfo="headinfo"/>
|
|
|
<div class="page-content">
|
|
|
<div class="content-background">
|
|
|
<div class="content-left">
|
|
@@ -24,7 +22,7 @@
|
|
|
</template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <p class="form-box-text">
|
|
|
+ <p class="form-box-text" v-show="needRegister">
|
|
|
未检测到该手机号 请先注册
|
|
|
</p>
|
|
|
<div style="display: flex;justify-content: center">
|
|
@@ -186,6 +184,9 @@ import { setToken } from '@/utils/auth'
|
|
|
const loading = ref(false)
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
+import HeadComponent from '@/views/xjc-integratedmachine/components/head_component.vue';
|
|
|
+import {handleThemeStyle} from "@/utils/theme.js";
|
|
|
+import useSettingsStore from "@/store/modules/settings.js";
|
|
|
const {proxy} = getCurrentInstance()
|
|
|
const {rank, gk_province,sys_user_sex,register_province} = proxy.useDict('rank', 'gk_province','sys_user_sex','register_province')
|
|
|
const params = route.query
|
|
@@ -193,7 +194,7 @@ const params = route.query
|
|
|
|
|
|
const step = ref(1)
|
|
|
const seconds = ref(60)
|
|
|
-
|
|
|
+const needRegister = ref(false)
|
|
|
|
|
|
|
|
|
const loginForm = ref({
|
|
@@ -210,6 +211,11 @@ const loginForm = ref({
|
|
|
checkCodeText:'',
|
|
|
})
|
|
|
|
|
|
+const headinfo = ref({
|
|
|
+ backUrl:'/xjc-integratedmachine/login/login_index',
|
|
|
+ isLogin:true,
|
|
|
+})
|
|
|
+
|
|
|
const loginStepOneRules = {
|
|
|
userName: [{required: true, trigger: "blur", message: "请输入您的手机号"}]
|
|
|
}
|
|
@@ -235,11 +241,14 @@ function phoneLogin() {
|
|
|
getUserInfo(loginForm.value.userName).then(resp => {
|
|
|
if (resp.sysUser == null) {
|
|
|
//没有此人,需要注册
|
|
|
+ needRegister
|
|
|
step.value = 2
|
|
|
} else {
|
|
|
step.value = 4
|
|
|
}
|
|
|
})
|
|
|
+ //清空数据
|
|
|
+ clearFrom()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -248,7 +257,6 @@ function getCheckCode() {
|
|
|
sendCheckCode(loginForm.value).then(resp => {
|
|
|
console.log("一体机注册,验证码:", resp.checkCode)
|
|
|
loginForm.value.checkCodeText = resp.checkCode
|
|
|
-
|
|
|
//开始倒计数
|
|
|
secondsBegin()
|
|
|
})
|
|
@@ -272,6 +280,8 @@ function validCheckCode() {
|
|
|
step.value = 3
|
|
|
}
|
|
|
})
|
|
|
+ //清空数据
|
|
|
+ clearFrom()
|
|
|
}
|
|
|
})
|
|
|
|
|
@@ -282,7 +292,17 @@ function chooseArea(val) {
|
|
|
loginForm.value.areaName = loginForm.value.areaItem.label
|
|
|
console.log("loginForm.value",loginForm.value)
|
|
|
}
|
|
|
-
|
|
|
+function clearFrom (){
|
|
|
+ //清空数据
|
|
|
+ loginForm.value.checkCode = '';
|
|
|
+ loginForm.value.areaName = null;
|
|
|
+ loginForm.value.areaId = null;
|
|
|
+ loginForm.value.userName = '';
|
|
|
+ loginForm.value.sex = null;
|
|
|
+ loginForm.value.areaItem = null;
|
|
|
+ loginForm.value.reppassword = '';
|
|
|
+ loginForm.value.password = '';
|
|
|
+}
|
|
|
|
|
|
function registHandler() {
|
|
|
proxy.$refs.loginStepThreeRef.validate(valid => {
|
|
@@ -293,6 +313,7 @@ function registHandler() {
|
|
|
}else{
|
|
|
regist(loginForm.value).then(resp =>{
|
|
|
proxy.$modal.msgSuccess("注册成功")
|
|
|
+ clearFrom()
|
|
|
//跳转到主页
|
|
|
router.push({
|
|
|
path : '/xjc_login',
|
|
@@ -320,6 +341,8 @@ function visitor_login(){
|
|
|
router.push({
|
|
|
path: params.modulePath
|
|
|
})
|
|
|
+ //清空数据
|
|
|
+ clearFrom()
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -332,6 +355,9 @@ function jumpReturn(path) {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+onMounted(() => {
|
|
|
+ clearFrom()
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|