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