import Vue from 'vue';
import Vuex from 'vuex';
import {
	localStorage
} from '@/js_sdk/mp-storage/mp-storage/index.js'
//全局风格设置
Vue.use(Vuex);

var appStyle = "";
if(localStorage.getItem('appSwiperStyle')){
	var appSwiperStyle = localStorage.getItem('appSwiperStyle');
	if (appSwiperStyle == -1) {
		appStyle = "ablaod";
	}
	if (appSwiperStyle == 0) {
		appStyle = "abload";
	}
	if (appSwiperStyle == 1) {
		appStyle = "aloab";
	}
	if (appSwiperStyle == 2) {
		appStyle = "adload";
	}
	if (appSwiperStyle == null) {
		appStyle = "oblaod";
	}
}
const store = new Vuex.Store({
	state:{
		 AppStyle: appStyle,
	},
	mutations:{
		setStyle(state, style) {
			state.AppStyle = style
		}
	}
})
export default store