Commit e942d41c authored by wuwangwolihui's avatar wuwangwolihui

营地2.0-修改

parent 8fc92e99
......@@ -2009,117 +2009,118 @@
}
let _this = this;
let obj = {};
if (this.configJson.name == 1) {
if (_this.configJson.name == 1) {
obj.name = _this.referForm.name;
}
if (this.configJson.gender == 1) {
if (_this.configJson.gender == 1) {
obj.gender = _this.referForm.gender;
}
if (this.configJson.idCard == 1) {
if (_this.configJson.idCard == 1) {
obj.id_card = _this.referForm.id_card;
}
if (this.configJson.age == 1) {
if (_this.configJson.age == 1) {
obj.age = _this.referForm.age;
}
if (this.configJson.education == 1) {
if (_this.configJson.education == 1) {
obj.education = _this.referForm.education;
}
if (this.configJson.postAddress == 1) {
if (_this.configJson.postAddress == 1) {
obj.address = _this.referForm.address;
}
if (this.configJson.country == 1) {
if (_this.configJson.country == 1) {
obj.country = _this.referForm.country;
}
if (this.configJson.nation == 1) {
if (_this.configJson.nation == 1) {
obj.nation = _this.referForm.nation;
}
if (this.configJson.startSchoolDate == 1) {
if (_this.configJson.startSchoolDate == 1) {
obj.start_school_date = _this.start_year;
}
if (this.configJson.politicalStatus == 1) {
if (_this.configJson.politicalStatus == 1) {
obj.political_status = _this.referForm.political_status;
}
if (this.configJson.phone == 1) {
if (_this.configJson.phone == 1) {
obj.phone = _this.referForm.phone;
}
if (this.configJson.grade == 1) {
if (_this.configJson.grade == 1) {
obj.grade = _this.referForm.grade;
}
if (this.configJson.unitandIdentity == 1) {
if (_this.configJson.unitandIdentity == 1) {
obj.unit_and_identity = _this.referForm.unit_and_identity;
}
if (this.configJson.email == 1) {
if (_this.configJson.email == 1) {
obj.email = _this.referForm.email;
}
if (this.configJson.jiguanCity == 1) {
if (_this.configJson.jiguanCity == 1) {
obj.jiguan_code = _this.referForm.jiguan_code;
}
if (this.configJson.recommend == 1) {
if (_this.configJson.recommend == 1) {
obj.recommend = _this.referForm.recommend;
}
if (this.configJson.start_school_date == 1) {
if (_this.configJson.start_school_date == 1) {
obj.start_school_date = _this.referForm.start_school_date;
}
if (this.configJson.birthday == 1) {
if (_this.configJson.birthday == 1) {
obj.birthday = _this.referForm.birthday;
}
if (this.configJson.electSubjectSituation == 1) {
if (_this.configJson.electSubjectSituation == 1) {
obj.elect_subject_situation = _this.elect_subject_situation;
}
if (this.configJson.pastMedicalHistory == 1) {
if (_this.configJson.pastMedicalHistory == 1) {
obj.past_medical_history = _this.referForm.past_medical_history;
}
if (this.configJson.noteOther == 1) {
if (_this.configJson.noteOther == 1) {
obj.note_other = _this.referForm.note_other;
}
if (this.configJson.emergency == 1) {
if (_this.configJson.emergency == 1) {
obj.emergency = _this.referForm.emergency;
}
if (this.configJson.emergencyPhone == 1) {
if (_this.configJson.emergencyPhone == 1) {
obj.emergency_phone = _this.referForm.emergency_phone;
}
//衣服尺码
if (this.configJson.clothesSize == 1) {
if (_this.configJson.clothesSize == 1) {
obj.clothes_size = _this.referForm.clothes_size;
}
//自我介绍
if (this.configJson.introduceMyself == 1) {
if (_this.configJson.introduceMyself == 1) {
obj.introduce = _this.referForm.introduce;
}
if (this.configJson.school == 1) {
if (_this.configJson.school == 1) {
obj.school_province = _this.referForm.school_province;
obj.school_city = _this.referForm.school_city;
obj.school = _this.referForm.school;
}
if (this.configJson.schoolContacts == 1) {
if (_this.configJson.schoolContacts == 1) {
obj.school_contacts = _this.referForm.school_contacts;
}
if (this.configJson.schoolPhone == 1) {
if (_this.configJson.schoolPhone == 1) {
obj.school_phone = _this.referForm.school_phone;
}
//是否需要填写邀请码
// if (this.doubt_code == 1 && this.code != '') {
if (this.configJson.code == 1) {
// if (_this.doubt_code == 1 && _this.code != '') {
if (_this.configJson.code == 1) {
obj.code = _this.referForm.code;
}
setAccount(obj).then((res) => {
console.log(res)
if (res.data.code != 200) {
if (res.data.code == 400068) {
this.$parent.statuss();
return this.$message.error(res.data.msg);
_this.$parent.statuss();
return _this.$message.error(res.data.msg);
}
return this.$message.error(res.data.msg);
return _this.$message.error(res.data.msg);
}
if (res.data.code == 4000346 || res.data.code == 4000347) {
this.dialogVisible = true;
this.msg = res.data.msg
_this.dialogVisible = true;
_this.msg = res.data.msg
return;
}
this.$emit("getstatus", res.data.status);
this.$message.success(res.data.msg);
this.referForm = res.data.data;
_this.$emit("getstatus", res.data.status);
_this.$message.success(res.data.msg);
// _this.referForm = res.data.data;
});
});
......
......@@ -4,9 +4,10 @@
export function add0(m) {
return m < 10 ? "0" + m : m;
}
// 倒计时
export function djTime(data) {
return add0(parseInt(data/60))+':'+add0(data%60);
return add0(parseInt(data / 60)) + ':' + add0(data % 60);
}
export function formatTime(data) {
......@@ -19,12 +20,13 @@ export function formatTime(data) {
let ss = time.getSeconds();
return (y + "-" + add0(m) + "-" + add0(d) + " " + add0(h) + ":" + add0(mm) + ":" + add0(ss));
}
//计算两个时间之间的时间差-多少秒
export function intervalTime(startTime, endTime) {
let stime = new Date(startTime);
let etime = new Date(endTime);
if(stime > etime){
return add0(0)+':'+add0(0)
if (stime > etime) {
return add0(0) + ':' + add0(0)
}
let y = etime.getFullYear() - stime.getFullYear();
let m = etime.getMonth() + 1 - (stime.getMonth() + 1);
......@@ -32,7 +34,7 @@ export function intervalTime(startTime, endTime) {
let h = etime.getHours() - stime.getHours();
let mm = etime.getMinutes() - stime.getMinutes();
let ss = etime.getSeconds() - stime.getSeconds();
let time = y*365*24*60*60 + m*30*24*60*60 + d*24*60*60 + h*60*60 + mm*60 + ss
let time = y * 365 * 24 * 60 * 60 + m * 30 * 24 * 60 * 60 + d * 24 * 60 * 60 + h * 60 * 60 + mm * 60 + ss
return time;
}
......@@ -45,12 +47,12 @@ export function formatYMD(data) {
return (y + "-" + add0(m) + "-" + add0(d));
}
// 2023年1月1日
// 2023年1月1日1点
export function formatYMDChina(data) {
let time = new Date(data);
let y = time.getFullYear();
let m = time.getMonth() + 1;
let d = time.getDate();
let h = time.getHours();
return (y + "" + m + "" + d + "");
return (y + "" + m + "" + d + "" + h + "");
}
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