Commit 4485f594 authored by 杨梦雪's avatar 杨梦雪

111

parent b3b4562d
......@@ -6,6 +6,7 @@ const name = /^[a-zA-Z_0-9]*[a-zA-Z][a-zA-Z_0-9]*$/
const numberReg = /^\d+$|^\d+[.]?\d+$/
// 中文
const cnReg = /^[\u4e00-\u9fa5]+$/
// 邮箱
const emailReg = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})+$/
......@@ -97,4 +98,4 @@ export default {
},
}
}
......@@ -2,11 +2,11 @@
<div class="steps flex">
<!-- 1 -->
<div class="step flex">
<div :class="'cricle' + ' ' + (status >= 1 ? 'speed-bg-color' : '')">
<div :class="'cricle' + ' ' + (status >= 0? 'speed-bg-color' : '')">
<span class="num">1</span>
</div>
<div
:class="'step_title' + ' ' + (status >= 1 ? 'speed-text-color' : '')"
:class="'step_title' + ' ' + (status >= 0 ? 'speed-text-color' : '')"
>
确认报名须知
</div>
......@@ -18,12 +18,12 @@
<div class="step flex">
<div
class="cricle cc"
:class="'cricle' + ' ' + (status >= 2 ? 'speed-bg-color' : '')"
:class="'cricle' + ' ' + (status >= 1 ? 'speed-bg-color' : '')"
>
<span class="num">2</span>
</div>
<div
:class="'step_title' + ' ' + (status >= 2 ? 'speed-text-color' : '')"
:class="'step_title' + ' ' + (status >= 1? 'speed-text-color' : '')"
>
填写邀请码
</div>
......@@ -33,12 +33,12 @@
<div class="step flex">
<div
class="cricle cc"
:class="'cricle' + ' ' + (status >= 3 ? 'speed-bg-color' : '')"
:class="'cricle' + ' ' + (status >=2 ? 'speed-bg-color' : '')"
>
<span class="num">3</span>
</div>
<div
:class="'step_title' + ' ' + (status >= 3 ? 'speed-text-color' : '')"
:class="'step_title' + ' ' + (status >=2 ? 'speed-text-color' : '')"
>
填写报名资料
</div>
......@@ -48,13 +48,11 @@
<div class="step flex">
<div
class="cricle cc"
:class="'cricle' + ' ' + (status >= 4 ? 'speed-bg-color' : '')"
:class="'cricle' + ' ' + (status >=3 ? 'speed-bg-color' : '')"
>
<span class="num">4</span>
</div>
<div
:class="'step_title' + ' ' + (status >= 4? 'speed-text-color' : '')"
>
<div :class="'step_title' + ' ' + (status >=3? 'speed-text-color' : '')">
报名资料审核
</div>
<img src="../assets/img/signUp/left.png" alt="" />
......@@ -63,13 +61,11 @@
<div class="step flex">
<div
class="cricle cc"
:class="'cricle' + ' ' + (status >= 5 ? 'speed-bg-color' : '')"
:class="'cricle' + ' ' + (status >= 4 ? 'speed-bg-color' : '')"
>
<span class="num">5</span>
</div>
<div
:class="'step_title' + ' ' + (status >= 5 ? 'speed-text-color' : '')"
>
<div :class="'step_title' + ' ' + (status >= 4 ? 'speed-text-color' : '')">
缴费
</div>
</div>
......@@ -89,7 +85,7 @@ export default {
created() {},
watch: {
statusNum(val) {
// console.log(val)
console.log(val)
this.status = val;
},
},
......@@ -115,8 +111,9 @@ export default {
color: #ffff;
position: absolute;
z-index: 999;
top: 7px;
left: 10px;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}
.cricle {
position: relative;
......
......@@ -10,7 +10,7 @@
<div class="pay_code">
<div v-if="isShowqr">
<div class="pay_time">支付剩余时间<span>15分30秒</span></div>
<div>150</div>
<div>{{has_amount}}</div>
<div class="img_qr">
<div class="qrcode" ref="qrCodeUrl"></div>
</div>
......@@ -54,15 +54,18 @@ export default {
timeoutObj: null, //心跳心跳倒计时
serverTimeoutObj: null, //心跳倒计时
timeoutnum: null, //断开 重连倒计时
has_amount:""
};
},
created() {
this.token = window.localStorage.getItem("index-token");
this.has_amount = window.localStorage.getItem("has_amount");
},
methods: {
async confirm() {
console.log(SERVER_WS_URL)
let { data: res } = await getWxConfig({
exam_uuid: this.examuuid,
// exam_uuid: this.examuuid,
pay_type: 1,
});
console.log(res);
......@@ -121,10 +124,10 @@ export default {
if (!this.token || this.token == "") {
this.token = window.localStorage.getItem("index-token");
}
let token=this.token
const wssURL =
SERVER_WS_URL + "/city?token=" + this.token + "&channel=pc";
SERVER_WS_URL + "/order?token=" + token + "&channel=pc";
this.websocket = new WebSocket(wssURL);
// console.log(this.websocket)
// 连接发生错误的回调方法
this.websocket.onerror = this.websocketOnerror;
......@@ -206,7 +209,7 @@ export default {
//数据发送
let sendData = {
order_no: window.localStorage.getItem("order_no"),
exam_uuid: window.localStorage.getItem("exam_uuid"),
cam_id: window.localStorage.getItem("campsite_id"),
token: this.token,
};
this.websocket.send(JSON.stringify(sendData));
......@@ -306,17 +309,17 @@ export default {
// color: #ee7602;
// }
// }
// .img_qr {
// width: 140px;
// height: 140px;
// padding: 10px;
// border: 1px solid #000;
// margin: 0 auto;
// img {
// width: 120px;
// height: 120px;
// }
// }
.img_qr {
width: 140px;
height: 140px;
padding: 10px;
// border: 1px solid #000;
margin: 0 auto;
img {
width: 100%;
height: 120px;
}
}
// ::v-deep .el-dialog__body {
// padding: 0 !important;
// }
......
......@@ -59,7 +59,7 @@ export default {
window.localStorage.clear();
this.$store.state.token = "";
// 使用编程式导航跳转到登录页面
this.$router.replace({ name: "index-login" });
this.$router.replace({ name: "recruit" });
},
},
};
......
......@@ -45,7 +45,8 @@ export default {
console.log(res, "setSignShould");
if (res.data.code !== 200) return this.$message.error(res.data.message);
this.$message.success(res.data.message);
this.$router.push("/signUp/referInfo");
this.$router.push("/signUp/invitation");
});
},
},
......
......@@ -206,9 +206,13 @@ export default {
setInviteCode({ code: code }).then((res) => {
console.log(res, "code");
if (res.data.code !== 200) return this.$message.error(res.data.message);
if (res.data.code !== 200) {
return this.$message.error(res.data.message);
}
// this.status=res.data.status
this.$emit('getstatus',res.data.status.status)
this.$message.success(res.data.message);
this.$router.replace("/signUp/invitation");
this.$router.push("/signUp/referInfo");
});
},
},
......
......@@ -258,8 +258,7 @@
ref="imgUrl"
name="multipartFile"
list-type="picture-card"
:auto-upload="true"
:disabled="isUploading"
:disabled="isUploading || fileList.length >= 10"
action="#"
accept=".jpg,.jpeg,.png"
:limit="10"
......@@ -271,31 +270,24 @@
>
<i style="font-size: 44px" class="el-icon-circle-plus"> </i>
<!-- <div class="text">上传材料</div> -->
<!-- <div slot="file" slot-scope="{ file }" v-for="(item,idx) in fileList" :key="idx"> -->
<div v-for="(item,idx) in fileList" :key="idx">
<div slot="file" slot-scope="{ file }">
<!-- <div v-for="(item, idx) in fileList" :key="idx"> -->
<img
class="el-upload-list__item-thumbnail"
:src="item.url"
:src="file.url"
alt=""
/>
<span class="el-upload-list__item-actions">
<span
class="el-upload-list__item-preview"
@click="handlePictureCardPreview(item)"
@click="handlePictureCardPreview(file)"
>
<i class="el-icon-zoom-in"></i>
</span>
<!-- <span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleDownload(file)"
>
<i class="el-icon-download"></i>
</span> -->
<span
v-if="!disabled"
class="el-upload-list__item-delete"
@click="handleRemove(item)"
@click="handleRemove(file)"
>
<i class="el-icon-delete"></i>
</span>
......@@ -508,9 +500,11 @@ export default {
};
},
created() {
let signUpFile= window.localStorage.getItem('sign_up_file_'+window.localStorage.getItem('phone'));
console.log(JSON.parse(signUpFile))
if(signUpFile && JSON.parse(signUpFile).length>0){
let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("phone")
);
console.log(JSON.parse(signUpFile));
if (signUpFile && JSON.parse(signUpFile).length > 0) {
this.fileList = JSON.parse(signUpFile);
}
this.getAccount();
......@@ -526,16 +520,6 @@ export default {
}
}
this.selfInfo = val;
// 身份证号存在,根据身份证号自动识别男女
// if (this.selfInfo.id_card && this.selfInfo.id_card !== "") {
// if (this.selfInfo.id_card.slice(-2, -1) % 2 == 0) {
// this.selfInfo.sex = 1;
// this.sex = 1;
// } else {
// this.selfInfo.sex = 0;
// this.sex = 0;
// }
// }
if (val.birthday && val.birthday !== "") {
//出生日期
this.bdYear = val.birthday.slice(0, 4); //前4位取年
......@@ -598,6 +582,7 @@ export default {
this.jgProvinceCode.toString() + this.jiguan_city.toString();
// console.log(this.referForm.jiguan_code);
},
// 获取省份城市
getProAndCity() {
getProAndCity({}).then((res) => {
......@@ -619,8 +604,11 @@ export default {
}
if (type == 1) {
this.selectCityJiguan = selectCity;
this.jiguan_city = "";
} else {
this.selectCitySchool = selectCity;
this.referForm.school_city = "";
this.referForm.school = "";
}
},
......@@ -654,12 +642,17 @@ export default {
},
handlePictureCardPreview(file) {
console.log(file);
this.resultPicture = file.url;
this.dialogVisible = true;
},
// 文件上传中处理
handleUploadProgress(event, file, fileList) {
console.log(fileList);
this.isUploading = true;
if (this.fileList.lenge < 10) {
return this.$message.info("chaochushuliamng");
}
},
uploadSuccess(res, file) {
// console.log(res, "111");
......@@ -682,10 +675,10 @@ export default {
this.getOssConfigs(image, params.file);
},
async getOssConfigs(image, file) {
let obj={
url: '',
savefile: ''
}
let obj = {
url: "",
savefile: "",
};
await getAchievementOss({ image: image })
.then((res) => {
console.log(res, "开始上传图片");
......@@ -705,22 +698,24 @@ export default {
// console.log(formData);
upload(oss_url, formData)
.then((ress) => {
// console.log(ress);
if (ress.data.code == 200) {
console.log(ress, "上传返回数据");
this.resultPicture =
filename + "?t=" + Date.parse(new Date());
console.log(ress, "ress");
if (ress.data.code != 200) {
console.log(ress, "ress");
return this.$message.error(ress.data.message);
}
this.resultPicture = filename + "?t=" + Date.parse(new Date());
this.$forceUpdate();
this.$message.success("上传成功");
obj={
obj = {
url: ress.data.picture_path,
savefile: res.data.config.savefile
}
savefile: res.data.config.savefile,
};
this.fileList.push(obj);
window.localStorage.setItem('sign_up_file_'+window.localStorage.getItem('phone'), JSON.stringify(this.fileList));
} else {
this.$message.error(ress.data.message);
}
console.log(this.fileList, " this.fileList");
window.localStorage.setItem(
"sign_up_file_" + window.localStorage.getItem("phone"),
JSON.stringify(this.fileList)
);
})
.catch((err) => {
this.$message.error(err);
......@@ -733,18 +728,46 @@ export default {
console.log(err);
});
},
imgPreview() {
// console.log(11);
this.resultPicture = this.addBanner.bannerUrl;
this.dialogVisible = true;
},
//删除图片
handleRemove(file) {
// console.log(file);
// let odject=savefile
// delPic({object:odject}).then((res)=>{
let savefile = file.savefile;
delPic({ object: savefile }).then((res) => {
console.log(res, "delpic");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
// delete this.fileList[idx];
this.$confirm("此操作将永久删除该文件, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.fileList.forEach((item, idx) => {
console.log(item.url == file.url);
if (item.url == file.url) {
this.fileList.splice(idx, 1);
window.localStorage.setItem(
"sign_up_file_" + window.localStorage.getItem("phone"),
JSON.stringify(this.fileList)
);
}
});
console.log(this.fileList);
// })
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
});
},
confirm() {
......@@ -752,10 +775,11 @@ export default {
// console.log(2222)
// if (!valid) return;
setAccount(this.referForm).then((res) => {
// console.log(res, "setAccount");
console.log(res, "setAccount");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$emit("getstatus", res.data.status);
this.$message.success("提交审核成功");
// 跳转到报名
this.$router.push("/signUp/check");
......@@ -793,14 +817,15 @@ export default {
}
.el-form-item__content {
height: 40px;
line-height: 40px;
// height: 40px;
// line-height: 40px;
.el-input {
height: 40px;
.el-input__inner {
height: 40px;
line-height: 40px;
border-radius: 4px;
border: 1px solid #e1e3e6;
background-color: #ffffff;
......@@ -856,7 +881,7 @@ export default {
}
&.bgPic {
height: 260px;
// height: 260px;
.el-form-item__label {
font-size: 14px;
}
......@@ -867,13 +892,6 @@ export default {
color: #a7a2a6;
line-height: 24px;
}
img {
// width: 160px;
// height: 160px;
// border-radius: 4px;
// border: 2px dashed #bcc2ca;
// margin: 0 10px 10px 0;
}
}
.el-select {
width: 100%;
......@@ -882,9 +900,32 @@ export default {
position: relative;
margin-top: 24px;
.image_in {
.limit_10 {
display: none;
}
.el-upload-list--picture-card {
.item_img {
width: 100%;
}
}
}
//去除upload组件过渡效果 css
.el-upload-list__item {
transition: none !important;
}
.el-upload--picture-card {
display: inline-block;
}
.el-upload {
position: relative;
.el-icon-circle-plus {
font-size: 52px;
color: #60194a;
position: absolute;
top: 23%;
left: 7%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
}
i {
font-size: 52px;
......
<template>
<div class="pass">
<div class="p_content">
<div>
<img src="@/assets/img/signUp/icon-shenhe.png" alt="" />
</div>
<div>1111111同学你好,你的报名资料已提交</div>
<div>
请等待工作人员审核,审核结果将于1-3个工作日发布,请留意网站及短信
</div>
</div>
</div>
</template>
<script>
/* eslint-disable */
export default {
name: "Pass",
};
</script>
<style lang="scss" scoped>
.pass {
padding: 0 56px 65px 56px;
.p_content {
div {
text-align: center;
font-size: 16px;
font-weight: 500;
color: #666666;
line-height: 18px;
}
:nth-child(2) {
margin: 24px 0;
}
:nth-child(3) {
margin: 0 0 216px 0;
}
}
}
</style>
......@@ -9,7 +9,7 @@
// 官网
export const SERVER_URL = 'http://api1.testgate.cn' // 正式环境
export const DEVELOPMENT_SERVER_URL = 'http://api1.testgate.cn' // 开发环境
export const SERVER_WS_URL = 'wss://api.thussat.com' // websocket
export const SERVER_WS_URL = 'ws://api1.testgate.cn' // websocket
// 剑桥官网
// export const SERVER_URL = "https://api.testgate.cn"; // 正式环境
// export const DEVELOPMENT_SERVER_URL = "https://api.testgate.cn"; //开发环境
......
/* eslint-disable */
import Vue from 'vue'
import VueRouter from 'vue-router'
// import store from '@/store'
......@@ -9,6 +11,7 @@ Vue.use(VueRouter)
const routes = [{
path: '/',
name: 'recruit',
meta: {
title: '招生简章'
},
......
......@@ -7,10 +7,17 @@
</div>
</div>
<Confirm v-if="type == 'examInfo'" :statusNum="status"> </Confirm>
<Invitation v-else-if="type == 'invitation'"> </Invitation>
<ReferInfo v-else-if="type == 'referInfo'"> </ReferInfo>
<Pass v-else-if="type == 'check'"> </Pass>
<Paying v-else-if="type == 'pay'"> </Paying>
<Invitation
v-else-if="type == 'invitation'"
:statusNum="status"
@getstatus="statuss"
>
</Invitation>
<ReferInfo v-else-if="type == 'referInfo'" @getstatus="statuss">
</ReferInfo>
<Pass v-else-if="type == 'check'" @getstatus="statuss"> </Pass>
<Paying v-else-if="type == 'pay'" @getstatus="statuss"> </Paying>
<Success v-else-if="type == 'success'" @getstatus="statuss"> </Success>
</div>
</template>
......@@ -22,7 +29,9 @@ import Invitation from "c/index/SignUp/invitation";
import ReferInfo from "c/index/SignUp/referInfo";
import Pass from "c/index/SignUp/pass";
import Paying from "c/index/SignUp/paying";
import Success from "c/index/SignUp/success";
import { signUpInit } from "r/index/signUp";
export default {
name: "signUp",
components: {
......@@ -32,11 +41,13 @@ export default {
ReferInfo,
Pass,
Paying,
Success,
},
data() {
return {
type: "examInfo",
status: "", //进度
statuss:''
};
},
created() {
......@@ -54,8 +65,17 @@ export default {
},
deep: true,
},
status(val) {
console.log(111, val);
},
},
methods: {
// 点击邀请码下一步传来的status
statuss(val) {
console.log(val, "val");
// this.statuss = val;
this.signUpInit();
},
signUpInit() {
// console.log(111);
signUpInit({}).then((res) => {
......@@ -64,30 +84,43 @@ export default {
return this.$message.error(res.data.message);
}
this.status = res.data.status;
if (this.status == 1) {
if (this.status == 0) {
this.type = "examInfo";
} else if (this.status == 2) {
} else if (this.status == 1) {
this.type = "invitation";
} else if (this.status == 3) {
} else if (this.status == 2) {
this.type = "referInfo";
} else if (this.status == 3) {
console.log(222);
this.type = "pay";
this.status = 4;
} else if (this.status == 4) {
// this.type = "check";
if (res.data.examine_status == 0) {
this.type = "check";
this.status = 3;
} else if (res.data.examine_status == 1) {
// console.log(333);
this.type = "pay";
this.status = 4;
} else if (res.data.examine_status == 2) {
this.type = "referInfo";
// this.status == 3
this.status = 2;
return this.$message.error(res.data.examine_reason);
}
} else if (this.status == 5) {
this.type = "pay";
}else if (this.status == 6) {
this.type = "success";
}
// console.log(this.status)
//审核报名资料状态
//订单支付金额
window.localStorage.setItem("has_amount", res.data.has_amount);
window.localStorage.setItem("campsite_id", res.data.campsite_id);
window.localStorage.setItem("order_no", res.data.order_no);
});
},
},
......
......@@ -18,7 +18,7 @@
/>
<el-input
v-model="loginForm.phone"
placeholder="身份证号/用户名"
placeholder="请输入手机号"
maxlength="20"
></el-input>
</el-form-item>
......@@ -32,7 +32,7 @@
v-model="loginForm.password"
:type="isShowPwd ? 'password' : 'text'"
maxlength="20"
placeholder="密码"
placeholder="请输入密码"
></el-input>
<img
@click="changePwdStatus()"
......@@ -96,15 +96,49 @@ export default {
],
// 对密码进行校验
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
{
required: true,
message: "请输入密码",
transform: (value) => value,
trigger: "blur",
},
{
type: "string",
message: "请输入不包含空格的字符",
trigger: "blur",
transform(value) {
if (value && value.indexOf(" ") === -1) {
return value;
} else {
return false;
}
},
},
{
trigger: "blur",
validator: (rule, value, callback) => {
var passwordreg =/^[a-zA-Z0-9]{6,12}$/
// /(?=.*\d)(?=.*[a-zA-Z]).{6,12}/;
if (!passwordreg.test(value)) {
callback(
new Error("请输入6-12位,包含数字/字母,")
);
} else {
callback();
}
},
},
],
},
};
},
created() {
this.$emit("getStatus", false);
window.localStorage.setItem("index-identity", 'c59086fdb37848e7a10765812d1da349');
window.localStorage.setItem(
"index-identity",
"c59086fdb37848e7a10765812d1da349"
);
},
methods: {
// 忘记账号/密码
......
......@@ -39,12 +39,11 @@
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="registerForm.password"
:type="isShowPwd ? 'password' : 'text'"
maxlength="20"
placeholder="设置密码:6-12位字符,包含字母或数字"
:autocomplete="isShowPwd ? 'new-password' : 'off'"
></el-input>
<img
<!-- <img
@click="changePwdStatus()"
v-if="!isShowPwd"
class="img_r"
......@@ -57,7 +56,7 @@
class="img_r"
src="@/assets/img/reset/eye01.png"
alt=""
/>
/> -->
</el-form-item>
<el-form-item prop="rq_password">
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
......@@ -85,7 +84,8 @@
/* eslint-disable */
// 请求接口
import { registerCode, setAccountInfo } from "r/index/register";
import { mobileCheck } from "@/common/utils.js";
import { mobileCheck, checkStrong } from "@/common/utils.js";
import { validatePassword } from "@/common/validator";
export default {
name: "index-register",
......@@ -97,7 +97,9 @@ export default {
callback();
}
};
return {
inputType: "",
// 手机验证短信
show: true,
count: "",
......@@ -132,8 +134,36 @@ export default {
],
// 对密码进行校验
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
{
required: true,
message: "请输入密码",
transform: (value) => value,
trigger: "blur",
},
{
type: "string",
message: "请输入不包含空格的字符",
trigger: "blur",
transform(value) {
if (value && value.indexOf(" ") === -1) {
return value;
} else {
return false;
}
},
},
{
trigger: "blur",
validator: (rule, value, callback) => {
var passwordreg = /^[a-zA-Z0-9]{6,12}$/;
// /(?=.*\d)(?=.*[a-zA-Z]).{6,12}/;
if (!passwordreg.test(value)) {
callback(new Error("请输入6-12位,包含数字/字母,"));
} else {
callback();
}
},
},
],
// 对密码进行校验
rq_password: [
......@@ -201,13 +231,14 @@ export default {
rq_password: this.registerForm.rq_password,
}).then((res) => {
console.log(res);
if (res.code != 200) {
return this.$message.error(res.message);
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$message.success(res.message);
this.$message.success(res.data.message);
// token存储
window.localStorage.setItem("index-token", res.token);
this.$router.replace({ name: "index-signUp" });
// 去登录
this.$router.push({ path: "/login" });
});
});
},
......
......@@ -39,12 +39,11 @@
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
<el-input
v-model="resetForm.password"
:type="isShowPwd ? 'password' : 'text'"
maxlength="20"
placeholder="设置密码:6-12位字符,包含字母或数字"
:autocomplete="isShowPwd ? 'new-password' : 'off'"
></el-input>
<img
<!-- <img
@click="changePwdStatus()"
v-if="!isShowPwd"
class="img_r"
......@@ -57,7 +56,7 @@
class="img_r"
src="@/assets/img/reset/eye01.png"
alt=""
/>
/> -->
</el-form-item>
<el-form-item prop="rq_password">
<img class="img_l" src="@/assets/img/reset/password.png" alt="" />
......@@ -133,8 +132,38 @@ export default {
],
// 对密码进行校验
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ min: 6, max: 20, message: "请输入正确的密码", trigger: "blur" },
{
required: true,
message: "请输入密码",
transform: (value) => value,
trigger: "blur",
},
{
type: "string",
message: "请输入不包含空格的字符",
trigger: "blur",
transform(value) {
if (value && value.indexOf(" ") === -1) {
return value;
} else {
return false;
}
},
},
{
trigger: "blur",
validator: (rule, value, callback) => {
var passwordreg =/^[a-zA-Z0-9]{6,12}$/
// /(?=.*\d)(?=.*[a-zA-Z]).{6,12}/;
if (!passwordreg.test(value)) {
callback(
new Error("请输入6-12位,包含数字/字母,")
);
} else {
callback();
}
},
},
],
// 对密码进行校验
rq_password: [
......@@ -147,9 +176,7 @@ export default {
},
};
},
created() {
},
created() {},
methods: {
// 去注册
toLogin() {
......
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