修复了部分问题
This commit is contained in:
parent
a35253b4b9
commit
ae1ba85e2c
@ -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>
|
||||
|
||||
|
||||
|
@ -6,6 +6,7 @@
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { getliveinfo } from '@/api';
|
||||
import store from '@/store';
|
||||
import { defineComponent, ref } from 'vue';
|
||||
import { useRoute } from 'vue-router';
|
||||
|
||||
@ -16,7 +17,7 @@ export default defineComponent({
|
||||
const url = ref<string>()
|
||||
if(id && typeof id == 'string'){
|
||||
getliveinfo(parseInt(id)).then((res: any)=>{
|
||||
url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}`
|
||||
url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}&name=${escape(store.state.userinfo.name)}`
|
||||
})
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user