积分兑换

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