hookehuyr

fix(BottomNav): 在Welcome页面屏蔽跳转到Dashboard的按钮

refactor(authRedirect): 更改测试环境下的默认openid为h-009

feat(Dashboard/Welcome): 添加广告遮罩层的每日显示限制
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:44:10 2 * @Date: 2025-08-27 17:44:10
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-12 23:03:26 4 + * @LastEditTime: 2025-09-12 23:28:37
5 * @FilePath: /lls_program/src/components/BottomNav.vue 5 * @FilePath: /lls_program/src/components/BottomNav.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -50,7 +50,16 @@ const isActive = (path) => { ...@@ -50,7 +50,16 @@ const isActive = (path) => {
50 }; 50 };
51 51
52 const navigate = (path) => { 52 const navigate = (path) => {
53 - Taro.redirectTo({ url: path }); 53 + // 获取当前页面栈
54 + const pages = Taro.getCurrentPages()
55 + const currentPage = pages[pages.length - 1]
56 + const currentRoute = currentPage?.route || ''
57 + // 在 Welcome 页面屏蔽掉跳转按钮
58 + if (currentRoute === 'pages/Welcome/index' && path === '/pages/Dashboard/index') {
59 + return
60 + } else {
61 + Taro.redirectTo({ url: path });
62 + }
54 }; 63 };
55 </script> 64 </script>
56 65
......
...@@ -144,6 +144,7 @@ ...@@ -144,6 +144,7 @@
144 144
145 <!-- 广告遮罩层 --> 145 <!-- 广告遮罩层 -->
146 <AdOverlay 146 <AdOverlay
147 + ref="adOverlayRef"
147 :ad-image-url="adObj.adImageUrl" 148 :ad-image-url="adObj.adImageUrl"
148 :target-page="adObj.targetPage" 149 :target-page="adObj.targetPage"
149 :storage-key="adObj.storageKey" 150 :storage-key="adObj.storageKey"
...@@ -190,6 +191,7 @@ const familyOwner = ref(false); ...@@ -190,6 +191,7 @@ const familyOwner = ref(false);
190 191
191 // 广告遮罩层数据 192 // 广告遮罩层数据
192 const adObj = ref({}) 193 const adObj = ref({})
194 +const adOverlayRef = ref(null)
193 195
194 /** 196 /**
195 * 触发积分收集组件的一键收取 197 * 触发积分收集组件的一键收取
...@@ -401,10 +403,12 @@ useDidShow(async () => { ...@@ -401,10 +403,12 @@ useDidShow(async () => {
401 } 403 }
402 404
403 // TODO: 获取广告信息 405 // TODO: 获取广告信息
404 - adObj.value = { 406 + if (!adOverlayRef.value.hasShownToday()) {
405 - adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg', 407 + adObj.value = {
406 - targetPage: '/pages/Dashboard/index', 408 + adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
407 - storageKey: 'dashboard_ad_overlay', 409 + targetPage: '/pages/Dashboard/index',
410 + storageKey: 'dashboard_ad_overlay',
411 + }
408 } 412 }
409 }) 413 })
410 414
......
1 <!-- 1 <!--
2 * @Date: 2025-08-27 17:43:45 2 * @Date: 2025-08-27 17:43:45
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-11 11:34:37 4 + * @LastEditTime: 2025-09-13 01:40:20
5 * @FilePath: /lls_program/src/pages/Welcome/index.vue 5 * @FilePath: /lls_program/src/pages/Welcome/index.vue
6 * @Description: 文件描述 6 * @Description: 文件描述
7 --> 7 -->
...@@ -135,6 +135,7 @@ ...@@ -135,6 +135,7 @@
135 135
136 <!-- 广告遮罩层 --> 136 <!-- 广告遮罩层 -->
137 <AdOverlay 137 <AdOverlay
138 + ref="adOverlayRef"
138 :ad-image-url="adObj.adImageUrl" 139 :ad-image-url="adObj.adImageUrl"
139 :target-page="adObj.targetPage" 140 :target-page="adObj.targetPage"
140 :storage-key="adObj.storageKey" 141 :storage-key="adObj.storageKey"
...@@ -175,6 +176,7 @@ const navigateTo = (url) => { ...@@ -175,6 +176,7 @@ const navigateTo = (url) => {
175 176
176 // 广告遮罩层数据 177 // 广告遮罩层数据
177 const adObj = ref({}) 178 const adObj = ref({})
179 +const adOverlayRef = ref(null)
178 180
179 /** 181 /**
180 * 处理广告遮罩层关闭事件 182 * 处理广告遮罩层关闭事件
...@@ -218,10 +220,12 @@ useDidShow(async () => { ...@@ -218,10 +220,12 @@ useDidShow(async () => {
218 } 220 }
219 221
220 // TODO: 获取广告信息 222 // TODO: 获取广告信息
221 - adObj.value = { 223 + if (!adOverlayRef.value.hasShownToday()) {
222 - adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg', 224 + adObj.value = {
223 - targetPage: '/pages/Dashboard/index', 225 + adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
224 - storageKey: 'dashboard_ad_overlay', 226 + targetPage: '/pages/Dashboard/index',
227 + storageKey: 'dashboard_ad_overlay',
228 + }
225 } 229 }
226 }); 230 });
227 231
......
1 /* 1 /*
2 * @Date: 2025-01-25 10:00:00 2 * @Date: 2025-01-25 10:00:00
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-09-12 23:12:50 4 + * @LastEditTime: 2025-09-12 23:34:54
5 * @FilePath: /lls_program/src/utils/authRedirect.js 5 * @FilePath: /lls_program/src/utils/authRedirect.js
6 * @Description: 授权重定向处理工具函数 6 * @Description: 授权重定向处理工具函数
7 */ 7 */
...@@ -265,11 +265,11 @@ export const silentAuth = async (onSuccess, onError) => { ...@@ -265,11 +265,11 @@ export const silentAuth = async (onSuccess, onError) => {
265 // 测试环境下传递openid,正式环境不传递 265 // 测试环境下传递openid,正式环境不传递
266 if (process.env.NODE_ENV === 'development') { 266 if (process.env.NODE_ENV === 'development') {
267 // requestData.openid = 'h-008'; 267 // requestData.openid = 'h-008';
268 - // requestData.openid = 'h-009'; 268 + requestData.openid = 'h-009';
269 // requestData.openid = 'h-010'; 269 // requestData.openid = 'h-010';
270 // requestData.openid = 'h-011'; 270 // requestData.openid = 'h-011';
271 // requestData.openid = 'h-012'; 271 // requestData.openid = 'h-012';
272 - requestData.openid = 'h-013'; 272 + // requestData.openid = 'h-013';
273 // requestData.openid = 'oWbdFvkD5VtloC50wSNR9IWiU2q8'; 273 // requestData.openid = 'oWbdFvkD5VtloC50wSNR9IWiU2q8';
274 // requestData.openid = 'oex8h5QZnZJto3ttvO6swSvylAQo'; 274 // requestData.openid = 'oex8h5QZnZJto3ttvO6swSvylAQo';
275 } 275 }
......