hookehuyr

fix: 修复打卡成功后跳转页面和移除返回按钮

主要是避免参数丢失

移除不再需要的返回按钮代码
将打卡成功后的页面跳转从reLaunch改为navigateTo以保留当前页面状态
<!--
* @Date: 2024-09-15 22:08:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-28 17:35:19
* @LastEditTime: 2025-08-29 17:20:18
* @FilePath: /map-demo/src/views/checkin/info.vue
* @Description: 文件描述
-->
<template>
<div class="info-page">
<div class="info-header-wrapper">
<div v-if="showBack && page_details.banner?.length" style="position: absolute; top: 1rem; left: 0.5rem; z-index: 9;">
<!-- <div v-if="showBack && page_details.banner?.length" style="position: absolute; top: 1rem; left: 0.5rem; z-index: 9;">
<van-icon name="arrow-left" color="white" size="1.75rem" @click="goBack()" />
</div>
</div> -->
<van-config-provider :theme-vars="themeVars">
<van-swipe class="my-swipe" indicator-color="#DD7850" lazy-render :autoplay="5000">
<van-swipe-item v-for="(image, index) in page_details.banner" :key="index" style="position: relative;">
......@@ -523,6 +523,16 @@ const checkIn = async () => { // 打卡
return;
}
// 提示打卡成功
showDialog({
title: '温馨提示',
message: `恭喜您打卡成功`,
confirmButtonText: '去上传图片',
}).then(() => {
// 后续上传图片页面
wx.miniProgram.navigateTo({ url: '/pages/UploadMedia/index' });
});
// 判断用户时候在范围内
if (!checkInRange(page_details.value.current_lng, page_details.value.current_lat, page_details.value?.position)) {
show_toast.value = true;
......@@ -541,7 +551,7 @@ const checkIn = async () => { // 打卡
confirmButtonText: '去上传图片',
}).then(() => {
// 后续上传图片页面
wx.miniProgram.reLaunch({ url: '/pages/UploadMedia/index' });
wx.miniProgram.navigateTo({ url: '/pages/UploadMedia/index' });
});
} else {
show_toast.value = true;
......