Fix(入驻):[#1811]商户提交入驻申请,再次进入页面时商家资质图片不显示
This commit is contained in:
+35
-16
@@ -520,16 +520,27 @@ export default {
|
||||
}
|
||||
|
||||
if (data.hotelInfo) {
|
||||
this.pics = [];
|
||||
this.form = data.hotelInfo;
|
||||
let temp = this.form.pics.split(",");
|
||||
if (temp.length > 0) {
|
||||
temp.map(item => {
|
||||
if (item.length > 0) {
|
||||
// 店铺图片
|
||||
this.pics = []
|
||||
this.form = data.hotelInfo
|
||||
const picsTemp = this.form.pics.split(",")
|
||||
if (picsTemp.length > 0) {
|
||||
picsTemp.map(item => {
|
||||
if (item) {
|
||||
this.pics.push({url: item})
|
||||
}
|
||||
})
|
||||
}
|
||||
// 商家资质
|
||||
this.quaPics = []
|
||||
const quaPicsTemp = this.form.qualification.split(",")
|
||||
if (quaPicsTemp.length > 0) {
|
||||
quaPicsTemp.map(item => {
|
||||
if (item) {
|
||||
this.quaPics.push({url: item})
|
||||
}
|
||||
})
|
||||
}
|
||||
this.indexType = this.columnsType.findIndex(item => item.id === this.form.type)
|
||||
if (this.indexType !== -1) {
|
||||
this.form.typeText = this.columnsType[this.indexType].name
|
||||
@@ -673,17 +684,25 @@ export default {
|
||||
},
|
||||
|
||||
save() {
|
||||
this.form.pics = "";
|
||||
this.pics.map(item => {
|
||||
this.form.pics += (item.url + ",");
|
||||
})
|
||||
this.form.pics = this.form.pics.substring(0, this.form.pics.length - 1);
|
||||
this.form.pics = ''
|
||||
const picsLength = this.pics.length
|
||||
if (picsLength > 0) {
|
||||
const tempArr = []
|
||||
this.pics.map(item => {
|
||||
item.url && tempArr.push(item.url)
|
||||
})
|
||||
this.form.pics = tempArr.join(',')
|
||||
}
|
||||
|
||||
this.form.qualification = "";
|
||||
this.quaPics.map(item => {
|
||||
this.form.qualification += (item.url + ",");
|
||||
})
|
||||
this.form.qualification = this.form.qualification.substring(0, this.form.qualification.length - 1);
|
||||
this.form.qualification = ''
|
||||
const quaPicsLength = this.quaPics.length
|
||||
if (quaPicsLength > 0) {
|
||||
const tempArr = []
|
||||
this.quaPics.map(item => {
|
||||
item.url && tempArr.push(item.url)
|
||||
})
|
||||
this.form.qualification = tempArr.join(',')
|
||||
}
|
||||
const postData = Object.assign({}, this.form)
|
||||
if (postData.coverType === 2) {
|
||||
postData.cover = postData.coverVideo
|
||||
|
||||
Reference in New Issue
Block a user