perf: 消息列表详情增加'置顶'标识

This commit is contained in:
韦荣超 2022-02-24 18:10:50 +08:00
parent 6fc6cb75e4
commit e650dd0503
4 changed files with 15 additions and 2 deletions

View File

@ -112,6 +112,7 @@ class WebSocketDialog extends AbstractModel
// 对方信息
$dialog->dialog_user = null;
$dialog->group_info = null;
$dialog->top_at = WebSocketDialogUser::whereDialogId($dialog->id)->whereUserid($userid)->value('top_at');
switch ($dialog->type) {
case "user":
$dialog_user = $builder->where('userid', '!=', $userid)->first();

View File

@ -2,10 +2,10 @@
directory=/var/www
# 生产环境
command=php bin/laravels start -i
#command=php bin/laravels start -i
# 开发环境
#command=./bin/inotify ./app
command=./bin/inotify ./app
numprocs=1
autostart=true

View File

@ -12,6 +12,7 @@
<Tag :color="tag.color" :fade="false">{{$L(tag.text)}}</Tag>
</template>
<h2>{{dialogData.name}}</h2>
<label v-if="dialogData.top_at" class="top-text">{{$L('置顶')}}</label>
<em v-if="peopleNum > 0">({{peopleNum}})</em>
</div>
<template v-if="dialogData.type === 'group'">

View File

@ -82,6 +82,17 @@
font-weight: 500;
padding-left: 6px;
}
.top-text{
width: 40px;
height: 24px;
border-radius:4px;
margin-left: 10px;
background-color: #8BCF70;
color:#FFFFFF;
text-align: center;
margin-top: 4px;
padding-top: 1px
}
}
.sub-title {