|
@@ -229,12 +229,14 @@ export default {
|
|
|
this.lookusercountsel();
|
|
|
this.chatSearch();
|
|
|
this.userswichrole();
|
|
|
+ this.lookonlineup('1');
|
|
|
},
|
|
|
mounted() {
|
|
|
this.channel();
|
|
|
},
|
|
|
destroyed() {
|
|
|
const that = this;
|
|
|
+ this.lookonlineup('0');
|
|
|
window.addEventListener('pagehide', function() {
|
|
|
console.log('页面要关闭了');
|
|
|
that.recordSave();
|
|
@@ -242,11 +244,18 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
...gensign(['gensignFetch']),
|
|
|
- ...room(['lookuserFetch', 'fetch', 'lookusercount', 'lookquery', 'lookupdate', 'lookrecord', 'lookuserswichrole']),
|
|
|
+ ...room(['lookuserFetch', 'fetch', 'lookusercount', 'lookquery', 'lookupdate', 'lookrecord', 'lookuserswichrole', 'lookupdateonline']),
|
|
|
...chat(['query', 'create']),
|
|
|
...quest(['questfetch']),
|
|
|
...uploadquestion({ upcreate: 'create', upquery: 'query' }),
|
|
|
...mapWeiXin(['support']),
|
|
|
+ async lookonlineup(isonline) {
|
|
|
+ const data = {};
|
|
|
+ data.roomid = this.id;
|
|
|
+ data.userid = this.user.uid;
|
|
|
+ data.isonline = isonline;
|
|
|
+ const res = await this.lookupdateonline(data);
|
|
|
+ },
|
|
|
reviewVideo(newstrem, newid, oldstrem, oldid) {
|
|
|
oldstrem.stop();
|
|
|
newstrem.stop();
|