promotion:基本完善完砍价逻辑
parent
7e55249b79
commit
52b8033e2d
|
@ -44,8 +44,8 @@ export function getBargainRecordPage(data) {
|
|||
// 获得砍价活动详情
|
||||
export function getBargainRecordDetail(id, activityId) {
|
||||
return request.get("app-api/promotion/bargain-record/get-detail", {
|
||||
id,
|
||||
activityId
|
||||
id: id > 0 ? id : undefined,
|
||||
activityId: activityId > 0 ? activityId : undefined
|
||||
}, {
|
||||
noAuth: true // TODO 芋艿:后续要做调整
|
||||
});
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
<div class="bnt bg-color-red" v-if="item.status === 2 && !item.orderId" @click="goConfirm(item)">
|
||||
去下单
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 2 && item.orderId && !item.payStatus" @click="goPay(item.payOrderId)">
|
||||
<div class="bnt bg-color-red" v-if="item.status === 2 && item.orderId && !item.payStatus" @click="goPay(item.orderId, item.payOrderId)">
|
||||
去付款
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
|
||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id, item.activityId)">
|
||||
继续砍价
|
||||
</div>
|
||||
<div class="bnt bg-color-red" v-if="item.status === 3" @click="goList">
|
||||
|
@ -146,9 +146,9 @@
|
|||
/**
|
||||
* 前往砍价记录的详情
|
||||
*/
|
||||
goDetail: function(id) {
|
||||
goDetail: function(id, activityId) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${id}&startBargainUid=${this.uid}`
|
||||
url: `/pages/activity/goods_bargain_details/index?id=${activityId}&startBargainUid=${this.uid}&storeBargainId=${id}`
|
||||
})
|
||||
},
|
||||
/**
|
||||
|
@ -183,8 +183,8 @@
|
|||
/**
|
||||
* 打开支付组件
|
||||
*/
|
||||
goPay: function (payOrderId) {
|
||||
const returnUrl = encodeURIComponent('/pages/activity/bargain/index');
|
||||
goPay: function (orderId, payOrderId) {
|
||||
const returnUrl = encodeURIComponent('/pages/order_pay_status/index?order_id=' + orderId);
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/cashier/index?order_id=${payOrderId}&returnUrl=${returnUrl}`
|
||||
});
|
||||
|
|
|
@ -465,6 +465,12 @@
|
|||
uni.navigateTo({
|
||||
url: `/pages/activity/bargain/index`
|
||||
})
|
||||
|
||||
// 下单界面
|
||||
const returnUrl = encodeURIComponent('/pages/order_pay_status/index?order_id=' + this.bargainUserInfo.orderId);
|
||||
uni.navigateTo({
|
||||
url: `/pages/goods/cashier/index?order_id=${this.bargainUserInfo.payOrderId}&returnUrl=${returnUrl}`
|
||||
});
|
||||
},
|
||||
|
||||
// ========== 砍价记录 ==========
|
||||
|
@ -473,7 +479,7 @@
|
|||
* 获得拼团记录
|
||||
*/
|
||||
gobargainUserInfo: function() {
|
||||
BargainApi.getBargainRecordDetail(this.bargainId, this.id).then(res => {
|
||||
BargainApi.getBargainRecordDetail(this.storeBargainId, this.id).then(res => {
|
||||
const bargainUserInfo = res.data;
|
||||
this.bargainUserInfo = bargainUserInfo;
|
||||
this.action = this.calculateAction(bargainUserInfo);
|
||||
|
|
Loading…
Reference in New Issue