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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user