no message

This commit is contained in:
kuaifan 2023-03-18 11:03:04 +08:00
parent fcdb021279
commit 58ce8325d6
7 changed files with 46 additions and 10 deletions

View File

@ -114,7 +114,11 @@ class DialogController extends AbstractController
if (count($list) < 20 && Base::judgeClientVersion("0.21.60")) {
$users = User::select(User::$basicField)
->where(function ($query) use ($key) {
$query->where("email", "like", "%{$key}%")->orWhere("nickname", "like", "%{$key}%");
if (str_contains($key, "@")) {
$query->where("email", "like", "%{$key}%");
} else {
$query->where("nickname", "like", "%{$key}%")->orWhere("pinyin", "like", "%{$key}%");
}
})->orderBy('userid')
->take(20 - count($list))
->get();

View File

@ -544,6 +544,7 @@ class SystemController extends AbstractController
'license' => Doo::licenseContent(),
'info' => Doo::license(),
'macs' => Doo::macs(),
'doo_sn' => Doo::dooSN(),
'user_count' => User::whereBot(0)->whereNull('disable_at')->count(),
]);
}

View File

@ -44,7 +44,7 @@ class Doo
char* translate(char* val, char* val);
char* md5s(char* text, char* password);
char* macs();
char* hostID();
char* dooSN();
EOF, "/usr/lib/doo/doo.so");
$token = $token ?: Base::headerOrInput('token');
$language = $language ?: Base::headerOrInput('language');
@ -114,6 +114,9 @@ class Doo
*/
public static function licenseContent(): string
{
if (env("SYSTEM_LICENSE") == 'hidden') {
return '';
}
$paths = [
config_path("LICENSE"),
config_path("license"),
@ -287,4 +290,13 @@ class Doo
}
return $array;
}
/**
* 获取当前SN
* @return string
*/
public static function dooSN(): string
{
return self::string(self::doo()->dooSN());
}
}

View File

@ -3,7 +3,7 @@ version: '3'
services:
php:
container_name: "dootask-php-${APP_ID}"
image: "kuaifan/php:swoole-8.0.rc6"
image: "kuaifan/php:swoole-8.0.rc7"
shm_size: "1024m"
volumes:
- ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf

View File

@ -120,7 +120,9 @@
<div class="avatar"><UserAvatar :userid="user.userid" :size="30"/></div>
<div class="nickname">
<em>{{user.nickname}}</em>
<div v-if="user.tags" class="tags">{{user.tags.join(', ')}}</div>
<div v-if="user.tags" class="tags">
<span v-for="tag in user.tags" :style="tagField(tag,'style')">{{tagField(tag, 'label')}}</span>
</div>
</div>
<div v-if="user.loading" class="loading"><Loading/></div>
</li>
@ -533,12 +535,8 @@ export default {
methods: {
listScroll(res) {
switch (res.directionreal) {
case 'up':
if (res.scrollE < 10) {
this.getContactsNextPage()
}
break;
if (res.scrollE < 10) {
this.getContactsNextPage()
}
this.operateVisible = false;
},
@ -622,6 +620,19 @@ export default {
});
},
tagField(item, field) {
if (!$A.isJson(item)) {
item = {label: item}
}
switch (field) {
case 'style':
return item.style || null
case 'label':
return item.label
}
return null
},
filterDialog(dialog) {
if ($A.getDialogNum(dialog) > 0 || dialog.id == this.dialogId || dialog.top_at || dialog.todo_num > 0) {
return true

View File

@ -10,6 +10,10 @@
<li>
<em>SN:</em>
<span>{{formData.info.sn}}</span>
<ETooltip max-width="auto" placement="right">
<div slot="content">{{$L('当前环境')}}: {{formData.doo_sn}}</div>
<Icon class="information" type="ios-information-circle-outline" />
</ETooltip>
</li>
<li>
<em>IP:</em>
@ -98,6 +102,7 @@ export default {
license: '',
info: {},
macs: [],
doo_sn: '',
user_count: 0
},
}

View File

@ -448,6 +448,9 @@
overflow: hidden;
text-overflow: ellipsis;
color: $primary-desc-color;
> span + span:before {
content: "\002c\0020";
}
}
}
.loading {