IM测试,下一步页面调整
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<u-loadmore status="nomore" />
|
||||
</div>
|
||||
<div v-else>
|
||||
<button @click="toLogin">去登录</button>
|
||||
<u-button @click="toLogin">去登录</u-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -48,9 +48,11 @@
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
getImToken().then(res => {
|
||||
getImToken().then(res => {
|
||||
im.syncFriends()
|
||||
im.connect(res.token, res.userInfo)
|
||||
im.connect(res.token, res.userInfo)
|
||||
|
||||
this.getConversationList()
|
||||
})
|
||||
},
|
||||
onShow() {
|
||||
@@ -61,7 +63,14 @@
|
||||
this.isShown = false
|
||||
},
|
||||
onNavigationBarButtonTap(e) {
|
||||
if (e.index == 0) {
|
||||
if (e.index == 0) {}
|
||||
if (e.index == 1) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/friends/index',
|
||||
fail: (err) => {
|
||||
console.log(err);
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -96,7 +105,7 @@
|
||||
// 进入聊天的详情页面,清理未读消息数量
|
||||
toDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/im/detail?targetId=' + item.targetId +
|
||||
url: '/pages/im/private/index?targetId=' + item.targetId +
|
||||
'&conversationType=' + item.conversationType
|
||||
})
|
||||
}
|
||||
@@ -128,7 +137,8 @@
|
||||
|
||||
.name {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
justify-content: space-between;
|
||||
font-size: $uni-font-size-base;
|
||||
|
||||
.time {
|
||||
font-size: $uni-font-size-sm;
|
||||
@@ -137,7 +147,8 @@
|
||||
}
|
||||
|
||||
.u-line-1 {
|
||||
color: $u-info;
|
||||
color: $u-info;
|
||||
font-size: $uni-font-size-sm;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user