diff --git a/assets/icon10.png b/assets/icon10.png
new file mode 100644
index 0000000..2b80162
Binary files /dev/null and b/assets/icon10.png differ
diff --git a/pages/meeting/index.scss b/pages/meeting/index.scss
index d94f867..88d8847 100644
--- a/pages/meeting/index.scss
+++ b/pages/meeting/index.scss
@@ -32,9 +32,39 @@
flex-shrink: 0;
}
+ &-audio {
+ flex-shrink: 0;
+ position: relative;
+ width: 16rpx;
+ height: 16rpx;
+
+ &-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ &-stateImage {
+ position: absolute;
+ width: 100%;
+ height: 0%;
+ bottom: 0;
+ left: 0;
+ overflow: hidden;
+
+ &-image {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 16rpx;
+ height: 16rpx;
+ }
+ }
+ }
+
&-text {
color: white;
font-size: 12rpx;
+ margin-left: 2rpx;
}
}
}
@@ -195,9 +225,33 @@
width: 60rpx;
box-sizing: border-box;
- &-image {
+ &-view {
+ position: relative;
width: 22rpx;
height: 22rpx;
+
+ &-image {
+ width: 100%;
+ height: 100%;
+ }
+
+ &-audioImage {
+ width: 100%;
+ height: 0%;
+ position: absolute;
+ left: 50%;
+ bottom: 0;
+ transform: translate(-50%, 0);
+ overflow: hidden;
+
+ &-image {
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 22rpx;
+ height: 22rpx;
+ }
+ }
}
&-text {
@@ -235,36 +289,42 @@
&-view {
overflow-y: auto;
- display: flex;
- align-items: center;
- justify-content: space-between;
padding: 4rpx 10rpx;
+ box-sizing: border-box;
+ flex-grow: 1;
- &-avatar {
+ &-view {
display: flex;
align-items: center;
- flex-grow: 1;
+ justify-content: space-between;
+ margin-bottom: 10rpx;
- &-text {
+ &-avatar {
+ display: flex;
+ align-items: center;
flex-grow: 1;
- color: white;
- font-size: 14rpx;
- margin: 0 2rpx;
- white-space: nowrap;
- text-overflow: ellipsis;
- overflow: hidden;
- width: 0;
+
+ &-text {
+ flex-grow: 1;
+ color: white;
+ font-size: 14rpx;
+ margin: 0 2rpx;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ width: 0;
+ }
}
- }
- &-image {
- display: flex;
- align-items: center;
- flex-shrink: 0;
+ &-image {
+ display: flex;
+ align-items: center;
+ flex-shrink: 0;
- &-icon {
- width: 16rpx;
- height: 16rpx;
+ &-icon {
+ width: 16rpx;
+ height: 16rpx;
+ }
}
}
}
@@ -291,6 +351,7 @@
flex-grow: 1;
overflow-y: auto;
padding: 0 10rpx;
+ box-sizing: border-box;
&-view {
color: white;
diff --git a/pages/meeting/index.ts b/pages/meeting/index.ts
index 44fdad0..49e1100 100644
--- a/pages/meeting/index.ts
+++ b/pages/meeting/index.ts
@@ -69,6 +69,8 @@ Page({
channelId: '',
roomInfo: '',
roomUserList: [],
+ audioList: [],
+ userVolume: 0,
chatList: [],
isAdmin: 0,
currentUid: '',
@@ -96,11 +98,17 @@ Page({
this.setData({
isAdmin: roomUserList.filter((item: any) => (role.ID.includes(item.roleId) || item.isRoomManager) && item.isRoom).length,
userNumer: roomUserList.filter((item: any) => item.isRoom).length,
+ audioList: roomUserList.map(item => {
+ return {
+ volume: 0,
+ uid: item.uid,
+ }
+ })
})
},
'footerList.**': function (footerList) {
const footerListTemplate = [...footerList];
- footerListTemplate[3].show = !footerListTemplate[6].active
+ footerListTemplate[3].show = footerListTemplate[2].active
this.setData({
footerList: footerListTemplate
})
@@ -172,6 +180,7 @@ Page({
this.setData({
chatList: [...this.data.chatList, item]
})
+ this.scrollToBottom()
break;
// 扩展操作
case 'Operation':
@@ -557,6 +566,7 @@ Page({
chatPopupVisible: true,
noViewChatList: 0
})
+ this.scrollToBottom()
break;
case '成员':
this.setData({
@@ -626,10 +636,24 @@ Page({
}
},
playerStateChange(e) {
- // console.log(e);
+
},
recorderStateChange(e) {
- // console.log(e);
+
+ },
+ playerAudioVolumenotify(e) {
+ const { uid } = e.currentTarget.dataset;
+ const { volume } = e.detail;
+ const audioListTemp = [...this.data.audioList]
+ const percentage = (volume / 100) * 100
+ const item = audioListTemp.find(row => row.uid == uid)
+ if (item) {
+ item.volume = Math.floor(percentage) + '%'
+ }
+ this.setData({
+ audioList: audioListTemp,
+ userVolume: audioListTemp.find(row => row.uid == this.data.user.uid).volume
+ })
},
clickChangeVideo(e) {
const { item } = e.currentTarget.dataset;
@@ -718,6 +742,7 @@ Page({
}],
messageStr: ''
})
+ this.scrollToBottom()
} else {
this.message('请输入文字!').error()
}
@@ -726,5 +751,16 @@ Page({
this.setData({
isFullscreen: !this.data.isFullscreen
})
+ },
+ scrollToBottom() {
+ wx.createSelectorQuery()
+ .select('#chatView')
+ .node()
+ .exec((res) => {
+ const scrollView = res[0].node;
+ scrollView.scrollTo({
+ top: 10000000000000
+ })
+ })
}
})
\ No newline at end of file
diff --git a/pages/meeting/index.wxml b/pages/meeting/index.wxml
index 969fefc..c9cd0a0 100644
--- a/pages/meeting/index.wxml
+++ b/pages/meeting/index.wxml
@@ -25,7 +25,7 @@
-
+
{{currentUser.userName}}
@@ -38,14 +38,20 @@
-
-
+
+
-
+
+
+
+
+
+
+
{{item.userName}}
@@ -56,9 +62,14 @@