import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
	state: {
		openId: localStorage.getItem("openid"),
		//服务器用
		//host: "http://www.kzmos.com/tianzong",
		host: "/tianzong",
		//本地用
		//host:"http://localhost:8080/tianzong",
		regEmail: "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$",
		regPhone: "^(1[3-9])\\d{9}$",
		jjInfo: {},
		sjInfo: {},
		sjInfo3: {},
		sjList: [],
		foreignSjInfo: {},
		foreignJjInfo: {},
		hkSjInfo: {},
		hkJjInfo: {},
		transmitMessageVlaue: {}
	},
	mutations: {
		getTransmitMessageVlaue(state, transmitMessageVlaue) {
			state.transmitMessageVlaue = transmitMessageVlaue
		},
		getId(state, openid) {
			state.openId = openid
		},
		getJjInfo(state, jjInfo) {
			state.jjInfo = jjInfo
		},
		getSjInfo(state, sjInfo) {
			state.sjInfo = sjInfo
		},
		getSjInfo3(state, sjInfo3) {
			state.sjInfo3 = sjInfo3
		},
		getSjList(state, sjList) {
			state.sjList = sjList
		},
		getForeignSjInfo(state, foreignSjInfo) {
			state.foreignSjInfo = foreignSjInfo
		},
		getForeignJjInfo(state, foreignJjInfo) {
			state.foreignJjInfo = foreignJjInfo
		},
		getHkSjInfo(state, hkSjInfo) {
			state.hkSjInfo = hkSjInfo
		},
		getHkJjInfo(state, hkJjInfo) {
			state.hkJjInfo = hkJjInfo
		}
	},
	actions: {

	}
})
export default store
