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")) { if (count($list) < 20 && Base::judgeClientVersion("0.21.60")) {
$users = User::select(User::$basicField) $users = User::select(User::$basicField)
->where(function ($query) use ($key) { ->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') })->orderBy('userid')
->take(20 - count($list)) ->take(20 - count($list))
->get(); ->get();

View File

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

View File

@ -44,7 +44,7 @@ class Doo
char* translate(char* val, char* val); char* translate(char* val, char* val);
char* md5s(char* text, char* password); char* md5s(char* text, char* password);
char* macs(); char* macs();
char* hostID(); char* dooSN();
EOF, "/usr/lib/doo/doo.so"); EOF, "/usr/lib/doo/doo.so");
$token = $token ?: Base::headerOrInput('token'); $token = $token ?: Base::headerOrInput('token');
$language = $language ?: Base::headerOrInput('language'); $language = $language ?: Base::headerOrInput('language');
@ -114,6 +114,9 @@ class Doo
*/ */
public static function licenseContent(): string public static function licenseContent(): string
{ {
if (env("SYSTEM_LICENSE") == 'hidden') {
return '';
}
$paths = [ $paths = [
config_path("LICENSE"), config_path("LICENSE"),
config_path("license"), config_path("license"),
@ -287,4 +290,13 @@ class Doo
} }
return $array; 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: services:
php: php:
container_name: "dootask-php-${APP_ID}" container_name: "dootask-php-${APP_ID}"
image: "kuaifan/php:swoole-8.0.rc6" image: "kuaifan/php:swoole-8.0.rc7"
shm_size: "1024m" shm_size: "1024m"
volumes: volumes:
- ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf - ./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="avatar"><UserAvatar :userid="user.userid" :size="30"/></div>
<div class="nickname"> <div class="nickname">
<em>{{user.nickname}}</em> <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>
<div v-if="user.loading" class="loading"><Loading/></div> <div v-if="user.loading" class="loading"><Loading/></div>
</li> </li>
@ -533,12 +535,8 @@ export default {
methods: { methods: {
listScroll(res) { listScroll(res) {
switch (res.directionreal) { if (res.scrollE < 10) {
case 'up': this.getContactsNextPage()
if (res.scrollE < 10) {
this.getContactsNextPage()
}
break;
} }
this.operateVisible = false; 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) { filterDialog(dialog) {
if ($A.getDialogNum(dialog) > 0 || dialog.id == this.dialogId || dialog.top_at || dialog.todo_num > 0) { if ($A.getDialogNum(dialog) > 0 || dialog.id == this.dialogId || dialog.top_at || dialog.todo_num > 0) {
return true return true

View File

@ -10,6 +10,10 @@
<li> <li>
<em>SN:</em> <em>SN:</em>
<span>{{formData.info.sn}}</span> <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>
<li> <li>
<em>IP:</em> <em>IP:</em>
@ -98,6 +102,7 @@ export default {
license: '', license: '',
info: {}, info: {},
macs: [], macs: [],
doo_sn: '',
user_count: 0 user_count: 0
}, },
} }

View File

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