feat:抖音支付
This commit is contained in:
@@ -96,26 +96,25 @@
|
||||
<template v-if="orderInfo.orderPackages && orderInfo.orderPackages.length > 0">
|
||||
<view class="express_header_row">
|
||||
<view class="express_title">运单号</view>
|
||||
<view
|
||||
class="express_toggle_btn"
|
||||
v-if="orderInfo.orderPackages.length > 1"
|
||||
@click="isExpandExpress = !isExpandExpress"
|
||||
>
|
||||
<text>{{ isExpandExpress ? '收起' : `展开全部(${orderInfo.orderPackages.length})` }}</text>
|
||||
<u-icon :name="isExpandExpress ? 'arrow-up' : 'arrow-down'" color="#7934F6" size="12" style="margin-left: 4rpx;"></u-icon>
|
||||
<view class="express_toggle_btn" v-if="orderInfo.orderPackages.length > 1"
|
||||
@click="isExpandExpress = !isExpandExpress">
|
||||
<text>{{ isExpandExpress ? '收起' : `展开全部(${orderInfo.orderPackages.length})`
|
||||
}}</text>
|
||||
<u-icon :name="isExpandExpress ? 'arrow-up' : 'arrow-down'" color="#7934F6"
|
||||
size="12" style="margin-left: 4rpx;"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
<view
|
||||
class="express_item_row"
|
||||
<view class="express_item_row"
|
||||
v-for="(pkg, pkgIdx) in (isExpandExpress ? orderInfo.orderPackages : orderInfo.orderPackages.slice(0, 1))"
|
||||
:key="pkg.id || pkgIdx"
|
||||
>
|
||||
:key="pkg.id || pkgIdx">
|
||||
<view class="express_info_text">
|
||||
<text class="express_name_tag" v-if="pkg.expressName">{{ pkg.expressName }}</text>
|
||||
<text class="express_name_tag" v-if="pkg.expressName">{{ pkg.expressName
|
||||
}}</text>
|
||||
<text class="express_no_num">{{ pkg.expressNo }}</text>
|
||||
</view>
|
||||
<view class="express_copy_btn" @click="copyData(pkg.expressNo)">
|
||||
<up-image src="/static/common/copy.png" width="12" height="12" bgColor="#f1f6ff00"></up-image>
|
||||
<up-image src="/static/common/copy.png" width="12" height="12"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<text class="copy_text">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -130,7 +129,8 @@
|
||||
<text class="express_no_num">{{ pItem.expressNo }}</text>
|
||||
</view>
|
||||
<view class="express_copy_btn" @click="copyData(pItem.expressNo)">
|
||||
<up-image src="/static/common/copy.png" width="12" height="12" bgColor="#f1f6ff00"></up-image>
|
||||
<up-image src="/static/common/copy.png" width="12" height="12"
|
||||
bgColor="#f1f6ff00"></up-image>
|
||||
<text class="copy_text">复制</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -225,8 +225,8 @@
|
||||
<view class="operate_comm operate_but_2" v-if="orderInfo.status === ORDER_TYPE.UNPAID" @click="goPay">去付款
|
||||
</view>
|
||||
<!-- <view class="operate_comm operate_but_1" v-if="orderInfo.status === ORDER_TYPE.COMPLETED">申请退款</view> -->
|
||||
<view class="operate_comm operate_but_1" style="border-color: #7732ff" v-if="orderInfo.status === ORDER_TYPE.NOT_RECEIVE"
|
||||
@click="onExpress(orderInfo.id)">
|
||||
<view class="operate_comm operate_but_1" style="border-color: #7732ff"
|
||||
v-if="orderInfo.status === ORDER_TYPE.NOT_RECEIVE" @click="onExpress(orderInfo.id)">
|
||||
<text class="text-zi">查看物流</text>
|
||||
</view>
|
||||
<view class="operate_comm operate_but_2" v-if="orderInfo.status === ORDER_TYPE.NOT_RECEIVE"
|
||||
@@ -285,6 +285,7 @@ import {
|
||||
import {
|
||||
appWxpayFun,
|
||||
zfbPayFun,
|
||||
douyinPayFun,
|
||||
jumpWayOk,
|
||||
jumpWayError,
|
||||
} from "@/utils/payUtils.js";
|
||||
@@ -358,6 +359,10 @@ export default {
|
||||
let params = {
|
||||
types: "1,2,3",
|
||||
};
|
||||
// #ifdef APP-PLUS
|
||||
params.types = "1,2,3,6"
|
||||
// #endif
|
||||
|
||||
const result = await getSupportPay(params);
|
||||
if (result && result.bizcode === 100) {
|
||||
const data = result.data || [];
|
||||
@@ -433,6 +438,9 @@ export default {
|
||||
item.alipay
|
||||
) {
|
||||
this.zfbPay(item.alipay, item.orderId, item.orderNum);
|
||||
} else if (item.douyin && Object.keys(item.douyin).length !== 0) {
|
||||
// 抖音支付
|
||||
this.appDouying(item.douyin, item.orderId, item.orderNum);
|
||||
} else {
|
||||
this.$refs.uToastRef.show({
|
||||
type: "error",
|
||||
@@ -446,6 +454,18 @@ export default {
|
||||
this.getOrderInfo();
|
||||
}
|
||||
},
|
||||
// app 抖音支付
|
||||
async appDouying(douyin, orderId, orderNum) {
|
||||
try {
|
||||
const result = await douyinPayFun(douyin, orderId, orderNum);
|
||||
console.log("抖音支付发起成功", result);
|
||||
// 处理支付发起成功后的逻辑
|
||||
} catch (error) {
|
||||
console.error("抖音支付失败", error);
|
||||
// 处理支付失败后的逻辑
|
||||
}
|
||||
},
|
||||
|
||||
// app 微信支付
|
||||
async appWxpay(alipay, orderId, orderNum) {
|
||||
try {
|
||||
@@ -457,6 +477,7 @@ export default {
|
||||
// 处理支付失败后的逻辑,如提示用户等
|
||||
}
|
||||
},
|
||||
|
||||
// 支付宝支付
|
||||
async zfbPay(alipay, orderId, orderNum) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user