lsc 3 years ago
parent
commit
7d4a8ccba7
1 changed files with 23 additions and 0 deletions
  1. 23 0
      src/config/config.js

+ 23 - 0
src/config/config.js

@@ -0,0 +1,23 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+
+Vue.use(Vuex)
+
+const store = new Vuex.Store({
+    state: {
+        isLogin: false,
+        luyou:1,
+        userInfo: {},
+        nCount:0,
+        api: 'https://ld.api.cocorobo.cn/edu/',
+        // api: 'http://localhost:7003/edu/',
+    },
+
+    mutations: {
+        update(state, [key, value]) {
+            state[key] = value;
+        },
+    }
+})
+
+export default store