|
@@ -14,10 +14,10 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="grid col-4 grid-square flex-sub booder-top">
|
|
<view class="grid col-4 grid-square flex-sub booder-top">
|
|
|
- <view class="bg-img" v-for="(item, index) in form.photo" :key="index" @tap="ViewImage"
|
|
|
|
|
|
|
+ <view class="bg-img" v-for="(item, index) in form.headPhoto" :key="index" @tap="ViewImage"
|
|
|
:data-url="form.headPhoto[index]">
|
|
:data-url="form.headPhoto[index]">
|
|
|
<image :src="item" mode="aspectFill"></image>
|
|
<image :src="item" mode="aspectFill"></image>
|
|
|
- <view class="cu-tag bg-red" @tap.stop="DelImg" :data-index="index">
|
|
|
|
|
|
|
+ <view class="cu-tag bg-red" @tap.stop="DelImg(index)" :data-index="index">
|
|
|
<text class='cuIcon-close'></text>
|
|
<text class='cuIcon-close'></text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -40,7 +40,7 @@
|
|
|
<button class="cu-btn round line-gray shadow" @click="$Router.push({ name: 'newSettings' })"
|
|
<button class="cu-btn round line-gray shadow" @click="$Router.push({ name: 'newSettings' })"
|
|
|
style="width: 205rpx;">取消</button>
|
|
style="width: 205rpx;">取消</button>
|
|
|
<button style="width:443rpx;background: linear-gradient( 90deg, #77B6FF 0%, #449AFF 100%);border-radius:53rpx ;"
|
|
<button style="width:443rpx;background: linear-gradient( 90deg, #77B6FF 0%, #449AFF 100%);border-radius:53rpx ;"
|
|
|
- class="cu-btn bg-blue round " @click="sumbit" v-if='form.renovationStatus.status || form.renovationStatus.status==null'>提交审核</button>
|
|
|
|
|
|
|
+ class="cu-btn bg-blue round " @click="sumbit" >提交审核</button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
@@ -76,11 +76,9 @@
|
|
|
async onLoad(data) {
|
|
async onLoad(data) {
|
|
|
if (data.params) {
|
|
if (data.params) {
|
|
|
let obj = JSON.parse(decodeURIComponent(data.params));
|
|
let obj = JSON.parse(decodeURIComponent(data.params));
|
|
|
- // this.video = obj.video ? obj.video : ''
|
|
|
|
|
- obj.photo = obj.photo ? obj.headPhoto.split(',').filter(id => id !== '') : []
|
|
|
|
|
this.form = obj
|
|
this.form = obj
|
|
|
this.form.renovationStatus=obj.renovationStatus.filter(item => item.type === 1)[0] //1入口图 2经营相册 3视频
|
|
this.form.renovationStatus=obj.renovationStatus.filter(item => item.type === 1)[0] //1入口图 2经营相册 3视频
|
|
|
- console.log( this.form)
|
|
|
|
|
|
|
+ this.form.headPhoto = this.form.renovationStatus ? this.form.renovationStatus.context.split(',') : []
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
},
|
|
},
|
|
@@ -107,8 +105,7 @@
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- DelImg(e) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ DelImg(index) {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
|
title: '提示',
|
|
title: '提示',
|
|
|
content: '确定要删除?',
|
|
content: '确定要删除?',
|
|
@@ -116,10 +113,8 @@
|
|
|
confirmText: '确定',
|
|
confirmText: '确定',
|
|
|
success: res => {
|
|
success: res => {
|
|
|
if (res.confirm) {
|
|
if (res.confirm) {
|
|
|
- console.log(this.form)
|
|
|
|
|
- // this.photoList.splice(e.currentTarget.dataset.index, 1)
|
|
|
|
|
- this.form.photo.splice(e.currentTarget.dataset.index, 1)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ this.form.headPhoto.splice(index, 1);
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -142,19 +137,13 @@
|
|
|
success: (files) => {
|
|
success: (files) => {
|
|
|
let data = JSON.parse(files.data);
|
|
let data = JSON.parse(files.data);
|
|
|
if (data.success) {
|
|
if (data.success) {
|
|
|
- let temp = this.form.headPhoto && this.form.headPhoto.split(',') || []
|
|
|
|
|
- if (this.form.headPhoto.split(',').length > 0) {
|
|
|
|
|
- // this.photoList = this.photoList.concat(res.tempFilePaths)
|
|
|
|
|
- this.form.photo.push(configService.apiUrl + '/' + data.message)
|
|
|
|
|
- this.form.headPhoto+(configService.apiUrl + '/' + data.message)
|
|
|
|
|
- temp.push(configService.apiUrl + '/' + data.message)
|
|
|
|
|
- this.form.headPhoto = temp.join(',')
|
|
|
|
|
- console.log(this.form.headPhoto)
|
|
|
|
|
|
|
+ if (this.form.headPhoto.length !=0) {
|
|
|
|
|
+ this.form.headPhoto.push(configService.apiUrl + '/' + data.message)
|
|
|
} else {
|
|
} else {
|
|
|
console.log('22222')
|
|
console.log('22222')
|
|
|
- // this.photoList =res.tempFilePaths
|
|
|
|
|
this.form.headPhoto = [configService.apiUrl + '/' + data.message]
|
|
this.form.headPhoto = [configService.apiUrl + '/' + data.message]
|
|
|
}
|
|
}
|
|
|
|
|
+ this.$forceUpdate();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
@@ -170,9 +159,16 @@
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
sumbit() {
|
|
sumbit() {
|
|
|
|
|
+ if(!this.form.headPhoto.length){
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ icon:'none',
|
|
|
|
|
+ title: '请上传图片'
|
|
|
|
|
+ })
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
let data = {
|
|
let data = {
|
|
|
merchantId: uni.getStorageSync(USER_INFO).merchantId,
|
|
merchantId: uni.getStorageSync(USER_INFO).merchantId,
|
|
|
- context: this.form.headPhoto,
|
|
|
|
|
|
|
+ context: this.form.headPhoto.join(","),
|
|
|
status:0,
|
|
status:0,
|
|
|
type:1,
|
|
type:1,
|
|
|
}
|
|
}
|
|
@@ -182,9 +178,9 @@
|
|
|
icon:'none',
|
|
icon:'none',
|
|
|
title:'提交成功'
|
|
title:'提交成功'
|
|
|
})
|
|
})
|
|
|
- uni.navigateBack({
|
|
|
|
|
- delta: 1 // 返回的页面数,默认为1
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/store/newSettings'
|
|
|
|
|
+ });
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
icon:'none',
|
|
icon:'none',
|