|
|
@@ -153,9 +153,9 @@
|
|
|
form.couponDescription.length : 0 }}</span>
|
|
|
/500
|
|
|
</view>
|
|
|
- <view class="tips">
|
|
|
+ <!-- <view class="tips">
|
|
|
支持jpg,png格式,最多上传5张,每张图片大小不得超过5M。
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
<!-- <view class="grid col-4 grid-square flex-sub booder-top">
|
|
|
<view class="bg-img" v-for="(item, index) in headPhotoImg" :key="index" @tap="ViewImage"
|
|
|
:data-url="headPhotoImg[index]">
|
|
|
@@ -171,8 +171,8 @@
|
|
|
</view>
|
|
|
</view> -->
|
|
|
|
|
|
- <u-upload ref="dUpload" :action="action" :file-list="xqImage" @on-success="detailsSuccess"
|
|
|
- @on-remove="detailsRemove" max-count="5" width="140rpx" height="140rpx"></u-upload>
|
|
|
+ <!-- <u-upload ref="dUpload" :action="action" :file-list="xqImage" @on-success="detailsSuccess"
|
|
|
+ @on-remove="detailsRemove" max-count="5" width="140rpx" height="140rpx"></u-upload> -->
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
@@ -200,8 +200,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- action: configService.apiUrl + '/sys/common/upload', //图片上传地址
|
|
|
- xqImage: [], //详情图回显
|
|
|
+ // action: configService.apiUrl + '/sys/common/upload', //图片上传地址
|
|
|
+ // xqImage: [], //详情图回显
|
|
|
headPhotoImg: [],
|
|
|
showApplication: false,
|
|
|
columns1: [{
|
|
|
@@ -220,7 +220,7 @@ export default {
|
|
|
// conditionsUse: null,
|
|
|
couponRange: '',
|
|
|
couponRangeInfo: [],
|
|
|
- couponPhoto: [],
|
|
|
+ // couponPhoto: [],
|
|
|
type:'1',
|
|
|
contentConditions:''
|
|
|
},
|
|
|
@@ -254,13 +254,13 @@ export default {
|
|
|
e.stopPropagation(); // 阻止默认事件(键盘弹出)
|
|
|
},
|
|
|
//上传详情图
|
|
|
- detailsSuccess(res, index, lists) {
|
|
|
- this.xqImage = lists
|
|
|
+ //detailsSuccess(res, index, lists) {
|
|
|
+ // this.xqImage = lists
|
|
|
|
|
|
- },
|
|
|
- detailsRemove(index, lists) {
|
|
|
- this.xqImage = lists
|
|
|
- },
|
|
|
+ //},
|
|
|
+ // detailsRemove(index, lists) {
|
|
|
+ // this.xqImage = lists
|
|
|
+ // },
|
|
|
groupChange(e) {
|
|
|
// e=='1'?this.couponWayInfo2='':this.couponWayInfo1=''
|
|
|
this.form.couponWay = e == '1' ? '1' : '2'
|
|
|
@@ -487,27 +487,27 @@ export default {
|
|
|
});
|
|
|
return
|
|
|
} else {
|
|
|
- let temp = []
|
|
|
- if (this.xqImage.length > 0) {
|
|
|
- this.xqImage.forEach((item) => {
|
|
|
- if (item.response && item.response.message) {
|
|
|
- temp.push(configService.apiUrl + '/' + item.response.message)
|
|
|
- } else if (item.url) {
|
|
|
- temp.push(item.url)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
+ // let temp = []
|
|
|
+ // if (this.xqImage.length > 0) {
|
|
|
+ // this.xqImage.forEach((item) => {
|
|
|
+ // if (item.response && item.response.message) {
|
|
|
+ // temp.push(configService.apiUrl + '/' + item.response.message)
|
|
|
+ // } else if (item.url) {
|
|
|
+ // temp.push(item.url)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ // }
|
|
|
|
|
|
|
|
|
let data={
|
|
|
repeatClaim:this.form.repeatClaim?'1':'2',
|
|
|
couponRangeInfo:this.form.couponRangeInfo.length > 0 ? this.form.couponRangeInfo.join(',') : null,
|
|
|
- couponPhoto:temp.length > 0 ? temp.join(',') : null
|
|
|
+ // couponPhoto:temp.length > 0 ? temp.join(',') : null
|
|
|
}
|
|
|
|
|
|
|
|
|
if (this.productId == '') {
|
|
|
- this.$http.post("/merchant/localCouponInfo/add", { ...this.form,...data, merchantId: uni.getStorageSync(USER_INFO).merchantId }).then(res => {
|
|
|
+ this.$http.post("/merchant/localCouponInfo/add", { ...this.form, ...data, merchantId: uni.getStorageSync(USER_INFO).merchantId }).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
uni.showToast({
|
|
|
title: '添加成功',
|
|
|
@@ -524,7 +524,7 @@ export default {
|
|
|
})
|
|
|
} else {
|
|
|
this.form.productId = this.productId
|
|
|
- this.$http.post("/merchant/localCouponInfo/edit", {...this.form,...data}).then(res => {
|
|
|
+ this.$http.post("/merchant/localCouponInfo/edit", {...this.form, ...data}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
uni.showToast({
|
|
|
title: '编辑成功',
|
|
|
@@ -550,18 +550,18 @@ export default {
|
|
|
res.data.result.couponRangeInfo = res.data.result.couponRangeInfo ? res.data.result.couponRangeInfo.split(',').filter(id => id) : []
|
|
|
// res.data.result.couponPhoto = res.data.result.couponPhoto!== null && res.data.result.couponPhoto.length>0? res.data.result.couponPhoto.split(',').filter(id => id) : []
|
|
|
|
|
|
- if(res.data.result.couponPhoto){
|
|
|
- let xqtemp = []
|
|
|
- xqtemp = res.data.result.couponPhoto.split(',')
|
|
|
- xqtemp.map(item => {
|
|
|
- this.xqImage.push({
|
|
|
- url: item
|
|
|
- })
|
|
|
- })
|
|
|
- }
|
|
|
+ // if(res.data.result.couponPhoto){
|
|
|
+ // let xqtemp = []
|
|
|
+ // xqtemp = res.data.result.couponPhoto.split(',')
|
|
|
+ // xqtemp.map(item => {
|
|
|
+ // this.xqImage.push({
|
|
|
+ // url: item
|
|
|
+ // })
|
|
|
+ // })
|
|
|
+ // }
|
|
|
res.data.result.couponWay = res.data.result.couponWay ? res.data.result.couponWay + '' : ''
|
|
|
res.data.result.repeatClaim = res.data.result.repeatClaim && res.data.result.repeatClaim=='1'? true: false
|
|
|
- this.headPhotoImg=res.data.result.couponPhoto
|
|
|
+ // this.headPhotoImg=res.data.result.couponPhoto
|
|
|
this.showDate = res.data.result.beginTime + '-' + res.data.result.endTime
|
|
|
this.form = res.data.result
|
|
|
}
|