|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view class="container">
|
|
|
+ <view class="container" :style="'height: '+windowHeight+'px;'">
|
|
|
<jhlive
|
|
|
ref="jhlive"
|
|
|
class="jhlive"
|
|
@@ -12,7 +12,8 @@
|
|
|
:avatar="avatar"
|
|
|
:num="num"
|
|
|
:likes="likes"
|
|
|
- :name="name" />
|
|
|
+ :name="name"
|
|
|
+ @onRemoteUser="handleRemoteUser" />
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -73,7 +74,19 @@
|
|
|
},
|
|
|
exitRoom() {
|
|
|
this.$refs.jhlive&&this.$refs.jhlive.exitRoom();
|
|
|
- },
|
|
|
+ },
|
|
|
+ handleRemoteUser(users) {
|
|
|
+ this.num = users.length;
|
|
|
+ users.length&&this.request(API.getMainInfo +"?userId="+ users[0], {}, 'GET').then(res => {
|
|
|
+ this.avatar = res.data.headimg;
|
|
|
+ this.name = res.data.nickname;
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error.data.msg,
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
</script>
|