<script setup lang="ts">
|
import { onLoad } from '@dcloudio/uni-app'
|
|
definePage({
|
name: 'success',
|
layout: 'default',
|
style: {
|
navigationStyle: 'custom',
|
},
|
})
|
|
const router = useRouter()
|
const sysInfo = uni.getSystemInfoSync()
|
const statusBarHeight = sysInfo.statusBarHeight || 0
|
const navBarHeight = 44
|
const orderId = ref<number | null>(null)
|
const orderUuid = ref('')
|
|
function handleBack() {
|
uni.switchTab({ url: '/pages/index/index' })
|
}
|
|
function goHome() {
|
uni.switchTab({ url: '/pages/index/index' })
|
}
|
|
function viewDetail() {
|
if (orderId.value && orderUuid.value) {
|
uni.redirectTo({
|
url: `/pages/review/index?orderId=${orderId.value}&orderUuid=${encodeURIComponent(orderUuid.value)}`,
|
})
|
return
|
}
|
uni.redirectTo({ url: '/pages/record/index' })
|
}
|
|
onLoad((options) => {
|
orderId.value = options?.orderId ? Number(options.orderId) : null
|
orderUuid.value = options?.orderUuid ? decodeURIComponent(options.orderUuid) : ''
|
})
|
</script>
|
|
<template>
|
<view class="min-h-screen bg-[#F6FBFF] w-full relative box-border">
|
<!-- 自定义导航栏 -->
|
<view class="relative z-50 w-full" :style="{ height: (statusBarHeight + navBarHeight) + 'px' }">
|
<view class="flex items-center justify-between w-full absolute left-0"
|
:style="{ top: statusBarHeight + 'px', height: navBarHeight + 'px' }">
|
<view class="flex h-full w-[88rpx] items-center justify-center relative z-10" @click="handleBack">
|
<wd-icon name="arrow-left" size="40rpx" color="#333333" />
|
</view>
|
<view class="absolute left-0 w-full text-center text-[34rpx] font-medium text-[#333333] z-0">
|
预约
|
</view>
|
<view class="w-[88rpx]"></view>
|
</view>
|
</view>
|
|
<view class="flex flex-col items-center pt-[120rpx] px-[64rpx]">
|
<!-- 成功图片 -->
|
<image src="/static/choosePerson/noData.png" class="w-[480rpx] h-[360rpx] mb-[48rpx]" mode="aspectFit" />
|
|
<!-- 提示文案 -->
|
<text class="text-[28rpx] text-[#000C1F] leading-[44rpx] text-center mb-[120rpx]">
|
访客预约已提交,受访单位将在1-3个自然日内进行处理。若需加急请线下与被访人沟通
|
</text>
|
|
<!-- 按钮组 -->
|
<view class="w-full flex flex-col items-center">
|
<view
|
class="w-[486rpx] h-[96rpx] rounded-full bg-[#0068FF] flex items-center justify-center shadow-[0_8rpx_24rpx_rgba(0,104,255,0.2)] mb-[48rpx]"
|
@click="viewDetail"
|
>
|
<text class="text-[32rpx] text-white font-medium">查看预约信息</text>
|
</view>
|
|
<view
|
class="w-[486rpx] h-[96rpx] rounded-full bg-transparent border-[2rpx] border-solid border-[#0068FF] flex items-center justify-center"
|
@click="goHome"
|
>
|
<text class="text-[32rpx] text-[#0068FF] font-medium">返回首页</text>
|
</view>
|
</view>
|
</view>
|
</view>
|
</template>
|
|
<style scoped>
|
</style>
|