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

1111

parent b6d0c2bf
......@@ -5,42 +5,42 @@
</template>
<script>
/* eslint-disable */
import { getCam } from "r/index/login";
export default {
name: "recruit",
data() {
return {};
},
created() {
window.localStorage.setItem(
"index-identity",
"c59086fdb37848e7a10765812d1da349"
);
this.getCam();
// window.localStorage.setItem(
// "index-identity",
// "c59086fdb37848e7a10765812d1da349"
// );
// this.getCam();
},
methods: {
getCam() {
getCam({}).then((res) => {
console.log(res, "getCam");
let root = document.querySelector(":root");
root.style.setProperty("--color", res.data.system_color);
root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
//当前营地logo
window.localStorage.setItem("system_logo", res.data.system_logo);
window.localStorage.setItem(
"doubt_code",
res.data.fill_individual_Invitationcode
); //是否填写邀请码
window.localStorage.setItem(
"doubt_info",
res.data.fill_individual_information
); //是否填写个人资料
window.localStorage.setItem(
"doubt_check",
res.data.audit_individual_information
); //是否审核个人资料
});
},
// getCam() {
// getCam({}).then((res) => {
// console.log(res, "getCam");
// let root = document.querySelector(":root");
// root.style.setProperty("--color", res.data.system_color);
// root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
// //当前营地logo
// window.localStorage.setItem("system_logo", res.data.system_logo);
// window.localStorage.setItem(
// "doubt_code",
// res.data.fill_individual_Invitationcode
// ); //是否填写邀请码
// window.localStorage.setItem(
// "doubt_info",
// res.data.fill_individual_information
// ); //是否填写个人资料
// window.localStorage.setItem(
// "doubt_check",
// res.data.audit_individual_information
// ); //是否审核个人资料
// });
// },
},
};
</script>
......
......@@ -22,80 +22,80 @@ export default {
callback()
}
},
validateid_card: function (rule, value, callback) {
if (!value) {
return callback(new Error("身份证号不能为空"));
}
if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
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))]) {
callback(new Error("你的身份证地区非法"));
}
},
// 数字验证
validateNumber: function (rule, value, callback) {
if (!numberReg.test(value)) {
callback(new Error('请输入数字'))
} else {
callback()
}
},
// 中文验证
validateCn: function (rule, value, callback) {
if (!cnReg.test(value)) {
callback(new Error("请输入中文"));
} else {
callback()
}
},
// 邮箱验证
validateEmail: function (rule, value, callback) {
if (!emailReg.test(value)) {
callback(new Error('邮箱格式错误!'))
} else {
callback()
}
},
validateid_card: function (rule, value, callback) {
if (!value) {
return callback(new Error("身份证号不能为空"));
}
if (!/(^\d{15}$)|(^\d{17}(\d|X|x)$)/.test(value)) {
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))]) {
callback(new Error("你的身份证地区非法"));
}
},
// 数字验证
validateNumber: function (rule, value, callback) {
if (!numberReg.test(value)) {
callback(new Error('请输入数字'))
} else {
callback()
}
},
// 中文验证
validateCn: function (rule, value, callback) {
if (!cnReg.test(value)) {
callback(new Error("请输入中文"));
} else {
callback()
}
},
// 邮箱验证
validateEmail: function (rule, value, callback) {
if (!emailReg.test(value)) {
callback(new Error('邮箱格式错误!'))
} else {
callback()
}
},
}
}
......@@ -6,11 +6,12 @@
top="0"
:close-on-click-modal="false"
@open="confirm()"
@close="cancelBtn()"
>
<div class="pay_code">
<div v-if="isShowqr">
<div class="pay_time">支付剩余时间<span>15分30秒</span></div>
<div>{{ has_amount }}</div>
<!-- <div class="pay_time">支付剩余时间<span>15分30秒</span></div> -->
<div class="money">{{ has_amount }}</div>
<div class="img_qr">
<div class="qrcode" ref="qrCodeUrl"></div>
</div>
......@@ -26,7 +27,7 @@
<span slot="footer" class="dialog-footer">
<div class="btn">
<el-button @click="updateCode()">刷新二维码</el-button>
<el-button class="cancel" @click="cancelBtn()">取 消</el-button>
<!-- <el-button class="cancel" @click="cancelBtn()">取 消</el-button> -->
</div>
</span>
</el-dialog>
......@@ -87,18 +88,18 @@ export default {
this.confirm();
},
createQrCode(qrCode) {
this.removeQr();
var qrcode = new QRCode(this.$refs.qrCodeUrl, {
text: qrCode, // 需要转换为二维码的内容
width: 120,
height: 120,
width: 140,
height: 140,
colorDark: "#000000",
colorLight: "#ffffff",
correctLevel: QRCode.CorrectLevel.H,
});
},
// 确认,关闭弹框,修改父组件的值
cancelBtn() {
// 关闭时,删除二维码img标签
// 删除二维码img标签
removeQr() {
if (this.$refs.qrCodeUrl) {
// 获取 父 标签下的所有子节点
let pObjs = this.$refs.qrCodeUrl.childNodes;
......@@ -108,7 +109,11 @@ export default {
this.$refs.qrCodeUrl.removeChild(pObjs[i]);
}
}
},
// 确认,关闭弹框,修改父组件的值
cancelBtn() {
// 关闭时,删除二维码img标签
this.removeQr();
this.closeWebSocket();
this.dialogVisible = false;
this.$emit("closeCFSUDialog", this.dialogVisible, false);
......@@ -265,74 +270,39 @@ export default {
</script>
<style scoped lang="scss">
.btn {
text-align: center;
padding-bottom: 24px;
}
.el-button {
width: 200px;
height: 50px;
background: var(--color);
border-radius: 4px;
opacity: 0.8;
line-height: 50px;
text-align: center;
color: #fff;
font-size: 16px;
padding: 0;
}
.pay_code {
text-align: center;
:nth-child(1) {
font-size: 14px;
font-weight: 500;
color: #12141c;
line-height: 14px;
span {
font-size: 13px !important;
color: var(--color);
}
}
:nth-child(2) {
font-size: 14px;
.money {
font-size: 20px;
font-weight: 500;
color: var(--color);
line-height: 24px;
}
:nth-child(4) {
font-size: 14px;
font-weight: 500;
color: #333333;
line-height: 16px;
span {
font-size: 17px !important;
color: #60194a;
}
}
:nth-child(5) {
font-size: 12px;
font-weight: 500;
color: #666666;
line-height: 12px;
}
}
// .info_2 {
// text-align: center;
// margin: 10px 0;
// line-height: 30px !important;
// .el-icon-warning {
// font-size: 30px;
// vertical-align: bottom;
// margin-right: 10px;
// color: #ee7602;
// }
// }
.img_qr {
width: 140px;
height: 140px;
padding: 10px;
// border: 1px solid #000;
margin: 0 auto;
img {
width: 100%;
height: 120px;
}
}
// ::v-deep .el-dialog__body {
// padding: 0 !important;
// }
// ::v-deep .el-icon-close:before {
// content: "";
// }
// ::v-deep .el-dialog__footer {
// padding: 30px 40px !important;
// text-align: center;
// .el-button {
// margin: 0 !important;
// }
// }
</style>
......@@ -205,6 +205,7 @@
v-model="referForm.school_city"
clearable
placeholder="市"
@change="changeCity($event)"
>
<el-option
v-for="item in selectCitySchool"
......@@ -220,7 +221,7 @@
<el-form-item label=" " prop="school">
<el-select v-model="referForm.school" clearable placeholder="中学">
<el-option
v-for="item in schoolName"
v-for="item in selectSchoolList"
:key="item.id"
:label="item.name"
:value="item.id"
......@@ -230,20 +231,22 @@
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="中学联系人" clearable prop="school_contacts">
<el-form-item label="中学联系人" prop="school_contacts">
<el-input
v-model="referForm.school_contacts"
placeholder="填写中学联系人"
size="small"
clearable
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="中学联系电话" clearable prop="school_phone">
<el-form-item label="中学联系电话" prop="school_phone">
<el-input
v-model="referForm.school_phone"
placeholder="填写中学联系电话"
size="small"
clearable
/>
</el-form-item>
</el-col>
......@@ -310,7 +313,7 @@
</el-form-item>
<el-form-item class="btn">
<el-button @click="confirm()">提交资料</el-button>
<el-button @click="confirm">提交资料</el-button>
</el-form-item>
</el-form>
</div>
......@@ -327,7 +330,11 @@ import {
getSchool,
} from "r/index/signUp";
import { upload } from "r/index/network";
import validator from "common/validator";
import {
validateid_card,
validateEmail,
validatePhone,
} from "common/validator";
export default {
name: "CheckForm",
......@@ -354,22 +361,21 @@ export default {
return {
isUploading: false, // 图片上传蒙层
referForm: {
name: "",
gender: "",
id_card: "",
birthday: "",
jiguan_code: undefined,
nation: "",
start_school_date: "",
political_status: "",
// phone: "",
email: "",
school_province: "",
school_city: "",
school: "",
school_contacts: "",
school_phone: "",
achievement_path: "",
name: null,
gender: null,
id_card: null,
birthday: null,
jiguan_code: null,
nation: null,
start_school_date: null,
political_status: null,
// phone: null,
email: null,
school_province: null,
school_city: null,
school: null,
school_contacts: null,
school_phone: null,
},
phone: "",
schoolName: [],
......@@ -382,10 +388,9 @@ export default {
],
id_card: [
{ required: true, message: "身份证号码不能为空!", trigger: "blur" },
{ validator: validator.validateid_card, trigger: "blur" },
{ validator: validateid_card, trigger: "blur" },
],
birthday: [
// { required: true, message: "出生日期不能为空!", trigger: "change" },
{
required: true,
validator: validateContent,
......@@ -402,7 +407,7 @@ export default {
{
required: true,
message: "高中入学年份不能为空!",
trigger: "blur",
trigger: "change",
},
],
political_status: [
......@@ -410,7 +415,7 @@ export default {
],
email: [
{ required: true, message: "邮箱不能为空!", trigger: "blur" },
{ validator: validator.validateEmail, trigger: "blur" },
{ validator: validateEmail, trigger: "blur" },
],
school_province: [
{
......@@ -434,15 +439,16 @@ export default {
],
school_phone: [
{ required: true, message: "手机号不能为空!", trigger: "blur" },
{ validator: validator.validatePhone, trigger: "blur" },
{ validator: validatePhone, trigger: "blur" },
],
},
selectProvince: [],
CityName: {},
selectCityJiguan: [],
selectCitySchool: [],
jgProvinceCode: "",
jiguan_city: null,
selectProvince: [], //省份
CityName: {}, //根据省份筛选出所有城市的对象
selectCityJiguan: [], //籍贯城市列表
selectCitySchool: [], //就读中学-城市列表
selectSchoolList: [], //就读中学-中学列表
jgProvinceCode: "", //省份id
jiguan_city: "", //城市id(和省份id拼接)
yearArrs: [], //生日涉及的近10年的年份
monthArrs: [
"01",
......@@ -501,8 +507,7 @@ export default {
fileList: [],
resultPicture: "",
dialogVisible: false,
disabled: false,
disabled: false,//限制输入框
};
},
created() {
......@@ -618,6 +623,16 @@ export default {
this.referForm.school = "";
}
},
changeCity(value) {
let selectSchool = [];
for (const key in this.schoolName) {
if (this.schoolName[key].city_id == value) {
selectSchool.push(this.schoolName[key]);
}
}
this.selectSchoolList = selectSchool;
this.selectSchoolList = selectSchool;
},
// 获取学校
getSchool() {
......@@ -776,22 +791,22 @@ export default {
});
});
},
confirm() {
// this.$refs["referRef"].validate((valid) => {
// console.log(2222)
// if (!valid) return;
setAccount(this.referForm).then((res) => {
console.log(res, "setAccount");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$emit("getstatus", res.data.status);
this.$message.success("提交审核成功");
this.$router.push("/signUp/check");
this.$refs["referRef"].validate((valid) => {
console.log(valid);
if (!valid) return;
console.log("11", valid);
// return;
setAccount(this.referForm).then((res) => {
console.log(res, "setAccount");
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$emit("getstatus", res.data.status);
this.$message.success("提交审核成功");
this.$router.push("/signUp/check");
});
});
// });
},
},
};
......
......@@ -109,6 +109,7 @@ export function request(config) {
const getCam = '/web/auth/getCam';
const registerCode = '/web/code/registerCode';
const passwordCode = '/web/code/passwordCode';
const changePassCode = '/web/auth/changePassCode';
const loginOut = '/web/auth/loginOut';
console.log(config)
if (
......@@ -117,7 +118,9 @@ export function request(config) {
config.url.indexOf(passMsgOld) != -1 ||
config.url.indexOf(getCam) != -1 ||
config.url.indexOf(registerCode) != -1 ||
config.url.indexOf(passwordCode) != -1
config.url.indexOf(changePassCode) != -1 ||
config.url.indexOf(passwordCode) != -1||
config.url.indexOf(loginOut) != -1
) {
return config
}
......
......@@ -13,12 +13,24 @@
/* eslint-disable */
import Header from "../../components/index/Header";
import Footer from "../../components/index/Footer";
export default {
name: "index-index",
components: {
Header,
Footer,
},
data() {
return {};
},
created() {
console.log('created')
},
methods: {
},
};
</script>
<style lang="scss">
......
......@@ -76,7 +76,7 @@ export default {
// 点击邀请码下一步传来的status
statuss(val) {
console.log(val, "val");
this.statuss = val;
// this.statuss = val;
// this.signUpInit();
},
......
......@@ -32,7 +32,7 @@
<span class="code" v-show="show" @click="getCode"
>获取验证码</span
>
<span v-show="!show" class="count">{{ count }} s</span>
<span v-show="!show" class="count">{{ codeTime }} s</span>
</div>
</el-form-item>
<el-form-item prop="password">
......@@ -86,6 +86,7 @@
import { passwordCode } from "r/index/register";
import { changePassCode } from "r/index/login";
import { mobileCheck } from "@/common/utils.js";
import {parseTime} from "common/utils";
export default {
name: "index-reset",
......@@ -103,6 +104,7 @@ export default {
count: "",
timer: null,
isShowPwd: true, // 控制密码显示隐藏
codeTime:'',//手机验证码倒计时时间
resetForm: {
phone: "",
code: "",
......@@ -210,11 +212,12 @@ export default {
passwordCode({
phone: this.resetForm.phone,
}).then((res) => {
console.log(res);
console.log(res,'passwordCode');
if (res.data.code != 200) {
return this.$message.error(res.data.message);
}
this.$message.success(res.data.message);
this.codeTime=parseTime(res.data.data.now)
});
},
......
......@@ -49,18 +49,46 @@
/* eslint-disable */
import Header from "@/components/index/Header.vue";
import Footer from "@/components/index/Footer.vue";
import { getCam } from "r/index/login";
export default {
name: "recruit",
data() {
return {};
},
created(){
window.localStorage.setItem(
"index-identity",
"c59086fdb37848e7a10765812d1da349"
);
this.getCam();
},
methods: {
toLogin() {
this.$router.replace({ name: "index-login" });
},
getCam() {
getCam({}).then((res) => {
console.log(res, "getCam");
let root = document.querySelector(":root");
root.style.setProperty("--color", res.data.system_color);
root.style.setProperty("--bk_pic", res.data.background_picture); //当前营地的背景图
//当前营地logo
window.localStorage.setItem("system_logo", res.data.system_logo);
window.localStorage.setItem(
"doubt_code",
res.data.fill_individual_Invitationcode
); //是否填写邀请码
window.localStorage.setItem(
"doubt_info",
res.data.fill_individual_information
); //是否填写个人资料
window.localStorage.setItem(
"doubt_check",
res.data.audit_individual_information
); //是否审核个人资料
});
},
},
components: {
Header,
......
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