商品结算
This commit is contained in:
@@ -7,8 +7,8 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// baseUrl = "https://twin-ui.com/demo/";
|
// baseUrl = "https://twin-ui.com/demo/";
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
// baseUrl = "https://testapi.nuttyreading.com/"; // 线上测试环境
|
||||||
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
// baseUrl = "https://api.nuttyreading.com/"; // 线上正式
|
||||||
baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
|
// baseUrl = "http://192.168.110.110:9200/pb/"; // 磊哥
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
baseUrl = "http://192.168.110.100:9200/pb/"; // 开发用电脑
|
||||||
// baseUrl = "http://59.110.212.44:9200/pb/";
|
// baseUrl = "http://59.110.212.44:9200/pb/";
|
||||||
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
// baseUrl = "http://192.168.110.100:9100/pb/"; // 开发用电脑
|
||||||
// baseUrl = "http://192.168.110.110:9200/pb/";
|
// baseUrl = "http://192.168.110.110:9200/pb/";
|
||||||
|
|||||||
@@ -1088,10 +1088,22 @@ export default {
|
|||||||
|
|
||||||
// 商品内容跳转
|
// 商品内容跳转
|
||||||
goDetail(id, data) {
|
goDetail(id, data) {
|
||||||
console.log("data at line 1277:", data);
|
console.log("data at line 1277:订单详情参数", data);
|
||||||
if (data.delFlag == -1) {
|
if (data.delFlag == -1) {
|
||||||
this.$commonJS.showToast("商品已下架");
|
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({
|
uni.navigateTo({
|
||||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||||
url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`,
|
url: `/pages/goods/index/index?navTitle=''&title=''&id=${id}`,
|
||||||
|
|||||||
@@ -55,7 +55,7 @@
|
|||||||
<view class="curriulum_title">{{ v.productName }} </view>
|
<view class="curriulum_title">{{ v.productName }} </view>
|
||||||
<view class="price_box">
|
<view class="price_box">
|
||||||
<text class="price" style="margin-right: 0">
|
<text class="price" style="margin-right: 0">
|
||||||
¥{{ v.price }}
|
¥{{ v.activityPrice && v.activityPrice > 0 ? v.activityPrice : v.price}}
|
||||||
</text>
|
</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -81,7 +81,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="pay_box" style="margin-top: 20rpx">
|
<view class="pay_box" style="margin-top: 20rpx">
|
||||||
<view @click="openOrderModal(v)" class="curriulum_title_box goods_item pay_item"
|
<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="top">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<text> {{ v.text }}</text>
|
<text> {{ v.text }}</text>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
<view class="order_top common_radius_box color_shandow goods_box pay_box">
|
<view class="order_top common_radius_box color_shandow goods_box pay_box">
|
||||||
<view class="title">价格明细</view>
|
<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="top">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image v-if="v.imgUrl" class="pay_item_img" :src="v.imgUrl" mode="aspectFil"
|
<image v-if="v.imgUrl" class="pay_item_img" :src="v.imgUrl" mode="aspectFil"
|
||||||
@@ -162,6 +162,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="order_top common_radius_box color_shandow goods_box pay_box">
|
<view class="order_top common_radius_box color_shandow goods_box pay_box">
|
||||||
<view class="title">支付方式</view>
|
<view class="title">支付方式</view>
|
||||||
|
<!-- 商品是安卓环境支付,或者商品列表中没有课程 -->
|
||||||
<template v-if="isAndorid || !isAndorid && !haveCourse">
|
<template v-if="isAndorid || !isAndorid && !haveCourse">
|
||||||
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
|
<view class="curriulum_title_box goods_item pay_item" v-for="(v, i) in payList">
|
||||||
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
|
<view :class="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
|
||||||
@@ -191,7 +192,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<!-- ios 支付列表 -->
|
<!-- ios 支付列表 -->
|
||||||
<template v-else>
|
<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="isDefaultCurrency && i != 2 ? 'bgGrey top' : 'top'">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
|
<image class="pay_item_img" :src="v.imgUrl" mode="aspectFil" :style="v.style">
|
||||||
@@ -866,7 +867,7 @@
|
|||||||
var s = 0;
|
var s = 0;
|
||||||
var that = this;
|
var that = this;
|
||||||
for (var i = this.goodsDataList.length - 1; i >= 0; i--) {
|
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;
|
that.totalPrice = s;
|
||||||
// !
|
// !
|
||||||
@@ -1013,7 +1014,7 @@
|
|||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
this.buyingFlag = false
|
this.buyingFlag = false
|
||||||
console.log("res at line 598:", res);
|
console.log("res at line 598系统下单返回结果:", res);
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
if (res.orderSn == null) {
|
if (res.orderSn == null) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
Reference in New Issue
Block a user