Commit 61ae9d3c authored by 杨梦雪's avatar 杨梦雪

11

parent b6573691
...@@ -29,7 +29,7 @@ export default { ...@@ -29,7 +29,7 @@ export default {
return callback(new Error("身份证号不能为空")); return callback(new Error("身份证号不能为空"));
} }
if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) { if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
callback(new Error("你输入的身份证长度或格式错误")); return callback(new Error("你输入的身份证长度或格式错误"));
} }
//身份证城市 //身份证城市
var aCity = { var aCity = {
...@@ -70,8 +70,9 @@ export default { ...@@ -70,8 +70,9 @@ export default {
91: "国外" 91: "国外"
}; };
if (!aCity[parseInt(value.substr(0, 2))]) { if (!aCity[parseInt(value.substr(0, 2))]) {
callback(new Error("你的身份证地区非法")); return callback(new Error("你的身份证地区非法"));
} }
return callback();
}, },
// 数字验证 // 数字验证
validateNumber: function (rule, value, callback) { validateNumber: function (rule, value, callback) {
......
...@@ -65,7 +65,7 @@ export default { ...@@ -65,7 +65,7 @@ export default {
}, },
]; ];
let arr = []; let arr = [];
console.log(newArr, "newArr"); // console.log(newArr, "newArr");
for (let i = 0; i < newArr.length; i++) { for (let i = 0; i < newArr.length; i++) {
const item = newArr[i]; const item = newArr[i];
if ( if (
...@@ -81,7 +81,7 @@ export default { ...@@ -81,7 +81,7 @@ export default {
}, },
watch: { watch: {
statusNum(val) { statusNum(val) {
console.log(val, "statusNum"); // console.log(val, "statusNum");
this.status = val; this.status = val;
}, },
}, },
......
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
</template> </template>
<script> <script>
/* eslint-disable */
export default { export default {
name: "Footer", name: "Footer",
}; };
......
...@@ -64,12 +64,12 @@ export default { ...@@ -64,12 +64,12 @@ export default {
}, },
methods: { methods: {
async confirm() { async confirm() {
console.log(SERVER_WS_URL); // 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);
if (res.code !== 200) { if (res.code !== 200) {
if (res.code == 400801) { if (res.code == 400801) {
return this.cancelBtn(); return this.cancelBtn();
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
if (this.$refs.qrCodeUrl) { if (this.$refs.qrCodeUrl) {
// 获取 父 标签下的所有子节点 // 获取 父 标签下的所有子节点
let pObjs = this.$refs.qrCodeUrl.childNodes; let pObjs = this.$refs.qrCodeUrl.childNodes;
console.log(pObjs); // console.log(pObjs);
for (var i = pObjs.length - 1; i >= 0; i--) { for (var i = pObjs.length - 1; i >= 0; i--) {
// 一定要倒序,正序是删不干净的,可自行尝试 // 一定要倒序,正序是删不干净的,可自行尝试
this.$refs.qrCodeUrl.removeChild(pObjs[i]); this.$refs.qrCodeUrl.removeChild(pObjs[i]);
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
// 连接成功建立的回调方法 // 连接成功建立的回调方法
websocketOnopen() { websocketOnopen() {
this.websocketSend(); this.websocketSend();
console.log("连接成功建立的回调方法"); // console.log("连接成功建立的回调方法");
//开启心跳 //开启心跳
this.start(); this.start();
}, },
...@@ -223,10 +223,10 @@ export default { ...@@ -223,10 +223,10 @@ export default {
}, },
// 接收到消息的回调方法 // 接收到消息的回调方法
websocketOnmessage(event) { websocketOnmessage(event) {
console.log(event, "event"); // console.log(event, "event");
if (event.data !== "Opened") { if (event.data !== "Opened") {
//const data = JSON.parse(event.data); //const data = JSON.parse(event.data);
console.log("接收到消息的回调方法", event.data); // console.log("接收到消息的回调方法", event.data);
if (event.data == 1) { if (event.data == 1) {
this.lockReconnect = false; this.lockReconnect = false;
...@@ -244,7 +244,7 @@ export default { ...@@ -244,7 +244,7 @@ export default {
}, },
// 连接关闭的回调方法 // 连接关闭的回调方法
websocketOnclose() { websocketOnclose() {
console.log("连接关闭的回调方法"); // console.log("连接关闭的回调方法");
//重连 //重连
this.reconnect(); this.reconnect();
}, },
......
...@@ -66,7 +66,7 @@ export default { ...@@ -66,7 +66,7 @@ export default {
window.localStorage.removeItem("campsite_id"); window.localStorage.removeItem("campsite_id");
window.localStorage.removeItem("order_no"); window.localStorage.removeItem("order_no");
window.localStorage.removeItem("campindex_type"); window.localStorage.removeItem("campindex_type");
this.$store.state.token = ""; // this.$store.state.token = "";
// 使用编程式导航跳转到登录页面 // 使用编程式导航跳转到登录页面
this.$router.push({ name: "recruit" }); this.$router.push({ name: "recruit" });
}, },
...@@ -74,20 +74,20 @@ export default { ...@@ -74,20 +74,20 @@ export default {
toRecruit() { toRecruit() {
// 清除本地缓存除了大学logo // 清除本地缓存除了大学logo
// window.localStorage.clear(); // window.localStorage.clear();
window.localStorage.removeItem("doubt_code"); // window.localStorage.removeItem("doubt_code");
window.localStorage.removeItem("doubt_info"); // window.localStorage.removeItem("doubt_info");
window.localStorage.removeItem("doubt_check"); // window.localStorage.removeItem("doubt_check");
// window.localStorage.removeItem("index-identity"); // window.localStorage.removeItem("index-identity");
window.localStorage.removeItem("index-token"); // window.localStorage.removeItem("index-token");
window.localStorage.removeItem("phone"); // window.localStorage.removeItem("phone");
window.localStorage.removeItem("camp_name"); // window.localStorage.removeItem("camp_name");
window.localStorage.removeItem("system_color"); // window.localStorage.removeItem("system_color");
window.localStorage.removeItem("has_amount"); // window.localStorage.removeItem("has_amount");
window.localStorage.removeItem("campsite_id"); // window.localStorage.removeItem("campsite_id");
window.localStorage.removeItem("order_no"); // window.localStorage.removeItem("order_no");
window.localStorage.removeItem("campindex_type"); // window.localStorage.removeItem("campindex_type");
this.$store.state.token = ""; // this.$store.state.token = "";
this.$router.push({ name: "recruit" }); this.$router.replace({ name: "recruit" });
}, },
}, },
}; };
......
<template> <template>
<!--底部--> <!--底部-->
<div class="confirm"> <div class="confirm">
<div class="title">2021年南开大学历史学科暑假营报名须知</div> <div class="title">{{ info.name }}报名须知</div>
<p>
<div v-html="info.exam_instructions"></div>
<!-- <p>
南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。 南开大学是教育部直属重点综合性大学,是敬爱的周恩来总理的母校。新中国成立以来,学校发展始终得到党和国家的亲切关怀。毛泽东主席题写校名、亲临视察;周恩来总理三回母校指导;邓小平同志会见数学大师陈省身,批示成立南开数学研究所;江泽民同志、胡锦涛同志先后视察南开。特别是党的十八大以来,习近平总书记多次对南开的发展给予肯定,并对相关工作回信和勉励,更在百年校庆之际亲临南开视察。
</p> </p>
<p> <p>
...@@ -14,7 +16,7 @@ ...@@ -14,7 +16,7 @@
</p> </p>
<div> <div>
<img src="../../../assets/img/signUp/computer.png" alt="" /> <img src="../../../assets/img/signUp/computer.png" alt="" />
</div> </div> -->
<div class="check"> <div class="check">
<el-checkbox v-model="checked" <el-checkbox v-model="checked"
>我已阅读并了解《2021年南开大学历史学科暑假营报名须知》</el-checkbox >我已阅读并了解《2021年南开大学历史学科暑假营报名须知》</el-checkbox
...@@ -29,28 +31,38 @@ ...@@ -29,28 +31,38 @@
<script> <script>
/* eslint-disable */ /* eslint-disable */
import { setSignShould } from "r/index/signUp"; import { setSignShould } from "r/index/signUp";
import { getCam } from "r/index/login";
export default { export default {
name: "Confirm", name: "Confirm",
// props: { statusNum: [String, Number] }, //进度参数 // props: { statusNum: [String, Number] }, //进度参数
data() { data() {
return { return {
checked: false, checked: false,
info: {},
}; };
}, },
created() { created() {
this.getCams();
}, },
methods: { methods: {
next() { next() {
// console.log(this.checked); // console.log(this.checked);
setSignShould({}).then((res) => { setSignShould({}).then((res) => {
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.$emit("getstatus", res.data.status); this.$emit("getstatus", res.data.status);
this.$message.success(res.data.message); this.$message.success(res.data.message);
this.$router.push("/signUp/invitation"); this.$router.push("/signUp/invitation");
});
},
getCams() {
getCam(false).then((res) => {
// console.log(res, "res");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$message.success(res.data.message);
this.info = res.data;
}); });
}, },
}, },
...@@ -83,6 +95,5 @@ export default { ...@@ -83,6 +95,5 @@ export default {
text-align: center; text-align: center;
margin-top: 42px; margin-top: 42px;
} }
} }
</style> </style>
...@@ -181,7 +181,7 @@ export default { ...@@ -181,7 +181,7 @@ export default {
}, },
// 下一步 // 下一步
async next() { async next() {
console.log(111); // console.log(111);
let code; let code;
if ( if (
this.invatation1 == "" && this.invatation1 == "" &&
......
...@@ -22,15 +22,20 @@ export default { ...@@ -22,15 +22,20 @@ export default {
name: "Pass", name: "Pass",
props: { props: {
getExamine: [String, Number], getExamine: [String, Number],
next: "", // isNext:''
}, },
created() { created() {
console.log(this.getExamine); // console.log(this.getExamine);
},
watch:{
// is_next(val){
// }
}, },
methods: { methods: {
paying() { paying() {
this.nextNum = 1; this.$emit('is_next',1)
this.$emit('isNext',this.nextNum) // console.log(is_next);
}, },
}, },
......
...@@ -97,7 +97,7 @@ export default { ...@@ -97,7 +97,7 @@ export default {
}, },
getAccount() { getAccount() {
getAccount({}).then((res) => { getAccount({}).then((res) => {
console.log(res, "getAccount"); // console.log(res, "getAccount");
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 diff is collapsed.
...@@ -30,7 +30,7 @@ instance.interceptors.request.use( ...@@ -30,7 +30,7 @@ instance.interceptors.request.use(
config.data = qs.stringify(config.data); config.data = qs.stringify(config.data);
} }
if (config.url.indexOf(SERVER_URL) === -1) { if (config.url.indexOf(SERVER_URL) === -1) {
console.log("upload"); // console.log("upload");
config.headers["Content-Type"] = "multipart/form-data"; config.headers["Content-Type"] = "multipart/form-data";
} else { } else {
config.headers["Content-Type"] = "application/x-www-form-urlencoded"; config.headers["Content-Type"] = "application/x-www-form-urlencoded";
...@@ -110,7 +110,8 @@ export function request(config) { ...@@ -110,7 +110,8 @@ export function request(config) {
const passwordCode = '/web/code/passwordCode'; const passwordCode = '/web/code/passwordCode';
const changePassCode = '/web/auth/changePassCode'; const changePassCode = '/web/auth/changePassCode';
const loginOut = '/web/auth/loginOut'; const loginOut = '/web/auth/loginOut';
console.log(config)
// console.log(config)
if ( if (
config.url.indexOf(loginUrl) != -1 || config.url.indexOf(loginUrl) != -1 ||
config.url.indexOf(setAccountInfo) != -1 || config.url.indexOf(setAccountInfo) != -1 ||
...@@ -118,7 +119,7 @@ export function request(config) { ...@@ -118,7 +119,7 @@ export function request(config) {
config.url.indexOf(getCam) != -1 || config.url.indexOf(getCam) != -1 ||
config.url.indexOf(registerCode) != -1 || config.url.indexOf(registerCode) != -1 ||
config.url.indexOf(changePassCode) != -1 || config.url.indexOf(changePassCode) != -1 ||
config.url.indexOf(passwordCode) != -1|| config.url.indexOf(passwordCode) != -1 ||
config.url.indexOf(loginOut) != -1 config.url.indexOf(loginOut) != -1
) { ) {
return config return config
...@@ -176,6 +177,7 @@ export function request(config) { ...@@ -176,6 +177,7 @@ export function request(config) {
instance.interceptors.response.use( instance.interceptors.response.use(
(res) => { (res) => {
// console.log(res)
if (res.data.code == 400003) { if (res.data.code == 400003) {
window.localStorage.clear() window.localStorage.clear()
router.push({ router.push({
...@@ -201,19 +203,21 @@ export function request(config) { ...@@ -201,19 +203,21 @@ export function request(config) {
return res return res
}, },
(error) => { (error) => {
// console.log(error.response.status)
Message.closeAll() Message.closeAll()
// if (error.response.status === 401) { if (error.response.status === 404) {
// // 未登录 // return this.$message.error("营地报名已结束")
// Notification({ // 未登录
// message: "身份验证失败,请登录", Notification({
// duration: 1500, message: "营地报名已关闭",
duration: 2000,
// onClose() { // onClose() {
// console.log('error'); // console.log('error');
// router.push("/admin/login"); // router.push("/admin/login");
// }, // },
// }); });
// return false; return false;
// } }
if (axios.isCancel(error)) { if (axios.isCancel(error)) {
console.log(error.message) console.log(error.message)
} else { } else {
......
...@@ -113,7 +113,8 @@ router.beforeEach((to, from, next) => { ...@@ -113,7 +113,8 @@ router.beforeEach((to, from, next) => {
toLogin = "/login", toLogin = "/login",
toRegister = "/register", toRegister = "/register",
toReset = "/reset" toReset = "/reset"
// toRrecruit = "/recruit" // toRecruit = "/:code"
let token = localStorage.getItem(tokenKey); let token = localStorage.getItem(tokenKey);
let nextUrl = false; let nextUrl = false;
let code = false; let code = false;
...@@ -127,6 +128,8 @@ router.beforeEach((to, from, next) => { ...@@ -127,6 +128,8 @@ router.beforeEach((to, from, next) => {
}); });
} else if (to.name == "recruit") { } else if (to.name == "recruit") {
code = to.params.code; code = to.params.code;
console.log(code,'code')
to.path == "/:code"
checkCam(code, (res) => { checkCam(code, (res) => {
if (res) { if (res) {
nextUrl = false; nextUrl = false;
...@@ -145,6 +148,8 @@ router.beforeEach((to, from, next) => { ...@@ -145,6 +148,8 @@ router.beforeEach((to, from, next) => {
// 页面跳转之后页面回滚到顶部 // 页面跳转之后页面回滚到顶部
router.afterEach((to, from, next) => { router.afterEach((to, from, next) => {
// console.log(to,'to')
window.scrollTo(0, 0) window.scrollTo(0, 0)
}); });
export default router export default router
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
}, },
data() { data() {
return { return {
type: 1,
isPosition: 0, // 左侧box是否浮动 isPosition: 0, // 左侧box是否浮动
pageYOffset: 0, // 左侧box浮动时,滚动的高度 pageYOffset: 0, // 左侧box浮动时,滚动的高度
scorllHeight: 0, // 最大滚动高度 scorllHeight: 0, // 最大滚动高度
...@@ -98,7 +98,7 @@ export default { ...@@ -98,7 +98,7 @@ export default {
}, },
methods: { methods: {
getStatus(val) { getStatus(val) {
console.log(val, "index_type"); // console.log(val, "index_type");
this.index_status = val; this.index_status = val;
this.ToSignUp(); this.ToSignUp();
}, },
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
<ReferInfo v-else-if="type == 'referInfo'" @getstatus="statuss"></ReferInfo> <ReferInfo v-else-if="type == 'referInfo'" @getstatus="statuss"></ReferInfo>
<Pass <Pass
v-else-if="type == 'check'" v-else-if="type == 'check'"
@getstatus="statuss" @is_next="is_nextevent"
@isNext="isNext"
:getExamine="getExamine" :getExamine="getExamine"
></Pass> ></Pass>
<Paying v-else-if="type == 'pay'" @getstatus="statuss"></Paying> <Paying v-else-if="type == 'pay'" @getstatus="statuss"></Paying>
...@@ -54,14 +53,13 @@ export default { ...@@ -54,14 +53,13 @@ export default {
doubt_check: window.localStorage.getItem("doubt_check"), doubt_check: window.localStorage.getItem("doubt_check"),
status_val: "", status_val: "",
getExamine: "", getExamine: "",
isNext: "", isNexts: "",
}; };
}, },
created() { created() {
this.type = this.$route.params.type; this.type = this.$route.params.type;
// console.log(this.$route, "router"); // console.log(this.$route, "router");
this.statuss(); this.statuss();
// this.signUpInit();
}, },
watch: { watch: {
...@@ -78,12 +76,14 @@ export default { ...@@ -78,12 +76,14 @@ export default {
status(val) { status(val) {
// console.log(val, "status"); // console.log(val, "status");
}, },
isNext(val) {
this.isNext = val;
console.log(val, "isNext");
},
}, },
methods: { methods: {
is_nextevent(val) {
this.isNexts = val;
console.log(val, "isNexts");
// this.signUpInit( this.isNexts );
this.signUpInit(this.status_val);
},
// 点击下一步,触发父组件方法 // 点击下一步,触发父组件方法
statuss(val) { statuss(val) {
// console.log(val, "statuss"); // console.log(val, "statuss");
...@@ -93,9 +93,11 @@ export default { ...@@ -93,9 +93,11 @@ export default {
}, },
// status=4,跳到审核页面;status=3时,根据doubt_check做判断 // status=4,跳到审核页面;status=3时,根据doubt_check做判断
signUpInit(status_val) { signUpInit(status_val) {
console.log(status_val, "11111"); // console.log(status_val, "11111");
// console.log(isNexts, "2222");
signUpInit({}).then((res) => { signUpInit({}).then((res) => {
console.log(res, "signUpInit"); // console.log(res, "signUpInit");
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
...@@ -106,7 +108,7 @@ export default { ...@@ -106,7 +108,7 @@ export default {
this.status = status_val; this.status = status_val;
} else { } else {
this.status = res.data.status; this.status = res.data.status;
console.log(this.status, "11111"); // console.log(this.status, "11111");
} }
// doubt_code,doubt_info,doubt_check。0为不填写,1为填写 // doubt_code,doubt_info,doubt_check。0为不填写,1为填写
if (this.status == 0) { if (this.status == 0) {
...@@ -121,7 +123,7 @@ export default { ...@@ -121,7 +123,7 @@ export default {
this.status = 1; this.status = 1;
} }
} else if (this.status == 2) { } else if (this.status == 2) {
console.log(this.doubt_info, "doubt_info"); // console.log(this.doubt_info, "doubt_info");
// 是否填写个人资料 // 是否填写个人资料
if (this.doubt_info == 0) { if (this.doubt_info == 0) {
this.type = "check"; this.type = "check";
...@@ -142,8 +144,11 @@ export default { ...@@ -142,8 +144,11 @@ export default {
} else if (this.status == 4) { } else if (this.status == 4) {
this.type = "check"; this.type = "check";
this.status = 3; this.status = 3;
console.log(this.status, "this.status ");
// console.log(this.isNexts ,'this.isNexts ')
if (this.isNext != null) { if (this.isNexts == 1) {
// console.log(11111);
if (res.data.examine_status == 1) { if (res.data.examine_status == 1) {
console.log(333); console.log(333);
this.type = "pay"; this.type = "pay";
...@@ -161,7 +166,7 @@ export default { ...@@ -161,7 +166,7 @@ export default {
} }
this.$emit("getStatus", this.type); this.$emit("getStatus", this.type);
this.getExamine = res.data.examine_status; this.getExamine = res.data.examine_status;
console.log(res.data.examine_status, "res.data.examine_status"); // console.log(res.data.examine_status, "res.data.examine_status");
//审核报名资料状态 //审核报名资料状态
//订单支付金额 //订单支付金额
......
...@@ -11,18 +11,17 @@ ...@@ -11,18 +11,17 @@
</div> </div>
</template> </template>
<script> <script>
/* eslint-disable */ /* eslint-disable */
export default { export default {
name: "loginIndex", name: "loginIndex",
data() { data() {
return { return {
bigImg: window.localStorage.getItem('bk_pic') bigImg: window.localStorage.getItem("bk_pic"),
}; };
}, },
created() { created() {
let bk_pic = window.localStorage.getItem('bk_pic'); let bk_pic = window.localStorage.getItem("bk_pic");
if(bk_pic){ if (bk_pic) {
this.bigImg = bk_pic; this.bigImg = bk_pic;
} }
...@@ -38,19 +37,20 @@ export default { ...@@ -38,19 +37,20 @@ export default {
background: #f8f8f8; background: #f8f8f8;
display: flex; display: flex;
flex-flow: row; flex-flow: row;
.big-img{ min-height: 100%;
width: (500/1920*100%); .big-img {
width: (500/1920 * 100%);
min-width: 350px; min-width: 350px;
/*height: 100%;*/ min-height: 100%;
img{ img {
width: 100%; width: 100%;
/*height: 100%;*/ min-height: 100%;
} }
} }
.big-right{ .big-right {
flex: 1; flex: 1;
position: relative; position: relative;
.info-box{ .info-box {
width: 520px; width: 520px;
height: auto; height: auto;
position: absolute; position: absolute;
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
}, },
getCams() { getCams() {
getCam(false).then((res) => { getCam(false).then((res) => {
console.log(res, "res"); // console.log(res, "res");
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
......
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