[修改优惠券管理,添加我的优惠券,修改签到页面]
This commit is contained in:
@@ -27,8 +27,8 @@
|
||||
<view class="info-item-text">{{details.quantity}}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-item-title">已发放量</view>
|
||||
<view class="info-item-text">{{details.grant_quantity}}</view>
|
||||
<view class="info-item-title">已使用/已领取</view>
|
||||
<view class="info-item-text">{{details.used_quantity}}/{{details.grant_quantity}}</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="info-item-title">每人限领</view>
|
||||
@@ -69,6 +69,11 @@
|
||||
<view class="mian-text">
|
||||
<text>{{details.description || '-'}}</text>
|
||||
</view>
|
||||
<view class="mian-del" v-if="details.can">
|
||||
<view class="mian-del-btn" v-if="details.can.delete" @click="mianDel(details.coupon_id)">
|
||||
删除优惠券
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="ios-bottom"></view>
|
||||
@@ -76,7 +81,7 @@
|
||||
<view class="footer">
|
||||
<view class="footer-flex">
|
||||
<view class="item" @click="putStatus">{{details.status.value == 4 ? '上架': '下架'}}</view>
|
||||
<view class="item" @click="onCouponsRecommend">{{recommended ? '设为推荐': '已设为推荐'}}</view>
|
||||
<view class="item item-btn" @click="onCouponsRecommend" :class="{active: !recommended}">{{recommended ? '设为推荐': '已设为推荐'}}</view>
|
||||
</view>
|
||||
<view class="ios-bottom"></view>
|
||||
</view>
|
||||
@@ -84,7 +89,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { magCouponsInfo, magCouponsStatus, magCouponsRecommend } from '@/apis/interfaces/coupons'
|
||||
import { magCouponsInfo, magCouponsStatus, magCouponsRecommend, magCouponsDel } from '@/apis/interfaces/coupons'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@@ -130,7 +135,34 @@
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
mianDel(id){
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '是否删除此优惠券',
|
||||
cancelColor: '#555',
|
||||
cancelText: '取消',
|
||||
confirmColor: '#8b64fd',
|
||||
confirmText: '确定',
|
||||
success: res => {
|
||||
if (res.confirm) {
|
||||
magCouponsDel(id).then(res => {
|
||||
this.$Router.push({name: 'couponsManagement'})
|
||||
uni.showToast({
|
||||
title: res.message,
|
||||
icon : 'none'
|
||||
})
|
||||
}).catch(err => {
|
||||
uni.showToast({
|
||||
title: err.message,
|
||||
icon : 'none'
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -164,6 +196,12 @@
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.item-btn {
|
||||
color: #eca824;
|
||||
&.active {
|
||||
color: #9d9d9d;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.details{
|
||||
@@ -244,6 +282,18 @@
|
||||
color: $text-gray;
|
||||
padding-top: $padding/3;
|
||||
}
|
||||
.mian-del {
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
color: red;
|
||||
padding-top: 20rpx;
|
||||
.mian-del-btn {
|
||||
padding: 10rpx 30rpx;
|
||||
border-radius: 10rpx;
|
||||
display: inline-block;
|
||||
border: 2rpx #f3bbbb solid;
|
||||
}
|
||||
}
|
||||
.mian-goods{
|
||||
padding-bottom: $padding;
|
||||
.item{
|
||||
|
||||
Reference in New Issue
Block a user