diff --git a/app.js b/app.js index 2aff100..d060b53 100644 --- a/app.js +++ b/app.js @@ -1,5 +1,7 @@ App({ onShow() { - + wx.setKeepScreenOn({ + keepScreenOn: true, + }); } }); diff --git a/pages/meeting/index.scss b/pages/meeting/index.scss index 88d8847..8172d58 100644 --- a/pages/meeting/index.scss +++ b/pages/meeting/index.scss @@ -142,6 +142,39 @@ &-smallvideo { overflow-y: auto; + position: relative; + + &-up { + position: fixed; + z-index: 5; + right: 7.4%; + top: 14%; + color: white; + background-color: rgba(0, 0, 0, 0.5); + border: 1px white solid; + width: 30rpx; + height: 20rpx; + display: flex; + align-items: center; + justify-content: center; + opacity: 0.4; + } + + &-down { + position: fixed; + z-index: 5; + right: 7.4%; + bottom: 14%; + color: white; + background-color: rgba(0, 0, 0, 0.5); + border: 1px white solid; + width: 30rpx; + height: 20rpx; + display: flex; + align-items: center; + justify-content: center; + opacity: 0.4; + } &-box { height: calc(100% / 3); diff --git a/pages/meeting/index.ts b/pages/meeting/index.ts index 939950f..2cee59c 100644 --- a/pages/meeting/index.ts +++ b/pages/meeting/index.ts @@ -76,6 +76,7 @@ Page({ currentUid: '', currentUser: '', userNumer: 0, + scrollTop: 0, noViewChatList: 0, applySpeakDialog: false, leaveDialog: false, @@ -500,9 +501,11 @@ Page({ }) break; } - this.setData({ - currentUser: roomUserList.find(row => row.uid == this.data.currentUid || row.screenShareId == this.data.currentUid) - }) + if (item.user && (item.user.uid === this.data.currentUid)) { + this.setData({ + currentUser: roomUserList.find(row => row.uid == this.data.currentUid || row.screenShareId == this.data.currentUid) + }) + } this.changeAgoraDevice() }, async changeFooterList(e): Promise { @@ -814,7 +817,7 @@ Page({ }) } }, - scroll() { + scroll(e) { const query = wx.createSelectorQuery().in(this); query.select('#meeting-content-smallvideo').boundingClientRect() query.selectAll('.meeting-content-smallvideo-box').boundingClientRect() @@ -833,4 +836,22 @@ Page({ }); }) }, + scrollUp() { + const query = wx.createSelectorQuery() + query.select('#meeting-content-smallvideo').scrollOffset((res => { + this.setData({ + scrollTop: res.scrollTop - 50 + }) + })) + query.exec() + }, + scrollDown() { + const query = wx.createSelectorQuery() + query.select('#meeting-content-smallvideo').scrollOffset((res => { + this.setData({ + scrollTop: res.scrollTop + 50 + }) + })) + query.exec() + }, }) \ No newline at end of file diff --git a/pages/meeting/index.wxml b/pages/meeting/index.wxml index 4c15264..344ccbc 100644 --- a/pages/meeting/index.wxml +++ b/pages/meeting/index.wxml @@ -29,7 +29,7 @@ {{currentUser.userName}} - + @@ -59,6 +59,12 @@ + + + + + +