|
@@ -48,7 +48,12 @@
|
|
|
<span>直播</span>
|
|
|
</el-col>
|
|
|
<el-col :span="24" class="video">
|
|
|
- <video :src="dockInfo.file_path" autoplay="autoplay" controls="controls" style="height: 395px; width: 100%;">
|
|
|
+ <video
|
|
|
+ :src="dockInfo.file_path"
|
|
|
+ autoplay="autoplay"
|
|
|
+ controls="controls"
|
|
|
+ :style="{ height: `${this.user.role == 3 ? '350px' : '395px'}`, width: '100%' }"
|
|
|
+ >
|
|
|
您的浏览器不支持 video 标签。
|
|
|
</video>
|
|
|
<div class="box">
|
|
@@ -79,6 +84,16 @@
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div>
|
|
|
+ <el-row type="flex" :gutter="10" style="padding-top:10px;height:30px;line-height:30px">
|
|
|
+ <el-col :span="20">
|
|
|
+ <el-input v-model="text" size="mini"></el-input>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="4">
|
|
|
+ <el-button @click="send" size="mini" round style="background: #ff8500;color: #fff;">发送</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
<!-- <videoPlayer ref="videoPlayer" :options="videoOptions" class="vjs-custom-skin videoPlayer" :playsinline="true" /> -->
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -569,6 +584,9 @@ export default {
|
|
|
// 测试轮播
|
|
|
lunboList: [],
|
|
|
animate: false,
|
|
|
+
|
|
|
+ //现场直播对话框
|
|
|
+ text: '',
|
|
|
}),
|
|
|
created() {
|
|
|
this.$set(this, `dock_id`, this.$route.query.id);
|
|
@@ -577,7 +595,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...mapProduct({ mapProductQuery: 'newquery' }),
|
|
|
- ...market({ marketFetch: 'fetch', operaFetch: 'operaFetch' }),
|
|
|
+ ...market({ marketFetch: 'fetch', operaFetch: 'operaFetch', sendMsg: 'operationCreate' }),
|
|
|
...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
|
|
|
...expertsuser({ expertQuery: 'query' }),
|
|
|
...transaction({ tquery: 'query' }),
|
|
@@ -759,6 +777,7 @@ export default {
|
|
|
// 测试轮播
|
|
|
scroll() {
|
|
|
let con1 = this.$refs.con1;
|
|
|
+ console.log(con1);
|
|
|
con1.style.marginTop = '-30px';
|
|
|
this.animate = !this.animate;
|
|
|
var that = this; // 在异步函数中会出现this的偏移问题,此处一定要先保存好this的指向
|
|
@@ -775,9 +794,35 @@ export default {
|
|
|
mLeave() {
|
|
|
this.timer1 = setInterval(this.scroll, 1000);
|
|
|
},
|
|
|
+ //
|
|
|
+ async send() {
|
|
|
+ if (this.text != '') {
|
|
|
+ let object = { login_role: 3, type: 2, login_name: this.user.adminuser, remark: this.text, dockid: this.dock_id };
|
|
|
+ let res = await this.sendMsg(object);
|
|
|
+ this.$checkRes(res, null, res.errmsg || '发言失败');
|
|
|
+ } else this.$message.error('请输入信息后发送');
|
|
|
+ },
|
|
|
+
|
|
|
+ channel() {
|
|
|
+ this.$stomp({
|
|
|
+ [`/exchange/bullet_chat/${this.dock_id}`]: this.onMessage,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onMessage(message) {
|
|
|
+ let body = _.get(message, 'body');
|
|
|
+ if (body) {
|
|
|
+ body = JSON.parse(body);
|
|
|
+ this.lunboList.push(body);
|
|
|
+ this.text = '';
|
|
|
+ }
|
|
|
+ // const { content, contenttype, sendid, sendname, icon, groupid, sendtime, type } = message.headers;
|
|
|
+ // let object = { content, contenttype, sendid, sendname, icon, groupid, sendtime, type };
|
|
|
+ // this.list.push(object);
|
|
|
+ },
|
|
|
},
|
|
|
mounted() {
|
|
|
this.timer1 = setInterval(this.scroll, 2000);
|
|
|
+ this.channel();
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
@@ -908,7 +953,7 @@ export default {
|
|
|
margin: 0 10px 10px 10px;
|
|
|
border: 2px solid #ccc;
|
|
|
width: 97%;
|
|
|
- background-color: #000;
|
|
|
+ // background-color: #000;
|
|
|
}
|
|
|
.livemain .livevideo .right {
|
|
|
height: 460px;
|