From 11da2aef4b4aa8ebff5b58b5241aaa6e0df56eb4 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Tue, 18 Jun 2024 15:43:09 +0800
Subject: [PATCH] fix: bug修改

---
 store/index.js |   39 +++++++++++++++++++++++++++++++++++++++
 1 files changed, 39 insertions(+), 0 deletions(-)

diff --git a/store/index.js b/store/index.js
new file mode 100644
index 0000000..3d8198f
--- /dev/null
+++ b/store/index.js
@@ -0,0 +1,39 @@
+import Vue from 'vue'
+import Vuex from 'vuex'
+Vue.use(Vuex)
+const store = new Vuex.Store({
+    state: {
+        userInfor: {},
+        tonken: '',
+        dictObj: {},
+        dict: null
+    },
+    mutations: {
+        setUserInfor(state, data) {
+            state.userInfor = data
+            // ������������������
+            uni.setStorageSync('userInfor', JSON.stringify(data)) //������������������������������
+        },
+        setDictObj(state, data) {
+            state.dictObj = data
+            // ������������������
+            uni.setStorageSync('dictObj', JSON.stringify(data)) //������������������������������
+        },
+        setDict(state, data) {
+            state.dict = data
+            // ������������������
+            uni.setStorageSync('dict', JSON.stringify(data)) //������������������������������
+        },
+        setTonken(state, data) {
+            state.tonken = data
+            // ������������������
+            uni.setStorageSync('tonken', data)
+        },
+    },
+    actions: {
+        getUserInfo(context, data) {
+            context.commit('userInfor', data)
+        }
+    },
+})
+export default store
\ No newline at end of file

--
Gitblit v1.8.0