1
This commit is contained in:
@ -301,13 +301,13 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "申请售后"
|
"navigationBarTitleText": "申请售后"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "details",
|
"path": "details",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "订单详情",
|
"navigationBarTitleText": "订单详情",
|
||||||
"usingComponents": {
|
"usingComponents": {
|
||||||
"pay-button-sdk": "tta5a3d31e3aecfb9b11://pay-button"
|
"pay-button": "tta5a3d31e3aecfb9b11://pay-button"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -322,7 +322,7 @@
|
|||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "商城订单",
|
"navigationBarTitleText": "商城订单",
|
||||||
"usingComponents": {
|
"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)">
|
<template v-if="[SHOP_ORDER_UNSLIVER].includes(data.status)">
|
||||||
<view class="order-btns-right">
|
<view class="order-btns-right">
|
||||||
<view
|
<!-- <view
|
||||||
class="flex-center fs-24 app-fc-main status-btn"
|
class="flex-center fs-24 app-fc-main status-btn"
|
||||||
@click.stop="remindRefund(data.order_id)"
|
@click.stop="remindRefund(data.order_id)"
|
||||||
>
|
>
|
||||||
申请退款
|
申请退款
|
||||||
</view>
|
</view> -->
|
||||||
<view
|
<view
|
||||||
class="flex-center fs-24 app-fc-white status-btn confirm"
|
class="flex-center fs-24 app-fc-white status-btn confirm"
|
||||||
@click.stop="jumpToReservation(data.order_id)"
|
@click.stop="jumpToReservation(data.order_id)"
|
||||||
|
|||||||
@ -254,7 +254,7 @@ export default {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
if (!isPrePay) {
|
if (!isPrePay) {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: "处理中",
|
title: "支付中",
|
||||||
mask: true,
|
mask: true,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -264,13 +264,13 @@ export default {
|
|||||||
|
|
||||||
createCartOrder(params)
|
createCartOrder(params)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
uni.hideLoading();
|
|
||||||
|
|
||||||
// Check if tt and requirePlugin are available
|
// Check if tt and requirePlugin are available
|
||||||
if (typeof tt !== "undefined" && tt.requirePlugin) {
|
if (typeof tt !== "undefined" && tt.requirePlugin) {
|
||||||
try {
|
try {
|
||||||
const plugin = tt.requirePlugin("lifeServicePlugin");
|
const plugin = tt.requirePlugin("lifeServicePlugin");
|
||||||
if (plugin && plugin.createOrder) {
|
if (plugin && plugin.createOrder) {
|
||||||
|
// 先隐藏之前的loading,让插件显示自己的弹窗
|
||||||
|
uni.hideLoading();
|
||||||
// let res1 = {
|
// let res1 = {
|
||||||
// data: {
|
// data: {
|
||||||
// businessLine: 1,
|
// businessLine: 1,
|
||||||
|
|||||||
@ -345,27 +345,31 @@
|
|||||||
</template>
|
</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)">
|
<view v-if="showBeforeSaleOrderStatus" class="handle-btn refund-btn">
|
||||||
<text class="fs-32 btnColor" style="color: #ff19a0">立即退款</text>
|
<!-- #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="{
|
||||||
|
reasonCode: [410],
|
||||||
|
note: '用户申请退款',
|
||||||
|
applySource: 101,
|
||||||
|
afterSaleType: 3,
|
||||||
|
needRefundPackFee: true
|
||||||
|
}"
|
||||||
|
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>
|
||||||
<!-- <pay-button-sdk
|
|
||||||
mode={{1}}
|
|
||||||
:order-id="orderData.order_no"
|
|
||||||
:order-status="1"
|
|
||||||
:refund-total-amount="Math.round((orderData.actual_price || 0) * 100)"
|
|
||||||
:apply-refund-params="{
|
|
||||||
reasonCode: [410],
|
|
||||||
note: '用户申请退款',
|
|
||||||
applySource: 101,
|
|
||||||
afterSaleType: 3,
|
|
||||||
needRefundPackFee: true
|
|
||||||
}"
|
|
||||||
style="width:280rpx;height:100rpx;text-align:center;line-height: 100rpx;"
|
|
||||||
@refund="handleRefundSuccess"
|
|
||||||
@error="handleRefundError"
|
|
||||||
/> -->
|
|
||||||
<!-- 立即预约按钮始终显示 -->
|
<!-- 立即预约按钮始终显示 -->
|
||||||
<view class="handle-btn" @click.stop="remindSliver">
|
<view class="handle-btn" @click.stop="remindSliver">
|
||||||
<text class="fs-32 btnColor">立即预约</text>
|
<text class="fs-32 btnColor">立即预约</text>
|
||||||
@ -766,14 +770,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 立即支付
|
// 立即支付
|
||||||
pay(data) {
|
pay(data) {
|
||||||
// uni.showLoading({
|
uni.showLoading({
|
||||||
// icon: "none",
|
icon: "none",
|
||||||
// title: "支付中",
|
title: "支付中",
|
||||||
// mask: true,
|
mask: true,
|
||||||
// });
|
});
|
||||||
// console.log(data,'-?')
|
// console.log(data,'-?')
|
||||||
|
|
||||||
const plugin = tt.requirePlugin('lifeServicePlugin');
|
const plugin = tt.requirePlugin('lifeServicePlugin');
|
||||||
|
// 先隐藏loading,让插件显示自己的弹窗
|
||||||
|
uni.hideLoading();
|
||||||
plugin.continueToPay({
|
plugin.continueToPay({
|
||||||
orderId:data.douyin_order_id, // 内部订单号
|
orderId:data.douyin_order_id, // 内部订单号
|
||||||
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
||||||
@ -781,9 +787,9 @@ plugin.continueToPay({
|
|||||||
const { orderId, outOrderNo } = res;
|
const { orderId, outOrderNo } = res;
|
||||||
console.log("success res", res);
|
console.log("success res", res);
|
||||||
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
||||||
|
this.getOrderDetail();
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
uni.hideLoading();
|
|
||||||
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
||||||
if (errLogId) {
|
if (errLogId) {
|
||||||
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
||||||
@ -791,6 +797,10 @@ plugin.continueToPay({
|
|||||||
if (orderId || outOrderNo) {
|
if (orderId || outOrderNo) {
|
||||||
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
||||||
}
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: errMsg || "支付失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1347,10 +1357,27 @@ plugin.continueToPay({
|
|||||||
.handle-btn.refund-btn {
|
.handle-btn.refund-btn {
|
||||||
border: 2rpx solid #ff19a0 !important;
|
border: 2rpx solid #ff19a0 !important;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
|
display: flex !important;
|
||||||
|
align-items: center !important;
|
||||||
|
justify-content: center !important;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
.btnColor {
|
.btnColor {
|
||||||
color: #ff19a0 !important;
|
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;
|
flex: 1 !important;
|
||||||
min-width: 0 !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 {
|
.contact-float-btn {
|
||||||
|
|||||||
@ -303,14 +303,16 @@ export default {
|
|||||||
},
|
},
|
||||||
// 支付
|
// 支付
|
||||||
pay(data) {
|
pay(data) {
|
||||||
// uni.showLoading({
|
uni.showLoading({
|
||||||
// icon: "none",
|
icon: "none",
|
||||||
// title: "支付中",
|
title: "支付中",
|
||||||
// mask: true,
|
mask: true,
|
||||||
// });
|
});
|
||||||
console.log(data,'-?')
|
console.log(data,'-?')
|
||||||
|
|
||||||
const plugin = tt.requirePlugin('lifeServicePlugin');
|
const plugin = tt.requirePlugin('lifeServicePlugin');
|
||||||
|
// 先隐藏loading,让插件显示自己的弹窗
|
||||||
|
uni.hideLoading();
|
||||||
plugin.continueToPay({
|
plugin.continueToPay({
|
||||||
orderId:data.douyin_order_id, // 内部订单号
|
orderId:data.douyin_order_id, // 内部订单号
|
||||||
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
// outOrderNo: "outOrderNo", // 外部订单号 2个订单号必填一个
|
||||||
@ -318,9 +320,9 @@ plugin.continueToPay({
|
|||||||
const { orderId, outOrderNo } = res;
|
const { orderId, outOrderNo } = res;
|
||||||
console.log("success res", res);
|
console.log("success res", res);
|
||||||
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
console.log("orderId", orderId, "outOrderNo", outOrderNo);
|
||||||
|
this.reloadData();
|
||||||
},
|
},
|
||||||
fail: (res) => {
|
fail: (res) => {
|
||||||
uni.hideLoading();
|
|
||||||
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
const { orderId, outOrderNo, errNo, errMsg, errLogId } = res;
|
||||||
if (errLogId) {
|
if (errLogId) {
|
||||||
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
console.log("查询订单信息失败", errNo, errMsg, errLogId);
|
||||||
@ -328,6 +330,10 @@ plugin.continueToPay({
|
|||||||
if (orderId || outOrderNo) {
|
if (orderId || outOrderNo) {
|
||||||
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
console.log("支付失败", errNo, errMsg, orderId, outOrderNo);
|
||||||
}
|
}
|
||||||
|
uni.showToast({
|
||||||
|
title: errMsg || "支付失败",
|
||||||
|
icon: "none",
|
||||||
|
});
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// payOrder({
|
// payOrder({
|
||||||
|
|||||||
Reference in New Issue
Block a user