From 48dd8be3d25e5b6d8bfa57ad757569f470f5ff74 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期五, 12 七月 2024 15:49:25 +0800
Subject: [PATCH] update组件

---
 App.vue |   90 +++++++++++++++++++++-----------------------
 1 files changed, 43 insertions(+), 47 deletions(-)

diff --git a/App.vue b/App.vue
index 6bdaa3c..b44273d 100644
--- a/App.vue
+++ b/App.vue
@@ -1,74 +1,70 @@
 <script>
 	// 合伙人: "appid" : "wx6d0ecc4e18710458",
-	// 花农: "appid" : "wx3203fd935a6ffe09",
+	// 花农: "appid" : "wx3203fd935a6ffe09",
 	// 花店 wx1441324401626290
 	import storage from '@/plugins/storage.js'
 
 	export default {
 		onLaunch: function(options) {
 
-			// #ifdef MP
-			// {
-			// 	if(decodeURIComponent(options.query.q))
-			// 	if (options.inviter) {
-			// 		//说明是邀请的,需要保存下来,
-			// 		this.$storage.setItem('inviter', options.inviter)
-			// 		//有效24小时
-			// 		this.$storage.setItem('inviterTime', new Date().getTime())
-
-			// 	}
-			// 	if (options.inviterName) {
-			// 		this.$storage.setItem('inviterName', options.inviterName)
-			// 		this.inviterName = options.inviterName
-			// 	}else{
-			// 		this.inviterName = this.$storage.getItem('inviterName') || ''
-			// 	}
-			// }
-			// #endif
 			console.warn('当前组件仅支持 uni_modules 目录结构 ,请升级 HBuilderX 到 3.1.0 版本以上!')
 			console.log('App Launch')
 			uni.getSystemInfo({
 				success: (e) => {
-					// this.globalData.StatusBar = e.statusBarHeight;
-					let custom = uni.getMenuButtonBoundingClientRect();
-					// this.globalData.Custom = custom;
-					// this.globalData.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
-					uni.setStorageSync('StatusBar', e.statusBarHeight);
-					uni.setStorageSync('CustomBar', (custom.bottom + custom.top - e.statusBarHeight));
+					try {
+						let custom = uni.getMenuButtonBoundingClientRect();
+						uni.setStorageSync('StatusBar', e.statusBarHeight);
+						uni.setStorageSync('CustomBar', (custom.bottom + custom.top - e.statusBarHeight));
+					} catch (e) {
+						console.error('e', e)
+					}
 				}
 			});
 			// #ifdef MP
 			if (true && storage.getItem('token')) {
 				setTimeout(async () => {
 					const res = await this.$store.dispatch('getCurrentInfo');
-					// console.log('init info',res,this.currentInfo)
-					// #ifdef PUB_CUSTOMER
-					if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
-						uni.reLaunch({
-							url: '/pages/home/supplier-home'
-						})
-					}
+					// #ifndef PUB_CUSTOMER
+					if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
+						uni.reLaunch({
+							url: '/pages/home/supplier-home'
+						})
+					} else {
+						uni.reLaunch({
+							url: '/pages/login/supplier-login'
+						})
+					}
 					// #endif
 				}, 200);
 			} else {
-
+				// #ifndef PUB_CUSTOMER
+				uni.reLaunch({
+					url: '/pages/login/supplier-login'
+				})
+				// #endif
 			}
 			// #endif
-			// #ifdef H5
-			if (true && storage.getItem('token')) {
-				setTimeout(async () => {
-					const res = await this.$store.dispatch('getCurrentInfo');
-					// console.log('init info',res,this.currentInfo)
-					if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
-						// uni.reLaunch({
-						// 	url: '/pages/home/supplier-home'
-						// })
-					}
-				}, 200);
-			} else {
-
-			}
+			// #ifdef PUB_CUSTOMER
+			uni.reLaunch({
+				url: '/pages/home/home'
+			})
 			// #endif
+
+			// // #ifdef H5
+			// if (true && storage.getItem('token')) {
+			// 	setTimeout(async () => {
+			// 		const res = await this.$store.dispatch('getCurrentInfo');
+			// 		// console.log('init info',res,this.currentInfo)
+			// 		if (this.currentInfo && this.currentInfo.id && !this.currentInfo.openId) {
+			// 			// uni.reLaunch({
+			// 			// 	url: '/pages/home/supplier-home'
+			// 			// })
+			// 		}
+			// 	}, 200);
+			// } else {
+
+			// }
+			// // #endif
 		},
 
 		onReady() {

--
Gitblit v1.9.3