Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
@@ -24,10 +24,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="list-content">
|
<div class="list-content">
|
||||||
<u-waterfall v-model="goodsList">
|
<div class="list-info" v-for="(item, index) in goodsList" :key="index" v-if="goodsList.length">
|
||||||
<template v-slot:left="{leftList}">
|
<div class="item" @click="toProductDetail(item)">
|
||||||
<div v-for="(item, index) in leftList" :key="index" @click="toProductDetail(item)">
|
|
||||||
<div class="item">
|
|
||||||
<img :src="item.picUrl" alt="">
|
<img :src="item.picUrl" alt="">
|
||||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGType', item.type) }}</div>
|
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGType', item.type) }}</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@@ -42,27 +40,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<AiEmpty v-else></AiEmpty>
|
||||||
<template v-slot:right="{rightList}">
|
|
||||||
<div v-for="(item, index) in rightList" :key="index" @click="toProductDetail(item)">
|
|
||||||
<div class="item">
|
|
||||||
<img :src="item.picUrl" alt="">
|
|
||||||
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGType', item.type) }}</div>
|
|
||||||
<div class="content">
|
|
||||||
<p class="text">{{item.title}}</p>
|
|
||||||
<div class="item-money">
|
|
||||||
<h3>{{item.integralPrice}}积分</h3>
|
|
||||||
<p v-if="item.type == 1">+¥{{item.payMoney}}</p>
|
|
||||||
<span v-if="item.type == 1">兑换后再付</span>
|
|
||||||
</div>
|
|
||||||
<div class="btn" :class="total >= item.integralPrice ? 'btn1' : 'btn0'" @click.stop="toOrder(item)" v-if="item.status == 1 && item.stock > 0">{{total >= item.integralPrice ? '去兑换' : '积分不足'}}</div>
|
|
||||||
<div class="btn btn0" :class="`btn`+item.status" v-else>商品缺货</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</u-waterfall>
|
|
||||||
<AiEmpty v-if="!goodsList.length"></AiEmpty>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -88,10 +66,9 @@ export default {
|
|||||||
currentType: 0,
|
currentType: 0,
|
||||||
pointTypeList: [{name: '全部'}, {name: '50分以下'}, {name: '100分以下'}, {name: '200分以下'}, {name: '5000分以下'}],
|
pointTypeList: [{name: '全部'}, {name: '50分以下'}, {name: '100分以下'}, {name: '200分以下'}, {name: '5000分以下'}],
|
||||||
currentPoint: 0,
|
currentPoint: 0,
|
||||||
leftList: [],
|
|
||||||
rightList: [],
|
|
||||||
goodsList: [],
|
goodsList: [],
|
||||||
total: 0
|
total: 0,
|
||||||
|
current: 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -116,9 +93,8 @@ export default {
|
|||||||
},
|
},
|
||||||
getListInit() {
|
getListInit() {
|
||||||
this.goodsList = []
|
this.goodsList = []
|
||||||
this.leftList = []
|
|
||||||
this.rightList = []
|
|
||||||
this.current = 1
|
this.current = 1
|
||||||
|
this.getList()
|
||||||
},
|
},
|
||||||
getList() {
|
getList() {
|
||||||
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`, null, {
|
this.$instance.post(`/app/appintegralsupermarketshop/goodsListXCX`, null, {
|
||||||
@@ -132,15 +108,6 @@ export default {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
|
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
|
||||||
if(res.data && res.data.records.length) {
|
|
||||||
res.data.records.map((item, index) => {
|
|
||||||
if(index%2 == 0) {
|
|
||||||
this.leftList.push(item)
|
|
||||||
}else {
|
|
||||||
this.rightList.push(item)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -169,7 +136,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
this.current = this.current + 1
|
this.current ++
|
||||||
this.getList()
|
this.getList()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@@ -251,6 +218,11 @@ export default {
|
|||||||
.list-content {
|
.list-content {
|
||||||
padding: 396px 0 24px 24px;
|
padding: 396px 0 24px 24px;
|
||||||
background-color: #f3f6f9;
|
background-color: #f3f6f9;
|
||||||
|
overflow: hidden;
|
||||||
|
.list-info {
|
||||||
|
width: 50%;
|
||||||
|
float: left;
|
||||||
|
}
|
||||||
.item {
|
.item {
|
||||||
width: calc(100% - 24px);
|
width: calc(100% - 24px);
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<p class="tips" v-if="item.type == 1"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
<p class="tips" v-if="item.goodsType == 1"><span>兑换成功后,点击「去购买」前往京东低价购买</span></p>
|
||||||
<p class="tips" v-else>免费兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
<p class="tips" v-else>免费兑换商品,可到固定的兑换点进行「核销兑换」</p>
|
||||||
<p class="remark" v-if="item.remarks">备注:{{item.remarks}}</p>
|
<p class="remark" v-if="item.remarks">备注:{{item.remarks}}</p>
|
||||||
<div class="flex-btn" v-if="item.goodsType == 1">
|
<div class="flex-btn" v-if="item.goodsType == 1">
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<p v-html="goodsInfo.description"></p>
|
<p v-html="goodsInfo.description"></p>
|
||||||
</div>
|
</div>
|
||||||
<div class="btn" @click="toOrder()">
|
<div class="btn" @click="toOrder()">
|
||||||
<div :class="total >= goodsInfo.integralPrice ? 'status1' : 'status0'" v-if="goodsInfo.status == 1 && goodsInfo.stock > 0">{{total >= goodsInfo.integralPrice ? '去兑换' : '积分不足'}}</div>
|
<div :class="total >= goodsInfo.integralPrice ? 'status1' : 'status0'" v-if="goodsInfo.status == 1 && goodsInfo.stock > 0">{{total >= goodsInfo.integralPrice ? '立即兑换' : '积分不足'}}</div>
|
||||||
<div class="status0" v-else>商品缺货</div>
|
<div class="status0" v-else>商品缺货</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user