丰都 积分兑换

This commit is contained in:
liuye
2023-05-22 16:06:08 +08:00
parent e15bf73657
commit 01dbb6695b
4 changed files with 27 additions and 9 deletions

View File

@@ -28,7 +28,7 @@
<div class="list-info" v-for="(item, index) in leftList" :key="index">
<div class="item" @click="toProductDetail(item)">
<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('integralSGTypeText', item.type) }}</div>
<div class="content">
<p class="text">{{item.title}}</p>
<div class="item-money">
@@ -51,7 +51,7 @@
<div class="list-info" v-for="(item, index) in rightList" :key="index">
<div class="item" @click="toProductDetail(item)">
<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('integralSGTypeText', item.type) }}</div>
<div class="content">
<p class="text">{{item.title}}</p>
<div class="item-money">
@@ -108,7 +108,7 @@ export default {
},
onLoad() {
this.getTotal()
this.$dict.load(['integralSGType']).then(() => {
this.$dict.load(['integralSGTypeText']).then(() => {
this.getList()
})
},
@@ -143,6 +143,7 @@ export default {
if (res.code === 0) {
this.goodsList = this.current == 1 ? res.data.records : [...this.goodsList, ...res.data.records]
res.data.records.map((item, index) => {
item.typeText = item.type == 0 ? 0 : 1
if(index%2 ==0) {
this.leftList.push(item)
}else {
@@ -292,6 +293,9 @@ export default {
top: 0;
right: 0;
}
.type2 {
background-color: #E64E39;
}
.type1 {
background-color: #E64E39;
}

View File

@@ -12,7 +12,7 @@
</div>
<div class="flex">
<img :src="item.goodsPicUrl" alt="">
<div class="type" :class="`type`+item.goodsType">{{ $dict.getLabel('integralSGType', item.goodsType) }}</div>
<div class="type" :class="`type`+item.goodsType">{{ $dict.getLabel('integralSGTypeText', item.goodsTypeText) }}</div>
<div class="flex-right">
<p>{{item.goodsTitle}}</p>
<div class="num-flex">
@@ -63,7 +63,7 @@ export default {
...mapState(['user']),
},
onLoad() {
this.$dict.load(['integralSGOStatus', 'integralSGType']).then(() => {
this.$dict.load(['integralSGOStatus', 'integralSGTypeText']).then(() => {
this.getList()
})
},
@@ -85,6 +85,9 @@ export default {
}
}).then(res => {
if (res.code === 0) {
res.data.records.map((item) => {
item.goodsTypeText = item.goodsType == 0 ? 0 : 1
})
this.list = this.current == 1 ? res.data.records : [...this.list, ...res.data.records]
}
})
@@ -190,6 +193,9 @@ export default {
scale: 0.9;
}
}
.type2 {
background-color: #E64E39;
}
.type1 {
background-color: #E64E39;
}

View File

@@ -3,7 +3,7 @@
<div class="header-info">
<div class="flex">
<img :src="goodsInfo.picUrl" alt="">
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGType', goodsInfo.type) }}</div>
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
<div class="flex-right">
<p>{{goodsInfo.title}}</p>
<div>
@@ -72,7 +72,7 @@ export default {
this.shopGoodsId = option.shopGoodsId
this.total = option.total
this.backLevel = option.backLevel
this.$dict.load(['integralSGType']).then(() => {
this.$dict.load(['integralSGTypeText']).then(() => {
this.getDetail()
})
},
@@ -81,6 +81,7 @@ export default {
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
if (res.code === 0) {
this.goodsInfo = res.data
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
}
})
},
@@ -142,6 +143,9 @@ export default {
scale: 0.9;
}
}
.type2 {
background-color: #E64E39;
}
.type1 {
background-color: #E64E39;
}

View File

@@ -1,7 +1,7 @@
<template>
<div class="productDetails" v-if="goodsInfo.picUrl">
<img :src="goodsInfo.picUrl" alt="">
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGType', goodsInfo.type) }}</div>
<div class="type" :class="`type`+goodsInfo.type">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
<div class="product-info">
<p>{{goodsInfo.title}}</p>
<h3>{{goodsInfo.integralPrice}}积分<span v-if="goodsInfo.type == 1">+¥{{goodsInfo.payMoney}}<span v-if="goodsInfo.type == 1">兑换后再付</span></span></h3>
@@ -42,7 +42,7 @@ export default {
onLoad(option) {
this.shopGoodsId = option.shopGoodsId
this.total = option.total
this.$dict.load(['integralSGType']).then(() => {
this.$dict.load(['integralSGTypeText']).then(() => {
this.getDetail()
})
},
@@ -51,6 +51,7 @@ export default {
this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => {
if (res.code === 0) {
this.goodsInfo = res.data
this.goodsInfo.typeText = this.goodsInfo.type == 0 ? 0 : 1
}
})
},
@@ -83,6 +84,9 @@ export default {
padding: 16px 16px 16px 36px;
border-bottom-left-radius: 40px;
}
.type2 {
background-color: #E64E39;
}
.type1 {
background-color: #E64E39;
}