|
|
@ -451,12 +451,11 @@ |
|
|
|
let url = `/voluntary/sphereLife/detail/${id}`; |
|
|
|
console.log(url,"url"); |
|
|
|
requestGet(url).then((res) => { |
|
|
|
console.log(res); |
|
|
|
if (res.code == 0) { |
|
|
|
this.formData = res.data |
|
|
|
this.fileList=[{fileUrl:res.data.attrs[0].url}] |
|
|
|
this.searchValue=res.data.address |
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
this.formData.tags1=res.data.tags.split(',').map(item => ({ tab: item.trim() })); |
|
|
|
} else { |
|
|
|
this.$message.error(res.msg) |
|
|
|
} |
|
|
@ -466,8 +465,10 @@ |
|
|
|
}, |
|
|
|
//添加标签 |
|
|
|
addDomain() { |
|
|
|
|
|
|
|
|
|
|
|
if (this.formData.tags1.length < 4) { |
|
|
|
this.formData.tags1.push({ name: '', tab: '' }); |
|
|
|
this.formData.tags1.push({tab: '' }); |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.$message.error("最多添加4个标签"); |
|
|
@ -546,18 +547,7 @@ |
|
|
|
removedImg() { |
|
|
|
this.formData.coverPic = '' |
|
|
|
}, |
|
|
|
// onChangeFileList(e) { |
|
|
|
// console.log(e, 'sssssb'); |
|
|
|
// this.fileList = e.length > 0 ? e.map(item => ({ |
|
|
|
// fileType: '0', |
|
|
|
// fileUrl: item.response.data.url |
|
|
|
// })) : []; // 当e为空时清空fileList |
|
|
|
// if (e.length > 0) { |
|
|
|
// this.formData.qualification = e[0].response.data.url; |
|
|
|
// } else { |
|
|
|
// this.formData.qualification = ''; |
|
|
|
// } |
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
|
|
onChangeImgs(e, rowIndex = 0) { |
|
|
|
console.log('onChangeFileList', e) |
|
|
@ -594,9 +584,12 @@ |
|
|
|
|
|
|
|
|
|
|
|
async handleComfirm() { |
|
|
|
let one=this.formData.tags1.map(item => item.tab).join(', ') |
|
|
|
this.formData.tags=one; |
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
if (this.formData.tags1) { |
|
|
|
let one=this.formData.tags1.map(item => item.tab).join(', ') |
|
|
|
this.formData.tags=one; |
|
|
|
console.log(this.formData,"this.formData"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// console.log(this.formData.tags.map(item => item.tab).join(', ')," this.formData"); |
|
|
|
// if (!this.formData.type) { |
|
|
|