积分兑换

This commit is contained in:
liuye
2023-04-12 18:01:32 +08:00
parent 4ba8594b28
commit c08d40d471

View File

@@ -26,12 +26,12 @@
<div class="list-content">
<u-waterfall v-model="flowList">
<template v-slot:left="{leftList}">
<div v-for="(item, index) in leftList" :key="index" @click="toProductDetail()">
<div v-for="(item, index) in leftList" :key="index" @click="toProductDetail(item)">
<div class="item">
<img src="https://cdn.cunwuyun.cn/dvcp/h5/watermark/8.png" alt="">
<div class="type type0">京东低价商品</div>
<img :src="item.picUrl" alt="">
<div class="type" :class="`type`+item.type">{{ $dict.getLabel('integralSGType', item.type) }}</div>
<div class="content">
<p class="text">无染(wuro)本色抽纸无染(wuro)本色抽纸无无染(wuro)本色抽纸无染(wuro)本色抽</p>
<p class="text">{{item.title}}</p>
<div class="item-money">
<h3>50积分</h3>
<p>+2.00</p>
@@ -84,16 +84,18 @@ export default {
currentType: 0,
pointTypeList: [{name: '全部'}, {name: '50分以下'}, {name: '100分以下'}, {name: '200分以下'}, {name: '5000分以下'}],
currentPoint: 0,
leftList: [1,1,1,1,1,11,1,1],
rightList: [1,1,1,1,1,11,1,1],
flowList: [1,1,1,1,1,11,1,1],
leftList: [],
rightList: [],
flowList: [],
}
},
computed: {
...mapState(['user']),
},
onLoad() {
this.getList()
this.$dict.load(['integralSGType']).then(() => {
this.getList()
})
},
methods: {
getListInit() {
@@ -102,7 +104,16 @@ export default {
getList() {
this.$instance.post(`/app/appintegralsupermarketgoods/list`).then(res => {
if (res.code === 0) {
this.flowList = 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)
}
})
}
}
})
},
@@ -118,8 +129,8 @@ export default {
this.currentPoint = index
// this.getListInit()
},
toProductDetail() {
uni.navigateTo({url: './productDetails'})
toProductDetail(item) {
uni.navigateTo({url: `./productDetails?id=${item.id}`})
},
toMyOrder() {
uni.navigateTo({url: './myOrderList'})
@@ -230,10 +241,10 @@ export default {
top: 0;
right: 0;
}
.type0 {
.type1 {
background-color: #E64E39;
}
.type1 {
.type0 {
background-color: #FF6900;
}
.content {