Commit 6c202cdb authored by 杨梦雪's avatar 杨梦雪

111

parent e52b0fb8
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0"> <meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> <link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title> <title> </title>
</head> </head>
<body> <body>
<noscript> <noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong> <strong>We're sorry but doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript> </noscript>
<div id="app"></div> <div id="app"></div>
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
height: 50px; height: 50px;
background: var(--color); background: var(--color);
border-radius: 4px; border-radius: 4px;
border-color: var(--color);
opacity: 0.8; opacity: 0.8;
line-height: 50px; line-height: 50px;
text-align: center; text-align: center;
......
...@@ -24,55 +24,12 @@ export default { ...@@ -24,55 +24,12 @@ export default {
}, },
validateid_card: function (rule, value, callback) { validateid_card: function (rule, value, callback) {
// console.log(value, 'sss') console.log(value, 'sss')
if (!value) {
return callback(new Error("身份证号不能为空"));
}
if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) { if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
return callback(new Error("你输入的身份证长度或格式错误")); callback(new Error("你输入的身份证长度或格式错误"));
}
//身份证城市
var aCity = {
11: "北京",
12: "天津",
13: "河北",
14: "山西",
15: "内蒙古",
21: "辽宁",
22: "吉林",
23: "黑龙江",
31: "上海",
32: "江苏",
33: "浙江",
34: "安徽",
35: "福建",
36: "江西",
37: "山东",
41: "河南",
42: "湖北",
43: "湖南",
44: "广东",
45: "广西",
46: "海南",
50: "重庆",
51: "四川",
52: "贵州",
53: "云南",
54: "西藏",
61: "陕西",
62: "甘肃",
63: "青海",
64: "宁夏",
65: "新疆",
71: "台湾",
81: "香港",
82: "澳门",
91: "国外"
};
if (!aCity[parseInt(value.substr(0, 2))]) {
return callback(new Error("你的身份证地区非法"));
} }
return callback(); callback();
}, },
// 数字验证 // 数字验证
validateNumber: function (rule, value, callback) { validateNumber: function (rule, value, callback) {
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
@input="changeValue1" @input="changeValue1"
@focus="getFocus(0, $event)" @focus="getFocus(0, $event)"
v-model="invatation1" v-model="invatation1"
maxlength="19"
> >
</el-input> </el-input>
<el-input <el-input
...@@ -24,7 +23,6 @@ ...@@ -24,7 +23,6 @@
@input="changeValue1" @input="changeValue1"
@focus="getFocus(1, $event)" @focus="getFocus(1, $event)"
v-model="invatation2" v-model="invatation2"
maxlength="4"
> >
</el-input> </el-input>
<el-input <el-input
...@@ -34,7 +32,6 @@ ...@@ -34,7 +32,6 @@
@input="changeValue1" @input="changeValue1"
@focus="getFocus(2, $event)" @focus="getFocus(2, $event)"
v-model="invatation3" v-model="invatation3"
maxlength="4"
> >
</el-input> </el-input>
<el-input <el-input
...@@ -44,7 +41,6 @@ ...@@ -44,7 +41,6 @@
@input="changeValue1" @input="changeValue1"
@focus="getFocus(3, $event)" @focus="getFocus(3, $event)"
v-model="invatation4" v-model="invatation4"
maxlength="4"
></el-input> ></el-input>
</div> </div>
<!-- <div class="errorCode">该邀请码无效,请输入正确的邀请码。</div> --> <!-- <div class="errorCode">该邀请码无效,请输入正确的邀请码。</div> -->
...@@ -73,13 +69,15 @@ export default { ...@@ -73,13 +69,15 @@ export default {
invatation3: "", invatation3: "",
invatation4: "", invatation4: "",
inputFlag: true, inputFlag: true,
}; };
}, },
watch: { watch: {
invatation1: function () { invatation1: function () {
// /\n/g(删除制表符 /t的正则)
this.invatation1 = this.invatation1 this.invatation1 = this.invatation1
.replace(/[\W]/g, "") .replace(/[\W]/g, "")
// .replace(/\n/g,"")
// .replace("/\n/g",'')
.toUpperCase() .toUpperCase()
.substring(0, 4); .substring(0, 4);
}, },
...@@ -108,20 +106,21 @@ export default { ...@@ -108,20 +106,21 @@ export default {
// }, // },
//第一个输入框 //第一个输入框
changeValue1(e) { changeValue1(e) {
// console.log(e, "输入"); const code = e.trim()
if (e.length == 19 && e.indexOf("-") !== -1) { console.log(code, "输入111")
if ( code.indexOf("-") !== -1) {
//如果是复制过来的带'-'邀请码 //如果是复制过来的带'-'邀请码
let copyCode = e.split("-"); let copyCode = code.split("-");
// console.log(copyCode, "输入"); console.log(copyCode, "输入222");
this.invatation1 = copyCode[0]; this.invatation1 = copyCode[0];
this.invatation2 = copyCode[1]; this.invatation2 = copyCode[1];
this.invatation3 = copyCode[2]; this.invatation3 = copyCode[2];
this.invatation4 = copyCode[3]; this.invatation4 = copyCode[3];
this.$refs.input3.focus(); this.$refs.input3.focus();
} else if (e.length > 4) { } else if (code.length > 4) {
this.changeValue(e.substring(0, 4)); this.changeValue(code.substring(0, 4));
} else { } else {
this.changeValue(e); this.changeValue(code);
} }
}, },
// 输入框 // 输入框
...@@ -206,14 +205,11 @@ export default { ...@@ -206,14 +205,11 @@ export default {
} }
setInviteCode({ code: code }).then((res) => { setInviteCode({ code: code }).then((res) => {
console.log(res, "code"); // console.log(res, "code");
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.status=res.data.status
this.$emit("getstatus", res.data.status); this.$emit("getstatus", res.data.status);
// console.log( res.data.status)
// this.$message.success(res.data.message);
}); });
}, },
}, },
...@@ -262,6 +258,5 @@ export default { ...@@ -262,6 +258,5 @@ export default {
color: #d7373f; color: #d7373f;
line-height: 12px; line-height: 12px;
} }
} }
</style> </style>
...@@ -51,7 +51,7 @@ export default { ...@@ -51,7 +51,7 @@ export default {
// console.log(isNexts, "2222"); // 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) {
if (res.data.code == 400001) { if (res.data.code == 400001) {
this.status = 6; this.status = 6;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<el-col :span="12"> <el-col :span="12">
<el-form-item label="身份证号" prop="id_card"> <el-form-item label="身份证号" prop="id_card">
<el-input <el-input
ref="idCard" ref="id_card"
v-model="referForm.id_card" v-model="referForm.id_card"
placeholder="填写真实姓名身份证号" placeholder="填写真实姓名身份证号"
size="small" size="small"
...@@ -157,13 +157,20 @@ ...@@ -157,13 +157,20 @@
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="政治面貌" prop="political_status"> <el-form-item label="政治面貌" prop="political_status">
<el-input <el-select
ref="political_status" ref="political_status"
v-model="referForm.political_status" v-model="referForm.political_status"
placeholder="填写政治面貌" placeholder="填写政治面貌"
size="small"
clearable clearable
/> >
<el-option
v-for="item in political_status"
:key="item.id"
:label="item.name"
:value="item.name"
>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
...@@ -411,7 +418,7 @@ export default { ...@@ -411,7 +418,7 @@ export default {
{ required: true, validator: validateContents, trigger: "change" }, { required: true, validator: validateContents, trigger: "change" },
], ],
nation: [ nation: [
{ required: true, message: "民族不能为空!", trigger: "blur" }, { required: true, message: "民族不能为空!", trigger: "change" },
], ],
start_school_date: [ start_school_date: [
{ {
...@@ -513,7 +520,22 @@ export default { ...@@ -513,7 +520,22 @@ export default {
], ],
bdYear: "", //选择的生日年份 bdYear: "", //选择的生日年份
bdMonth: "", //选择的生日月份 bdMonth: "", //选择的生日月份
bdDay: "", //选择的生日日期F bdDay: "", //选择的生日日期
// 政治面貌
political_status: [
{
id: 1,
name: "党员",
},
{
id: 2,
name: "团员",
},
{
id: 3,
name: "群众",
},
],
// 上传的图片 // 上传的图片
dialogImageUrl: "", dialogImageUrl: "",
dialogVisible: false, dialogVisible: false,
...@@ -529,7 +551,7 @@ export default { ...@@ -529,7 +551,7 @@ export default {
const code = this.$store.state.indexIdentity; const code = this.$store.state.indexIdentity;
this.phone = window.localStorage.getItem("phone" + code); //本地取用户手机号 this.phone = window.localStorage.getItem("phone" + code); //本地取用户手机号
let signUpFile = window.localStorage.getItem( let signUpFile = window.localStorage.getItem(
"sign_up_file_" + window.localStorage.getItem("phone" + code) "sign_up_file_" + window.localStorage.getItem("phone" + code) + code
); );
// console.log(signUpFile) // console.log(signUpFile)
if (signUpFile && JSON.parse(signUpFile).length > 0) { if (signUpFile && JSON.parse(signUpFile).length > 0) {
...@@ -867,7 +889,8 @@ export default { ...@@ -867,7 +889,8 @@ export default {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.setItem( window.localStorage.setItem(
"sign_up_file_" + "sign_up_file_" +
+window.localStorage.getItem("phone" + code), +window.localStorage.getItem("phone" + code) +
code,
JSON.stringify(this.fileList) JSON.stringify(this.fileList)
); );
}) })
...@@ -912,7 +935,9 @@ export default { ...@@ -912,7 +935,9 @@ export default {
this.fileList.splice(idx, 1); this.fileList.splice(idx, 1);
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.setItem( window.localStorage.setItem(
"sign_up_file_" + window.localStorage.getItem("phone" + code), "sign_up_file_" +
window.localStorage.getItem("phone" + code) +
code,
JSON.stringify(this.fileList) JSON.stringify(this.fileList)
); );
} }
...@@ -972,8 +997,6 @@ export default { ...@@ -972,8 +997,6 @@ export default {
// console.log(res, "setAccount"); // console.log(res, "setAccount");
if (res.data.code != 200) { if (res.data.code != 200) {
if (res.data.code == 400068) { if (res.data.code == 400068) {
// let code = this.$store.state.indexIdentity;
// this.$router.push("/signUp/check?code=" + code);
this.$parent.statuss(); this.$parent.statuss();
return this.$message.error(res.data.message); return this.$message.error(res.data.message);
} }
...@@ -981,11 +1004,9 @@ export default { ...@@ -981,11 +1004,9 @@ export default {
} }
// 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 = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
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;
}); });
}); });
......
...@@ -39,7 +39,11 @@ export default { ...@@ -39,7 +39,11 @@ export default {
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);
if (res.data.is_dowload == 1) {
window.location.href = res.data.pdf_address; window.location.href = res.data.pdf_address;
}else{
return this.$message.error("营地下载证书还未开始");
}
}); });
}, },
}, },
......
...@@ -182,11 +182,11 @@ export function request(config) { ...@@ -182,11 +182,11 @@ export function request(config) {
instance.interceptors.response.use( instance.interceptors.response.use(
(res) => { (res) => {
console.log(res, '11111') // console.log(res, '11111')
console.log(res.data.code, 'res.data.code') // console.log(res.data.code, 'res.data.code')
if (res.data.code == 400034 || if (res.data.code == 400034 ||
res.data.code == 400035 || res.data.code == 400035 ||
res.data.code == 400001 || // res.data.code == 400001 ||
res.data.code == 400002 || res.data.code == 400002 ||
res.data.code == 400003) { res.data.code == 400003) {
...@@ -202,9 +202,8 @@ export function request(config) { ...@@ -202,9 +202,8 @@ export function request(config) {
return return
} }
if (res.data.code == 400023 ) { if (res.data.code == 400023 ) {
console.log(store.state.indexIdentity, 'store.state.indexIdentity') // console.log(store.state.indexIdentity, 'store.state.indexIdentity')
let code = store.state.indexIdentity; let code = store.state.indexIdentity;
window.localStorage.removeItem("doubt_code" + code); window.localStorage.removeItem("doubt_code" + code);
window.localStorage.removeItem("doubt_info" + code); window.localStorage.removeItem("doubt_info" + code);
window.localStorage.removeItem("doubt_check" + code); window.localStorage.removeItem("doubt_check" + code);
...@@ -229,13 +228,11 @@ export function request(config) { ...@@ -229,13 +228,11 @@ export function request(config) {
Notification({ Notification({
message: res.data.message, message: res.data.message,
duration: 3000, duration: 3000,
}); });
return return
} }
if (res.data.code == 400003) { if (res.data.code == 400003) {
let code = this.$store.state.indexIdentity; let code = this.$store.state.indexIdentity;
window.localStorage.removeItem("doubt_code" + code); window.localStorage.removeItem("doubt_code" + code);
window.localStorage.removeItem("doubt_info" + code); window.localStorage.removeItem("doubt_info" + code);
window.localStorage.removeItem("doubt_check" + code); window.localStorage.removeItem("doubt_check" + code);
......
...@@ -91,11 +91,11 @@ router.onError((error) => { ...@@ -91,11 +91,11 @@ router.onError((error) => {
}) })
function checkCam(code, cb) { function checkCam(code, cb) {
console.log(code, 'code') // console.log(code, 'code')
// console.log(cb, 'cb') // console.log(cb, 'cb')
// const code=store.status.indexIdentity // const code=store.status.indexIdentity
store.state.indexIdentity = code; store.state.indexIdentity = code;
console.log(code, 'code') // console.log(code, 'code')
if (!code) { if (!code) {
Message({ Message({
message: "请访问正确的营地链接地址1", message: "请访问正确的营地链接地址1",
...@@ -158,7 +158,6 @@ router.beforeEach((to, from, next) => { ...@@ -158,7 +158,6 @@ router.beforeEach((to, from, next) => {
code = to.params.code ? to.params.code : to.query.code; code = to.params.code ? to.params.code : to.query.code;
checkCam(code, (res) => { checkCam(code, (res) => {
if (res) { if (res) {
let token = window.localStorage.getItem("index-token" + code); let token = window.localStorage.getItem("index-token" + code);
// console.log(token, "token") // console.log(token, "token")
//检查登陆情况 //检查登陆情况
......
...@@ -42,6 +42,7 @@ import Cookie from "js-cookie"; ...@@ -42,6 +42,7 @@ 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";
export default { export default {
name: "campIndex", name: "campIndex",
components: { components: {
...@@ -83,6 +84,7 @@ export default { ...@@ -83,6 +84,7 @@ export default {
// }, // },
}, },
created() { created() {
this.getStatus(); this.getStatus();
this.ToSignUp(this.index); this.ToSignUp(this.index);
}, },
......
...@@ -92,11 +92,10 @@ export default { ...@@ -92,11 +92,10 @@ export default {
signUpInit(status_val) { signUpInit(status_val) {
console.log(11111); console.log(11111);
// console.log(status_val, "11111"); // console.log(status_val, "11111");
// console.log(isNexts, "2222"); // console.log(isNexts, "2222");
signUpInit({}).then((res) => { signUpInit({}).then((res) => {
console.log(22222); // console.log(22222);
// console.log(res, "signUpInit"); console.log(res, "signUpInit");
if (res.data.code != 200) { if (res.data.code != 200) {
// if (res.data.code == 400001) { // if (res.data.code == 400001) {
// this.status = 6; // this.status = 6;
...@@ -149,7 +148,6 @@ export default { ...@@ -149,7 +148,6 @@ export default {
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) {
// console.log(11111); // console.log(11111);
if (res.data.examine_status == 1) { if (res.data.examine_status == 1) {
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
</el-form-item> </el-form-item>
<div class="box"> <div class="box">
<div class="fr" @click="register()">还没有账号?立即注册</div> <div class="fr" @click="register()">还没有账号?立即注册</div>
<div class="fl" @click="forgetPwd()">忘记密码?</div> <!-- <div class="fl" @click="forgetPwd()">忘记密码?</div> -->
</div> </div>
</el-form> </el-form>
</div> </div>
......
...@@ -65,21 +65,7 @@ export default { ...@@ -65,21 +65,7 @@ export default {
let code =this.$store.state.indexIdentity let code =this.$store.state.indexIdentity
getCamInfo(code).then((res) => { getCamInfo(code).then((res) => {
console.log(res, '33333') console.log(res, '33333')
// if (res.data.code == 400034 ||
// res.data.code == 400035 ||
// res.data.code == 400001 ||
// res.data.code == 400002 ||
// res.data.code == 400003) {
// Notification({
// message: res.data.message,
// duration: 1000,
// });
// cb && cb(false);
return false; return false;
// }
}) })
}, },
methods: { methods: {
......
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