Commit e942d41c authored by wuwangwolihui's avatar wuwangwolihui

营地2.0-修改

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