1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- import Vue from "vue";
- import Vuex from "vuex";
- import user from "@/store/modules/user";
- Vue.use(Vuex);
- const myPlugin = (store) => {
-
- let vuexStorage = uni.getStorageSync("vuexStorage");
- if (vuexStorage) {
- console.log(vuexStorage)
- store.replaceState(vuexStorage);
- }
- store.subscribe((mutation, state) => {
- uni.setStorageSync("vuexStorage", state);
- });
- };
- export default new Vuex.Store({
- state: {
- isShowSeiminModel: false,
- qucikCreateOrderType: '',
- },
- mutations: {
-
- changeSeiminModel(state, args) {
- state.isShowSeiminModel = args;
- },
-
- changeQucikCreateOrderType(state, args) {
- state.qucikCreateOrderType = args;
- },
- },
- modules: {
- user,
- },
- plugins: [myPlugin],
- });
|