|
@@ -4,7 +4,7 @@
|
|
|
<el-col :span="24" class="main">
|
|
|
<el-col :span="24" class="video">
|
|
|
<el-link :underline="false" class="back" @click="back()"><i class="el-icon-arrow-left"></i></el-link>
|
|
|
- <el-col :span="24" class="videoone" v-if="videodock.file_path != null || ''">
|
|
|
+ <el-col :span="24" class="videoone" v-if="videodock.file_path != 'video'">
|
|
|
<video :src="videodock.file_path" autoplay="" controls="controls">
|
|
|
您的浏览器不支持 video 标签。
|
|
|
</video>
|
|
@@ -93,8 +93,6 @@ export default {
|
|
|
dock_id: '',
|
|
|
// 视频信息
|
|
|
videodock: {},
|
|
|
- // 倒计时查询详情
|
|
|
- times: 5,
|
|
|
//展会详情
|
|
|
dockinfo: [],
|
|
|
// 聊天
|
|
@@ -125,6 +123,9 @@ export default {
|
|
|
await this.search();
|
|
|
await this.seachLunbo();
|
|
|
},
|
|
|
+ mounted() {
|
|
|
+ this.channel();
|
|
|
+ },
|
|
|
methods: {
|
|
|
...dock({ dockQuery: 'query', dockFetch: 'fetch' }),
|
|
|
...exportuser({ expertQuery: 'query' }),
|
|
@@ -166,25 +167,13 @@ export default {
|
|
|
this.$set(this, `lunboList`, res.data);
|
|
|
}
|
|
|
},
|
|
|
- //倒计时查询展会视频详情
|
|
|
- counttime() {
|
|
|
- this.timer = setInterval(() => {
|
|
|
- this.times--;
|
|
|
- if (this.times === 0) {
|
|
|
- this.searchvideo();
|
|
|
- this.times = 5;
|
|
|
- clearInterval(this.timer);
|
|
|
- }
|
|
|
- }, 1000);
|
|
|
+ channel() {
|
|
|
+ this.$stomp({
|
|
|
+ [`/exchange/dock_video/${this.dock_id}`]: this.onMessage,
|
|
|
+ });
|
|
|
},
|
|
|
- async searchvideo() {
|
|
|
- if (this.dock_id) {
|
|
|
- let res = await this.dockFetch(this.dock_id);
|
|
|
- if (this.$checkRes(res)) {
|
|
|
- // 对接会详情
|
|
|
- this.$set(this, `videodock`, res.data);
|
|
|
- }
|
|
|
- }
|
|
|
+ onMessage(message) {
|
|
|
+ this.$set(this.dockInfo, `file_path`, message.body);
|
|
|
},
|
|
|
// 专家详情
|
|
|
expertBtn(data) {
|
|
@@ -201,17 +190,7 @@ export default {
|
|
|
return this.$route.query.id;
|
|
|
},
|
|
|
},
|
|
|
- watch: {
|
|
|
- times: {
|
|
|
- immediate: true,
|
|
|
- deep: true,
|
|
|
- handler(val) {
|
|
|
- if (val && val == 5) {
|
|
|
- this.counttime();
|
|
|
- }
|
|
|
- },
|
|
|
- },
|
|
|
- },
|
|
|
+ watch: {},
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
|
},
|