修复了部分问题
This commit is contained in:
@@ -33,7 +33,7 @@ function join() {
|
||||
$('#header-roomId').html('房间号: ' + $('#roomId').val());
|
||||
$('#member-me')
|
||||
.find('.member-id')
|
||||
.html($('#userId').val() + '(我)');
|
||||
.html(window.uname + '(我)');
|
||||
}
|
||||
|
||||
function leave() {
|
||||
|
||||
@@ -82,6 +82,7 @@ function formatDateTime (inputTime) {
|
||||
});
|
||||
|
||||
tim.on(TIM.EVENT.GROUP_LIST_UPDATED, function(event) {
|
||||
console.log(event.data)
|
||||
// 收到群组列表更新通知,可通过遍历 event.data 获取群组列表数据并渲染到页面
|
||||
// event.name - TIM.EVENT.GROUP_LIST_UPDATED
|
||||
// event.data - 存储 Group 对象的数组 - [Group]
|
||||
@@ -142,7 +143,7 @@ function formatDateTime (inputTime) {
|
||||
})
|
||||
tim.on(TIM.EVENT.SDK_READY, function (){
|
||||
tim.updateMyProfile({
|
||||
nick: '我的昵称'
|
||||
nick: window.uname
|
||||
});
|
||||
const promise = tim.createGroup({
|
||||
type: TIM.TYPES.GRP_AVCHATROOM,
|
||||
@@ -207,7 +208,7 @@ function formatDateTime (inputTime) {
|
||||
const list = $("#liaotianliebiao")
|
||||
const html = ` <div>
|
||||
<p>${formatDateTime(imResponse.data.message.time)}</p>
|
||||
<p><span>${imResponse.data.message.nick}:</span>${imResponse.data.message.payload.text}</p>
|
||||
<p><span>${window.uname}:</span>${imResponse.data.message.payload.text}</p>
|
||||
</div>`
|
||||
console.log(html)
|
||||
list.append(html)
|
||||
|
||||
@@ -411,6 +411,7 @@
|
||||
const urldata = GetRequest('roomid')
|
||||
window.roomid = urldata.roomid
|
||||
window.mid = urldata.memberid
|
||||
window.uname = urldata.name
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user