Jacob
2026-10-12 85aed6cbf2e5693f980e182febd113b3b13f8813
pages/zone/index.vue
....@@ -25,6 +25,24 @@
2525 <view class="head_img">
2626 <image :src="info.image"></image>
2727 </view>
28
+ <view v-if="info.zoneType == 8 && info.info" class="rich-content">
29
+ <rich-text :nodes="info.info"></rich-text>
30
+ </view>
31
+ <view v-if="info.zoneType == 8 && info.uploadVideo" class="video-wrap">
32
+ <view v-show="!videoControls" style="width:100%;height:750rpx">
33
+ <video id="zoneVideo" :src='info.uploadVideo' objectFit="contain" controls
34
+ style="width:100%;height:100%" show-center-play-btn="true" show-mute-btn="true" muted="true"
35
+ show-fullscreen-btn="true" auto-pause-if-navigate :custom-cache="false"
36
+ :enable-progress-gesture="true" show-progress="false"
37
+ :poster="info.uploadVideoImg || info.image" @pause="zoneVideoPause"></video>
38
+ </view>
39
+ <view class="video-poster" v-show="videoControls">
40
+ <image class="image" :src="info.uploadVideoImg || info.image"></image>
41
+ </view>
42
+ <view class="video-stop" v-show="videoControls" @tap="bindZoneVideoPlay">
43
+ <image class="image" src="https://ossacmall.bluedeer.com.cn/app/static/images/stop.png"></image>
44
+ </view>
45
+ </view>
2846 <view class="tag-wrap-container" :style="'top:' + (marTop) + 'px;'" v-if="info.zoneType == 7">
2947 <view class="tag-wrap">
3048 <!-- 标签列表 -->
....@@ -596,6 +614,8 @@
596614 isYueyangZone: false,
597615 isOpen: false, // 默认收起,false收起/true展开
598616 currentIndex: -1, // 默认选中第一个【全部】
617
+ videoControls: true, // 专区活动视频是否显示海报+播放按钮
618
+ zoneVideoContext: '', // 活动视频播放上下文
599619 partitionList: [],
600620 partitionProject: {},
601621 tagList: [],
....@@ -835,6 +855,17 @@
835855 }
836856 },
837857 methods: {
858
+ /**
859
+ * 专区活动视频:点击海报播放按钮后播放
860
+ */
861
+ bindZoneVideoPlay() {
862
+ if (!this.zoneVideoContext) {
863
+ this.zoneVideoContext = uni.createVideoContext('zoneVideo', this);
864
+ }
865
+ this.$set(this, 'videoControls', false);
866
+ this.zoneVideoContext.play();
867
+ },
868
+ zoneVideoPause() { },
838869 handleCouponRule() {
839870 this.$refs.personalAndShareCouponRuleRef.show(this.info.ruleContentText)
840871 },
....@@ -1449,6 +1480,7 @@
14491480 console.log('专区详情入参::', params)
14501481 getZoneDetail(that.id, params).then(res => {
14511482 that.info = res.data;
1483
+ //that.info.zoneType=8;
14521484 that.updateZoneShareMenu();
14531485 if (res.data.zoneType == 6) {
14541486 that.setYueyangZone()
....@@ -1850,6 +1882,48 @@
18501882 }
18511883 }
18521884
1885
+.rich-content {
1886
+ padding: 24rpx 30rpx;
1887
+ background-color: #fff;
1888
+}
1889
+
1890
+.video-wrap {
1891
+ position: relative;
1892
+ width: 100%;
1893
+ height: 750rpx;
1894
+ background-color: #000;
1895
+}
1896
+
1897
+.video-wrap .video-poster {
1898
+ position: absolute;
1899
+ top: 0;
1900
+ left: 0;
1901
+ width: 100%;
1902
+ height: 750rpx;
1903
+ z-index: 9;
1904
+}
1905
+
1906
+.video-wrap .video-poster .image {
1907
+ width: 100%;
1908
+ height: 100%;
1909
+}
1910
+
1911
+.video-wrap .video-stop {
1912
+ position: absolute;
1913
+ top: 50%;
1914
+ left: 50%;
1915
+ width: 136rpx;
1916
+ height: 136rpx;
1917
+ margin-top: -68rpx;
1918
+ margin-left: -68rpx;
1919
+ z-index: 9;
1920
+}
1921
+
1922
+.video-wrap .video-stop .image {
1923
+ width: 100%;
1924
+ height: 100%;
1925
+}
1926
+
18531927 .toolbarList {
18541928 width: 750rpx;
18551929 position: -webkit-sticky;