diff --git a/App.vue b/App.vue index ef4c47e1..3681eff2 100644 --- a/App.vue +++ b/App.vue @@ -210,7 +210,10 @@ cache_diy_page_data_key: 'cache_diy_page_data_key', // apptabbar底部菜单高度 - cache_app_tabbar_height_key: 'cache_app_tabbar_height_key', + cache_app_system_tabbar_height_key: 'cache_app_system_tabbar_height_key', + + // diy底部菜单高度 + cache_app_diy_tabbar_height_key: 'cache_app_diy_tabbar_height_key', // apptabbar底部菜单角标数据 cache_tabbar_badge_key: 'cache_tabbar_badge_key', @@ -943,20 +946,35 @@ } return value; }, - + /** - * 底部菜单高度数据存储 + * diy底部菜单高度数据存储 * value 高度 */ - app_tabbar_height_save(value) { - uni.setStorageSync(this.data.cache_app_tabbar_height_key, value); + app_diy_tabbar_height_save(value) { + uni.setStorageSync(this.data.cache_app_diy_tabbar_height_key, value); + }, + + /** + * diy底部菜单高度数据读取 + */ + app_diy_tabbar_height_value() { + return parseInt(uni.getStorageSync(this.data.cache_app_diy_tabbar_height_key) || 0); + }, + + /** + * 系统底部菜单高度数据存储 + * value 高度 + */ + app_system_tabbar_height_save(value) { + uni.setStorageSync(this.data.cache_app_system_tabbar_height_key, value); }, /** - * 底部菜单高度数据读取 + * 系统底部菜单高度数据读取 */ - app_tabbar_height_value() { - return parseInt(uni.getStorageSync(this.data.cache_app_tabbar_height_key) || 0); + app_system_tabbar_height_value() { + return parseInt(uni.getStorageSync(this.data.cache_app_system_tabbar_height_key) || 0); }, /** @@ -3055,7 +3073,7 @@ if(temp !== undefined && this.is_tabbar_pages()) { obj.$vm.setData( { - bottom_fixed_style: 'bottom:'+(((this.app_tabbar_height_value()-8)*2)+20)+'rpx' + bottom_fixed_style: 'bottom:'+(((this.app_system_tabbar_height_value()-8)*2)+20)+'rpx' }); } } diff --git a/components/common/common.vue b/components/common/common.vue index 6b0811bb..44614d73 100644 --- a/components/common/common.vue +++ b/components/common/common.vue @@ -188,7 +188,7 @@ this.$emit('onFooterHeight', value); // 存储底部菜单高度 - app.globalData.app_tabbar_height_save(value); + app.globalData.app_system_tabbar_height_save(value); }, // 协议事件 diff --git a/components/diy/diy.vue b/components/diy/diy.vue index f7d85354..fce11fd1 100644 --- a/components/diy/diy.vue +++ b/components/diy/diy.vue @@ -81,7 +81,7 @@ - + @@ -219,7 +219,7 @@ diy_data: [], page_style: '', page_img_style: '', - is_show_footer: 0, + is_show_footer: false, tabs_home_id: this.propDataId, // 商品列表 goods_list: [], @@ -287,6 +287,13 @@ this.setData({ is_show_footer: is_show_footer && !is_tabbar, }); + // diy页面不显示底部菜单则设置底部菜单高度为0 + if(!this.is_show_footer) { + // 存储diy页面底部菜单高度 + if(app.globalData.current_page(false) == 'pages/diy/diy') { + app.globalData.app_diy_tabbar_height_save(0); + } + } } else { app.globalData.is_config(this, 'init_config'); } @@ -620,8 +627,13 @@ // 底部菜单高度 footer_height_value_event(value) { this.setData({ - footer_height_value: value * 2 + 20, + footer_height_value: (value*2)+20, }); + + // 存储diy页面底部菜单高度 + if(app.globalData.current_page(false) == 'pages/diy/diy') { + app.globalData.app_diy_tabbar_height_save(value); + } }, // 商品数量更新回调 goods_buy_event(index, goods = {}, params = {}, back_data = null) { diff --git a/components/diy/tabs.vue b/components/diy/tabs.vue index 315ad109..c9e7fbcf 100644 --- a/components/diy/tabs.vue +++ b/components/diy/tabs.vue @@ -201,7 +201,7 @@