From 0e1bce71603c5cbb92b3fe6387c87430528d18a9 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期二, 18 七月 2023 16:14:45 +0800
Subject: [PATCH] no message

---
 uniapp/pages/rankinglist/fengqiang.vue |   61 ++++++++++++++++++++++++------
 1 files changed, 49 insertions(+), 12 deletions(-)

diff --git a/uniapp/pages/rankinglist/fengqiang.vue b/uniapp/pages/rankinglist/fengqiang.vue
index ea3a51d..5a9ad31 100644
--- a/uniapp/pages/rankinglist/fengqiang.vue
+++ b/uniapp/pages/rankinglist/fengqiang.vue
@@ -1,15 +1,23 @@
 <template>
-	<view>
+	<view v-if="isshowtype">
+		<matherPage></matherPage>
+	</view>
+	<view v-else>
 		<web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view>
 	</view>
 </template>
 
 <script>
+		import matherPage from '@/components/sh_page/matherPage.vue';
 	var wv
 	export default {
+		components:{
+			matherPage
+		},
 		data() {
 			return {
 				webviewUrl: '',
+				isshowtype:false,
 				webviewStyles: {
 					progress: {
 						color: '#EE1B14'
@@ -17,26 +25,55 @@
 				},
 			}
 		},
+		onShow()
+		{
+			// #ifdef APP-PLUS
+			var showtar = getApp().globalData.ifwt == 1 ? false : true;
+			var platform = plus.os.name;
+			//showtar&&platform=='iOS'
+			if(showtar&&platform=='iOS')
+			{//璺宠浆new
+				this.isshowtype=true;
+				
+				return;
+			}
+			// #endif
+		},
 		onLoad(options) {
-			//console.log(options);
-			const value = uni.getStorageSync('userInfo');
-			console.log(value.token);
-			this.webviewUrl = encodeURI('http://dfgapp.ushopvip.com/html/fengqiangbang.html?token='+value.token);
+			if(!this.hasLogin){
+				uni.reLaunch({
+					url:"/pages/login/wxlogin"
+				})
+			}
+			else{
+				const value = uni.getStorageSync('userInfo');
+				console.log(value);
+				//this.webviewUrl = encodeURI('http://appapitest.ushopvip.com/html/fengqiangbang.html?token='+value.token);
+				this.webviewUrl = encodeURI('http://dfgapp.ushopvip.com/html/fengqiangbang.html?token='+value.token);
+			}
+			
 		},
 		onReady() {
 		  this.clearMuiBack();
 		},
 		methods: {
 			received(e) {
-				console.log(e.detail.data[0].type)
-				if(e.detail.data[0].type=='getToken'){
-					const token = uni.getStorageSync('userInfo').token;
-					var currentWebview = this.$scope.$getAppWebview()
-					var wv = currentWebview.children()[0]
-					wv.evalJS('localStorage.setItem("ZZTOKEN",' + JSON.stringify(token) + ')');
+				var res=e.detail.data[0];
+				console.log(res);
+				switch(res.action)
+				{
+					case "back"://杩斿洖
+						this.backLast();
+						break;
 				}
 			},
-			
+			backLast()
+			{
+				console.log("杩斿洖")
+				uni.navigateBack({
+					delta: 1
+				});
+			},
 			// 鍏抽棴mui杩斿洖
 			  clearMuiBack() {
 			    // #ifdef APP-PLUS

--
Gitblit v1.9.3