Commit b6573691 authored by 杨梦雪's avatar 杨梦雪

11

parent 7f68da5d
...@@ -24,6 +24,7 @@ export default { ...@@ -24,6 +24,7 @@ export default {
}, },
validateid_card: function (rule, value, callback) { validateid_card: function (rule, value, callback) {
// console.log(value, 'sss')
if (!value) { if (!value) {
return callback(new Error("身份证号不能为空")); return callback(new Error("身份证号不能为空"));
} }
...@@ -96,6 +97,4 @@ export default { ...@@ -96,6 +97,4 @@ export default {
callback() callback()
} }
}, },
} }
<template> <template>
<div class="pass" > <div class="pass">
<div class="p_content"> <div class="p_content">
<div> <div>
<img src="@/assets/img/signUp/icon-shenhe.png" alt="" /> <img src="@/assets/img/signUp/icon-shenhe.png" alt="" />
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</div> </div>
<div class="btn" v-show="this.getExamine == 1 || this.getExamine == 2"> <div class="btn" v-show="this.getExamine == 1 || this.getExamine == 2">
<el-button @click="paying()">下一步 </el-button> <el-button @click="paying()" >下一步 </el-button>
</div> </div>
</div> </div>
</div> </div>
...@@ -21,8 +21,19 @@ ...@@ -21,8 +21,19 @@
export default { export default {
name: "Pass", name: "Pass",
props: { props: {
getExamine: String, getExamine: [String, Number],
next: "",
}, },
created() {
console.log(this.getExamine);
},
methods: {
paying() {
this.nextNum = 1;
this.$emit('isNext',this.nextNum)
},
},
}; };
</script> </script>
......
...@@ -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" class="is-error"> <el-form-item label="姓名" prop="name" >
<el-input <el-input
ref="name" ref="name"
v-model="referForm.name" v-model="referForm.name"
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="出生日期" prop="birthday"> <el-form-item label="出生日期" prop="birthday" ref="birthday">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="8"> <el-col :span="8">
<el-select ref="bdYear" v-model="bdYear" placeholder="年"> <el-select v-model="bdYear" placeholder="年">
<el-option <el-option
v-for="(item, index) in yearArrs" v-for="(item, index) in yearArrs"
:key="index" :key="index"
...@@ -58,7 +58,7 @@ ...@@ -58,7 +58,7 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select ref="bdMonth" v-model="bdMonth" placeholder="月"> <el-select v-model="bdMonth" placeholder="月">
<el-option <el-option
v-for="(item, index) in monthArrs" v-for="(item, index) in monthArrs"
:key="index" :key="index"
...@@ -69,12 +69,7 @@ ...@@ -69,12 +69,7 @@
</el-select> </el-select>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-select <el-select v-model="bdDay" placeholder="日" @change="getTime">
ref="bdDay"
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"
...@@ -89,7 +84,7 @@ ...@@ -89,7 +84,7 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="籍贯" prop="jiguan_code" class="is-error"> <el-form-item label="籍贯" prop="jiguan_code" >
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
<el-select <el-select
...@@ -334,7 +329,7 @@ ...@@ -334,7 +329,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>
...@@ -351,19 +346,13 @@ import { ...@@ -351,19 +346,13 @@ import {
getSchool, getSchool,
} from "r/index/signUp"; } from "r/index/signUp";
import { upload } from "r/index/network"; import { upload } from "r/index/network";
import { import validator from "common/validator";
validateid_card,
validateEmail,
validatePhone,
} from "common/validator";
export default { export default {
name: "CheckForm", name: "CheckForm",
data() { data() {
let validateContent = (rule, value, callback) => { let validateContent = (rule, value, callback) => {
// console.log(rule, value, callback);
// console.log(this.referForm.birthday);
if (!this.referForm.birthday) { if (!this.referForm.birthday) {
callback(new Error("出生日期不能为空!")); callback(new Error("出生日期不能为空!"));
} else { } else {
...@@ -371,8 +360,6 @@ export default { ...@@ -371,8 +360,6 @@ export default {
} }
}; };
let validateContents = (rule, value, callback) => { let validateContents = (rule, value, callback) => {
// console.log(rule, value, callback);
// console.log(this.referForm.jiguan_code);
if (!this.referForm.jiguan_code) { if (!this.referForm.jiguan_code) {
callback(new Error("籍贯不能为空!")); callback(new Error("籍贯不能为空!"));
} else { } else {
...@@ -409,7 +396,7 @@ export default { ...@@ -409,7 +396,7 @@ export default {
], ],
id_card: [ id_card: [
{ required: true, message: "身份证号码不能为空!", trigger: "blur" }, { required: true, message: "身份证号码不能为空!", trigger: "blur" },
{ validator: validateid_card, trigger: "blur" }, { validator: validator.validateid_card, trigger: "blur" },
], ],
birthday: [ birthday: [
{ {
...@@ -436,7 +423,7 @@ export default { ...@@ -436,7 +423,7 @@ export default {
], ],
email: [ email: [
{ required: true, message: "邮箱不能为空!", trigger: "blur" }, { required: true, message: "邮箱不能为空!", trigger: "blur" },
{ validator: validateEmail, trigger: "blur" }, { validator: validator.validateEmail, trigger: "blur" },
], ],
school_province: [ school_province: [
{ {
...@@ -460,7 +447,7 @@ export default { ...@@ -460,7 +447,7 @@ export default {
], ],
school_phone: [ school_phone: [
{ required: true, message: "手机号不能为空!", trigger: "blur" }, { required: true, message: "手机号不能为空!", trigger: "blur" },
{ validator: validatePhone, trigger: "blur" }, { validator: validator.validatePhone, trigger: "blur" },
], ],
}, },
selectProvince: [], //省份 selectProvince: [], //省份
...@@ -818,6 +805,7 @@ export default { ...@@ -818,6 +805,7 @@ 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) {
...@@ -849,21 +837,25 @@ export default { ...@@ -849,21 +837,25 @@ export default {
} }
}, },
confirm() { confirm() {
console.log(111);
console.log(this.$refs["birthday"]);
this.$refs["referRef"].validate((valid, object) => { this.$refs["referRef"].validate((valid, object) => {
console.log(object, "object"); console.log(object, "object");
console.log("11", valid);
if (!valid) { if (!valid) {
console.log("2221", valid);
this.scrollView(object); this.scrollView(object);
return; return;
} }
console.log("11", valid); console.log(2222);
// 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) {
// window.scrollTo(0, 0) // window.scrollTo(0, 0)
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
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");
......
...@@ -26,7 +26,6 @@ const instance = axios.create({ ...@@ -26,7 +26,6 @@ const instance = axios.create({
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
console.log(config, '111');
if (config.method === "post" && !config.notQs) { if (config.method === "post" && !config.notQs) {
config.data = qs.stringify(config.data); config.data = qs.stringify(config.data);
} }
......
...@@ -113,12 +113,19 @@ router.beforeEach((to, from, next) => { ...@@ -113,12 +113,19 @@ router.beforeEach((to, from, next) => {
toLogin = "/login", toLogin = "/login",
toRegister = "/register", toRegister = "/register",
toReset = "/reset" toReset = "/reset"
// toRrecruit = "/recruit"
let token = localStorage.getItem(tokenKey); let token = localStorage.getItem(tokenKey);
let nextUrl = false; let nextUrl = false;
let code = false; let code = false;
if(to.path == toLogin || to.path == toRegister || to.path == toReset) { if (to.path == toLogin || to.path == toRegister || to.path == toReset) {
nextUrl = false; // nextUrl = false;
}else if (to.name == "recruit") { code = to.params.code;
checkCam(code, (res) => {
if (res) {
nextUrl = false;
}
});
} else if (to.name == "recruit") {
code = to.params.code; code = to.params.code;
checkCam(code, (res) => { checkCam(code, (res) => {
if (res) { if (res) {
......
...@@ -84,9 +84,9 @@ export default { ...@@ -84,9 +84,9 @@ export default {
created() { created() {
window.localStorage.setItem("campindex_type", 0); window.localStorage.setItem("campindex_type", 0);
this.campindex_type = window.localStorage.getItem("campindex_type"); this.campindex_type = window.localStorage.getItem("campindex_type");
this.campindex_type= 0 this.campindex_type = 0;
this.getStatus(); this.getStatus();
this.ToSignUp() this.ToSignUp();
}, },
mounted() { mounted() {
window.addEventListener("scroll", this.handleScrollX, true); window.addEventListener("scroll", this.handleScrollX, true);
...@@ -167,18 +167,24 @@ export default { ...@@ -167,18 +167,24 @@ export default {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
} }
// .com-container {
// height: calc(100% - 100px);
// }
.index-container { .index-container {
padding: 104px 0 70px 0; padding: 104px 0 70px 0;
display: flex; display: flex;
flex-flow: row; flex-flow: row;
.camp_left { .camp_left {
// width: 100px;
height: 100%;
position: relative; position: relative;
width: 22%; width: 22%;
max-width: 280px; max-width: 280px;
min-width: 200px; min-width: 200px;
// width: calc(100% - 100px);
height: 300px; height: 300px;
background-color: #ffffff; background-color: #ffffff;
border-radius: 8px; border-radius: 8px;
padding: 20px 0; padding: 20px 0;
...@@ -226,6 +232,9 @@ export default { ...@@ -226,6 +232,9 @@ export default {
.camp_right { .camp_right {
flex: 1; flex: 1;
// width: calc(100% - 100px);
// height: 100%;
// overflow: auto;
border-radius: 8px; border-radius: 8px;
background-color: #ffffff; background-color: #ffffff;
} }
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<Pass <Pass
v-else-if="type == 'check'" v-else-if="type == 'check'"
@getstatus="statuss" @getstatus="statuss"
@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>
...@@ -50,10 +51,10 @@ export default { ...@@ -50,10 +51,10 @@ export default {
status: "", //进度 status: "", //进度
doubt_code: window.localStorage.getItem("doubt_code"), doubt_code: window.localStorage.getItem("doubt_code"),
doubt_info: window.localStorage.getItem("doubt_info"), doubt_info: window.localStorage.getItem("doubt_info"),
doubt_check: window.localStorage.getItem("doubt_check"), doubt_check: window.localStorage.getItem("doubt_check"),
status_val: "", status_val: "",
getExamine: "", getExamine: "",
isNext: "",
}; };
}, },
created() { created() {
...@@ -66,7 +67,7 @@ export default { ...@@ -66,7 +67,7 @@ export default {
watch: { watch: {
$route: { $route: {
handler(val) { handler(val) {
console.log(val, "routeval"); // console.log(val, "routeval");
const that = this; const that = this;
if (val.path.indexOf("signUp") != -1) { if (val.path.indexOf("signUp") != -1) {
that.type = val.params.type; that.type = val.params.type;
...@@ -75,27 +76,18 @@ export default { ...@@ -75,27 +76,18 @@ export default {
deep: true, deep: true,
}, },
status(val) { status(val) {
console.log(val, "status"); // console.log(val, "status");
},
isNext(val) {
this.isNext = val;
console.log(val, "isNext");
}, },
}, },
methods: { methods: {
// 点击下一步,触发父组件方法 // 点击下一步,触发父组件方法
statuss(val) { statuss(val) {
console.log(val, "statuss"); // console.log(val, "statuss");
this.status_val = val; this.status_val = val;
// if (this.status_val == 1) {
// this.type = "invitation";
// this.status = 1;
// } else if (this.status_val == 2) {
// this.type = "referInfo";
// this.status = 3;
// } else if (this.status_val == 3) {
// this.type = "check";
// } else if (this.status_val == 4) {
// this.type = "pay";
// } else if (this.status_val == 5) {
// this.type = "success";
// }
this.signUpInit(this.status_val); this.signUpInit(this.status_val);
}, },
...@@ -148,17 +140,19 @@ export default { ...@@ -148,17 +140,19 @@ export default {
this.status = 3; this.status = 3;
} }
} else if (this.status == 4) { } else if (this.status == 4) {
if (res.data.examine_status == 0) { this.type = "check";
this.type = "check"; this.status = 3;
this.status = 3;
} else if (res.data.examine_status == 1) { if (this.isNext != null) {
// console.log(333); if (res.data.examine_status == 1) {
this.type = "pay"; console.log(333);
this.status = 4; this.type = "pay";
} else if (res.data.examine_status == 2) { this.status = 4;
this.type = "referInfo"; } else if (res.data.examine_status == 2) {
this.status = 2; this.type = "referInfo";
return this.$message.error(res.data.examine_reason); this.status = 2;
return this.$message.error(res.data.examine_reason);
}
} }
} else if (this.status == 5) { } else if (this.status == 5) {
this.type = "pay"; this.type = "pay";
......
...@@ -200,7 +200,7 @@ export default { ...@@ -200,7 +200,7 @@ export default {
const timeLag = intervalTime(startTime, endTime); const timeLag = intervalTime(startTime, endTime);
console.log(timeLag); console.log(timeLag);
if (!this.timer) { if (!this.timer) {
this.count = timeLag-1;//59 this.count = timeLag;
this.show = false; this.show = false;
this.timer = setInterval(() => { this.timer = setInterval(() => {
if (this.count > 0 && this.count <= timeLag) { if (this.count > 0 && this.count <= timeLag) {
......
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