|
|
@@ -3,17 +3,21 @@ import StatusDisplay from '../components/StatusDisplay.vue'
|
|
|
import { StaticUrl } from '@/config'
|
|
|
import router from '@/router'
|
|
|
|
|
|
+const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
|
|
|
definePage({
|
|
|
name: 'video-rights-order-info',
|
|
|
islogin: true,
|
|
|
style: {
|
|
|
navigationBarTitleText: '订单确认',
|
|
|
+ navigationStyle: 'custom',
|
|
|
},
|
|
|
})
|
|
|
|
|
|
const orderNo = ref('')
|
|
|
+const topUp = ref('')
|
|
|
onLoad((options: any) => {
|
|
|
orderNo.value = options.orderNo
|
|
|
+ topUp.value = options.topUp
|
|
|
console.log(options, '页面数据')
|
|
|
})
|
|
|
onMounted(() => {
|
|
|
@@ -25,9 +29,29 @@ async function getOrderDetail() {
|
|
|
const res = await Apis.videoRight.orderDetail({ data: { orderNumber: orderNo.value } })
|
|
|
videoRightOrderDetail.value = res.data
|
|
|
}
|
|
|
+
|
|
|
+function orderBack() {
|
|
|
+ const vrIndex = 'subPack-videoRights/commonTab/index'
|
|
|
+ const pages = getCurrentPages()
|
|
|
+ const targetPageIndex = pages.findIndex(page => page.route === vrIndex)
|
|
|
+ if (topUp.value === 'true') {
|
|
|
+ if (targetPageIndex !== -1) {
|
|
|
+ const delta = pages.length - targetPageIndex - 1
|
|
|
+ router.back({ delta, animationType: 'fade-out' })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ router.back()
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
+ <wd-navbar
|
|
|
+ title="订单详情" custom-style="background-color:#FFF" :bordered="false" :z-index="99"
|
|
|
+ safe-area-inset-top left-arrow fixed @click-left="orderBack"
|
|
|
+ />
|
|
|
+ <view :style="{ paddingTop: `${(Number(statusBarHeight) || 44) + MenuButtonHeight + 12}px` }" />
|
|
|
<view class="video-rights-order-info-page">
|
|
|
<view class="box-border px24rpx">
|
|
|
<view class="h-22rpx" />
|
|
|
@@ -100,7 +124,7 @@ async function getOrderDetail() {
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="fixed bottom-0 h-174rpx w-full border-[1rpx_solid_#EEEEEE] bg-#FFF px-24rpx">
|
|
|
- <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="router.back()">
|
|
|
+ <wd-button custom-class="w-702rpx mt-10rpx" block size="large" @click="orderBack">
|
|
|
返回
|
|
|
</wd-button>
|
|
|
</view>
|