积分抵扣、霸王餐、优惠券分享新增
This commit is contained in:
@@ -3,10 +3,10 @@
|
||||
<view class="towcontent">
|
||||
<view class="towcontentlistxitem flex-start">
|
||||
<view class="towcontentlistxitembox flex-colum"
|
||||
:class="tabIndex == index?'towcontentlistxitemboxopacity':''"
|
||||
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(index,item)">
|
||||
:class="tabIndex == item.type?'towcontentlistxitemboxopacity':''"
|
||||
v-for="(item,index) in tabList" :key="index" @click="towcontentclick(item)">
|
||||
<text class="title">{{item.name}}</text>
|
||||
<image v-if="tabIndex == index"
|
||||
<image v-if="tabIndex == item.type"
|
||||
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/index/today/dg.png" mode="widthFix">
|
||||
</image>
|
||||
</view>
|
||||
@@ -74,10 +74,8 @@
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
tabList: [{
|
||||
name: '全部',
|
||||
type: ''
|
||||
},
|
||||
tabList: [
|
||||
|
||||
{
|
||||
name: '未使用',
|
||||
type: '1'
|
||||
@@ -87,13 +85,17 @@
|
||||
type: '2'
|
||||
}
|
||||
],
|
||||
tabIndex: 0,
|
||||
tabIndex: 1,
|
||||
list: [],
|
||||
status: "",
|
||||
status: 1,
|
||||
type: "",
|
||||
|
||||
};
|
||||
},
|
||||
onLoad() {
|
||||
onLoad(options) {
|
||||
if (options.type) {
|
||||
this.type = options.type;
|
||||
}
|
||||
this.getCouponList()
|
||||
},
|
||||
|
||||
@@ -101,11 +103,10 @@
|
||||
|
||||
/**
|
||||
* 切换类型
|
||||
* @param {Object} index
|
||||
* @param {Object} item
|
||||
*/
|
||||
towcontentclick(index, item) {
|
||||
this.tabIndex = index;
|
||||
towcontentclick(item) {
|
||||
this.tabIndex = item.type;
|
||||
this.status = item.type;
|
||||
this.getCouponList()
|
||||
},
|
||||
@@ -115,7 +116,7 @@
|
||||
*/
|
||||
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
|
||||
@@ -156,7 +157,7 @@
|
||||
margin-top: 32rpx;
|
||||
|
||||
.towcontentlistxitembox {
|
||||
width: 33%;
|
||||
width: 50%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
@@ -170,8 +171,6 @@
|
||||
}
|
||||
|
||||
.towcontentlistxitemboxopacity {
|
||||
width: 33%;
|
||||
font-family: PingFang SC, PingFang SC;
|
||||
font-weight: bold;
|
||||
text{
|
||||
color: #E3AD7F;
|
||||
|
||||
Reference in New Issue
Block a user