diff --git a/components/otherBar/otherBar.js b/components/otherBar/otherBar.js index f3db4ce..8f6c3ec 100644 --- a/components/otherBar/otherBar.js +++ b/components/otherBar/otherBar.js @@ -14,7 +14,7 @@ Page({ { // "iconPath": "/image/icon_component.png", // "selectedIconPath": "/image/icon_component.png", - "text": "个人信息" + "text": "个人中心" }, // { // // "iconPath": "/image/yingyong.png", diff --git a/components/tabBar/tabBar.js b/components/tabBar/tabBar.js index 1330752..1df09e2 100644 --- a/components/tabBar/tabBar.js +++ b/components/tabBar/tabBar.js @@ -30,7 +30,7 @@ Page({ { // "iconPath": "/image/icon_biz.png", // "selectedIconPath": "/image/icon_biz.png", - "text": "考生信息" + "text": "个人中心" } ], }, diff --git a/pages/examinee/information/revise/revise.acss b/pages/examinee/information/revise/revise.acss index f4a3ee6..e568f89 100644 --- a/pages/examinee/information/revise/revise.acss +++ b/pages/examinee/information/revise/revise.acss @@ -50,9 +50,9 @@ color: #333333; font-size: 28rpx; } -.revise-box{ +.revise-box .checkbox-group{ display: flex; - justify-content: space-between; + justify-content: flex-start; flex-wrap: wrap; font-size: 32rpx; line-height: 80rpx; @@ -61,7 +61,7 @@ .revise-box2{ justify-content: flex-start; } -.revise-box>label{ +.revise-box .checkbox-group label{ width: 32%; display: flex; align-items: center; diff --git a/pages/examinee/information/revise/revise.axml b/pages/examinee/information/revise/revise.axml index 58e57d2..81da8c8 100644 --- a/pages/examinee/information/revise/revise.axml +++ b/pages/examinee/information/revise/revise.axml @@ -35,36 +35,13 @@ 选科组合 - - - - - - + + + @@ -101,16 +78,18 @@ 是否提前批 - - + + + + @@ -119,7 +98,7 @@ 预估/模考成绩(非必填) - + @@ -128,7 +107,7 @@ 预估/模考省内排名(非必填) - + diff --git a/pages/examinee/information/revise/revise.js b/pages/examinee/information/revise/revise.js index a808fb8..a4aefb8 100644 --- a/pages/examinee/information/revise/revise.js +++ b/pages/examinee/information/revise/revise.js @@ -1,35 +1,33 @@ Page({ data: { + //电话 + mobile: '', + //姓名 + studentName: '', // 地区 addrArray: [], addrObj: [], addrIndex: 0, // 学科 subjectArray: [], - subjectObj: [], + subjectValue: [], subjectIndex: 0, // 毕业时间 - yearArray: ['2022', '2021', '2020','2019'], + yearArray: [], yearIndex: 0, + // 性别 sexArray: ['未知','男', '女'], sexIndex: 0, - mobile: '',//电话 - studentName: '',//姓名 - student_gender: '',//性别 - student_native: '', //考籍(省级)编号 - student_native_str: '',//考籍(省级)名称 - student_subject: '',//选科组合(选科ID,多个用英文逗号分割) - student_exam_year: '',//高考年份 - achievement_arts: '',//艺考成绩,-1表示未考(用户留空时默认传值为-1) - achievement_PE:'',//体考成绩,-1表示未考(用户留空时默认传值为-1) - achievement_expect:'',//预估或模考成绩 - province_ranking: '',//预估/省内排名 - achievement_high: '',//高考成绩,-1表示未考(用户留空时默认传值为-1) - studentInfo: [] + + advance: [],// 是否提前批 + achievementExpect:'',//预估或模考成绩 + provinceRanking: '',//预估/省内排名 + }, onLoad() { this.getAddrArray(); this.getSubjectArray(); + this.getDate(); dd.setNavigationBar({ title: '完善考生信息', backgroundColor: '#FFFFFF', @@ -41,6 +39,24 @@ Page({ bindMobile(e) { this.data.mobile = e.detail.value }, + bindStudentExpect(e) { + this.data.achievementExpect = e.detail.value + }, + bindStudentRanking(e) { + this.data.provinceRanking = e.detail.value + }, + getDate(){ + const date = new Date(); + let year = Math.trunc(date.getFullYear()); + let end = year + 10; + let newArray=[]; + for(let i=year; i<= end; i++){ + newArray.push(i); + } + this.setData({ + yearArray: newArray + }) + }, // 获取地区 getAddrArray(){ let params = { @@ -91,20 +107,20 @@ Page({ token = res.data.token; dd.utils.$http('/api/dictionary/subjects','GET',params,token).then( (data) => { - console.log(data,22) - // let list = data.data.data; - // let newArray = []; - // list.forEach(item=>{ - // let obj = { - // code: item.code, - // name: item.name - // } - // newArray.push(obj.name); - // this.data.addrObj.push(obj); - // }) - // this.setData({ - // subjectArrayy: newArray - // }) + let list = data.data.data; + let newArray = []; + list.forEach(item=>{ + let obj = { + id: item.id, + name: item.name + } + newArray.push(obj.name); + }) + this.setData({ + subjectArray: newArray + }) + + // console.log(this.data.subjectObj,22) }, (err) => { console.log('错误:'+err); @@ -116,13 +132,21 @@ Page({ } }); }, - + onChangeA(e) { + // console.log(e,123); + this.data.subjectValue = e + }, + onChangeB(e) { + // console.log(e,123); + this.data.advance = e + }, bindAddrChange(e) { // console.log('picker发送选择改变,携带值为', e.detail.value); this.setData({ addrIndex: e.detail.value, }); }, + bindYearChange(e) { // console.log('picker发送选择改变,携带值为', e.detail.value); this.setData({ @@ -144,12 +168,12 @@ Page({ student_gender: this.data.sexIndex,//性别 student_native: this.data.addrObj[this.data.addrIndex].code, //考籍(省级)编号 student_native_str: this.data.addrObj[this.data.addrIndex].name,//考籍(省级)名称 - student_subject: '',//选科组合(选科ID,多个用英文逗号分割) - student_exam_year: '',//高考年份 - achievement_arts: '',//艺考成绩,-1表示未考(用户留空时默认传值为-1) + student_subject: this.data.subjectValue,//选科组合(选科ID,多个用英文逗号分割) + student_exam_year: this.data.yearArray[this.data.yearIndex],//高考年份 + achievement_arts: this.data.advance,//艺考成绩,-1表示未考(用户留空时默认传值为-1) achievement_PE:'',//体考成绩,-1表示未考(用户留空时默认传值为-1) - achievement_expect:'',//预估或模考成绩 - province_ranking: '',//预估/省内排名 + achievement_expect: this.data.achievementExpect,//预估或模考成绩 + province_ranking: this.data.provinceRanking,//预估/省内排名 achievement_high: '',//高考成绩,-1表示未考(用户留空时默认传值为-1) }; console.log(params,2255) @@ -161,15 +185,11 @@ Page({ token = res.data.token; dd.utils.$http('/api/user/edit-student-info','POST',params,token).then( (data) => { - let list = data.data.data; - console.log(list,999); - let newArray = []; - let array = { - - } - newArray = array; - this.setData({ - studentInfo: newArray + dd.alert({ + content: '写入成功' + }); + dd.navigateBack({ + delta: 1 }) }, (err) => {