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

11

parent 2002039d
...@@ -213,9 +213,7 @@ export default { ...@@ -213,9 +213,7 @@ export default {
// this.status=res.data.status // this.status=res.data.status
this.$emit("getstatus", res.data.status); this.$emit("getstatus", res.data.status);
// console.log( res.data.status) // console.log( res.data.status)
this.$message.success(res.data.message); // this.$message.success(res.data.message);
// this.$router.push("/signUp/referInfo");
}); });
}, },
}, },
......
...@@ -10,7 +10,10 @@ ...@@ -10,7 +10,10 @@
</div> </div>
<div v-if="this.examine_status == 1">审核已通过</div> <div v-if="this.examine_status == 1">审核已通过</div>
<div v-if="this.examine_status == 2">提示:{{ this.examine_reason }}</div> <div v-if="this.examine_status == 2">提示:{{ this.examine_reason }}</div>
<div class="btn" v-show="this.examine_status == 1 || this.examine_status == 2"> <div
class="btn"
v-show="this.examine_status == 1 || this.examine_status == 2"
>
<el-button @click="paying()">下一步 </el-button> <el-button @click="paying()">下一步 </el-button>
</div> </div>
</div> </div>
...@@ -19,11 +22,10 @@ ...@@ -19,11 +22,10 @@
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Cookie from "js-cookie";
import { signUpInit } from "r/index/signUp";
export default { export default {
name: "Pass", name: "Pass",
props: {
// getExamine: [String, Number],
},
data() { data() {
return { return {
examine_status: window.localStorage.getItem("examine_status"), examine_status: window.localStorage.getItem("examine_status"),
...@@ -31,17 +33,130 @@ export default { ...@@ -31,17 +33,130 @@ export default {
}; };
}, },
created() { created() {
console.log(this.examine_reason);
// let url = location.href; //把当前页面的地址赋给变量 url
// console.log(url)
// var times = url.split("?"); //分切变量 url 分隔符号为 "?"
// let code = Cookie.get("index-identity");
// if (times[1] != "code=" + code) {
// //如果?后的值不等于1表示没有刷新
// url += "?1"; //把变量 url 的值加入 ?1
// self.location.replace(url); //刷新页面
// }
this.signUpInit()
}, },
watch: {}, watch: {},
methods: { methods: {
paying() { paying() {
this.$emit("is_next", 1); this.$emit("is_next", 1);
// console.log(is_next); // console.log(is_next);
}, },
signUpInit(status_val) {
// console.log(status_val, "11111");
// console.log(isNexts, "2222");
signUpInit({}).then((res) => {
// console.log(res, "signUpInit");
if (res.data.code != 200) {
if (res.data.code == 400001) {
this.status = 6;
this.type = "success";
}
return this.$message.error(res.data.message);
}
this.status = res.data.status;
// console.log(this.status, "11111");
// 点击下一步传值给status,更新
if (status_val != null) {
this.status = status_val;
} else {
this.status = res.data.status;
// console.log(this.status, "11111");
}
// doubt_code,doubt_info,doubt_check。0为不填写,1为填写
if (this.status == 0) {
this.type = "examInfo";
} else if (this.status == 1) {
// 是否填写邀请码
if (this.doubt_code == 0) {
this.type = "referInfo";
this.status = 2;
} else {
this.type = "invitation";
this.status = 1;
}
} else if (this.status == 2) {
// console.log(this.doubt_info, "doubt_info");
// 是否填写个人资料
if (this.doubt_info == 0) {
this.type = "check";
this.status = 3;
} else {
this.type = "referInfo";
// this.status = 2;
}
} else if (this.status == 3) {
// 是否审核个人资料
if (this.doubt_check == 0) {
this.type = "pay";
this.status = 4;
} else {
this.type = "check";
this.status = 3;
}
} else if (this.status == 4) {
this.type = "check";
this.status = 3;
// console.log(this.status, "this.status ");
// console.log(this.isNexts ,'this.isNexts ')
if (this.isNexts == 1) {
// console.log(11111);
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 = 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";
}
this.$emit("getStatus", this.type);
// this.getExamine = res.data.examine_status;
// console.log(res.data.examine_status, "res.data.examine_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);
this.examine_status = res.data.examine_status;
window.localStorage.setItem("examine_status", res.data.examine_status); //返回错误原因
window.localStorage.setItem("examine_reason", res.data.examine_reason); //资料审核状态
// window.localStorage.setItem("achievement_path", res.data.achievement_path); //上传的图片
const aPath = res.data.achievement_path;
if (aPath) {
let arr = aPath.split(",");
let fileList = [];
fileList = arr.map((item) => {
let obj = {
url: item
};
return obj
});
window.localStorage.setItem(
"sign_up_file_" + window.localStorage.getItem("phone"),
JSON.stringify(fileList)
); //上传的图片
}
});
},
}, },
}; };
</script> </script>
......
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
<el-select <el-select
ref="start_school_date" ref="start_school_date"
v-model="referForm.start_school_date" v-model="referForm.start_school_date"
placeholder="填写入学年份(高中)" placeholder="年份"
clearable clearable
> >
<el-option <el-option
...@@ -392,14 +392,12 @@ export default { ...@@ -392,14 +392,12 @@ export default {
phone: "", phone: "",
schoolName: {}, schoolName: {},
referInfoRules: { referInfoRules: {
name: [ name: [{ required: true, message: "姓名不能为空!", trigger: "blur" }],
{ required: true, message: "真实姓名不能为空!", trigger: "blur" },
],
gender: [ gender: [
{ required: true, message: "性别不能为空!", trigger: "change" }, { required: true, message: "性别不能为空!", trigger: "change" },
], ],
id_card: [ id_card: [
{ required: true, message: "身份证号不能为空!", trigger: "blur" }, { required: true, message: "身份证号不能为空!", trigger: "blur" },
{ validator: validator.validateid_card, trigger: "blur" }, { validator: validator.validateid_card, trigger: "blur" },
], ],
birthday: [ birthday: [
...@@ -418,7 +416,7 @@ export default { ...@@ -418,7 +416,7 @@ export default {
start_school_date: [ start_school_date: [
{ {
required: true, required: true,
message: "高中入学年份不能为空!", message: "入学年份不能为空!",
trigger: "change", trigger: "change",
}, },
], ],
...@@ -426,7 +424,7 @@ export default { ...@@ -426,7 +424,7 @@ export default {
{ required: true, message: "政治面貌不能为空!", trigger: "blur" }, { required: true, message: "政治面貌不能为空!", trigger: "blur" },
], ],
email: [ email: [
{ required: true, message: "邮箱不能为空!", trigger: "blur" }, { required: true, message: "电子邮箱不能为空!", trigger: "blur" },
{ validator: validator.validateEmail, trigger: "blur" }, { validator: validator.validateEmail, trigger: "blur" },
], ],
school_province: [ school_province: [
...@@ -447,10 +445,14 @@ export default { ...@@ -447,10 +445,14 @@ export default {
{ required: true, message: "请选择所在学校!", trigger: "change" }, { required: true, message: "请选择所在学校!", trigger: "change" },
], ],
school_contacts: [ school_contacts: [
{ required: true, message: "请填写学校联系人!", trigger: "blur" }, { required: true, message: "请填写中学联系人!", trigger: "blur" },
], ],
school_phone: [ school_phone: [
{ required: true, message: "手机号不能为空!", trigger: "blur" }, {
required: true,
message: "中学联系电话不能为空!",
trigger: "blur",
},
{ validator: validator.validatePhone, trigger: "blur" }, { validator: validator.validatePhone, trigger: "blur" },
], ],
}, },
...@@ -539,7 +541,8 @@ export default { ...@@ -539,7 +541,8 @@ export default {
// this.fileList = window.localStorage.getItem("achievement_path"); // this.fileList = window.localStorage.getItem("achievement_path");
// } // }
// console.log(window.localStorage.getItem("achievement_path")) // console.log(window.localStorage.getItem("achievement_path"))
console.log(this.fileList); // console.log(this.fileList);
console.log(this.$parent.event, " this.$parent");
this.getSchool(); this.getSchool();
this.getProAndCity(); this.getProAndCity();
this.getTenYear(); this.getTenYear();
...@@ -966,23 +969,28 @@ export default { ...@@ -966,23 +969,28 @@ export default {
// console.log(this.referForm.birthday); // console.log(this.referForm.birthday);
this.$refs["referRef"].validate((valid, object) => { this.$refs["referRef"].validate((valid, object) => {
// console.log(valid, "valid"); // console.log(valid, "valid");
if (!valid) { if (!valid) {
this.scrollView(object); this.scrollView(object);
return false; return false;
} }
setAccount(this.referForm).then((res) => { setAccount(this.referForm).then((res) => {
// console.log(2222);
// console.log(res, "setAccount"); // console.log(res, "setAccount");
if (res.data.code != 200) { if (res.data.code != 200) {
if (res.data.code == 400068) {
// let code = Cookie.get("index-identity");
// this.$router.push("/signUp/check?code=" + code);
this.$parent.statuss();
return this.$message.error(res.data.message);
}
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.$emit("getstatus", res.data.status);
this.$message.success(res.data.message); this.$message.success(res.data.message);
let code = Cookie.get("index-identity"); let code = Cookie.get("index-identity");
this.$router.push("/signUp/check?code=" + code); this.$router.push("/signUp/check?code=" + code);
// this.$parent.is_nextevent();
this.referForm = res.data.data; this.referForm = res.data.data;
}); });
}); });
......
...@@ -38,7 +38,7 @@ export default { ...@@ -38,7 +38,7 @@ 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.$message.success(res.data.message); // this.$message.success(res.data.message);
window.location.href = res.data.pdf_address; window.location.href = res.data.pdf_address;
}); });
}, },
......
...@@ -190,7 +190,7 @@ export function request(config) { ...@@ -190,7 +190,7 @@ export function request(config) {
res.data.code == 400801 || res.data.code == 400801 ||
res.data.code == 400910 || res.data.code == 400910 ||
res.data.code == 4002132 || res.data.code == 4002132 ||
res.data.code == 400410 || res.data.code == 40068 ||
res.data.code == 401001 res.data.code == 401001
) { ) {
store.state.showDialog = true store.state.showDialog = true
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Cookie from "js-cookie" import Cookie from "js-cookie";
import Header from "@/components/index/SignUp/Header.vue"; import Header from "@/components/index/SignUp/Header.vue";
import Footer from "@/components/index/Footer.vue"; import Footer from "@/components/index/Footer.vue";
...@@ -50,7 +50,7 @@ export default { ...@@ -50,7 +50,7 @@ export default {
}, },
data() { data() {
return { return {
index: 0,
isPosition: 0, // 左侧box是否浮动 isPosition: 0, // 左侧box是否浮动
pageYOffset: 0, // 左侧box浮动时,滚动的高度 pageYOffset: 0, // 左侧box浮动时,滚动的高度
scorllHeight: 0, // 最大滚动高度 scorllHeight: 0, // 最大滚动高度
...@@ -72,7 +72,7 @@ export default { ...@@ -72,7 +72,7 @@ export default {
}, },
], ],
campindex_type: "", campindex_type: 0,
index_status: "", index_status: "",
}; };
}, },
...@@ -83,11 +83,8 @@ export default { ...@@ -83,11 +83,8 @@ export default {
// }, // },
}, },
created() { created() {
window.localStorage.setItem("campindex_type", 0);
this.campindex_type = window.localStorage.getItem("campindex_type");
this.campindex_type = 0;
this.getStatus(); this.getStatus();
this.ToSignUp(); this.ToSignUp(this.index);
}, },
mounted() { mounted() {
window.addEventListener("scroll", this.handleScrollX, true); window.addEventListener("scroll", this.handleScrollX, true);
...@@ -104,14 +101,15 @@ export default { ...@@ -104,14 +101,15 @@ export default {
this.ToSignUp(); this.ToSignUp();
}, },
ToSignUp(index) { ToSignUp(index) {
// console.log(index,'index')
let code = Cookie.get("index-identity"); let code = Cookie.get("index-identity");
this.campindex_type = index; this.campindex_type = index;
if (this.campindex_type == 0) { if (this.campindex_type == 0) {
this.$router.push("/signUp/" + this.index_status+"?code="+code); this.$router.push("/signUp/" + this.index_status + "?code=" + code);
} else if (this.campindex_type == 1) { } else if (this.campindex_type == 1) {
this.$router.push("/homework?code="+code); this.$router.push("/homework?code=" + code);
} else if (this.campindex_type == 2) { } else if (this.campindex_type == 2) {
this.$router.push("/certificate?code="+code); this.$router.push("/certificate?code=" + code);
} }
}, },
onResize() { onResize() {
......
...@@ -143,7 +143,7 @@ export default { ...@@ -143,7 +143,7 @@ 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.status, "this.status ");
// console.log(this.isNexts ,'this.isNexts ') // console.log(this.isNexts ,'this.isNexts ')
if (this.isNexts == 1) { if (this.isNexts == 1) {
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
} else if (res.data.examine_status == 2) { } else if (res.data.examine_status == 2) {
this.type = "referInfo"; this.type = "referInfo";
this.status = 2; 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) {
......
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