import Vue from "vue";
import Vuex from "vuex";
import login from "../../baoan-common/src/store/login";
import * as ustate from "../../baoan-common/src/store/user/state";
import * as umutations from "../../baoan-common/src/store/user/mutations";
import security_guard_base from "../../baoan-common/src/store/security_guard_base";
import company_recruit_work from "../../baoan-common/src/store/company_recruit_work";
import certificates_print_again from "../../baoan-common/src/store/certificates_print_again";
import certificates_base from "../../baoan-common/src/store/certificates_base";
import company_baoan_work from "../../baoan-common/src/store/company_baoan_work";
import company_base from "../../baoan-common/src/store/company_base";
import company_baoan_punch from "../../baoan-common/src/store/company_baoan_punch";
import company_baoan_dispatch from "../../baoan-common/src/store/company_baoan_dispatch";
import baoan_work_warning from "../../baoan-common/src/store/baoan_work_warning";
import security_guard_collect from "../../baoan-common/src/store/security_guard_collect";
import system_account from '../../baoan-common/src/store/system_account';
import daily_inspection from '../../baoan-common/src/store/daily_inspection';
import warning_message from '../../baoan-common/src/store/warning_message';
Vue.use(Vuex);
export default new Vuex.Store({
	state: {
		...ustate,
	},
	mutations: {
		...umutations,
	},
	actions: {},
	modules: {
		login,
		security_guard_base,
		company_recruit_work,
		certificates_print_again,
		company_baoan_work,
		company_base,
		certificates_base,
		company_baoan_punch,
		company_baoan_dispatch,
		baoan_work_warning,
		security_guard_collect,
		system_account,
		daily_inspection,
		warning_message
	},
	getters: {
		client() {
			let client = {};
			uni.getSystemInfo({
				success: (res) => {
					console.log(res);
					client = {
						win_top: res.windowTop,
						win_width: res.windowWidth,
						win_height: res.windowHeight,
						scr_width: res.screenWidth,
						scr_height: res.screenHeight,
					};
				},
			});
			return client;
		},
	},
});
