优化代码

main
gzydong 2021-05-23 17:43:49 +08:00
parent a836395976
commit 69245aef69
2 changed files with 5 additions and 5 deletions

View File

@ -11,7 +11,7 @@ DB_USERNAME=root
DB_PASSWORD= DB_PASSWORD=
DB_CHARSET=utf8mb4 DB_CHARSET=utf8mb4
DB_COLLATION=utf8mb4_unicode_ci DB_COLLATION=utf8mb4_unicode_ci
DB_PREFIX= DB_PREFIX=im_
# ---- Redis 配置 ---- # ---- Redis 配置 ----
REDIS_HOST=localhost REDIS_HOST=localhost
@ -21,9 +21,9 @@ REDIS_DB=0
# ---- JWT授权配置 ---- # ---- JWT授权配置 ----
# 务必改为你自己的字符串 # 务必改为你自己的字符串
JWT_SECRET=hyperf SIMPLE_JWT_SECRET=lumneim
#token过期时间单位为秒 JWT_HEADER_NAME=Authorization
JWT_TTL=86400 SIMPLE_JWT_PREFIX=jwt
# ---- 项目配置 ---- # ---- 项目配置 ----
WEB_URL=http://im.gzydong.club WEB_URL=http://im.gzydong.club

View File

@ -226,7 +226,7 @@ class ContactsController extends CController
public function getContactApplyUnreadNum() public function getContactApplyUnreadNum()
{ {
return $this->response->success([ return $this->response->success([
'unread_num' => FriendApply::getInstance()->get(strval($this->uid())) 'unread_num' => (int)FriendApply::getInstance()->get(strval($this->uid()))
]); ]);
} }