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..4454cd8 100644 --- a/src/pages/improveData/improveData.vue +++ b/src/pages/improveData/improveData.vue @@ -786,14 +786,25 @@ }) }) } - } + }else{ + opsArr=[] + } console.log("opsArr====",opsArr); 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,