From 4885600ecc369aa2e30a65de8dd7a410f13c34df Mon Sep 17 00:00:00 2001
From: heyujie <516346543@qq.com>
Date: 星期一, 24 五月 2021 11:25:04 +0800
Subject: [PATCH] 解决app通信问题

---
 pages/detail/detail.vue |   64 ++++++++++++++++++++++----------
 1 files changed, 44 insertions(+), 20 deletions(-)

diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue
index e152b53..ed9a900 100644
--- a/pages/detail/detail.vue
+++ b/pages/detail/detail.vue
@@ -1,9 +1,9 @@
 <template>
 	<view class="content">
-		<uni-nav-bar left-icon="back" left-text="杩斿洖" @clickLeft="goBack" title="璇︽儏"></uni-nav-bar>
+		<uni-nav-bar left-icon="back" left-text="杩斿洖" @clickLeft="goBack" title="璇︽儏" statusBar="true"></uni-nav-bar>
 
 		<view class="video-box">
-			<video id="myVideo" :src="'/httpImage/' +videoUrl"></video>
+			<video id="myVideo" :src=" 'http://192.168.20.10:7009'        +'/httpImage/' +videoUrl"></video>
 		</view>
 		<view class="desc-box">
 			<view class="first">
@@ -21,9 +21,13 @@
 				鏉ヨ嚜锛歿{curInfo.pos}}
 			</view>
 		</view>
+		<!-- <image src="../../static/pic3.jpg" mode=""></image> -->
 		<button type="default" @tap="showImg">鏌ョ湅澶у浘</button>
-		<imagePopper :show="showImgPopper.show" :imgSrc="'/httpImage/'+curInfo.imgUrl" @hideImgPopper="hideImgPopper">
+		<imagePopper :show="showImgPopper.show" :imgSrc="showImgPopper.imgSrc" @hideImgPopper="hideImgPopper">
 		</imagePopper>
+		<view class="tui-actionsheet-mask" :class="[showImgPopper.show?'tui-mask-show':'']" @tap="handleClickMask">
+			<image :src="showImgPopper.imgSrc" mode=""></image>
+		</view>
 	</view>
 </template>
 
@@ -44,7 +48,6 @@
 				videoUrl: ""
 			}
 		},
-
 		onBackPress(e) {
 			console.log(e);
 			uni.navigateTo({
@@ -57,8 +60,8 @@
 			uni.request({
 				url: "http://192.168.20.10:9000/video/" + this.curInfo.id,
 				success: (res) => {
-					console.log('request success',res.data.data.videoUrl);
-					this.videoUrl =res.data.data.videoUrl;
+					console.log('request success', res.data.data.videoUrl);
+					this.videoUrl = res.data.data.videoUrl;
 				}
 			})
 		},
@@ -70,25 +73,17 @@
 			},
 			showImg() {
 				this.showImgPopper.show = true;
+				this.showImgPopper.imgSrc = 'http://192.168.20.10:7009' + '/httpImage/' + this.curInfo.imgUrl
 			},
-
 			hideImgPopper() {
 				this.showImgPopper.show = false;
 			},
-			getLevel(level) {
-				switch (level) {
-					case 1:
-						return "涓�绾�"
-					case 2:
-						return "浜岀骇"
-					case 3:
-						return "涓夌骇"
-					case 4:
-						return "鍥涚骇"
-					default:
-						break;
-				}
+			handleClickMask() {
+				this.handleClickCancel();
 			},
+			handleClickCancel() {
+				this.showImgPopper.show = false;
+			}
 		}
 	}
 </script>
@@ -165,4 +160,33 @@
 		line-height: 2.4;
 		border-radius: 15px;
 	}
+
+	.tui-actionsheet-mask {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background: rgba(0, 0, 0, 0.6);
+		z-index: 999999999;
+		transition: all 0.3s ease-in-out;
+		opacity: 0;
+		visibility: hidden;
+
+		uni-image {
+			width: 340px;
+			height: 240px;
+			display: inline-block;
+			overflow: hidden;
+			position: absolute;
+			top: 45%;
+			left: 8%;
+			z-index: 999999999;
+		}
+	}
+
+	.tui-mask-show {
+		opacity: 1;
+		visibility: visible;
+	}
 </style>

--
Gitblit v1.8.0