|
@@ -2,6 +2,9 @@
|
|
|
<div id="roomsDetail">
|
|
|
<el-row>
|
|
|
<el-col :span="24" class="info">
|
|
|
+ <el-col :span="24" class="title">
|
|
|
+ <span>{{ roomInfos.title }}</span>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24" class="video">
|
|
|
<el-col :span="15" class="videoLeft">
|
|
|
<div id="look-video-left" class="video-box col-div" style="justify-content: flex-end"></div>
|
|
@@ -10,17 +13,16 @@
|
|
|
<div id="look-video-right" class="video-box col-div" style="justify-content: flex-end"></div>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24" class="num">
|
|
|
+ <span>观看:{{ total }}</span>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24" class="chat">
|
|
|
- <el-col :span="24" class="chatList">
|
|
|
- 聊天列表
|
|
|
- </el-col>
|
|
|
- <el-col :span="24" class="chatInput">
|
|
|
- <el-col :span="19" class="input">
|
|
|
- <el-input v-model="input"></el-input>
|
|
|
- </el-col>
|
|
|
- <el-col :span="5" class="btn">
|
|
|
- <el-button type="primary" size="mini" @click="onSubmit">发送</el-button>
|
|
|
- </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <van-swipe :autoplay="3000">
|
|
|
+ <van-swipe-item v-for="(advert, index) in roomInfos.adverts" :key="index">
|
|
|
+ <img width="100%" height="100%" v-lazy="advert.imgdir" />
|
|
|
+ </van-swipe-item>
|
|
|
+ </van-swipe>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -31,6 +33,13 @@
|
|
|
<script>
|
|
|
import TRTC from 'trtc-js-sdk';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
+import Vue from 'vue';
|
|
|
+import { Swipe, SwipeItem, Lazyload } from 'vant';
|
|
|
+import { Image as VanImage } from 'vant';
|
|
|
+Vue.use(Swipe);
|
|
|
+Vue.use(SwipeItem);
|
|
|
+Vue.use(VanImage);
|
|
|
+Vue.use(Lazyload);
|
|
|
const { mapActions: gensign } = createNamespacedHelpers('gensign');
|
|
|
const { mapActions: room } = createNamespacedHelpers('room');
|
|
|
export default {
|
|
@@ -43,15 +52,19 @@ export default {
|
|
|
localStream_: null,
|
|
|
sdkAppId_: '1400380125',
|
|
|
userId_: '',
|
|
|
+ roomInfos: {},
|
|
|
+ sendmemo: '',
|
|
|
+ total: 0,
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
this.initclient();
|
|
|
this.lookuserSearch();
|
|
|
+ this.lookusercountsel();
|
|
|
},
|
|
|
methods: {
|
|
|
...gensign(['gensignFetch']),
|
|
|
- ...room(['lookuserFetch']),
|
|
|
+ ...room(['lookuserFetch', 'fetch', 'lookusercount']),
|
|
|
async lookuserSearch() {
|
|
|
let data = {};
|
|
|
data.roomid = this.id;
|
|
@@ -59,10 +72,23 @@ export default {
|
|
|
data.userid = this.user.userid;
|
|
|
data.username = this.user.name;
|
|
|
const res = await this.lookuserFetch(data);
|
|
|
- console.log(res);
|
|
|
+ // 根据房间id查询房间详细信息
|
|
|
+ let result = await this.fetch(this.id);
|
|
|
+ if (this.$checkRes(result)) {
|
|
|
+ console.log(result.data);
|
|
|
+ this.$set(this, `roomInfos`, result.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async lookusercountsel() {
|
|
|
+ // 根据房间id查询房间详细信息
|
|
|
+ let result = await this.lookusercount({ roomname: this.roomname });
|
|
|
+ if (this.$checkRes(result)) {
|
|
|
+ console.log(result.total);
|
|
|
+ this.$set(this, `total`, result.total);
|
|
|
+ }
|
|
|
},
|
|
|
onSubmit() {
|
|
|
- console.log(this.input);
|
|
|
+ console.log(this.sendmemo);
|
|
|
},
|
|
|
async initclient() {
|
|
|
this.userId_ = this.user.uid;
|
|
@@ -119,8 +145,14 @@ export default {
|
|
|
|
|
|
<style lang="less" scoped>
|
|
|
.info {
|
|
|
+ .title {
|
|
|
+ text-align: center;
|
|
|
+ padding: 10px 0;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
.video {
|
|
|
- background: #fff;
|
|
|
+ background: #000;
|
|
|
margin: 0 0 10px 0;
|
|
|
.videoLeft {
|
|
|
height: 200px;
|
|
@@ -129,24 +161,22 @@ export default {
|
|
|
height: 200px;
|
|
|
}
|
|
|
}
|
|
|
+ .num {
|
|
|
+ padding: 10px 0;
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
.chat {
|
|
|
background: #fff;
|
|
|
padding: 10px;
|
|
|
- .chatList {
|
|
|
- border: 1px solid #ccc;
|
|
|
- min-height: 300px;
|
|
|
- margin: 0 0 10px 0;
|
|
|
- border-radius: 10px;
|
|
|
- padding: 5px 10px;
|
|
|
- }
|
|
|
- .chatInput {
|
|
|
- .el-button {
|
|
|
- width: 100%;
|
|
|
- padding: 13px 0;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
}
|
|
|
+.my-swipe .van-swipe-item {
|
|
|
+ color: #fff;
|
|
|
+ font-size: 20px;
|
|
|
+ line-height: 150px;
|
|
|
+ text-align: center;
|
|
|
+ background-color: #39a9ed;
|
|
|
+}
|
|
|
/deep/.video-js {
|
|
|
height: 190px !important;
|
|
|
border-radius: 10px;
|