From ea87c908fb6cdfc3e227a584a53e6730efb8262a Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 26 十月 2023 13:41:12 +0800
Subject: [PATCH] 小程序代码

---
 minipro_standard/store/index.js |   38 +++++++++++++++++---------------------
 1 files changed, 17 insertions(+), 21 deletions(-)

diff --git a/minipro_standard/store/index.js b/minipro_standard/store/index.js
index cb25fd3..897b26f 100644
--- a/minipro_standard/store/index.js
+++ b/minipro_standard/store/index.js
@@ -81,32 +81,28 @@
 			let res = await getTreeList({
 				type: type
 			})
-			if (res && res.code === 200) {
+			if (res.code === 200) {
 				content.commit('SETMENU', res.data)
 			}
 		},
 		// 鑾峰彇鐘舵�侀珮搴�
-		getHeight(context) {
-			// #ifdef MP-WEIXIN
-			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
-			})
-			// #endif
-			
+		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
+			})
 		},
 		async getUpcomingNum(context) {
-			let res = await pageCount({})
-			
-			if (res && res.code === 200) {
+			let res = await pageCount({})
+			if (res.code === 200) {
 				context.commit('SETNUM', {
 					d: res.data.startNum,
 					y: res.data.endNum
@@ -116,7 +112,7 @@
 		// 鍚戝悗绔幏鍙栦釜浜轰俊鎭�
 		async getUserInfos(content) {
 			let res = await getUserInfo()
-			if (res && res.code === 200) {
+			if (res.code === 200) {
 				content.commit('SETUSERINFO', res.data)
 				return true;
 			}

--
Gitblit v1.9.3