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