
const app = {
	state: {
		wxWechatConfig: {
            wxAppId:  process.env.VUE_APP_APPID,
			wxId: process.env.VUE_APP_WXID
        },
        loading: false,
        pageTitle: "智慧药房",
		platform: 'web',  //网页web   
		noTop: false,
		authMenu: [],
		drugList: []
	},
	mutations: {
		SET_NO_TOP: (state, bool) => {
            state.noTop = bool
		},
		SET_LOADING: (state, bool) => {
            state.loading = bool
		},
		SET_PAGE_TITLE: (state, val) => {
            state.pageTitle = val
        },
		SET_AUTH_MENU: (state, val) => {
            state.authMenu = val
        },
		SET_DRUG_LIST: (state, val) => {
            state.drugList = val
        }
	},
	actions: {
		SetNoTop({ commit, state }, bool) {
            commit('SET_NO_TOP', bool)
		},
		SetLoading({ commit, state }, bool) {
            commit('SET_LOADING', bool)
		},
		SetPageTitle({ commit, state }, val) {
			commit('SET_PAGE_TITLE', val)
		},
		SetAuthMenu({ commit, state }, val) {
			commit('SET_AUTH_MENU', val)
		},
		SetDrugList({ commit, state }, val) {
			commit('SET_DRUG_LIST', val)
		}
	}
};

export default app;
