import {
	getOpenId,
	getUserId,
	getToken,
	getPersonData,
	getPersonPopedom,
	getMenuList,
	getCommonMenuList,
	getPersonTemp,
	getFunList,
	getAuthFunList,
	getRegisterFormData,
	getAppVersion,
	getPersionHomeModel,
	getOldRelationFormData,
	getWxPayBackUrl,
	getWdMessageNum,
	getInvitationCode,
	getDefaultExaminePerson,
	getActivityFormData,
	getApiType,
	getParkingMerchantId,
	getParkingMerchantData,
	getParkingCompanyId
} from '../utils/storage'

var storage_prefix = process.env.VUE_APP_LOCAL_STORAGE_PREFIX;

const state = {
	wx_openid: getOpenId(),
	ali_openid: getUserId(),
	token: getToken(),
	person_data: getPersonData(storage_prefix),
	person_popedom: getPersonPopedom(storage_prefix),
	add_person_data: '',
	control_abnormal_statistics_startTime: '',
	control_abnormal_statistics_endTime: '',
	menu_list: getMenuList(storage_prefix),
	common_menu_list: getCommonMenuList(storage_prefix),
	person_temp: getPersonTemp(storage_prefix),
	fun_list: getFunList(storage_prefix),
	auth_fun_list: getAuthFunList(storage_prefix),
	register_form_data: getRegisterFormData(storage_prefix),
	app_version: getAppVersion(storage_prefix),
	persion_home_model: getPersionHomeModel(storage_prefix),
	old_relation_form_data: getOldRelationFormData(storage_prefix),
	wx_pay_back_url: getWxPayBackUrl(storage_prefix),
	register_examine_form: '',
	wd_message_num: getWdMessageNum(storage_prefix),
	invitation_code: getInvitationCode(storage_prefix),
	default_examine_person: getDefaultExaminePerson(storage_prefix),
	activity_form_data: getActivityFormData(storage_prefix),
	api_type: getApiType(storage_prefix),
	parking_merchant_id: getParkingMerchantId(storage_prefix),
	parking_merchant_data: getParkingMerchantData(storage_prefix),
	parking_company_id: getParkingCompanyId(storage_prefix),
	//这里由于include，需要默认为数组
	keep_alive_components: [],
}

export default state
