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");
});
},
},
......
This diff is collapsed.
<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