丰都积分兑换
This commit is contained in:
@@ -90,7 +90,14 @@ export default {
|
||||
})
|
||||
},
|
||||
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({
|
||||
|
||||
@@ -104,7 +104,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?isFree=${this.goodsInfo.type}&integralPrice=${integralPrice}&backLevel=${this.backLevel}&goodsJdUrl=${this.goodsInfo.jdUrl}&shopGoodsId=${this.shopGoodsId}`})
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@@ -2,14 +2,8 @@
|
||||
<div class="successOrder">
|
||||
<img src="./img/success.png" alt="">
|
||||
|
||||
<div v-if="isFree == 1">
|
||||
<h3>兑换成功</h3>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>{{integralPrice}}积分</span><br/>
|
||||
可点击下方按钮前往京东商城进行低价购买
|
||||
</p>
|
||||
<div class="btn" @click="openJd">去购买</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
|
||||
<div v-if="isFree == 0">
|
||||
<h3>提交成功</h3>
|
||||
<p>提交「免费兑」订单成功,扣减 <span>{{integralPrice}}积分</span></p>
|
||||
<div class="btn-flex">
|
||||
@@ -17,6 +11,13 @@
|
||||
<div @click="toOrderList">查看订单</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else>
|
||||
<h3>兑换成功</h3>
|
||||
<p>提交「京东低价商品」订单成功,扣减 <span>{{integralPrice}}积分</span><br/>
|
||||
可点击下方按钮前往京东商城进行低价购买
|
||||
</p>
|
||||
<div class="btn" @click="openJd">去购买</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -31,7 +32,9 @@ export default {
|
||||
isFree: 0, // 0免费 1京东
|
||||
integralPrice: 0,
|
||||
backLevel: 1,
|
||||
goodsJdUrl: ''
|
||||
goodsJdUrl: '',
|
||||
shopGoodsId: '',
|
||||
goodsInfo: {}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -42,10 +45,26 @@ export default {
|
||||
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.goodsJdUrl}`})
|
||||
}else {
|
||||
uni.navigateToMiniProgram({
|
||||
appId: this.goodsInfo.jdAppid,
|
||||
path: this.goodsInfo.jdUrl
|
||||
})
|
||||
}
|
||||
},
|
||||
back() {
|
||||
uni.navigateBack({delta: Number(this.backLevel)})
|
||||
|
||||
Reference in New Issue
Block a user