1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- import Vue from 'vue'
- import Vuex from 'vuex'
- Vue.use(Vuex)
- const store = new Vuex.Store({
- state: {
- yuyueData:'',
- carInfo:'',
- ckshopInfo:'',
- userInfo:'',
- wxOpenData:'',
- },
- getters:{
- getyuyueData(state){
- return state.yuyueData
- },
- getcarInfo(state){
- return state.carInfo
- },
- getckshopInfo(state){
- return state.ckshopInfo
- },
- getuserInfo(state){
- return state.userInfo
- },
- getwxOpenData(state){
- return state.wxOpenData
- }
- },
- mutations: {
- mutationsyuyueData(state,data){
- state.yuyueData=data
- },
- mutationscarInfo(state,data){
- state.carInfo=data
- },
- mutationsckshopInfo(state,data){
- state.ckshopInfo=data
- },
- mutationsuserInfo(state,data){
- state.userInfo=data
- },
- mutationswxOpenData(state,data){
- state.wxOpenData=data
- },
- },
- actions: {
- actionsyuyueData(context,playload){
- context.commit('mutationsyuyueData',playload)
- },
- actionscarInfo(context,playload){
- context.commit('mutationscarInfo',playload)
- },
- actionsckshopInfo(context,playload){
- context.commit('mutationsckshopInfo',playload)
- },
- actionsuserInfo(context,playload){
- context.commit('mutationsuserInfo',playload)
- },
- actionswxOpenData(context,playload){
- context.commit('mutationswxOpenData',playload)
- },
- }
- })
- export default store
|