From 47b673f0d6987a51125daf3214264ad7bdd3ff57 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期日, 04 六月 2023 14:54:30 +0800
Subject: [PATCH] no message

---
 uniapp/pages/goods/goodsDetail.vue |    6 ++++++
 uniapp/App.vue                     |    9 ++++++++-
 uniapp/pages/mine/mine.vue         |    9 ++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/uniapp/App.vue b/uniapp/App.vue
index 5853e98..ad3c38f 100644
--- a/uniapp/App.vue
+++ b/uniapp/App.vue
@@ -136,6 +136,7 @@
 			canlisten: true,
 			appinfo: {},
 			ifwt: 0,
+			hasinit:false,
 			
 		},
 		onShow: function() {
@@ -148,7 +149,12 @@
 							content: '妫�娴嬪埌缃戠粶鏉冮檺鍙兘璁剧疆涓哄叧闂紝鎮ㄥ彲浠ュ湪鈥滆缃�濅腑妫�鏌ユ棤绾挎暟鎹強铚傜獫绉诲姩缃戠粶'
 						})
 					}else{
-						that.getAppInfo();
+						console.log("鏄惁璇锋眰杩囷細"+that.globalData.hasinit)
+						if(!that.globalData.hasinit)
+						{
+							that.getAppInfo();
+						}
+						
 						/* let appInfo = utils.getCacheSync('appInfo')
 						if(appInfo == "" || appInfo == undefined){
 							console.log("鑾峰彇鏂规硶")
@@ -177,6 +183,7 @@
 				this.$u.api.comminInt({}).then(e => {
 					console.log(e)
 					if (e.code != 0) return that.$alert(e.msg)
+					that.globalData.hasinit=true;
 					that.globalData.appinfo = e.data.basic
 					utils.setCache('appInfo', e.data.basic)
 					utils.setCache('baseUrl', this.$u.http.config.baseUrl)
diff --git a/uniapp/pages/goods/goodsDetail.vue b/uniapp/pages/goods/goodsDetail.vue
index 65d6aa6..108156d 100644
--- a/uniapp/pages/goods/goodsDetail.vue
+++ b/uniapp/pages/goods/goodsDetail.vue
@@ -305,6 +305,12 @@
       if (this.memberId) {
         this.updataUser()
       }
+	  
+	  if(!getApp().globalData.hasinit)
+	  {
+		  console.log("鍒濆鍖�")
+	  	getApp().getAppInfo();
+	  }
     },
     onLoad(options) {
       this.appinfo = utils.getCacheSync('appInfo')
diff --git a/uniapp/pages/mine/mine.vue b/uniapp/pages/mine/mine.vue
index 9648712..1d99ce3 100644
--- a/uniapp/pages/mine/mine.vue
+++ b/uniapp/pages/mine/mine.vue
@@ -274,9 +274,11 @@
 		},
 		onPullDownRefresh()
 		{
+			
 			this.getuserInfo();
 			this.centerInfo();
 			this.getmoneyInfo();
+			this.getInit();
 			uni.stopPullDownRefresh();
 		},		
 		onLoad() {
@@ -285,13 +287,14 @@
 					url:"/pages/login/wxlogin"
 				})
 			}else{
-				getApp().watch(this.getInit,'appinfo')
+				getApp().watch(this.getInit,'ifwt')
 				this.centerInfo()
 				this.getbanner()
 			}
 		},
 		onShow() {
 			if(this.hasLogin){
+				this.getInit();
 				this.getmoneyInfo()
 				this.getuserInfo()
 				
@@ -300,6 +303,10 @@
 		methods: {
 			getInit()
 			{
+				if(!getApp().globalData.hasinit)
+				{
+					getApp().getAppInfo();
+				}
 					// #ifdef APP-PLUS
 					this.appInfo = uni.getStorageSync('appInfo');
 					this.showtar = getApp().globalData.ifwt == 1 ? false : true;

--
Gitblit v1.9.3