充值活动相关增加

This commit is contained in:
GaoHao
2024-10-26 09:23:21 +08:00
parent d6ca0aead6
commit a868117cda
5 changed files with 62 additions and 35 deletions

View File

@@ -3,10 +3,10 @@
<view class="towcontent">
<view class="towcontentlistxitem flex-start">
<view class="towcontentlistxitembox flex-colum"
:class="towcontentclickindex == index?'towcontentlistxitemboxopacity':''"
v-for="(item,index) in listbox" :key="index" @click="towcontentclick(index,item)">
:class="tabIndex == index?'towcontentlistxitemboxopacity':''"
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(index,item)">
<text class="title">{{item.name}}</text>
<image v-if="towcontentclickindex == index"
<image v-if="tabIndex == index"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
</image>
</view>
@@ -74,27 +74,27 @@
export default {
data() {
return {
listbox: [{
tabList: [{
name: '全部',
type: ''
},
{
name: '未使用',
type: '0'
type: '1'
},
{
name: '已使用',
type: '1'
type: '2'
}
],
towcontentclickindex: 0,
tabIndex: 0,
list: [],
status: "",
};
},
onLoad() {
this.ordermineCouponsthis()
this.getCouponList()
},
methods: {
@@ -105,17 +105,17 @@
* @param {Object} item
*/
towcontentclick(index, item) {
this.towcontentclickindex = index;
this.tabIndex = index;
this.status = item.type;
this.ordermineCouponsthis()
this.getCouponList()
},
/**
* 获取优惠券数据
*/
async ordermineCouponsthis() {
async getCouponList() {
try {
let res = await this.api.getUserConpons({
let res = await this.api.conponList({
userId: uni.cache.get('userInfo').id,
shopId: uni.cache.get('shopId'),
status: this.status