From 9ab4955166b7b1370fc2a49b152353241ca9e64a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 16 十月 2023 09:22:23 +0800
Subject: [PATCH] 小程序

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

diff --git a/minipro_standard/store/index.js b/minipro_standard/store/index.js
index f73661c..e69de29 100644
--- a/minipro_standard/store/index.js
+++ b/minipro_standard/store/index.js
@@ -1,62 +0,0 @@
-import Vue from 'vue'
-import Vuex from 'vuex'
-
-Vue.use(Vuex) // vue鐨勬彃浠舵満鍒�
-
-const navHeight = uni.getStorageSync('navHeight');
-const statusbarHeight = uni.getStorageSync('statusbarHeight');
-const menuButtonWidth = uni.getStorageSync('menuButtonWidth');
-const token = uni.getStorageSync('token');
-const userInfo = uni.getStorageSync('userInfo');
-
-
-// Vuex.Store 鏋勯�犲櫒閫夐」
-const store = new Vuex.Store({
-	// 涓轰簡涓嶅拰椤甸潰鎴栫粍浠剁殑data涓殑閫犳垚娣锋穯锛宻tate涓殑鍙橀噺鍓嶉潰寤鸿鍔犱笂$绗﹀彿
-	state: {
-		// 鐢ㄦ埛淇℃伅
-		userInfo: userInfo || null,
-		token: token || null,
-		menuButtonWidth: menuButtonWidth || '0',
-		statusbarHeight: statusbarHeight || '0',
-		navHeight: navHeight || '0',
-	},
-	mutations: {
-		setHeight(state, val) {
-			state.navHeight = val.navHeight
-			state.statusbarHeight = val.statusbarHeight
-			state.menuButtonWidth = val.menuButtonWidth
-			uni.setStorageSync('navHeight', val.navHeight);
-			uni.setStorageSync('statusbarHeight', val.statusbarHeight);
-			uni.setStorageSync('menuButtonWidth', val.menuButtonWidth);
-		},
-		SETTOKEN(state, val) {
-			state.token = val
-			uni.setStorageSync('token', val);
-		},
-		SETUSERINFO(state, val) {
-			state.userInfo = val
-			uni.setStorageSync('userInfo', val);
-		}
-	},
-	actions: {
-		// 鑾峰彇鐘舵�侀珮搴�
-		getHeight(context) {
-			
-			let res = uni.getMenuButtonBoundingClientRect()
-			let status = uni.getSystemInfoSync()
-			let menuButtonWidth = res.width
-			let height = res.height
-			let statusbarHeight = status.statusBarHeight
-			let navHeight = res.height + (res.top - statusbarHeight) * 2;
-			context.commit('setHeight', {
-				statusbarHeight,
-				navHeight,
-				height,
-				menuButtonWidth
-			})
-		},
-	}
-})
-
-export default store

--
Gitblit v1.9.3