商品结算

This commit is contained in:
@fawn-nine
2024-09-18 15:42:17 +08:00
parent cebe7d7021
commit e421621155
3 changed files with 23 additions and 10 deletions

View File

@@ -55,7 +55,7 @@
<view class="curriulum_title">{{ v.productName }} </view>
<view class="price_box">
<text class="price" style="margin-right: 0">
{{ v.price }}
{{ v.activityPrice && v.activityPrice > 0 ? v.activityPrice : v.price}}
</text>
</view>
</view>
@@ -81,7 +81,7 @@
</view>
<view class="pay_box" style="margin-top: 20rpx">
<view @click="openOrderModal(v)" class="curriulum_title_box goods_item pay_item"
v-for="(v, i) in orderInfoList">
v-for="(v, i) in orderInfoList" :key="i">
<view class="top">
<view class="left">
<text> {{ v.text }}</text>
@@ -114,7 +114,7 @@
<view class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">价格明细</view>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in priceBreakdownList">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in priceBreakdownList" :key="i">
<view class="top">
<view class="left">
<image v-if="v.imgUrl" class="pay_item_img" :src="v.imgUrl" mode="aspectFil"
@@ -162,6 +162,7 @@
</view>
<view class="order_top common_radius_box color_shandow goods_box pay_box">
<view class="title">支付方式</view>
<!-- 商品是安卓环境支付或者商品列表中没有课程 -->
<template v-if="isAndorid || !isAndorid && !haveCourse">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
@@ -191,7 +192,7 @@
</template>
<!-- ios 支付列表 -->
<template v-else>
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payListIOS">
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payListIOS" :key="i">
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
<view class="left">
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
@@ -866,7 +867,7 @@
var s = 0;
var that = this;
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
s += this.goodsDataList[i].price ? this.goodsDataList[i].price : 0;
s += this.goodsDataList[i].activityPrice && this.goodsDataList[i].activityPrice > 0 ? this.goodsDataList[i].activityPrice : this.goodsDataList[i].price;
}
that.totalPrice = s;
//
@@ -1013,7 +1014,7 @@
})
.then(async (res) => {
this.buyingFlag = false
console.log("res at line 598:", res);
console.log("res at line 598系统下单返回结果:", res);
if (res.code == 0) {
if (res.orderSn == null) {
uni.showToast({