Commit 00be5eb0 authored by 杨梦雪's avatar 杨梦雪

111

parent 105c0cf6
......@@ -14,6 +14,7 @@ const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/
const phoneReg = /^1(3|4|5|6|7|8|9)\d{9}$/
export default {
//手机号验证
validatePhone: function (rule, value, callback) {
if (!phoneReg.test(value) || value.length !== 11) {
......@@ -48,7 +49,7 @@ export default {
},
// 邮箱验证
validateEmail: function (rule, value, callback) {
console.log(value,'ssss')
console.log(value, 'ssss')
if (!emailReg.test(value)) {
callback(new Error('邮箱格式错误!'))
} else {
......
......@@ -23,7 +23,7 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="性别" prop="gender" style="height: 73px;">
<el-form-item label="性别" prop="gender" style="height: 73px">
<el-radio-group
v-model="referForm.gender"
ref="gender"
......@@ -35,6 +35,17 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="年龄" prop="age">
<el-input
ref="age"
v-model="referForm.age"
placeholder="填写年龄"
size="small"
clearable
/>
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="身份证号" prop="id_card">
<el-input
ref="id_card"
......@@ -44,7 +55,7 @@
clearable
/>
</el-form-item>
</el-col>
</el-col> -->
<!-- <el-col :span="12">
<el-form-item label="出生日期" prop="birthday">
<el-row :gutter="20">
......@@ -666,6 +677,7 @@ export default {
referForm: {
name: null,
gender: null,
age: null,
id_card: null,
birthday: null,
jiguan_code: null,
......@@ -691,6 +703,7 @@ export default {
gender: [
{ required: true, message: "性别不能为空!", trigger: "change" },
],
id_card: [
{ required: true, message: "身份证号不能为空!", trigger: "blur" },
{ validator: validator.validateid_card, trigger: "blur" },
......@@ -759,9 +772,9 @@ export default {
gender: [
{ required: true, message: "性别不能为空!", trigger: "change" },
],
id_card: [
{ required: true, message: "身份证号不能为空!", trigger: "blur" },
{ validator: validator.validateid_card, trigger: "blur" },
age: [
{ required: true, message: "年龄不能为空!", trigger: "blur" },
{ validator: validator.validateNumber, trigger: "blur" },
],
jiguan_code: [
......
......@@ -12,11 +12,11 @@
// export const SERVER_WS_URL = 'wss://api1.testgate.cn' // websocket
// 正式
// export const SERVER_URL = "https://api.campcenter.cn/"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://api.campcenter.cn/"; //开发环境
// export const SERVER_WS_URL = "wss://api.campcenter.cn"; // websocket
export const SERVER_URL = "https://api.campcenter.cn/"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "https://api.campcenter.cn/"; //开发环境
export const SERVER_WS_URL = "wss://api.campcenter.cn"; // websocket
// 测试
export const SERVER_URL = "https://ying-test.campcenter.cn"; // 正式环境
export const DEVELOPMENT_SERVER_URL = "https://ying-test.campcenter.cn/"; //开发环境
export const SERVER_WS_URL = "wss://ying-test.campcenter.cn"; // websocket
// export const SERVER_URL = "https://ying-test.campcenter.cn"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://ying-test.campcenter.cn/"; //开发环境
// export const SERVER_WS_URL = "wss://ying-test.campcenter.cn"; // websocket
<template>
<div class="container">
<div class="flex title_Login">
<div class="title" style="width: 30%" @click="toCodeLogin">
<div :class="changeLogin == 2 ? 'change_login' : ''">验证码登录</div>
<div class="title_Login">
<div v-if="changeLogin == 1">
<div class="title" @click="toCodeLogin">
<div :class="changeLogin == 2 ? 'change_login' : ''">验证码登录</div>
</div>
<div class="title" @click="toLogin">
<div :class="changeLogin == 1 ? 'change_login' : ''">
账号密码登录
</div>
</div>
</div>
<div class="title" style="width: 35%" @click="toLogin">
<div :class="changeLogin == 1 ? 'change_codelogin' : ''">
账号密码登录
<div v-else-if="changeLogin == 2">
<div class="title" @click="toLogin">
<div :class="changeLogin == 1 ? 'change_login' : ''">
账号密码登录
</div>
</div>
<div class="title" @click="toCodeLogin">
<div :class="changeLogin == 2 ? 'change_login' : ''">验证码登录</div>
</div>
</div>
</div>
<div>
<el-form
......@@ -84,7 +96,7 @@
<el-form-item>
<el-button @click="submitForm()">登 录</el-button>
</el-form-item>
<div class="box">
<div v-if="changeLogin == 1" class="box">
<div>
<div class="fr" @click="register()">还没有账号?立即注册</div>
<div class="fl" @click="forgetPwd()">忘记密码?</div>
......@@ -176,7 +188,7 @@ export default {
},
changeLogin: 2,
};
},
},
created() {
this.$emit("getStatus", false);
const code = this.$store.state.indexIdentity;
......@@ -310,26 +322,22 @@ export default {
margin-top: 0;
overflow: hidden;
.title_Login {
justify-content: space-between;
position: relative;
margin: 19px 0 0 0;
text-align: center;
.title {
height: 20px;
font-size: 22px;
font-size: 16px;
font-weight: 500;
color: var(--color);
line-height: 20px;
text-align: right;
}
.change_login {
width: 100%;
font-size: 19px;
margin-top: 8px;
border-bottom: 2px solid var(--color);
}
.change_codelogin {
width: 100%;
font-size: 17px;
margin-top: 8px;
border-bottom: 2px solid var(--color);
font-size: 22px;
margin-top: 32px;
color: black;
text-align: center;
}
}
......
......@@ -333,8 +333,8 @@ export default {
overflow: hidden;
.title {
margin: 19px 0 6px 0;
width: 132px;
// margin: 19px 0 6px 0;
// width: 132px;
height: 20px;
font-size: 22px;
font-weight: 500;
......@@ -342,12 +342,12 @@ export default {
line-height: 20px;
}
.line {
width: 103px;
height: 3px;
background: var(--color);
border-radius: 2px;
}
// .line {
// width: 103px;
// height: 3px;
// background: var(--color);
// border-radius: 2px;
// }
::v-deep .el-form {
margin-top: 60px;
......
......@@ -319,21 +319,22 @@ export default {
overflow: hidden;
.title {
margin: 19px 0 6px 0;
width: 132px;
// margin: 19px 0 6px 0;
// width: 132px;
height: 20px;
font-size: 22px;
font-weight: 500;
color: var(--color);
line-height: 20px;
text-align: center;
}
.line {
width: 83px;
height: 3px;
background: var(--color);
border-radius: 2px;
}
// .line {
// width: 83px;
// height: 3px;
// background: var(--color);
// border-radius: 2px;
// }
::v-deep .el-form {
margin-top: 60px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment