// 用户数据模块
// import http from '@/shopro/request/index'
// import store from '@/shopro/store'
// import tools from '@/shopro/utils/tools'
// import wechat from '@/shopro/wechat/wechat'
// import share from '@/shopro/share'

const state = {
	iosRejectUpdate: true, //是否禁止更新检测
	androidRejectUpdate: true, //是否禁止更新检测
}

const getters = {
	iosRejectUpdate: state => {
		let platform = uni.getSystemInfoSync().platform;
		if (platform != 'ios') {
			return false;
		} else {
			return state.iosRejectUpdate;
		}
	},
	androidRejectUpdate: state => {
		let platform = uni.getSystemInfoSync().platform;
		if (platform != 'android') {
			return false;
		} else {
			return state.androidRejectUpdate;
		}
	},
}

const actions = {
	// 
	// setRejectUpdate({
	// 	commit,
	// 	dispatch,
	// 	getters,
	// 	state
	// }, iosRejectUpdate = true) {
	// 	commit('changeRejectUpdate', iosRejectUpdate);
	// },
	//检测是否是引流版并保存数据


}

const mutations = {
	changeRejectUpdateIos(state, iosRejectUpdate) {
		state.iosRejectUpdate = iosRejectUpdate;
	},
	changeRejectUpdateAndroid(state, androidRejectUpdate) {
		state.androidRejectUpdate = androidRejectUpdate;
	},
}



export default {
	state,
	mutations,
	actions,
	getters
}