hookehuyr

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

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

feat(Dashboard/Welcome): 添加广告遮罩层的每日显示限制
<!--
* @Date: 2025-08-27 17:44:10
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-12 23:03:26
* @LastEditTime: 2025-09-12 23:28:37
* @FilePath: /lls_program/src/components/BottomNav.vue
* @Description: 文件描述
-->
......@@ -50,7 +50,16 @@ const isActive = (path) => {
};
const navigate = (path) => {
Taro.redirectTo({ url: path });
// 获取当前页面栈
const pages = Taro.getCurrentPages()
const currentPage = pages[pages.length - 1]
const currentRoute = currentPage?.route || ''
// 在 Welcome 页面屏蔽掉跳转按钮
if (currentRoute === 'pages/Welcome/index' && path === '/pages/Dashboard/index') {
return
} else {
Taro.redirectTo({ url: path });
}
};
</script>
......
......@@ -144,6 +144,7 @@
<!-- 广告遮罩层 -->
<AdOverlay
ref="adOverlayRef"
:ad-image-url="adObj.adImageUrl"
:target-page="adObj.targetPage"
:storage-key="adObj.storageKey"
......@@ -190,6 +191,7 @@ const familyOwner = ref(false);
// 广告遮罩层数据
const adObj = ref({})
const adOverlayRef = ref(null)
/**
* 触发积分收集组件的一键收取
......@@ -401,10 +403,12 @@ useDidShow(async () => {
}
// TODO: 获取广告信息
adObj.value = {
adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
targetPage: '/pages/Dashboard/index',
storageKey: 'dashboard_ad_overlay',
if (!adOverlayRef.value.hasShownToday()) {
adObj.value = {
adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
targetPage: '/pages/Dashboard/index',
storageKey: 'dashboard_ad_overlay',
}
}
})
......
<!--
* @Date: 2025-08-27 17:43:45
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-11 11:34:37
* @LastEditTime: 2025-09-13 01:40:20
* @FilePath: /lls_program/src/pages/Welcome/index.vue
* @Description: 文件描述
-->
......@@ -135,6 +135,7 @@
<!-- 广告遮罩层 -->
<AdOverlay
ref="adOverlayRef"
:ad-image-url="adObj.adImageUrl"
:target-page="adObj.targetPage"
:storage-key="adObj.storageKey"
......@@ -175,6 +176,7 @@ const navigateTo = (url) => {
// 广告遮罩层数据
const adObj = ref({})
const adOverlayRef = ref(null)
/**
* 处理广告遮罩层关闭事件
......@@ -218,10 +220,12 @@ useDidShow(async () => {
}
// TODO: 获取广告信息
adObj.value = {
adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
targetPage: '/pages/Dashboard/index',
storageKey: 'dashboard_ad_overlay',
if (!adOverlayRef.value.hasShownToday()) {
adObj.value = {
adImageUrl: 'https://cdn.ipadbiz.cn/lls_prog/images/%E5%8D%97%E4%BA%AC%E8%B7%AF%E5%95%86%E5%9C%88.jpeg',
targetPage: '/pages/Dashboard/index',
storageKey: 'dashboard_ad_overlay',
}
}
});
......
/*
* @Date: 2025-01-25 10:00:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-09-12 23:12:50
* @LastEditTime: 2025-09-12 23:34:54
* @FilePath: /lls_program/src/utils/authRedirect.js
* @Description: 授权重定向处理工具函数
*/
......@@ -265,11 +265,11 @@ export const silentAuth = async (onSuccess, onError) => {
// 测试环境下传递openid,正式环境不传递
if (process.env.NODE_ENV === 'development') {
// requestData.openid = 'h-008';
// requestData.openid = 'h-009';
requestData.openid = 'h-009';
// requestData.openid = 'h-010';
// requestData.openid = 'h-011';
// requestData.openid = 'h-012';
requestData.openid = 'h-013';
// requestData.openid = 'h-013';
// requestData.openid = 'oWbdFvkD5VtloC50wSNR9IWiU2q8';
// requestData.openid = 'oex8h5QZnZJto3ttvO6swSvylAQo';
}
......