You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

70 lines
2.0 KiB

import Vue from 'vue';
import Vuex from 'vuex';
import mutations from './mutations';
import actions from './actions';
import device from './device';
Vue.use(Vuex);
export default new Vuex.Store({
modules: {
device
},
state: {
// #ifdef H5
APPID: uni.getAccountInfoSync().miniProgram.appId,
// #endif
brandInfo: {
brand: {}
},
// permissionObj: { // 权限代号对应
// '1001': '营业额',
// '1002': '收款记录',
// '1003': '经营分析',
// '1004': '预约订单',
// '1005': '会员卡订单',
// '1006': '积分订单',
// '1007': '员工管理',
// '1008': '查询核销',
// '1009': '场地管理',
// '1010': '设备管理',
// '1011': '商品零售',
// '1012': '订单管理',
// '1013': '课程管理',
// },
permissionObj: { // 权限代号对应
'1001': '营业额',
'1002': '收款记录',
'1012': '订单管理',
'1007': '员工管理',
'1008': '核销查询',
'1009': '场地管理',
'1010': '设备管理',
'1011': '商品零售',
'1013': '课程管理',
'1014': '储值卡管理',
'1015': '进场人数异常',
},
// 场地占用提交页面信息
occupyInfo: {
storeInfo: {}, // 店铺信息
dateInfo: {}, // 时间信息
typeInfo: {}, // 球场类型
venueList: [], // 选择场地列表
}
},
mutations,
actions,
getters: {
permissionArr: state=>{
let _arr = [], _obj = state.permissionObj;
for(let key in _obj){
_arr.push({
key,
name: _obj[key],
})
}
console.warn(_arr.length)
return _arr;
}
}
});