collect 8.7
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<u-empty mode="list" v-if="!list.length" color="#000" img-width="200" font-size="30" margin-top="300"></u-empty>
|
||||
<u-swipe-action
|
||||
v-for="(item, index) in list" :key="index"
|
||||
:index='item.fav_id'
|
||||
:index='index'
|
||||
:show="item.show"
|
||||
:options="options"
|
||||
@click="removeFavorite"
|
||||
@@ -18,7 +18,7 @@
|
||||
<view class="item-price">¥{{ item.favlog_price }}</view>
|
||||
<view class="item-date">
|
||||
<image src="@/pageE/static/mine/26.png"></image>
|
||||
<view>{{ item.fav_time }}</view>
|
||||
<view>{{ item.fav_time | date }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -31,7 +31,6 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
show: false,
|
||||
options: [
|
||||
{
|
||||
text: '删除',
|
||||
@@ -50,16 +49,22 @@ export default {
|
||||
this.$u.api.getFavoritesList().then(res => {
|
||||
if(res.errCode == 0) {
|
||||
this.list = res.data;
|
||||
this.list.forEach(item => {
|
||||
Object.assign(item, { show: false });
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
removeFavorite(id) {
|
||||
removeFavorite(index) {
|
||||
const id = this.list[index].fav_id;
|
||||
this.$u.api.removeFavorite({
|
||||
id: id
|
||||
fid: id,
|
||||
type: 'goods'
|
||||
}).then(res => {
|
||||
this.$u.toast(res.message);
|
||||
if(res.errCode == 0) {
|
||||
this.getGoodsFavoritesList();
|
||||
} else {
|
||||
this.$u.toast(res.message);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<view class="price">¥<span>{{ couponInfo.voucher_price }}</span></view>
|
||||
<view class="condition">满{{ couponInfo.voucher_limit }}使用</view>
|
||||
</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.type == 1 ? '平台' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用</view>
|
||||
<view class="info-store u-line-1">仅限{{ couponInfo.type == 1 ? '指定商品' : couponInfo.store_name }}{{ couponInfo.gc_id | showClass(goodsClass) }}商品使用</view>
|
||||
<view class="info-integral">兑换积分:{{ couponInfo.voucher_points }}积分</view>
|
||||
<view class="info-date">有效期{{ couponInfo.voucher_startdate }}-{{ couponInfo.voucher_enddate }}</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user