字典更换

This commit is contained in:
liuye
2023-05-22 16:22:53 +08:00
parent f450ca1e08
commit 76148b66f5
4 changed files with 15 additions and 9 deletions

View File

@@ -28,7 +28,7 @@
<div class="list-info" v-for="(item, index) in leftList" :key="index" v-if="goodsList.length">
<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.typeText">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</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" v-if="goodsList.length">
<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.typeText">{{ $dict.getLabel('integralSGTypeText', item.typeText) }}</div>
<div class="content">
<p class="text">{{item.title}}</p>
<div class="item-money">
@@ -113,7 +113,7 @@ export default {
this.userId = option.userId
this.integralUserId = option.integralUserId
this.getTotal()
this.$dict.load(['integralSGType']).then(() => {
this.$dict.load(['integralSGTypeText']).then(() => {
this.getList()
})
},
@@ -151,6 +151,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 {

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.goodsTypeText">{{ $dict.getLabel('integralSGTypeText', item.goodsTypeText) }}</div>
<div class="flex-right">
<p>{{item.goodsTitle}}</p>
<div class="num-flex">
@@ -65,7 +65,7 @@ export default {
},
onLoad(option) {
this.userId = option.userId
this.$dict.load(['integralSGOStatus', 'integralSGType']).then(() => {
this.$dict.load(['integralSGOStatus', 'integralSGTypeText']).then(() => {
this.getList()
})
},
@@ -87,6 +87,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]
}
})

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.typeText">{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}</div>
<div class="flex-right">
<p>{{goodsInfo.title}}</p>
<div>
@@ -74,7 +74,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()
})
},
@@ -86,6 +86,7 @@ export default {
this.$http.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
}
})
},

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.typeText">{{ $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>
@@ -44,7 +44,7 @@ export default {
this.shopGoodsId = option.shopGoodsId
this.userId = option.userId
this.total = option.total
this.$dict.load(['integralSGType']).then(() => {
this.$dict.load(['integralSGTypeText']).then(() => {
this.getDetail()
})
},
@@ -56,6 +56,7 @@ export default {
this.$http.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
}
})
},