Commit 1a51d059 authored by 杨梦雪's avatar 杨梦雪

增加邀请码

parent f43e9f33
...@@ -493,6 +493,25 @@ ...@@ -493,6 +493,25 @@
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
<!-- 邀请码 -->
<el-col :span="12" v-show="doubt_code == 1">
<el-form-item
label="邀请码"
style="height: 73px"
>
<el-input
ref="code"
v-model="referForm.code"
placeholder="邀请码"
size="small"
:disabled="referForm.code==null?false:true"
clearable
/>
</el-form-item>
<div class="tipsMsg">
每个邀请码仅能绑定一个用户
</div>
</el-col>
</el-row> </el-row>
<!-- 学校信息 --> <!-- 学校信息 -->
<div <div
...@@ -642,7 +661,7 @@ ...@@ -642,7 +661,7 @@
</div> </div>
</div> </div>
<!-- 学习成绩证明材料 --> <!-- 学习成绩证明材料 -->
<div v-show="configJson.achievementPath == 1" > <div v-show="configJson.achievementPath == 1">
<div class="cont_title">学习成绩证明材料</div> <div class="cont_title">学习成绩证明材料</div>
<el-form-item <el-form-item
label="上传申请资料图片" label="上传申请资料图片"
...@@ -724,7 +743,7 @@ ...@@ -724,7 +743,7 @@
<script> <script>
/* eslint-disable */ /* eslint-disable */
import Cookie from "js-cookie"; import {setInviteCode} from "r/index/signUp";
import { import {
getAccount, getAccount,
getAchievementOss, getAchievementOss,
...@@ -739,7 +758,7 @@ ...@@ -739,7 +758,7 @@
export default { export default {
name: "referInfo", name: "referInfo",
props: {invitation_code: String},
data() { data() {
const validateContent = (rule, value, callback) => { const validateContent = (rule, value, callback) => {
if (!this.referForm.birthday) { if (!this.referForm.birthday) {
...@@ -781,8 +800,11 @@ ...@@ -781,8 +800,11 @@
school: null, school: null,
school_contacts: null, school_contacts: null,
school_phone: null, school_phone: null,
code: null
}, },
doubt_code: window.localStorage.getItem(
"doubt_code" + this.$store.state.indexIdentity
),//是否填写邀请码
schoolName: {}, schoolName: {},
referInfoRules: { referInfoRules: {
name: [{required: true, message: "姓名不能为空!", trigger: "blur"}], name: [{required: true, message: "姓名不能为空!", trigger: "blur"}],
...@@ -881,10 +903,8 @@ ...@@ -881,10 +903,8 @@
}, },
{validator: validator.validatePhone, trigger: "blur"}, {validator: validator.validatePhone, trigger: "blur"},
], ],
// backgroundPicture: [{ required: true, message: "请上传图片" }], // backgroundPicture: [{ required: true, message: "请上传图片" }],
}, },
EducationArrs: ["初中", "高中", "大学", "硕士", "博士"], EducationArrs: ["初中", "高中", "大学", "硕士", "博士"],
countryList: area.country, //国籍 countryList: area.country, //国籍
selectProvince: [], //省份 selectProvince: [], //省份
...@@ -895,7 +915,6 @@ ...@@ -895,7 +915,6 @@
jgProvinceCode: "", //省份id jgProvinceCode: "", //省份id
jiguan_city: "", //城市id(和省份id拼接) jiguan_city: "", //城市id(和省份id拼接)
yearArrs: [], //生日涉及的近10年的年份 yearArrs: [], //生日涉及的近10年的年份
monthArrs: [ monthArrs: [
"01", "01",
"02", "02",
...@@ -974,7 +993,6 @@ ...@@ -974,7 +993,6 @@
dialogVisible: false, dialogVisible: false,
fileList: [], fileList: [],
resultPicture: "", resultPicture: "",
dialogVisible: false,
disabled: false, //限制输入框 disabled: false, //限制输入框
}; };
}, },
...@@ -999,6 +1017,7 @@ ...@@ -999,6 +1017,7 @@
if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) { if (this.configJson.jiguanCity == 1 || this.configJson.school == 1) {
this.getProAndCity(); this.getProAndCity();
} }
}, },
watch: { watch: {
referForm(val) { referForm(val) {
...@@ -1057,6 +1076,9 @@ ...@@ -1057,6 +1076,9 @@
this.changeCity(this.referForm.school_city, true); this.changeCity(this.referForm.school_city, true);
// console.log(this.referForm.school_city, 12322); // console.log(this.referForm.school_city, 12322);
} }
if (this.invitation_code != null) {
this.referForm.code = this.invitation_code
}
}, },
}, },
mounted() { mounted() {
...@@ -1096,7 +1118,6 @@ ...@@ -1096,7 +1118,6 @@
console.log(yearArr, "yearArr"); console.log(yearArr, "yearArr");
this.yearArrs = yearArr; this.yearArrs = yearArr;
}, },
//组装出生日期 //组装出生日期
getTime() { getTime() {
this.referForm.birthday = this.referForm.birthday =
...@@ -1106,7 +1127,6 @@ ...@@ -1106,7 +1127,6 @@
// console.log(this.referForm.birthday); // console.log(this.referForm.birthday);
}, },
// 国籍 // 国籍
//组装入学年份 //组装入学年份
getyear() { getyear() {
this.referForm.start_school_date = this.start_year.toString(); this.referForm.start_school_date = this.start_year.toString();
...@@ -1125,7 +1145,6 @@ ...@@ -1125,7 +1145,6 @@
// console.log(this.selectProvince, this.CityName); // console.log(this.selectProvince, this.CityName);
}); });
}, },
//选择籍贯省份change事件 //选择籍贯省份change事件
changeProvince(type, val, status) { changeProvince(type, val, status) {
// console.log(type, val); // console.log(type, val);
...@@ -1146,7 +1165,6 @@ ...@@ -1146,7 +1165,6 @@
} }
} }
}, },
//返回当前省份下的城市列表 //返回当前省份下的城市列表
getCurrentCityLists(val) { getCurrentCityLists(val) {
let currentCity = []; let currentCity = [];
...@@ -1185,7 +1203,6 @@ ...@@ -1185,7 +1203,6 @@
} }
return currentCity; return currentCity;
}, },
// 籍贯城市change事件 // 籍贯城市change事件
getJiguan() { getJiguan() {
this.referForm.jiguan_code = this.referForm.jiguan_code =
...@@ -1217,7 +1234,6 @@ ...@@ -1217,7 +1234,6 @@
// }); // });
// this.restaurants = data; //中学(模糊搜索) // this.restaurants = data; //中学(模糊搜索)
}, },
// 返回当前城市下的学校列表 // 返回当前城市下的学校列表
getCurrentSchoolLists(val) { getCurrentSchoolLists(val) {
let currentSchool = []; let currentSchool = [];
...@@ -1273,7 +1289,6 @@ ...@@ -1273,7 +1289,6 @@
} }
return currentSchool; return currentSchool;
}, },
// 图片上传成功前钩子 // 图片上传成功前钩子
beforeAvatarUpload(file) { beforeAvatarUpload(file) {
// console.log(file, "beforeImage"); // console.log(file, "beforeImage");
...@@ -1290,7 +1305,6 @@ ...@@ -1290,7 +1305,6 @@
} }
return (isJPG || isPng || isJPEG) && isLt10M; return (isJPG || isPng || isJPEG) && isLt10M;
}, },
handlePictureCardPreview(file) { handlePictureCardPreview(file) {
console.log(file, "11111111"); console.log(file, "11111111");
this.resultPicture = file.url; this.resultPicture = file.url;
...@@ -1459,6 +1473,14 @@ ...@@ -1459,6 +1473,14 @@
break; // 因为我们只需要检测一项,所以就可以跳出循环了 break; // 因为我们只需要检测一项,所以就可以跳出循环了
} }
}, },
confimCode(code) {
setInviteCode({code: code}).then((res) => {
// console.log(res, "code");
if (res.data.code !== 200) {
return this.$message.error(res.data.message);
}
});
},
confirm() { confirm() {
// console.log(111); // console.log(111);
// console.log(this.referForm.birthday); // console.log(this.referForm.birthday);
...@@ -1486,7 +1508,6 @@ ...@@ -1486,7 +1508,6 @@
if (this.configJson.education == 1) { if (this.configJson.education == 1) {
obj.education = _this.referForm.education; obj.education = _this.referForm.education;
} }
if (this.configJson.postAddress == 1) { if (this.configJson.postAddress == 1) {
obj.address = _this.referForm.address; obj.address = _this.referForm.address;
} }
...@@ -1534,6 +1555,10 @@ ...@@ -1534,6 +1555,10 @@
if (this.configJson.schoolPhone == 1) { if (this.configJson.schoolPhone == 1) {
obj.school_phone = _this.referForm.school_phone; obj.school_phone = _this.referForm.school_phone;
} }
//是否需要填写邀请码
if (this.doubt_code == 1 && this.code != '') {
obj.code = _this.referForm.code;
}
setAccount(obj).then((res) => { setAccount(obj).then((res) => {
// console.log(res, "setAccount"); // console.log(res, "setAccount");
if (res.data.code != 200) { if (res.data.code != 200) {
...@@ -1550,6 +1575,7 @@ ...@@ -1550,6 +1575,7 @@
// this.$router.push("/signUp/check?code=" + code); // this.$router.push("/signUp/check?code=" + code);
this.referForm = res.data.data; this.referForm = res.data.data;
}); });
}); });
}, },
}, },
......
This diff is collapsed.
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