diff --git a/pagesInn/inn/innProfileEdit.vue b/pagesInn/inn/innProfileEdit.vue index 16d4072..dda4b3d 100644 --- a/pagesInn/inn/innProfileEdit.vue +++ b/pagesInn/inn/innProfileEdit.vue @@ -136,6 +136,14 @@ --> + + + + 店铺图片 + 最多上传9张图片 + + + + + + + 店铺资质 + 最多上传9张图片 + + + + + + + + 确定修改 @@ -176,10 +204,12 @@ export default { }, innHistory: {}, // 历史信息 picsArray: [], + qualificationsArray: [], typeList: [], // 类型列表 typeIndex: 0, // 选中的类型 typeRange: [], // 类型数据源 uploadedFilesArray: [], + uploadedQualificationFilesArray: [], innApplyInfo: { 'address': '', 'areaId': 0, @@ -193,6 +223,7 @@ export default { 'name': '', 'ownerName': '', 'pics': [], + 'qualification': [], 'position': '', 'tel': '', 'qrcode': '', @@ -209,6 +240,7 @@ export default { if (id) { // 赋值 const hotel = JSON.parse(uni.getStorageSync('MY_HOTEL_INFO')) + console.log(hotel) this.innHistory = hotel this.fillData(this.innApplyInfo, this.innHistory) if (hotel.coverType === 2) { @@ -216,7 +248,7 @@ export default { } else { this.innApplyInfo.coverVideo = '' } - // 图片填充 + // 店铺图片 this.picsArray = hotel.pics.map(item => { return { path: item, @@ -224,6 +256,17 @@ export default { } }) this.uploadedFilesArray = hotel.pics || [] + // 资质 + const uploadedQualificationFilesArray = [] + this.qualificationsArray = hotel.qualifications.map(item => { + const image = item.image || '' + uploadedQualificationFilesArray.push(image) + return { + path: item.image, + upload_percent: 100 + } + }) + this.uploadedQualificationFilesArray = uploadedQualificationFilesArray } }, methods: { @@ -261,6 +304,10 @@ export default { uploadedImgChange: function (uploadedFilesList) { this.uploadedFilesArray = uploadedFilesList }, + // 文件上传结果 + uploadedImg2Change: function (uploadedFilesList) { + this.uploadedQualificationFilesArray = uploadedFilesList + }, chooseQrcodeImg() { chooseImage(img => { this.$set(this.innApplyInfo, 'qrcode', img) @@ -311,11 +358,16 @@ export default { this.$dialog.error('请上传至少一张店铺图片') return } + if (this.uploadedQualificationFilesArray.length === 0) { + this.$dialog.error('请上传至少一张店铺资质图片') + return + } // 深拷贝 const param = JSON.parse(JSON.stringify(this.innApplyInfo)) if (this.uploadedFilesArray.length > 0) { param.pics = this.uploadedFilesArray.join(',') } + param.qualification = this.uploadedQualificationFilesArray param.id = this.innHistory.id if (param.coverType === 2) { param.cover = param.coverVideo @@ -430,6 +482,11 @@ export default { flex-shrink: 0; margin-right: 10rpx; } +.base-info-section .item.is_required .cell .cell-title .txt { + margin: 0 0 0 8px; + color: red; + font-size: 22rpx; +} .base-info-section .item.is_required .cell .cell-value { flex-grow: 1;