store.js 540 Bytes
Newer Older
王建威's avatar
王建威 committed
1 2 3 4 5
import Vue from 'vue'
import Vuex from 'vuex'
Vue.use(Vuex)
const store = new Vuex.Store({
    state: {
王建威's avatar
王建威 committed
6 7
		webviewUrl: '',
		installment: {} //采购分期存储的数据
王建威's avatar
王建威 committed
8 9 10 11
	},
    mutations: {
		changeWebviewUrl(state, url) {
			state.webviewUrl = url;
王建威's avatar
王建威 committed
12 13 14
		},
		changeInstallment(state, data) {
			state.installment = data;
王建威's avatar
王建威 committed
15 16 17 18 19
		}
	},
    actions: {
		changeWebviewUrl(context, url) {
			context.commit('changeWebviewUrl', url);
王建威's avatar
王建威 committed
20 21 22
		},
		changeInstallment(context, data) {
			context.commit('changeInstallment', data);
王建威's avatar
王建威 committed
23 24 25 26
		}
	}
})
export default store