diff --git a/.env.example b/.env.example index a98fb16..673af49 100644 --- a/.env.example +++ b/.env.example @@ -11,7 +11,7 @@ DB_USERNAME=root DB_PASSWORD= DB_CHARSET=utf8mb4 DB_COLLATION=utf8mb4_unicode_ci -DB_PREFIX= +DB_PREFIX=im_ # ---- Redis 配置 ---- REDIS_HOST=localhost @@ -21,9 +21,9 @@ REDIS_DB=0 # ---- JWT授权配置 ---- # 务必改为你自己的字符串 -JWT_SECRET=hyperf -#token过期时间,单位为秒 -JWT_TTL=86400 +SIMPLE_JWT_SECRET=lumneim +JWT_HEADER_NAME=Authorization +SIMPLE_JWT_PREFIX=jwt # ---- 项目配置 ---- WEB_URL=http://im.gzydong.club diff --git a/app/Controller/Api/V1/ContactsController.php b/app/Controller/Api/V1/ContactsController.php index 8969601..e7cccc9 100644 --- a/app/Controller/Api/V1/ContactsController.php +++ b/app/Controller/Api/V1/ContactsController.php @@ -226,7 +226,7 @@ class ContactsController extends CController public function getContactApplyUnreadNum() { return $this->response->success([ - 'unread_num' => FriendApply::getInstance()->get(strval($this->uid())) + 'unread_num' => (int)FriendApply::getInstance()->get(strval($this->uid())) ]); }