This commit is contained in:
weipengfei 2024-03-02 18:18:51 +08:00
parent 472e8931f2
commit 4eb5580ff1
2 changed files with 881 additions and 837 deletions

View File

@ -157,17 +157,16 @@
addCart(this.cartForm).then(res => {
// ID
that.checkForm.cart_id.push(res.data.cart_id);
that.$util.Tips({
title: "操作成功!"
}, () => {
orderCheck(that.checkForm).then(res => {
orderCheck(that.checkForm).then(res1 => {
uni.navigateTo({
url: "/pages/payment/settlement?cartId=" + this.checkForm
.cart_id + "&money=" + this.cartForm.total_amount +
"&merName=" + this.merchantInfo.merchant.mer_name
"&merName=" + this.merchantInfo.merchant.mer_name,
success: (res) => {
res.eventChannel.emit('datas', res1.data.platformConsumption);
}
})
});
});
}).catch((err) => {
this.$util.Tips({
title: err.message || err.msg || err

View File

@ -12,8 +12,8 @@
<view class="product-item">
<view class="img-box">
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/89ad3202402292014108303.jpg"
width="170rpx" height="180rpx" />
<image src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/89ad3202402292014108303.jpg" width="170rpx"
height="180rpx" />
</view>
<view class="content event_content">
<view class="name line1">
@ -73,10 +73,10 @@
<view class='money'>{{payForm.money}}</view>
</view>
<view class='item acea-row row-between-wrapper'>
<view class='item acea-row row-between-wrapper' v-if="false">
<view>补贴抵扣</view>
<block v-if="platformConsumption.length > 0">
<view class='discount money red_packet'>
<block v-if="platformConsumption.length > 0" >
<view class='discount money red_packet' @click="couponTap3()">
<text v-if="consumption_id">-{{consumption_money||'0.00'}}</text>
<text v-else>有补贴补贴未选</text>
<text class='iconfont icon-jiantou'></text>
@ -131,7 +131,8 @@
configMap
} from '@/utils';
import {
orderPay
orderPay,
orderCheck
} from "@/api/payment.js";
export default {
@ -242,7 +243,17 @@
money: '',
merName: '',
return_url: ''
}
},
checkForm: {
address_id: '',
cart_id: [],
consumption_id: '',
product_type: 0,
source: 999,
takes: [],
use_coupon: {},
use_integral: false
},
};
},
computed: {
@ -258,6 +269,24 @@
this.payForm.cart_id = options.cartId;
this.payForm.money = options.money;
this.payForm.merName = options.merName;
this.checkForm.cart_id = options.cartId.split(',');
// this.platformConsumption = [{
// balance: "39000.00",
// coupon_price: "50000.00",
// coupon_title: "",
// coupon_user_id: 178,
// describe: "使",
// end_time: "2025-07-01 00:00:00",
// start_time: "2024-03-02 14:15:17",
// uid: 889
// }]
const eventChannel = this.getOpenerEventChannel();
eventChannel.on('datas', (data) => {
this.platformConsumption = data;
})
// #ifdef H5
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
@ -282,7 +311,23 @@
},
methods: {
couponTap3: function(item, index) {
uni.navigateTo({
url: '/pages/redpacket/redpacket',
success: (res) => {
res.eventChannel.emit('changeRedPacketInfo', this.platformConsumption)
uni.$once('changeRedPacket', (data) => {
this.consumption_id = data;
orderCheck({
...this.checkForm,
consumption_id: this.consumption_id
}).then(res=>{
this.payForm.money = this.cartForm.total_price;
})
})
}
})
},
//
authColse: function(e) {
console.log(e, 'authColse')