From 433c5ab2fd2a6fd48fb931b5070b742503a99a6b Mon Sep 17 00:00:00 2001
From: Jacob <hlnie@tohours.com>
Date: 星期五, 23 十月 2026 13:35:07 +0800
Subject: [PATCH] Merge branch 'dev' into sit
---
pages/zone/index.vue | 93 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 86 insertions(+), 7 deletions(-)
diff --git a/pages/zone/index.vue b/pages/zone/index.vue
index 9d4b6d0..d55a838 100644
--- a/pages/zone/index.vue
+++ b/pages/zone/index.vue
@@ -29,6 +29,24 @@
<view class="head_img">
<image :src="info.image"></image>
</view>
+ <view v-if="info.zoneType == 8 && info.info" class="rich-content">
+ <rich-text :nodes="info.info"></rich-text>
+ </view>
+ <view v-if="info.zoneType == 8 && info.uploadVideo" class="video-wrap">
+ <view v-show="!videoControls" style="width:100%;height:750rpx">
+ <video id="zoneVideo" :src='info.uploadVideo' objectFit="contain" controls
+ style="width:100%;height:100%" show-center-play-btn="true" show-mute-btn="true" muted="true"
+ show-fullscreen-btn="true" auto-pause-if-navigate :custom-cache="false"
+ :enable-progress-gesture="true" show-progress="false"
+ :poster="info.uploadVideoImg || info.image" @pause="zoneVideoPause"></video>
+ </view>
+ <view class="video-poster" v-show="videoControls">
+ <image class="image" :src="info.uploadVideoImg || info.image"></image>
+ </view>
+ <view class="video-stop" v-show="videoControls" @tap="bindZoneVideoPlay">
+ <image class="image" src="https://ossacmall.bluedeer.com.cn/app/static/images/stop.png"></image>
+ </view>
+ </view>
<view class="tag-wrap-container" :style="'top:' + (marTop) + 'px;'" v-if="info.zoneType == 7">
<view class="tag-wrap">
<!-- 鏍囩鍒楄〃 -->
@@ -71,7 +89,8 @@
</view>
</view>
</view>
- <view @click="goLottery" class="lottery_banner" v-if="info && info.isLottery && info.lotteryBanner">
+ <view @click="goLottery" class="lottery_banner"
+ v-if="info && info.isLottery && info.lotteryBanner && lotteryBannerReady">
<image class="lottery_bannerImg" :src="info.lotteryBanner" mode="widthFix"
:style="{ height: lotteryBannerHeight }">
</image>
@@ -600,6 +619,8 @@
isYueyangZone: false,
isOpen: false, // 榛樿鏀惰捣锛宖alse鏀惰捣/true灞曞紑
currentIndex: -1, // 榛樿閫変腑绗竴涓�愬叏閮ㄣ��
+ videoControls: true, // 涓撳尯娲诲姩瑙嗛鏄惁鏄剧ず娴锋姤+鎾斁鎸夐挳
+ zoneVideoContext: '', // 娲诲姩瑙嗛鎾斁涓婁笅鏂�
partitionList: [],
partitionProject: {},
tagList: [],
@@ -624,6 +645,7 @@
urlOption: {},
homeTop: '200',
lotteryBannerHeight: '', //鎶藉banner棰勮绠楅珮搴︼紙rpx锛夛紝绌哄瓧绗︿覆琛ㄧず鏈彇鍒帮紝鎸夊師閫昏緫鑷�傚簲
+ lotteryBannerReady: false, //鏄惁宸叉嬁鍒癰anner灏哄锛堟垨宸茬‘璁ゆ嬁涓嶅埌锛夛紝鏈氨缁墠涓嶆覆鏌擄紝閬垮厤棣栧抚鎾戦珮
hasNewPop: false,
leftCoupon: {},
rightCoupon: {},
@@ -840,6 +862,17 @@
}
},
methods: {
+ /**
+ * 涓撳尯娲诲姩瑙嗛锛氱偣鍑绘捣鎶ユ挱鏀炬寜閽悗鎾斁
+ */
+ bindZoneVideoPlay() {
+ if (!this.zoneVideoContext) {
+ this.zoneVideoContext = uni.createVideoContext('zoneVideo', this);
+ }
+ this.$set(this, 'videoControls', false);
+ this.zoneVideoContext.play();
+ },
+ zoneVideoPause() { },
handleCouponRule() {
this.$refs.personalAndShareCouponRuleRef.show(this.info.ruleContentText)
},
@@ -1455,15 +1488,23 @@
setLotteryBannerSize(info) {
let that = this
that.lotteryBannerHeight = ''
- if (!info || !info.isLottery || !info.lotteryBanner) return
+ that.lotteryBannerReady = false
+ if (!info || !info.isLottery || !info.lotteryBanner) {
+ that.lotteryBannerReady = true
+ return
+ }
uni.getImageInfo({
src: info.lotteryBanner,
success: (img) => {
if (img.width > 0 && img.height > 0) {
that.lotteryBannerHeight = (690 * img.height / img.width).toFixed(2) + 'rpx'
}
+ that.lotteryBannerReady = true
},
- fail: () => { }
+ fail: (err) => {
+ console.warn('鎶藉banner灏哄棰勫彇澶辫触锛屽洖閫�涓鸿嚜閫傚簲', err)
+ that.lotteryBannerReady = true
+ }
})
},
getZoneDetail: function () {
@@ -1473,11 +1514,7 @@
console.log('涓撳尯璇︽儏鍏ュ弬锛氾細', params)
getZoneDetail(that.id, params).then(res => {
that.info = res.data;
-<<<<<<< Updated upstream
-=======
- //that.info.zoneType=8;
that.setLotteryBannerSize(res.data);
->>>>>>> Stashed changes
that.updateZoneShareMenu();
if (res.data.zoneType == 6) {
that.setYueyangZone()
@@ -1893,6 +1930,48 @@
}
}
+.rich-content {
+ padding: 24rpx 30rpx;
+ background-color: #fff;
+}
+
+.video-wrap {
+ position: relative;
+ width: 100%;
+ height: 750rpx;
+ background-color: #000;
+}
+
+.video-wrap .video-poster {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 750rpx;
+ z-index: 9;
+}
+
+.video-wrap .video-poster .image {
+ width: 100%;
+ height: 100%;
+}
+
+.video-wrap .video-stop {
+ position: absolute;
+ top: 50%;
+ left: 50%;
+ width: 136rpx;
+ height: 136rpx;
+ margin-top: -68rpx;
+ margin-left: -68rpx;
+ z-index: 9;
+}
+
+.video-wrap .video-stop .image {
+ width: 100%;
+ height: 100%;
+}
+
.toolbarList {
width: 750rpx;
position: -webkit-sticky;
--
Gitblit v1.4.0