|
@@ -107,6 +107,7 @@ export default {
|
|
|
this.lookuserSearch();
|
|
|
this.lookusercountsel();
|
|
|
this.chatSearch();
|
|
|
+ this.userswichrole();
|
|
|
},
|
|
|
mounted() {
|
|
|
this.channel();
|
|
@@ -114,7 +115,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...gensign(['gensignFetch']),
|
|
|
- ...room(['lookuserFetch', 'fetch', 'lookusercount']),
|
|
|
+ ...room(['lookuserFetch', 'fetch', 'lookusercount', 'lookuserswichrole']),
|
|
|
...chat(['query', 'create']),
|
|
|
async chatSearch({ skip = 0, limit = 1000 } = {}) {
|
|
|
const info = { roomid: this.id };
|
|
@@ -208,6 +209,15 @@ export default {
|
|
|
this.$set(this, `total`, result.total);
|
|
|
}
|
|
|
},
|
|
|
+ async userswichrole() {
|
|
|
+ // 根据房间id查询房间详细信息
|
|
|
+ let result = await this.lookuserswichrole({ roomid: this.id, userid: this.user.uid });
|
|
|
+ if (this.$checkRes(result)) {
|
|
|
+ if (result.data.switchrole === 'anchor') {
|
|
|
+ this.switchbtn = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async initclient() {
|
|
|
this.userId_ = this.user.uid;
|
|
|
const res = await this.gensignFetch({ userid: this.userId_ });
|