diff --git a/subPackages/user/infoFilling.vue b/subPackages/user/infoFilling.vue index 52fd396..e210c75 100644 --- a/subPackages/user/infoFilling.vue +++ b/subPackages/user/infoFilling.vue @@ -12,7 +12,7 @@ - + 语言能力 {{inputValueStr}} 请选择 @@ -170,20 +170,47 @@ popSubmit () { let tempSelect = JSON.parse(JSON.stringify(this.selection)) - let valueHave = tempSelect.arr.filter(x=>tempSelect.value.includes(x.id)) - this.selectionItem.value = tempSelect.value - this.selectionItem.valueStr = valueHave.map(x=>x.name).join(',') + if (['scenic_ids'].includes(this.valueType)) { + let valueHave = tempSelect.arr.filter(x=>tempSelect.value.includes(x.id)) + this.selectionItem.value = tempSelect.value + this.selectionItem.valueStr = valueHave.map(x=>x.name).join(',') + } else if (['lingo_ids'].includes(this.valueType)) { + this.inputValue = tempSelect.value + this.inputValueStr = tempSelect.valueStr + } this.$refs.popup.close() }, uploadImg() { + let url = this.NEWAPIURL+'/api/api/Common/upload' + let merchants_token ='' + if (uni.getStorageSync('userInfo') && JSON.parse(uni.getStorageSync('userInfo')).token) merchants_token = JSON.parse(uni.getStorageSync('userInfo')).token uni.chooseImage({ + count:1, success: (res) => { - for(let i =0 ;i { + console.log(uploadFileRes.data); + }, + fail:()=> { + uni.showToast({ + title:'上传失败', + icon:'none' + }) + } + }); }, fail:()=> { @@ -197,25 +224,26 @@ // 选择数据时的数据处理 handleSubmitData() { - let data = [] - if (this.valueType == 'lingo_ids') { - data = this.lingoIds - } - if (this.valueType == 'scenic_ids') { - data = this.scenicIds - } - - let value = [] - data.forEach(v=>{ - if(Array.isArray(v.value) && v.value.length>0) { - value.push(v) + // 景点数据处理 + if (["scenic_ids"].includes(this.valueType)) { + let data = [] + if (this.valueType == 'lingo_ids') { + data = this.lingoIds } - }) - - this.inputValue = value.map(v=>v.value.join(',')).join(',') - - this.inputValueStr = value.map(v=>v.valueStr).join(',') - console.log(this.inputValue,this.inputValueStr) + if (this.valueType == 'scenic_ids') { + data = this.scenicIds + } + + let value = [] + data.forEach(v=>{ + if(Array.isArray(v.value) && v.value.length>0) { + value.push(v) + } + }) + this.inputValue = value.map(v=>v.value.join(',')).join(',') + this.inputValueStr = value.map(v=>v.valueStr).join(',') + console.log(this.inputValue,this.inputValueStr) + } }, submit() {