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);
} }
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<div class="cont_title">个人信息</div> <div class="cont_title">个人信息</div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-form-item label="姓名" prop="name" > <el-form-item label="姓名" prop="name">
<el-input <el-input
ref="name" ref="name"
v-model="referForm.name" v-model="referForm.name"
...@@ -27,8 +27,8 @@ ...@@ -27,8 +27,8 @@
ref="gender" ref="gender"
size="small" size="small"
> >
<el-radio label="0"></el-radio> <el-radio :label="0"></el-radio>
<el-radio label="1"></el-radio> <el-radio :label="1"></el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="出生日期" prop="birthday" ref="birthday"> <el-form-item label="出生日期" prop="birthday">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-select v-model="bdYear" placeholder="年"> <el-select v-model="bdYear" placeholder="年">
...@@ -69,7 +69,12 @@ ...@@ -69,7 +69,12 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select v-model="bdDay" placeholder="日" @change="getTime"> <el-select
ref="birthday"
v-model="bdDay"
placeholder="日"
@change="getTime"
>
<el-option <el-option
v-for="(item, index) in dayArrs" v-for="(item, index) in dayArrs"
:key="index" :key="index"
...@@ -84,14 +89,13 @@ ...@@ -84,14 +89,13 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="籍贯" prop="jiguan_code" > <el-form-item label="籍贯" prop="jiguan_code">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<!-- @keyup.enter.native="selsectProvince" -->
<el-select <el-select
ref="jgProvinceCode"
v-model="jgProvinceCode" v-model="jgProvinceCode"
placeholder="省" placeholder="省"
@keyup.enter.native="selsectProvince"
@change="changeProvince(1, $event)" @change="changeProvince(1, $event)"
> >
<el-option <el-option
...@@ -105,7 +109,7 @@ ...@@ -105,7 +109,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-select <el-select
ref="jiguan_city" ref="jiguan_code"
v-model="jiguan_city" v-model="jiguan_city"
placeholder="市" placeholder="市"
@change="getJiguan()" @change="getJiguan()"
...@@ -165,9 +169,8 @@ ...@@ -165,9 +169,8 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input <el-input
ref="phone" v-model="referForm.phone"
v-model="phone" placeholder="请输入手机号"
placeholder="18355151517"
size="small" size="small"
:disabled="true" :disabled="true"
/> />
...@@ -329,7 +332,7 @@ ...@@ -329,7 +332,7 @@
</el-form-item> </el-form-item>
<el-form-item class="btn"> <el-form-item class="btn">
<el-button @click="confirm()">提交资料</el-button> <el-button @click="confirm">提交资料</el-button>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
...@@ -352,14 +355,14 @@ export default { ...@@ -352,14 +355,14 @@ export default {
name: "CheckForm", name: "CheckForm",
data() { data() {
let validateContent = (rule, value, callback) => { const validateContent = (rule, value, callback) => {
if (!this.referForm.birthday) { if (!this.referForm.birthday) {
callback(new Error("出生日期不能为空!")); callback(new Error("出生日期不能为空!"));
} else { } else {
callback(); callback();
} }
}; };
let validateContents = (rule, value, callback) => { const validateContents = (rule, value, callback) => {
if (!this.referForm.jiguan_code) { if (!this.referForm.jiguan_code) {
callback(new Error("籍贯不能为空!")); callback(new Error("籍贯不能为空!"));
} else { } else {
...@@ -377,7 +380,7 @@ export default { ...@@ -377,7 +380,7 @@ export default {
nation: null, nation: null,
start_school_date: null, start_school_date: null,
political_status: null, political_status: null,
// phone: null, phone: null,
email: null, email: null,
school_province: null, school_province: null,
school_city: null, school_city: null,
...@@ -386,7 +389,7 @@ export default { ...@@ -386,7 +389,7 @@ export default {
school_phone: null, school_phone: null,
}, },
phone: "", phone: "",
schoolName: [], schoolName: {},
referInfoRules: { referInfoRules: {
name: [ name: [
{ required: true, message: "真实姓名不能为空!", trigger: "blur" }, { required: true, message: "真实姓名不能为空!", trigger: "blur" },
...@@ -518,46 +521,67 @@ export default { ...@@ -518,46 +521,67 @@ export default {
disabled: false, //限制输入框 disabled: false, //限制输入框
}; };
}, },
mounted() {},
created() { created() {
this.phone = window.localStorage.getItem("phone"); //本地取用户手机号 // this.phone = window.localStorage.getItem("phone"); //本地取用户手机号
let signUpFile = window.localStorage.getItem( let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("phone") "sign_up_file_" + window.localStorage.getItem("phone")
); );
console.log(JSON.parse(signUpFile));
if (signUpFile && JSON.parse(signUpFile).length > 0) { if (signUpFile && JSON.parse(signUpFile).length > 0) {
this.fileList = JSON.parse(signUpFile); this.fileList = JSON.parse(signUpFile);
} }
this.getAccount();
this.getProAndCity();
this.getSchool(); this.getSchool();
this.getProAndCity();
this.getTenYear(); this.getTenYear();
this.getAccount();
}, },
watch: { watch: {
self(val) { referForm(val) {
// console.log(val, "val");
for (var k in val) { for (var k in val) {
if (val[k] == null || !val[k]) { if (val[k] == null || !val[k]) {
val[k] = this.referForm[k]; val[k] = this.referForm[k];
} }
} }
this.selfInfo = val; this.selfInfo = val;
if (val.gender && val.gender !== "") {
// console.log(val.gender)
this.referForm.gender = val.gender;
}
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位取年
this.bdMonth = val.birthday.slice(4, 6); //中2位取月 this.bdMonth = val.birthday.slice(4, 6); //中2位取月
this.bdDay = val.birthday.slice(6, 8); //后2位取日 this.bdDay = val.birthday.slice(6, 8); //后2位取日
} }
if (val.jiguan_city !== null && val.jiguan_province !== null) {
//籍贯
if (this.referForm.jiguan_city) {
}
this.jgProvinceCode = Number(val.jiguan_province);
this.changeProvince(1, this.jgProvinceCode, true);
this.jiguan_city = Number(val.jiguan_city);
}
// console.log(val.school_province, val.school_city, val.school);
if ( if (
val.jiguan_code && val.school_province !== null &&
val.jiguan_code !== "" && val.school_city !== null &&
val.jiguan_code !== "00" val.school !== null
) { ) {
//籍贯 //学校
// console.log(val.jiguan_code, "val.jiguan_code+++++"); this.referForm.school_province = Number(val.school_province);
this.jgProvinceCode = Number(val.jiguan_code.slice(0, 2)); //前2位取省份 this.referForm.school_city = Number(val.school_city);
// console.log(this.jgProvinceCode, "val.jiguan_code+++++"); this.referForm.school = Number(val.school);
this.selectJgProvince(this.jgProvinceCode, "1"); // console.log(
this.jgCityCode = Number(val.jiguan_code.slice(2, 6)); //后4位取城市 // this.referForm.school_province,
console.log(this.jgCityCode, "val.jiguan_code+++++"); // this.referForm.school_city,
// this.referForm.school
// );
this.changeProvince(2, this.referForm.school_province, true);
// console.log(this.referForm.school_city, 12322);
this.changeCity(this.referForm.school_city, true);
} }
}, },
}, },
...@@ -588,6 +612,12 @@ export default { ...@@ -588,6 +612,12 @@ export default {
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.referForm = res.data.info;
if (res.data.info.jiguan_province && res.data.info.jiguan_city) {
this.referForm.jiguan_code =
res.data.info.jiguan_province.toString() +
res.data.info.jiguan_city.toString();
}
}); });
}, },
getTime() { getTime() {
...@@ -595,12 +625,7 @@ export default { ...@@ -595,12 +625,7 @@ export default {
this.bdYear.toString() + this.bdYear.toString() +
this.bdMonth.toString() + this.bdMonth.toString() +
this.bdDay.toString(); //组装出生日期 this.bdDay.toString(); //组装出生日期
// console.log(this.referForm.birthday); console.log(this.referForm.birthday);
},
getJiguan() {
this.referForm.jiguan_code =
this.jgProvinceCode.toString() + this.jiguan_city.toString();
// console.log(this.referForm.jiguan_code);
}, },
// 获取省份城市 // 获取省份城市
...@@ -611,38 +636,74 @@ export default { ...@@ -611,38 +636,74 @@ export default {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
this.selectProvince = res.data.province_list; this.selectProvince = res.data.province_list;
this.CityName = res.data.city_list; // this.CityName = res.data.city_list;
// console.log(this.selectProvince, this.CityName);
}); });
}, },
changeProvince(type, value) {
// console.log(value, "value"); //选择籍贯省份change事件
let selectCity = []; changeProvince(type, val, status) {
for (const key in this.CityName) { // console.log(type, val);
if (this.CityName[key].parent_id == value) {
selectCity.push(this.CityName[key]);
}
}
if (type == 1) { if (type == 1) {
this.selectCityJiguan = selectCity; this.selectCityJiguan = [];
this.jiguan_city = ""; this.selectCityJiguan = this.getCurrentCityLists(val);
if (!status) {
this.jiguan_city = "";
this.referForm.jiguan_code = "";
}
} else { } else {
this.selectCitySchool = selectCity; this.selectCitySchool = [];
this.referForm.school_city = ""; this.selectCitySchool = this.getCurrentCityLists(val); //在此调用城市筛选列表
this.referForm.school = ""; if (!status) {
this.referForm.school_city = "";
this.referForm.school = "";
}
} }
}, },
changeCity(value) {
let selectSchool = []; //返回当前省份下的城市列表
for (const key in this.schoolName) { getCurrentCityLists(val) {
if (this.schoolName[key].city_id == value) { let currentCity = [];
selectSchool.push(this.schoolName[key]); if (
this.CityName == null ||
!this.CityName ||
Object.values(this.CityName).length == 0
) {
getProAndCity({})
.then((res) => {
// console.log(res, "getProAndCity");
if (res.data.code === 200) {
// this.selectProvince = res.data.province_list;
this.CityName = res.data.city_list;
for (let key in this.CityName) {
if (this.CityName[key].parent_id == val) {
currentCity.push(this.CityName[key]);
}
}
return currentCity;
} else {
this.$message.error(res.data.message);
}
})
.catch((err) => {
this.$message.error(err);
});
} else {
for (let key in this.CityName) {
if (this.CityName[key].parent_id == val) {
currentCity.push(this.CityName[key]);
}
} }
return currentCity;
} }
this.selectSchoolList = selectSchool; return currentCity;
this.referForm.school = ""; },
// 籍贯城市change事件
getJiguan() {
this.referForm.jiguan_code =
this.jgProvinceCode.toString() + this.jiguan_city.toString();
}, },
// 获取学校
getSchool() { getSchool() {
getSchool({}).then((res) => { getSchool({}).then((res) => {
// console.log(res, "getSchool"); // console.log(res, "getSchool");
...@@ -652,10 +713,63 @@ export default { ...@@ -652,10 +713,63 @@ export default {
this.schoolName = res.data.school_list; this.schoolName = res.data.school_list;
}); });
}, },
// 学校城市change事件
changeCity(val, status) {
// console.log(12345333,val,status)
this.selectSchoolList = [];
this.selectSchoolList = this.getCurrentSchoolLists(val);
if (!status) {
this.referForm.school = "";
}
},
// 返回当前城市下的学校列表
getCurrentSchoolLists(val) {
let currentSchool = [];
// console.log(this.schoolName);
if (
this.schoolName == null ||
!this.schoolName ||
Object.values(this.schoolName).length == 0
) {
getSchool({})
.then((res) => {
// console.log(res)
if (res.data.code === 200) {
this.schoolName = res.data.school_list;
window.localStorage.setItem(
"schoolName",
JSON.stringify(res.data.list)
);
for (let key in this.schoolName) {
if (this.schoolName[key].city_id == val) {
currentSchool.push(this.schoolName[key]);
}
}
return currentSchool;
} else {
this.$message.error(res.data.message);
}
})
.catch((err) => {
this.$message.error(err);
});
} else {
// console.log(this.schoolName, 111);
for (let key in this.schoolName) {
// console.log(key, this.schoolName[key]);
if (this.schoolName[key].city_id == val) {
currentSchool.push(this.schoolName[key]);
}
}
// console.log(currentSchool, 222);
return currentSchool;
}
return currentSchool;
},
// 图片上传成功前钩子 // 图片上传成功前钩子
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
console.log(file, "beforeImage"); // console.log(file, "beforeImage");
const isJPG = file.type === "image/jpg"; const isJPG = file.type === "image/jpg";
const isPng = file.type === "image/png"; const isPng = file.type === "image/png";
const isJPEG = file.type === "image/jpeg"; const isJPEG = file.type === "image/jpeg";
...@@ -671,22 +785,22 @@ export default { ...@@ -671,22 +785,22 @@ export default {
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
console.log(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); // console.log(fileList);
this.isUploading = true; this.isUploading = true;
if (this.fileList.lenge < 10) { if (this.fileList.lenge < 10) {
return this.$message.info("chaochushuliamng"); return this.$message.info("chaochushuliamng");
} }
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
console.log(res, "res"); // console.log(res, "res");
console.log(file, "file"); // console.log(file, "file");
console.log(fileList, "fileList"); // console.log(fileList, "fileList");
this.referForm.achievementPath = res; this.referForm.achievementPath = res;
this.fileList = { this.fileList = {
name: file.name, name: file.name,
...@@ -712,7 +826,7 @@ export default { ...@@ -712,7 +826,7 @@ export default {
}; };
await getAchievementOss({ image: image }) await getAchievementOss({ image: image })
.then((res) => { .then((res) => {
console.log(res, "开始上传图片"); // console.log(res, "开始上传图片");
if (res.data.code === 200) { if (res.data.code === 200) {
let oss_url = res.data.config.host; let oss_url = res.data.config.host;
let filename = res.data.config.file; let filename = res.data.config.file;
...@@ -729,7 +843,7 @@ export default { ...@@ -729,7 +843,7 @@ export default {
// console.log(formData); // console.log(formData);
upload(oss_url, formData) upload(oss_url, formData)
.then((ress) => { .then((ress) => {
console.log(ress, "ress"); // console.log(ress, "ress");
if (ress.data.code != 200) { if (ress.data.code != 200) {
console.log(ress, "ress"); console.log(ress, "ress");
return this.$message.error(ress.data.message); return this.$message.error(ress.data.message);
...@@ -745,7 +859,7 @@ export default { ...@@ -745,7 +859,7 @@ export default {
// this.fileList = fileList // this.fileList = fileList
console.log(this.fileList, " this.fileList"); // console.log(this.fileList, " this.fileList");
window.localStorage.setItem( window.localStorage.setItem(
"sign_up_file_" + window.localStorage.getItem("phone"), "sign_up_file_" + window.localStorage.getItem("phone"),
JSON.stringify(this.fileList) JSON.stringify(this.fileList)
...@@ -759,14 +873,14 @@ export default { ...@@ -759,14 +873,14 @@ export default {
} }
}) })
.catch((err) => { .catch((err) => {
console.log(err); // console.log(err);
}); });
}, },
//删除图片 //删除图片
handleRemove(file) { handleRemove(file) {
let savefile = file.savefile; let savefile = file.savefile;
delPic({ object: savefile }).then((res) => { delPic({ object: savefile }).then((res) => {
console.log(res, "delpic"); // console.log(res, "delpic");
if (res.data.code != 200) { if (res.data.code != 200) {
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
...@@ -779,7 +893,7 @@ export default { ...@@ -779,7 +893,7 @@ export default {
}) })
.then(() => { .then(() => {
this.fileList.forEach((item, idx) => { this.fileList.forEach((item, idx) => {
console.log(item.url == file.url); // console.log(item.url == file.url);
if (item.url == file.url) { if (item.url == file.url) {
this.fileList.splice(idx, 1); this.fileList.splice(idx, 1);
window.localStorage.setItem( window.localStorage.setItem(
...@@ -788,7 +902,7 @@ export default { ...@@ -788,7 +902,7 @@ export default {
); );
} }
}); });
console.log(this.fileList); // console.log(this.fileList);
this.$message({ this.$message({
type: "success", type: "success",
...@@ -805,13 +919,13 @@ export default { ...@@ -805,13 +919,13 @@ export default {
}, },
// 滚动到固定地方 // 滚动到固定地方
scrollView(object) { scrollView(object) {
console.log(object, "object"); // console.log(object, "object");
console.log(object, "object");
for (let i in object) { for (let i in object) {
if (!i) { if (!i) {
continue; continue;
} }
let dom = this.$refs[i]; let dom = this.$refs[i];
// console.log(i, dom);
if (!dom) { if (!dom) {
continue; continue;
} }
...@@ -827,38 +941,31 @@ export default { ...@@ -827,38 +941,31 @@ export default {
// 值有auto、instant,smooth,缓动动画(当前是慢速的) // 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: "smooth", behavior: "smooth",
}); });
this.dialogFormFu = {
title: "提示",
message: object[i][0].message,
};
this.dialogVisibleFu = true;
// this.$emit("getValues", object[i][0].message, false);
break; // 因为我们只需要检测一项,所以就可以跳出循环了 break; // 因为我们只需要检测一项,所以就可以跳出循环了
} }
}, },
confirm() { confirm() {
console.log(111); // console.log(111);
console.log(this.$refs["birthday"]); // console.log(this.referForm.birthday);
this.$refs["referRef"].validate((valid, object) => { this.$refs["referRef"].validate((valid, object) => {
console.log(object, "object"); // console.log(valid, "valid");
console.log("11", valid);
if (!valid) { if (!valid) {
console.log("2221", valid);
this.scrollView(object); this.scrollView(object);
return; return false;
} }
console.log(2222);
setAccount(this.referForm).then((res) => { setAccount(this.referForm).then((res) => {
console.log(res, "setAccount"); // console.log(2222);
// console.log(res, "setAccount");
if (res.data.code != 200) { if (res.data.code != 200) {
// window.scrollTo(0, 0)
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
console.log(3333); // console.log(3333);
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/check"); this.$router.push("/signUp/check");
this.referForm = res.data.data;
}); });
}); });
}, },
......
...@@ -21,7 +21,7 @@ const instance = axios.create({ ...@@ -21,7 +21,7 @@ const instance = axios.create({
"Content-Type": "application/x-www-form-urlencoded", "Content-Type": "application/x-www-form-urlencoded",
}, },
withCredentials: false, withCredentials: false,
}); });
instance.interceptors.request.use( instance.interceptors.request.use(
...@@ -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: "营地报名已关闭",
// onClose() { duration: 2000,
// console.log('error'); // onClose() {
// router.push("/admin/login"); // console.log('error');
// }, // 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