diff --git a/src/project/szpc/AppRedemptionPoints/AppRedemptionPoints.vue b/src/project/szpc/AppRedemptionPoints/AppRedemptionPoints.vue index c45d438..23b6189 100644 --- a/src/project/szpc/AppRedemptionPoints/AppRedemptionPoints.vue +++ b/src/project/szpc/AppRedemptionPoints/AppRedemptionPoints.vue @@ -28,7 +28,7 @@
-
{{ $dict.getLabel('integralSGType', item.type) }}
+
{{ $dict.getLabel('integralSGTypeText', item.typeText) }}

{{item.title}}

@@ -51,7 +51,7 @@
-
{{ $dict.getLabel('integralSGType', item.type) }}
+
{{ $dict.getLabel('integralSGTypeText', item.typeText) }}

{{item.title}}

@@ -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; } diff --git a/src/project/szpc/AppRedemptionPoints/myOrderList.vue b/src/project/szpc/AppRedemptionPoints/myOrderList.vue index ba8afae..6ae5de7 100644 --- a/src/project/szpc/AppRedemptionPoints/myOrderList.vue +++ b/src/project/szpc/AppRedemptionPoints/myOrderList.vue @@ -12,23 +12,23 @@
-
{{ $dict.getLabel('integralSGType', item.goodsType) }}
+
{{ $dict.getLabel('integralSGTypeText', item.goodsTypeText) }}

{{item.goodsTitle}}

-

{{item.usedIntegral}}积分+{{item.payMoney}}元

+

{{item.usedIntegral}}积分+{{item.payMoney}}元

x {{item.quantity}}
-

兑换成功后,点击「去购买」前往京东低价购买

+

兑换成功后,点击「去购买」前往京东低价购买

免费兑换商品,可到固定的兑换点进行「核销兑换」

备注:{{item.remarks}}

-
+

去购买
-
+

核销码:{{item.verificationCode}}

取消订单
@@ -63,7 +63,7 @@ export default { ...mapState(['user']), }, onLoad() { - this.$dict.load(['integralSGOStatus', 'integralSGType']).then(() => { + this.$dict.load(['integralSGOStatus', 'integralSGTypeText']).then(() => { this.getList() }) }, @@ -85,12 +85,22 @@ 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] } }) }, openJd(item) { - uni.navigateTo({url: `./jdH5?goodsJdUrl=${item.goodsJdUrl}`}) + if(item.goodsType == 1) { + uni.navigateTo({url: `./jdH5?goodsJdUrl=${item.goodsJdUrl}`}) + }else { + uni.navigateToMiniProgram({ + appId: item.goodsJdAppid, + path: item.goodsJdUrl + }) + } }, cancel(item) { uni.showModal({ @@ -183,6 +193,9 @@ export default { scale: 0.9; } } + .type2 { + background-color: #E64E39; + } .type1 { background-color: #E64E39; } diff --git a/src/project/szpc/AppRedemptionPoints/placeOrder.vue b/src/project/szpc/AppRedemptionPoints/placeOrder.vue index 1a9ae69..1bc120d 100644 --- a/src/project/szpc/AppRedemptionPoints/placeOrder.vue +++ b/src/project/szpc/AppRedemptionPoints/placeOrder.vue @@ -3,16 +3,16 @@
-
{{ $dict.getLabel('integralSGType', goodsInfo.type) }}
+
{{ $dict.getLabel('integralSGTypeText', goodsInfo.typeText) }}

{{goodsInfo.title}}

-

{{goodsInfo.integralPrice}}积分+¥{{goodsInfo.payMoney}}.00

+

{{goodsInfo.integralPrice}}积分+¥{{goodsInfo.payMoney}}.00

-

兑换成功后,点击「去购买」前往京东低价购买

+

兑换成功后,点击「去购买」前往京东低价购买

免费兑换商品,可到固定的兑换点进行「核销兑换」

@@ -28,7 +28,7 @@
支付积分
减{{(goodsNum*goodsInfo.integralPrice).toFixed(2)}}积分
-
+
京东支付
¥{{(goodsNum*goodsInfo.payMoney).toFixed(2)}}
@@ -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 } }) }, @@ -104,7 +105,7 @@ export default { }, toSuccess() { var integralPrice = this.goodsNum*this.goodsInfo.integralPrice - uni.navigateTo({url: `./successOrder?isFree=${this.goodsInfo.type}&integralPrice=${integralPrice}&backLevel=${this.backLevel}&goodsJdUrl=${this.goodsInfo.jdUrl}`}) + uni.navigateTo({url: `./successOrder?integralPrice=${integralPrice}&backLevel=${this.backLevel}&shopGoodsId=${this.goodsInfo.shopGoodsId}`}) } }, } @@ -142,6 +143,9 @@ export default { scale: 0.9; } } + .type2 { + background-color: #E64E39; + } .type1 { background-color: #E64E39; } diff --git a/src/project/szpc/AppRedemptionPoints/productDetails.vue b/src/project/szpc/AppRedemptionPoints/productDetails.vue index 4ae6e6d..340eb43 100644 --- a/src/project/szpc/AppRedemptionPoints/productDetails.vue +++ b/src/project/szpc/AppRedemptionPoints/productDetails.vue @@ -1,12 +1,12 @@ @@ -28,24 +29,39 @@ export default { appName: '提交订单', data() { return { - isFree: 0, // 0免费 1京东 integralPrice: 0, backLevel: 1, - goodsJdUrl: '' + shopGoodsId: '', + goodsInfo: {} } }, computed: { ...mapState(['user']), }, onLoad(option) { - this.isFree = option.isFree + console.log(option) this.integralPrice = option.integralPrice this.backLevel = option.backLevel - this.goodsJdUrl = option.goodsJdUrl + this.shopGoodsId = option.shopGoodsId + this.getDetail() }, methods: { + getDetail() { + this.$instance.post(`/app/appintegralsupermarketshop/queryGoodsInfoXCX?shopGoodsId=${this.shopGoodsId}`).then(res => { + if (res.code === 0) { + this.goodsInfo = res.data + } + }) + }, openJd() { - uni.navigateTo({url: `./jdH5?goodsJdUrl=${this.goodsJdUrl}`}) + if(this.goodsInfo.type == 1) { + uni.navigateTo({url: `./jdH5?goodsJdUrl=${this.goodsInfo.jdUrl}`}) + }else { + uni.navigateToMiniProgram({ + appId: this.goodsInfo.jdAppid, + path: this.goodsInfo.jdUrl + }) + } }, back() { uni.navigateBack({delta: Number(this.backLevel)})