hookehuyr

refactor(导航): 统一使用Taro.redirectTo进行页面跳转

将原本使用go方法的页面跳转统一改为Taro.redirectTo,提高代码一致性
调整首页预约码图标位置和占位元素
优化温馨提示的样式布局
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-07 21:59:47
* @LastEditTime: 2026-01-07 22:27:24
* @FilePath: /xyxBooking-weapp/src/pages/bookingCode/index.vue
* @Description: 文件描述
-->
......@@ -49,17 +49,23 @@ useDidShow(() => {
success: (res) => {
const isConnected = ['wifi', '4g', '5g', '3g'].includes(res.networkType);
if (!isConnected) {
go('/pages/weakNetwork/index');
Taro.redirectTo({
url: '/pages/weakNetwork/index'
})
}
}
});
})
const toMy = () => { // 跳转到我的
go('/pages/me/index');
Taro.redirectTo({
url: '/pages/me/index'
})
}
const toHome = () => { // 跳转到首页
go('/pages/index/index');
Taro.redirectTo({
url: '/pages/index/index'
})
}
</script>
......
<!--
* @Date: 2023-06-21 10:23:09
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-06 23:01:43
* @LastEditTime: 2026-01-07 22:25:27
* @FilePath: /xyxBooking-weapp/src/pages/index/index.vue
* @Description: 预约页首页
-->
......@@ -32,8 +32,8 @@
首页
</view>
<view class="nav-logo" @tap="toCode">
<image :src="icon_4" style="width: 160rpx; height: 160rpx; position: absolute; top: -170rpx;" />
<!-- <van-icon size="48rpx" name="wap-home" color="#FFF" style="opacity: 0;" /> -->
<image :src="icon_4" style="width: 160rpx; height: 160rpx; position: absolute; top: -110rpx;" />
<view style="width: 48rpx; height: 48rpx;"></view>
预约码
</view>
<view class="nav-logo" @tap="toMy">
......@@ -69,10 +69,14 @@ const toSearch = () => { // 跳转到寺院录入
go('/search');
}
const toCode = () => { // 跳转到预约码
go('/bookingCode');
Taro.redirectTo({
url: '/pages/bookingCode/index'
})
}
const toMy = () => { // 跳转到我的
go('/me');
Taro.redirectTo({
url: '/pages/me/index'
})
}
useDidShow(async () => {
......
......@@ -42,10 +42,14 @@ import icon_invite from '@/assets/images/二维码@2x2.png'
const go = useGo();
const toCode = () => { // 跳转到预约码
go('/pages/bookingCode/index');
Taro.redirectTo({
url: '/pages/bookingCode/index'
})
}
const toHome = () => { // 跳转到首页
go('/pages/index/index');
Taro.redirectTo({
url: '/pages/index/index'
})
}
const menu_list = [{
......
......@@ -16,7 +16,7 @@
</view>
</view>
<view style="color:#A67939; font-size: 30rpx; text-align: center;">
<view>
<view style="display: flex; align-items: center; justify-content: center;">
<IconFont name="tips" />&nbsp;温馨提示
</view>
<view style="margin-top: 16rpx;">获取参观码,扫码或识别身份证成功进闸机</view>
......
......@@ -18,7 +18,7 @@
<view class="payment-amount">支付金额:<text>¥ {{ billInfo?.total_amt }}</text></view>
</view>
<view class="appointment-notice">
<view style="margin-bottom: 8rpx;"><IconFont name="tips" />&nbsp;温馨提示</view>
<view style="margin-bottom: 8rpx; display: flex; align-items: center; justify-content: center;"><IconFont name="tips" />&nbsp;温馨提示</view>
<view style="font-size: 27rpx;">1. 一人一码,或拿身份证,扫码或识别身份证成功后进入</view>
<view style="font-size: 27rpx;">2. 若您无法按时参观,请提前在预约记录中取消您的预约</view>
</view>
......