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