|
@@ -12,7 +12,9 @@ const _emit = defineEmits<{
|
|
|
const NodeList = ref<Api.DeliveryNode[]>([])
|
|
const NodeList = ref<Api.DeliveryNode[]>([])
|
|
|
const showNode = ref(false)
|
|
const showNode = ref(false)
|
|
|
|
|
|
|
|
|
|
+// #ifdef MP-WEIXIN
|
|
|
const plugins = requirePlugin('logisticsPlugin')
|
|
const plugins = requirePlugin('logisticsPlugin')
|
|
|
|
|
+// #endif
|
|
|
async function handleCancel(order: Api.xsbOrderList) {
|
|
async function handleCancel(order: Api.xsbOrderList) {
|
|
|
await useUserStore().handleCommonCancelOrder?.(order)
|
|
await useUserStore().handleCommonCancelOrder?.(order)
|
|
|
_emit('refresh')
|
|
_emit('refresh')
|
|
@@ -21,8 +23,13 @@ async function handleCancel(order: Api.xsbOrderList) {
|
|
|
async function handlePay(orderNumber: string) {
|
|
async function handlePay(orderNumber: string) {
|
|
|
const res = await useUserStore().handleCommonPayMent?.(orderNumber)
|
|
const res = await useUserStore().handleCommonPayMent?.(orderNumber)
|
|
|
if (res?.payType !== 1 && res) {
|
|
if (res?.payType !== 1 && res) {
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
await useUserStore().getWxCommonPayment(res)
|
|
await useUserStore().getWxCommonPayment(res)
|
|
|
_emit('refresh')
|
|
_emit('refresh')
|
|
|
|
|
+ // #endif
|
|
|
|
|
+ // #ifdef H5
|
|
|
|
|
+ useUserStore().handleCommonWechatPay(orderNumber)
|
|
|
|
|
+ // #endif
|
|
|
}
|
|
}
|
|
|
else {
|
|
else {
|
|
|
_emit('refresh')
|
|
_emit('refresh')
|
|
@@ -64,9 +71,11 @@ async function handleLogistics(_order: Api.xsbOrderList) {
|
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
|
const jsData = JSON.parse(res.data)
|
|
const jsData = JSON.parse(res.data)
|
|
|
if (jsData.errmsg === 'ok') {
|
|
if (jsData.errmsg === 'ok') {
|
|
|
|
|
+ // #ifdef MP-WEIXIN
|
|
|
plugins.openWaybillTracking({
|
|
plugins.openWaybillTracking({
|
|
|
waybillToken: jsData.waybill_token,
|
|
waybillToken: jsData.waybill_token,
|
|
|
})
|
|
})
|
|
|
|
|
+ // #endif
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
catch {
|
|
catch {
|