feat(store&bottom-nav): add package entry tab tracking logic

1. add packageEntryTab state and mutation in vuex store
2. extract and track current/previous page's matching tab entry
3. update package entry tab state via store commit instead of local variable
4. optimize tab url parsing by stripping query parameters
This commit is contained in:
2026-05-30 14:12:01 +08:00
parent 6410257a25
commit d3c34c3698
2 changed files with 37 additions and 6 deletions

View File

@@ -77,6 +77,7 @@ const store = new Vuex.Store({
diyGroupPositionObj: {},
diyGroupShowModule: '',
tabBarHeight: '56px',
packageEntryTab: {}, // 追踪每个分包的入口Tab { 'pages_goods': '/pages_goods/category' }
mapConfig: {
tencent_map_key: '',
wap_is_open: 1,
@@ -197,6 +198,9 @@ const store = new Vuex.Store({
setTabBarHeight(state, value) {
state.tabBarHeight = value;
},
setPackageEntryTab(state, value) {
state.packageEntryTab = value;
},
setMapConfig(state, value) {
state.mapConfig = value;
uni.setStorageSync('mapConfig', value);