This commit is contained in:
2024-04-11 15:33:58 +08:00
parent 2ad1790eff
commit c1b21a6c0e
2 changed files with 14 additions and 5 deletions

View File

@ -79,7 +79,7 @@
}
} else {
uni.navigateTo({
url: `/pagesC/noticedetails/noticedetails?item=${JSON.stringify(item)}&title=${this.title}&messageNo=${item.messageNo}&actId=${item.actId}`
url: `/pagesC/noticedetails/noticedetails?item=${JSON.stringify(item)}&title=${this.title}&videoId=${item.videoId}&messageNo=${item.messageNo}&actId=${item.actId}`
})
}
},

View File

@ -11,7 +11,7 @@
</view>
<view class="" style="height: 2rpx;width: 100%;background-color: #f6f6f6;">
</view>
<video v-if="messageNo" id="myVideo" @timeupdate="videoFun" :src="messageNo" :initial-time="initial_time"
<video v-if="videoId" id="myVideo" @timeupdate="videoFun" :src="messageNo" :initial-time="initial_time"
@ended='ended' />
<view class="text">
<text>{{currentItem.content}}</text>
@ -34,7 +34,8 @@
video_real_time: 0, //
nitial_time: '', //
actId: '',
cardNo: uni.getStorageSync('userinfo').cardNo
cardNo: uni.getStorageSync('userinfo').cardNo,
videoId: null,
};
},
onReady() { //
@ -43,16 +44,24 @@
});
},
onLoad(options) {
this.actId = options.actId
this.initial_time = '0' //
this.title = options.title
this.currentItem = JSON.parse(options.item)
if (options.messageNo) {
this.messageNo = baseurl + `/applet/message/preview/${options.messageNo}`
}
if (options.actId) {
this.actId = options.actId
this.videoId = options.videoId
if (!this.videoId) {
setTimeout(() => {
this.ended();
}, 5000)
}
}
},
methods: {
ended(e) {
ended() {
videoadd(this.cardNo, this.actId).then(res => {
if (res.code == 200) {
this.$refs.uToast.show({