商品结算

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

@@ -7,8 +7,8 @@ if (process.env.NODE_ENV === 'development') {
// baseUrl = "https://twin-ui.com/demo/";
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
// baseUrl = "http://59.110.212.44:9200/pb/";
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
// baseUrl = "http://192.168.110.110:9200/pb/";

View File

@@ -1088,10 +1088,22 @@ export default {
// 商品内容跳转
goDetail(id, data) {
console.log("data at line 1277:", data);
console.log("data at line 1277:订单详情参数", data);
if (data.delFlag == -1) {
this.$commonJS.showToast("商品已下架");
} else {
}else if(data.goodsType == '05'){
if(data.courseIds && data.courseIds.length > 0){
uni.navigateTo({
url: `/pages/course/courseDetail?id=${data.courseIds[0].courseId}`,
});
}else{
uni.showToast({
title: "课程数据出错",
icon: "none"
});
}
} else {
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`,

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({