优化问题

This commit is contained in:
duan
2024-06-05 15:47:04 +08:00
parent bdd5a6a325
commit ba106d1f96
8 changed files with 48 additions and 25 deletions

View File

@@ -18,7 +18,7 @@ const store = new Vuex.Store({
bottompadding: "",
heightBar: ''
},
shopId: null
},
getters: {
is_login(state) {
@@ -35,8 +35,12 @@ const store = new Vuex.Store({
//二次修改后的值 或者过滤的
return state.info;
},
},
mutations: {
SET_SHOPID(state, data) {
state.shopId = data;
},
SET_STATUS_BAR(state, data) {
state.BarHeight.statusBar = data;
},
@@ -57,7 +61,16 @@ const store = new Vuex.Store({
},
},
actions: {
set_shopid: async ({
commit
}, data) => {
let res = await Api.productqueryShopIdByTableCode({
code: uni.cache.get('tableCode')
})
if (res.code == 0) {
commit('SET_SHOPID', res.data)
}
},
HeightActions({
commit
}) {
@@ -95,8 +108,8 @@ const store = new Vuex.Store({
// #ifdef APP-PLUS
console.log('app-plus', e)
statusBar = e.statusBarHeight
heightBar = e.statusBarHeight
customBar = e.statusBarHeight
heightBar = e.statusBarHeight
customBar = e.statusBarHeight
bottomPadding = (e.screenHeight - e.safeArea.bottom)
// customBar = 0
// #endif