From 9b3aa2951f8e02872050b89bda76f7ad7eeaa84f Mon Sep 17 00:00:00 2001 From: liuyalei Date: Tue, 16 Aug 2022 11:35:06 +0800 Subject: [PATCH 1/2] change --- src/pages/PersonalCenter/ReEditSingleInfo.vue | 75 +++++++++++-------- src/pages/improveData/improveData.vue | 16 +++- src/request/interface.js | 4 +- 3 files changed, 58 insertions(+), 37 deletions(-) diff --git a/src/pages/PersonalCenter/ReEditSingleInfo.vue b/src/pages/PersonalCenter/ReEditSingleInfo.vue index 28fa751..1baf615 100644 --- a/src/pages/PersonalCenter/ReEditSingleInfo.vue +++ b/src/pages/PersonalCenter/ReEditSingleInfo.vue @@ -76,7 +76,8 @@ - + @@ -208,8 +209,8 @@ peopleSkillColums: [ ["书法家", "画家", "雕塑家"] ], - xiehuiObj: {} ,//协会的name id 为key value 对象 - artHonrList:[""] + xiehuiObj: {}, //协会的name id 为key value 对象 + artHonrList: [""] }; }, onLoad(opt) { @@ -221,10 +222,14 @@ uni.setNavigationBarTitle({ title: JSON.parse(opt.key) }) - /* if(this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项'){ - console.log("this.EdvaluePPPPPPP",JSON.parse(JSON.stringify(opt.value))); + if(this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项'){ + if (opt.value == '[""]' || opt.value == "null"){ + this.Edvalue=[""] + console.log("onload 艺术成就",this.Edvalue ); + } + - } */ + } // 日期选择器模式的转换 if (this.Edkey == '出生日期' || this.Edkey == '入会时间') { this.timeMode = 'date' @@ -279,10 +284,15 @@ // 分化为 stanlist 和fileList2 this.fileList2 = [] - if (opt.value =='[""]') { + if (opt.value == '[""]' || opt.value == "null") { + console.log("ddd"); this.StandradList = [""] - this.fileList2 = [[]] - this.postFileList2=[[]] + this.fileList2 = [ + [] + ] + this.postFileList2 = [ + [] + ] } else { // console.log("this.Edvalue++++", this.Edvalue); this.Edvalue.map((v, i) => { @@ -465,63 +475,64 @@ }) } } else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') { - console.log("艺术成就", this.Edvalue); - - var str = JSON.stringify(this.Edvalue) - if(this.Edvalue[0]){ + // console.log("艺术成就submit", this.Edvalue); + + var str = JSON.stringify(this.Edvalue) + + if (this.Edvalue[0]) { if (this.Edkey == '艺术成就') { - + this.PostChangerRequest({ - 'artAtt': str + 'artAtt': str }) } else { this.PostChangerRequest({ 'greats': str }) } - }else{ + } else { console.log("11"); if (this.Edkey == '艺术成就') { - + this.PostChangerRequest({ 'artAtt': '' }) } else { this.PostChangerRequest({ - 'greats':'' + 'greats': '' }) } } } else if (this.Edkey == '代表作') { - + var opsArr = [] for (let i = 0; i < this.StandradList.length; i++) { // console.log("=====", this.fileList2); opsArr.push({ - name: this.StandradList[i] ?this.StandradList[i]: '' , - value: this.postFileList2[i]? this.postFileList2[i] : [] + name: this.StandradList[i] ? this.StandradList[i] : '', + value: this.postFileList2[i] ? this.postFileList2[i] : [] }) } - var isNull= opsArr.every((v,i)=>{ - return v.name=='' - }) - - - console.log("isNul",isNull); + var isNull = opsArr.every((v, i) => { + return v.name == '' + }) + + + console.log("isNul", isNull); console.log("opsArr", opsArr); - - // isNull 是否所有作品名称 都没有 - if(isNull){ + + // isNull 是否所有作品名称 都没有 + if (isNull) { this.PostChangerRequest({ 'opus': [] }) - }else{ + } else { this.PostChangerRequest({ 'opus': opsArr }) } - + /* if(this.fileList2 ){ var opsArr = [] for (let i = 0; i < this.StandradList.length; i++) { diff --git a/src/pages/improveData/improveData.vue b/src/pages/improveData/improveData.vue index b3e18cd..f052d5c 100644 --- a/src/pages/improveData/improveData.vue +++ b/src/pages/improveData/improveData.vue @@ -791,9 +791,19 @@ console.log("honorList",this.honorList); this.honorList.forEach() return - - var yishucj = JSON.stringify(this.artlist) - var rongyujx = JSON.stringify(this.honorList) + var yishucj=null + if(this.artlist[0]==""){ + yishucj='' + }else{ + yishucj = JSON.stringify(this.artlist) + } + var rongyujx=null + if(this.honorList[0]==""){ + rongyujx='' + }else{ + rongyujx = JSON.stringify(this.honorList) + } + let that = this.model1.userInfo let data = { // "phone": that.phoneNum, diff --git a/src/request/interface.js b/src/request/interface.js index dadb222..d1b2974 100644 --- a/src/request/interface.js +++ b/src/request/interface.js @@ -7,8 +7,8 @@ export default { config: { // baseUrl: "http://192.168.0.57:8080/h5/api", //王锡 // baseUrl: "http://192.168.124.110:8088/api", //周源 - baseUrl: "http://10.0.0.48:8080/h5/api", //俞燕红 - // baseUrl: "https://yxx.ydool.net/h5/api", //线上 + // baseUrl: "http://10.0.0.48:8080/h5/api", //俞燕红 + baseUrl: "https://yxx.ydool.net/h5/api", //线上 header: { 'Content-Type': 'application/json;charset=UTF-8', // 'Content-Type':'application/x-www-form-urlencoded' From 473428e7384867417beebe148dcafa37a18c4d8c Mon Sep 17 00:00:00 2001 From: liuyalei Date: Tue, 16 Aug 2022 11:49:55 +0800 Subject: [PATCH 2/2] change add a little --- src/pages/improveData/improveData.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/improveData/improveData.vue b/src/pages/improveData/improveData.vue index f052d5c..4454cd8 100644 --- a/src/pages/improveData/improveData.vue +++ b/src/pages/improveData/improveData.vue @@ -786,11 +786,12 @@ }) }) } - } + }else{ + opsArr=[] + } console.log("opsArr====",opsArr); console.log("honorList",this.honorList); - this.honorList.forEach() - return + var yishucj=null if(this.artlist[0]==""){ yishucj=''