From 8f8155aa4c83f7c2577ac123add550766b6a7ce3 Mon Sep 17 00:00:00 2001 From: heyujie <516346543@qq.com> Date: 星期一, 07 六月 2021 16:53:19 +0800 Subject: [PATCH] 修改配置 --- pages/detail/detail.vue | 39 ++++++++++++++++++--------------------- 1 files changed, 18 insertions(+), 21 deletions(-) diff --git a/pages/detail/detail.vue b/pages/detail/detail.vue index ed9a900..fea7a7b 100644 --- a/pages/detail/detail.vue +++ b/pages/detail/detail.vue @@ -2,8 +2,8 @@ <view class="content"> <uni-nav-bar left-icon="back" left-text="杩斿洖" @clickLeft="goBack" title="璇︽儏" statusBar="true"></uni-nav-bar> - <view class="video-box"> - <video id="myVideo" :src=" 'http://192.168.20.10:7009' +'/httpImage/' +videoUrl"></video> + <view class="video-box" v-show="showVideo"> + <video id="myVideo" :src=" 'http://'+ getResourceUrl() +'/httpImage/' +videoUrl"></video> </view> <view class="desc-box"> <view class="first"> @@ -21,11 +21,10 @@ 鏉ヨ嚜锛歿{curInfo.pos}} </view> </view> - <!-- <image src="../../static/pic3.jpg" mode=""></image> --> <button type="default" @tap="showImg">鏌ョ湅澶у浘</button> - <imagePopper :show="showImgPopper.show" :imgSrc="showImgPopper.imgSrc" @hideImgPopper="hideImgPopper"> - </imagePopper> - <view class="tui-actionsheet-mask" :class="[showImgPopper.show?'tui-mask-show':'']" @tap="handleClickMask"> + <!-- <imagePopper :show="showImgPopper.show" :imgSrc="showImgPopper.imgSrc" @hideImgPopper="hideImgPopper"> + </imagePopper> --> + <view class="tui-actionsheet-mask" :class="[showImgPopper.show?'tui-mask-show':'']" @tap="handleClickCancel"> <image :src="showImgPopper.imgSrc" mode=""></image> </view> </view> @@ -45,7 +44,8 @@ imgSrc: "" }, curInfo: {}, - videoUrl: "" + videoUrl: "", + showVideo:true } }, onBackPress(e) { @@ -53,17 +53,16 @@ uni.navigateTo({ url: '/pages/index/index' }) - // return true }, mounted() { this.curInfo = getApp().globalData.curPageDetail uni.request({ - url: "http://192.168.20.10:9000/video/" + this.curInfo.id, + url: "http://" + getApp().globalData.requestVideoUrl+ "/video/" + this.curInfo.id, success: (res) => { console.log('request success', res.data.data.videoUrl); this.videoUrl = res.data.data.videoUrl; } - }) + }) }, methods: { goBack() { @@ -72,17 +71,16 @@ }) }, showImg() { + this.showVideo=false this.showImgPopper.show = true; - this.showImgPopper.imgSrc = 'http://192.168.20.10:7009' + '/httpImage/' + this.curInfo.imgUrl + this.showImgPopper.imgSrc = 'http://' + this.getResourceUrl() + '/httpImage/' + this.curInfo.imgUrl }, - hideImgPopper() { - this.showImgPopper.show = false; - }, - handleClickMask() { - this.handleClickCancel(); + getResourceUrl(){ + return getApp().globalData.resourseUrl }, handleClickCancel() { this.showImgPopper.show = false; + this.showVideo=true } } } @@ -92,7 +90,6 @@ uni-video { width: 100%; height: 290px; - /* height: -webkit-fill-available; */ display: inline-block; line-height: 0; overflow: hidden; @@ -174,13 +171,13 @@ visibility: hidden; uni-image { - width: 340px; - height: 240px; + width: 100%; + // height: 240px; display: inline-block; overflow: hidden; position: absolute; - top: 45%; - left: 8%; + top: 35%; + // left: 8%; z-index: 999999999; } } -- Gitblit v1.8.0