1
This commit is contained in:
@ -307,7 +307,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "订单详情",
|
||||
"usingComponents": {
|
||||
"pay-button-sdk": "tta5a3d31e3aecfb9b11://pay-button"
|
||||
"pay-button": "tta5a3d31e3aecfb9b11://pay-button"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -322,7 +322,7 @@
|
||||
"style": {
|
||||
"navigationBarTitleText": "商城订单",
|
||||
"usingComponents": {
|
||||
"pay-button-sdk": "tta5a3d31e3aecfb9b11://pay-button"
|
||||
"pay-button": "tta5a3d31e3aecfb9b11://pay-button"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -96,12 +96,12 @@
|
||||
<!-- 待预约 -->
|
||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
||||
<view class="order-btns-right">
|
||||
<view
|
||||
<!-- <view
|
||||
class="flex-center fs-24 app-fc-main status-btn"
|
||||
@click.stop="remindRefund(data.order_id)"
|
||||
>
|
||||
申请退款
|
||||
</view>
|
||||
</view> -->
|
||||
<view
|
||||
class="flex-center fs-24 app-fc-white status-btn confirm"
|
||||
@click.stop="jumpToReservation(data.order_id)"
|
||||
|
||||
@ -254,7 +254,7 @@ export default {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (!isPrePay) {
|
||||
uni.showLoading({
|
||||
title: "处理中",
|
||||
title: "支付中",
|
||||
mask: true,
|
||||
});
|
||||
}
|
||||
@ -264,13 +264,13 @@ export default {
|
||||
|
||||
createCartOrder(params)
|
||||
.then((res) => {
|
||||
uni.hideLoading();
|
||||
|
||||
// Check if tt and requirePlugin are available
|
||||
if (typeof tt !== "undefined" && tt.requirePlugin) {
|
||||
try {
|
||||
const plugin = tt.requirePlugin("lifeServicePlugin");
|
||||
if (plugin && plugin.createOrder) {
|
||||
// 先隐藏之前的loading,让插件显示自己的弹窗
|
||||
uni.hideLoading();
|
||||
// let res1 = {
|
||||
// data: {
|
||||
// businessLine: 1,
|
||||
|
||||
@ -345,14 +345,13 @@
|
||||
</template>
|
||||
|
||||
<!-- 待发货 -->
|
||||
<template v-if="[SHOP_ORDER_UNSLIVER].includes(orderData.status)">
|
||||
<template >
|
||||
<!-- 抖音退款组件 - 只有在没有售后状态或售后被驳回时显示 -->
|
||||
<view v-if="showBeforeSaleOrderStatus" class="handle-btn refund-btn" @click.stop="remindRefund(orderData.order_id)">
|
||||
<text class="fs-32 btnColor" style="color: #ff19a0">立即退款</text>
|
||||
</view>
|
||||
<!-- <pay-button-sdk
|
||||
mode={{1}}
|
||||
:order-id="orderData.order_no"
|
||||
<view v-if="showBeforeSaleOrderStatus" class="handle-btn refund-btn">
|
||||
<!-- #ifdef MP-TOUTIAO -->
|
||||
<pay-button
|
||||
:mode="1"
|
||||
:order-id="orderData.douyin_order_id"
|
||||
:order-status="1"
|
||||
:refund-total-amount="Math.round((orderData.actual_price || 0) * 100)"
|
||||
:apply-refund-params="{
|
||||
@ -362,10 +361,15 @@
|
||||
afterSaleType: 3,
|
||||
needRefundPackFee: true
|
||||
}"
|
||||
style="width:280rpx;height:100rpx;text-align:center;line-height: 100rpx;"
|
||||
style="width:100%;height:100%;display:block;position:relative;z-index:999;"
|
||||
@refund="handleRefundSuccess"
|
||||
@error="handleRefundError"
|
||||
/> -->
|
||||
/>
|
||||
<!-- #endif -->
|
||||
<!-- #ifndef MP-TOUTIAO -->
|
||||
<text class="fs-32 btnColor" style="color: #ff19a0" @click.stop="remindRefund(orderData.order_id)">立即退款</text>
|
||||
<!-- #endif -->
|
||||
</view>
|
||||
<!-- 立即预约按钮始终显示 -->
|
||||
<view class="handle-btn" @click.stop="remindSliver">
|
||||
<text class="fs-32 btnColor">立即预约</text>
|
||||
@ -766,14 +770,16 @@ export default {
|
||||
},
|
||||
// 立即支付
|
||||
pay(data) {
|
||||
// uni.showLoading({
|
||||
// icon: "none",
|
||||
// title: "支付中",
|
||||
// mask: true,
|
||||
// });
|
||||
uni.showLoading({
|
||||
icon: "none",
|
||||
title: "支付中",
|
||||
mask: true,
|
||||
});
|
||||
// console.log(data,'-?')
|
||||
|
||||
const plugin = tt.requirePlugin('lifeServicePlugin');
|
||||
// 先隐藏loading,让插件显示自己的弹窗
|
||||
uni.hideLoading();
|
||||
plugin.continueToPay({
|
||||
orderId:data.douyin_order_id, // 内部订单号
|
||||
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
||||
@ -781,9 +787,9 @@ plugin.continueToPay({
|
||||
const { orderId, outOrderNo } = res;
|
||||
console.log("success res", res);
|
||||
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
||||
this.getOrderDetail();
|
||||
},
|
||||
fail: (res) => {
|
||||
uni.hideLoading();
|
||||
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
||||
if (errLogId) {
|
||||
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
||||
@ -791,6 +797,10 @@ plugin.continueToPay({
|
||||
if (orderId || outOrderNo) {
|
||||
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
||||
}
|
||||
uni.showToast({
|
||||
title: errMsg || "支付失败",
|
||||
icon: "none",
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
@ -1347,10 +1357,27 @@ plugin.continueToPay({
|
||||
.handle-btn.refund-btn {
|
||||
border: 2rpx solid #ff19a0 !important;
|
||||
background: transparent !important;
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.btnColor {
|
||||
color: #ff19a0 !important;
|
||||
}
|
||||
|
||||
// 确保 pay-button 组件居中显示
|
||||
::v-deep pay-button {
|
||||
display: flex !important;
|
||||
align-items: center !important;
|
||||
justify-content: center !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
position: absolute !important;
|
||||
top: 0 !important;
|
||||
left: 0 !important;
|
||||
}
|
||||
}
|
||||
|
||||
// 最后一个按钮(立即预约)保持粉色背景白色文字样式
|
||||
@ -1371,6 +1398,22 @@ plugin.continueToPay({
|
||||
flex: 1 !important;
|
||||
min-width: 0 !important;
|
||||
}
|
||||
|
||||
// 确保 pay-button 组件正确显示
|
||||
::v-deep pay-button {
|
||||
display: block !important;
|
||||
width: 100% !important;
|
||||
height: 100% !important;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
// 确保组件内部所有元素都可见
|
||||
::v-deep pay-button * {
|
||||
display: block !important;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
}
|
||||
|
||||
.contact-float-btn {
|
||||
|
||||
@ -303,14 +303,16 @@ export default {
|
||||
},
|
||||
// 支付
|
||||
pay(data) {
|
||||
// uni.showLoading({
|
||||
// icon: "none",
|
||||
// title: "支付中",
|
||||
// mask: true,
|
||||
// });
|
||||
uni.showLoading({
|
||||
icon: "none",
|
||||
title: "支付中",
|
||||
mask: true,
|
||||
});
|
||||
console.log(data,'-?')
|
||||
|
||||
const plugin = tt.requirePlugin('lifeServicePlugin');
|
||||
// 先隐藏loading,让插件显示自己的弹窗
|
||||
uni.hideLoading();
|
||||
plugin.continueToPay({
|
||||
orderId:data.douyin_order_id, // 内部订单号
|
||||
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
||||
@ -318,9 +320,9 @@ plugin.continueToPay({
|
||||
const { orderId, outOrderNo } = res;
|
||||
console.log("success res", res);
|
||||
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
||||
this.reloadData();
|
||||
},
|
||||
fail: (res) => {
|
||||
uni.hideLoading();
|
||||
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
||||
if (errLogId) {
|
||||
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
||||
@ -328,6 +330,10 @@ plugin.continueToPay({
|
||||
if (orderId || outOrderNo) {
|
||||
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
||||
}
|
||||
uni.showToast({
|
||||
title: errMsg || "支付失败",
|
||||
icon: "none",
|
||||
});
|
||||
},
|
||||
});
|
||||
// payOrder({
|
||||
|
||||
Reference in New Issue
Block a user