合并master后
This commit is contained in:
@@ -198,19 +198,19 @@
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
|
|
||||||
.name {
|
.name {
|
||||||
color: #999;
|
color: #999; font-size: 28rpx;
|
||||||
@include toe();
|
@include toe();
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.others {
|
.others {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
color: #999;
|
color: #999; font-size: 28rpx;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.dianzan {
|
.dianzan {
|
||||||
|
|||||||
@@ -12,13 +12,14 @@ if (process.env.NODE_ENV === 'development') {
|
|||||||
// 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/";
|
||||||
|
// baseUrl = "http://192.168.110.38:9200/pb/"; // 吴春磊笔记本1
|
||||||
// socketUrl = "ws://8.129.186.35:6001/";
|
// socketUrl = "ws://8.129.186.35:6001/";
|
||||||
} else if (process.env.NODE_ENV === 'production') {
|
} else if (process.env.NODE_ENV === 'production') {
|
||||||
// 生产环境11
|
// 生产环境11
|
||||||
// baseUrl = "http://192.168.110.100:9200/pb/" // 开发用电脑
|
// baseUrl = "http://59.110.212.44:9100/pb/";
|
||||||
// baseUrl = "https://testapi.nuttyreading.com/";
|
// baseUrl = "https://testapi.nuttyreading.com/";
|
||||||
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
// baseUrl = "http://192.168.110.110:9200/pb/";//磊哥
|
||||||
baseUrl = "https://api.nuttyreading.com/"; // 正式环境
|
baseUrl = "https://api.nuttyreading.com/"; //1
|
||||||
// baseUrl = "ws://twin-ui.com:6001/";
|
// baseUrl = "ws://twin-ui.com:6001/";
|
||||||
// socketUrl = "ws://twin-ui.com:6001/";
|
// socketUrl = "ws://twin-ui.com:6001/";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1088,9 +1088,21 @@ 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 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 {
|
} else {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
// url: '../bookShop/commodityDetail?id=' + item.id
|
// url: '../bookShop/commodityDetail?id=' + item.id
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
: ''
|
: ''
|
||||||
}`"
|
}`"
|
||||||
>
|
>
|
||||||
<view class="image_box" style="margin-right: 10rpx">
|
<view class="image_box" style="margin-right: 10rpx; ">
|
||||||
<image
|
<image
|
||||||
:src="slotProps.row.productImages"
|
:src="slotProps.row.productImages"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
@@ -58,14 +58,19 @@
|
|||||||
></image>
|
></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view :class="`goods_info `">
|
<view :class="`goods_info flex_box just`" style="justify-content: space-between;">
|
||||||
<view class="name">{{ slotProps.row.productName }}</view>
|
<view class="name">{{ slotProps.row.productName }}</view>
|
||||||
|
<view class="flex_box">
|
||||||
|
<text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
|
||||||
|
v-if="slotProps.row.activityPrice > 0 && slotProps.row.activityPrice < slotProps.row.price" >¥{{slotProps.row.price}}</text>
|
||||||
<view class="price" style="color: #258feb"
|
<view class="price" style="color: #258feb"
|
||||||
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
|
>¥{{ slotProps.row.activityPrice?slotProps.row.activityPrice:slotProps.row.price }}</view
|
||||||
></view
|
></view
|
||||||
>
|
>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
<!-- <text v-if="slotProps.row.conditions!='03'">【试听】</text> -->
|
||||||
</template>
|
</template>
|
||||||
</common-list>
|
</common-list>
|
||||||
|
|||||||
@@ -167,11 +167,11 @@
|
|||||||
<text class="hidden1">{{ item.title }}</text>
|
<text class="hidden1">{{ item.title }}</text>
|
||||||
<!-- {{item.isAudition}}-{{librayList[curIndex].isBuy}}-{{userMsg.vip}} -->
|
<!-- {{item.isAudition}}-{{librayList[curIndex].isBuy}}-{{userMsg.vip}} -->
|
||||||
<uni-tag
|
<uni-tag
|
||||||
v-if="item.isAudition == 1 && librayList[curIndex].isBuy == 0 && userMsg.vip == 0"
|
v-if="item.isAudition == 1 && librayList[curIndex].isBuy == 0 && (userMsg.vip != 1 && userMsg.vip != 2)"
|
||||||
style="margin-left: 10rpx" :inverted="true" text="试听" size="mini"
|
style="margin-left: 10rpx" :inverted="true" text="试听" size="mini"
|
||||||
type="success" />
|
type="success" />
|
||||||
<template
|
<template
|
||||||
v-if="librayList[curIndex] && librayList[curIndex].isBuy == 1 || userMsg.vip != 0">
|
v-if="librayList[curIndex] && librayList[curIndex].isBuy == 1 || (userMsg.vip == 1 || userMsg.vip == 2)">
|
||||||
<uni-tag v-if="item.isLearned == 0" style="margin-left: 10rpx;"
|
<uni-tag v-if="item.isLearned == 0" style="margin-left: 10rpx;"
|
||||||
:inverted="true" text="未学" size="mini" type="primary" />
|
:inverted="true" text="未学" size="mini" type="primary" />
|
||||||
<uni-tag v-if="item.isLearned == 1" style="margin-left: 10rpx;"
|
<uni-tag v-if="item.isLearned == 1" style="margin-left: 10rpx;"
|
||||||
@@ -192,13 +192,16 @@
|
|||||||
<view v-else>暂无章节内容</view>
|
<view v-else>暂无章节内容</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class=" completionBg">
|
<view class=" completionBg" style="padding: 0 20rpx;">
|
||||||
<uni-section class="mb-10" style="padding: 0 20rpx" title="学习进度" type="line"
|
<view class="" style="margin: 16rpx;">
|
||||||
v-if="librayList.length > 0 && librayList[curIndex].completion > 0">
|
<text style="font-size: 28rpx; color:#666">学习进度</text>
|
||||||
|
</view>
|
||||||
|
<!-- <uni-section class="mb-10" style="padding: 0 20rpx" title="" type="line"
|
||||||
|
v-if="librayList.length > 0 && librayList[curIndex].completion > 0"> -->
|
||||||
<view class="progress-box">
|
<view class="progress-box">
|
||||||
<progress :percent="librayList[curIndex].completion" show-info stroke-width="3" />
|
<progress :percent="librayList[curIndex].completion" show-info stroke-width="3" />
|
||||||
</view>
|
</view>
|
||||||
</uni-section>
|
<!-- </uni-section> -->
|
||||||
</view>
|
</view>
|
||||||
<view class="linkPro" v-if="tjProList.length > 0">
|
<view class="linkPro" v-if="tjProList.length > 0">
|
||||||
<uni-section style="padding: 0 20rpx" class="mb-10 graybg" title="相关书籍" type="line">
|
<uni-section style="padding: 0 20rpx" class="mb-10 graybg" title="相关书籍" type="line">
|
||||||
@@ -225,14 +228,22 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view style="background: rgba(255, 255, 255, 0.85) !important">
|
<view style="background: rgba(255, 255, 255, 0.85) !important">
|
||||||
<uni-section style="padding: 0 20rpx" class="mb-10 graybg" title="留言板" type="line">
|
<!-- <uni-section style="padding: 0 20rpx" class="mb-10 graybg" title="留言板" type="line">
|
||||||
<template v-slot:right>
|
<template v-slot:right>
|
||||||
<view class="flexbox" style="align-items: center" @click="addSay()">
|
<view class="flexbox" style="align-items: center" @click="addSay()">
|
||||||
<u-icon name="edit-pen" color="#2979ff" size="28"></u-icon>
|
<u-icon name="edit-pen" color="#2979ff" size="28"></u-icon>
|
||||||
<text>发布留言</text>
|
<text>发布留言</text>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
</uni-section>
|
</uni-section> -->
|
||||||
|
<view class="flex_box flex_between" style="margin: 16rpx; padding: 40rpx 0;">
|
||||||
|
<text style="font-size: 28rpx; color:#666">留言板</text>
|
||||||
|
<view class="flexbox" style="align-items: center" @click="addSay()">
|
||||||
|
<!-- <u-icon name="edit-pen" color="#2979ff" size="28"></u-icon> -->
|
||||||
|
<!-- <uni-icons type="chatboxes" color="#2979ff" size="28"></uni-icons> -->
|
||||||
|
<text style="color:#2979ff; font-size: 30rpx; font-weight: bold;" >发布留言</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="liuyanBox">
|
<view class="liuyanBox">
|
||||||
<view class="" v-if="sayList.length > 0">
|
<view class="" v-if="sayList.length > 0">
|
||||||
<commentsList :sayList="sayList" @support="support" @showSayModule="showSayModule">
|
<commentsList :sayList="sayList" @support="support" @showSayModule="showSayModule">
|
||||||
@@ -271,8 +282,8 @@
|
|||||||
</view>
|
</view>
|
||||||
<!-- </view> -->
|
<!-- </view> -->
|
||||||
<!-- 评论弹出 -->
|
<!-- 评论弹出 -->
|
||||||
<u-popup key="2" :show="sayVisible" :round="10" @close="sayclose">
|
<u-popup key="2" v-if="sayVisible" :show="sayVisible" :round="10" @close="sayclose">
|
||||||
<view class="contentBox" style="padding: 20rpx">
|
<view class="contentBox" style="padding: 20rpx; background-color: #fff; border-top: 1px solid #999;">
|
||||||
<view class="" v-if="fatherSay.id != undefined">
|
<view class="" v-if="fatherSay.id != undefined">
|
||||||
<view class="" style="font-size: 26rpx; margin-bottom: 20rpx">
|
<view class="" style="font-size: 26rpx; margin-bottom: 20rpx">
|
||||||
<text>回复@:{{ fatherSay.user.name }} 的留言</text>
|
<text>回复@:{{ fatherSay.user.name }} 的留言</text>
|
||||||
@@ -342,7 +353,8 @@
|
|||||||
</emotion>
|
</emotion>
|
||||||
</view>
|
</view>
|
||||||
<view class="sbmitBox">
|
<view class="sbmitBox">
|
||||||
<button @click="submitSay" type="default">发 布</button>
|
<button class="submit" @click="submitSay" type="default">发 布</button>
|
||||||
|
<button style="background-color: #fff !important; color: ; " @click="sayclose" type="default">取 消</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</u-popup>
|
</u-popup>
|
||||||
@@ -1612,7 +1624,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.sbmitBox {
|
.sbmitBox {
|
||||||
button {
|
button.submit {
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
@include theme("btn_bg");
|
@include theme("btn_bg");
|
||||||
|
|||||||
@@ -877,7 +877,8 @@ export default {
|
|||||||
productImages: this.selectGoodsData.productImages,
|
productImages: this.selectGoodsData.productImages,
|
||||||
productId: this.selectGoodsData.productId,
|
productId: this.selectGoodsData.productId,
|
||||||
productName: this.selectGoodsData.productName,
|
productName: this.selectGoodsData.productName,
|
||||||
price: this.selectGoodsData.activityPrice?this.selectGoodsData.activityPrice:this.selectGoodsData.price,
|
activityPrice:this.selectGoodsData.activityPrice,
|
||||||
|
price: this.selectGoodsData.price,
|
||||||
goodsType: this.selectGoodsData.goodsType,
|
goodsType: this.selectGoodsData.goodsType,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -53,15 +53,25 @@
|
|||||||
<view class="normal_box">
|
<view class="normal_box">
|
||||||
<view class="normal_box_top" style="justify-content: space-between">
|
<view class="normal_box_top" style="justify-content: space-between">
|
||||||
<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>
|
<!-- <view class=""></view> -->
|
||||||
|
<view style="width: 100% !important; text-align: right;" class=" ">
|
||||||
|
<!-- <view class="flexbox" style="justify-content: space-between; align-items: center;"> -->
|
||||||
|
<!-- -->
|
||||||
|
<text style="color: #999; text-decoration: line-through; margin-right: 20rpx;"
|
||||||
|
v-if="v.activityPrice > 0 && v.activityPrice < v.price" >原价:¥{{v.price}}</text>
|
||||||
|
<text class="" style="margin-right: 26rpx">
|
||||||
|
¥{{ v.activityPrice && v.activityPrice > 0 ? v.activityPrice : v.price}}
|
||||||
|
</text>
|
||||||
|
<text>x 1</text>
|
||||||
|
<!-- </view> -->
|
||||||
|
|
||||||
|
|
||||||
<view style="width: 100%; text-align: right">
|
|
||||||
x 1
|
|
||||||
<!-- <u-number-box v-model="number" style="float: right">
|
<!-- <u-number-box v-model="number" style="float: right">
|
||||||
<view slot="minus" class="minus">
|
<view slot="minus" class="minus">
|
||||||
<u-icon name="minus" size="12"></u-icon>
|
<u-icon name="minus" size="12"></u-icon>
|
||||||
@@ -162,6 +172,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'">
|
||||||
@@ -411,6 +422,7 @@
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
historyOrderInfo:undefined, //上一个订单的参数
|
||||||
isDefaultCurrency: false,
|
isDefaultCurrency: false,
|
||||||
isShowAddress: false,
|
isShowAddress: false,
|
||||||
jfNumber: 0,
|
jfNumber: 0,
|
||||||
@@ -483,6 +495,7 @@
|
|||||||
"margin-left": "30rpx",
|
"margin-left": "30rpx",
|
||||||
},
|
},
|
||||||
modalInfo: {},
|
modalInfo: {},
|
||||||
|
canjump:true, // 是否可以跳转到其他页面
|
||||||
currentCateIndex: 0,
|
currentCateIndex: 0,
|
||||||
show: false,
|
show: false,
|
||||||
playData: {},
|
playData: {},
|
||||||
@@ -866,7 +879,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;
|
||||||
// !
|
// !
|
||||||
@@ -928,6 +941,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
async goBuyJie() {
|
async goBuyJie() {
|
||||||
|
console.log('this.buyingFlag',this.buyingFlag);
|
||||||
if (this.buyingFlag) {
|
if (this.buyingFlag) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '操作太频繁了,休息下吧',
|
title: '操作太频繁了,休息下吧',
|
||||||
@@ -947,6 +961,7 @@
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.nowClick = true;
|
this.nowClick = true;
|
||||||
}, 5000);
|
}, 5000);
|
||||||
|
|
||||||
// let youPre = {
|
// let youPre = {
|
||||||
// id: "",
|
// id: "",
|
||||||
// coupons: {
|
// coupons: {
|
||||||
@@ -970,6 +985,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let data = {
|
let data = {
|
||||||
buyType: this.options.typeId, //0- 商品页直接下单 1- 购物车结算
|
buyType: this.options.typeId, //0- 商品页直接下单 1- 购物车结算
|
||||||
userId: this.userInfo.id, //下单人ID
|
userId: this.userInfo.id, //下单人ID
|
||||||
@@ -997,9 +1013,48 @@
|
|||||||
appName: "wumen",
|
appName: "wumen",
|
||||||
come: "2",
|
come: "2",
|
||||||
};
|
};
|
||||||
|
var productList = [...data.productList]
|
||||||
|
var thisproduct = productList.map(item => {
|
||||||
|
return item.productId+"_"+item.quantity
|
||||||
|
})
|
||||||
|
thisproduct = thisproduct.join(',')
|
||||||
console.log("data at line 477:", data);
|
console.log("data at line 477:", data);
|
||||||
|
// console.log('成功信息',product,thisproduct,data.addressId, data.realMoney);
|
||||||
|
if(this.historyOrderInfo &&
|
||||||
|
thisproduct == this.historyOrderInfo.product &&
|
||||||
|
data.addressId == this.historyOrderInfo.addressId &&
|
||||||
|
this.historyOrderInfo.realMoney == data.realMoney){
|
||||||
|
that.canjump = false
|
||||||
|
uni.showModal({
|
||||||
|
title:'提示',
|
||||||
|
content:'您短时间内有一笔相同金额的订单,是否确定继续下单?',
|
||||||
|
cancelText:'点错了',
|
||||||
|
confirmText:'继续操作',
|
||||||
|
success: function(res) {
|
||||||
|
that.canjump = true
|
||||||
|
if (res.confirm) {
|
||||||
|
|
||||||
|
that.buyingFlag = false
|
||||||
|
console.log('用户点击确定',that.buyingFlag);
|
||||||
|
that.submitorder(data)
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
that.buyingFlag = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
that.submitorder(data)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async submitorder(data){
|
||||||
|
uni.showLoading({
|
||||||
|
title:'正在请求订单'
|
||||||
|
})
|
||||||
|
// this.buyingFlag = false
|
||||||
|
console.log('进来请求了吗?');
|
||||||
|
let that = this
|
||||||
await $http
|
await $http
|
||||||
.request({
|
.request({
|
||||||
// url: "book/buyOrder/buySave",
|
// url: "book/buyOrder/buySave",
|
||||||
@@ -1012,8 +1067,18 @@
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
.then(async (res) => {
|
.then(async (res) => {
|
||||||
this.buyingFlag = false
|
that.buyingFlag = false
|
||||||
console.log("res at line 598:", res);
|
var product = data.productList.map(item => {
|
||||||
|
return item.productId+"_"+item.quantity
|
||||||
|
})
|
||||||
|
product = product.join(',')
|
||||||
|
that.historyOrderInfo = {
|
||||||
|
'product':product,
|
||||||
|
'addressId':data.addressId,
|
||||||
|
'realMoney':data.realMoney
|
||||||
|
}
|
||||||
|
|
||||||
|
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({
|
||||||
@@ -1023,12 +1088,12 @@
|
|||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
console.log("that.payType at line 607:", that.payType);
|
console.log("that.payType at line 607:", that.payType);
|
||||||
|
uni.showToast({
|
||||||
|
title: "下单成功,即将进行支付",
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
if (that.payType == 2) {
|
if (that.payType == 2) {
|
||||||
// 常规支付
|
// 常规支付
|
||||||
uni.showToast({
|
|
||||||
title: "正在支付",
|
|
||||||
icon: "loading",
|
|
||||||
});
|
|
||||||
await setPay({
|
await setPay({
|
||||||
typePay: "alipay",
|
typePay: "alipay",
|
||||||
subject: "order",
|
subject: "order",
|
||||||
@@ -1043,10 +1108,12 @@
|
|||||||
});
|
});
|
||||||
console.log(res, "支付支付");
|
console.log(res, "支付支付");
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "支付成功",
|
title: "支付成功",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if(that.canjump){
|
||||||
if (that.goToInfo.type == 1 ) {
|
if (that.goToInfo.type == 1 ) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: `${that.goToInfo.url}?type=order`,
|
url: `${that.goToInfo.url}?type=order`,
|
||||||
@@ -1059,8 +1126,10 @@
|
|||||||
url: `${that.goToInfo.url}?backType=order`,
|
url: `${that.goToInfo.url}?backType=order`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
|
uni.hideLoading()
|
||||||
console.log("失败失败失败");
|
console.log("失败失败失败");
|
||||||
// this.buyingFlag = false
|
// this.buyingFlag = false
|
||||||
// that.$commonJS.showToast('支付是失败')
|
// that.$commonJS.showToast('支付是失败')
|
||||||
@@ -1068,7 +1137,6 @@
|
|||||||
console.log("延迟调用 失败提示");
|
console.log("延迟调用 失败提示");
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "支付失败",
|
title: "支付失败",
|
||||||
|
|
||||||
image: "../../../static/icon/ic_close.png",
|
image: "../../../static/icon/ic_close.png",
|
||||||
});
|
});
|
||||||
}, 0);
|
}, 0);
|
||||||
@@ -1082,7 +1150,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
} else if (this.payType == 1) {
|
} else if (that.payType == 1) {
|
||||||
// 微信支付
|
// 微信支付
|
||||||
let data1 = {
|
let data1 = {
|
||||||
orderSn: res.orderSn,
|
orderSn: res.orderSn,
|
||||||
@@ -1092,26 +1160,26 @@
|
|||||||
setWXPay(data1, (res) => {
|
setWXPay(data1, (res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// this.buyingFlag = false
|
// this.buyingFlag = false
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "支付成功",
|
title: "支付成功",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if(that.canjump){
|
||||||
if (that.goToInfo.type == 1) {
|
if (that.goToInfo.type == 1) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: `${that.goToInfo.url}?type=order`,
|
url: `${that.goToInfo.url}?type=order`,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// uni.navigateBack({
|
|
||||||
// delta: 2,
|
|
||||||
// });
|
|
||||||
// uni.n
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: `${that.goToInfo.url}?backType=order`,
|
url: `${that.goToInfo.url}?backType=order`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else {
|
} else {
|
||||||
// this.buyingFlag = false
|
// this.buyingFlag = false
|
||||||
|
uni.hideLoading()
|
||||||
console.log(res, "微信支付111111111111111");
|
console.log(res, "微信支付111111111111111");
|
||||||
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
if (res.data.errMsg.indexOf("User canceled") != -1) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -1128,14 +1196,16 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else if (this.payType == 4) {
|
} else if (that.payType == 4) {
|
||||||
// this.buyingFlag = false
|
that.buyingFlag = false
|
||||||
// 天医币支付
|
// 天医币支付
|
||||||
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "购买成功",
|
title: "购买成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
if(that.canjump){
|
||||||
if (that.goToInfo.type == 1) {
|
if (that.goToInfo.type == 1) {
|
||||||
uni.switchTab({
|
uni.switchTab({
|
||||||
url: `${that.goToInfo.url}?type=order`,
|
url: `${that.goToInfo.url}?type=order`,
|
||||||
@@ -1145,15 +1215,16 @@
|
|||||||
url: `${that.goToInfo.url}?backType=order`,
|
url: `${that.goToInfo.url}?backType=order`,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).catch(e => {
|
}).catch(e => {
|
||||||
this.buyingFlag = false
|
that.buyingFlag = false
|
||||||
|
uni.hideLoading()
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
radioChange(index) {
|
radioChange(index) {
|
||||||
if (index == this.selectPayIndex) {
|
if (index == this.selectPayIndex) {
|
||||||
return
|
return
|
||||||
@@ -1866,6 +1937,7 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
|
|
||||||
.curriulum_title {
|
.curriulum_title {
|
||||||
|
// width: calc(100% - 80rpx);
|
||||||
width: calc(100% - 80rpx);
|
width: calc(100% - 80rpx);
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
|
|||||||
Reference in New Issue
Block a user