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