| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- <?php
- namespace app\api\controller\user;
- use app\models\coin\UserCoinTransfer;
- use app\models\system\DictCoin;
- use app\Request;
- use crmeb\services\JsonService;
- use think\facade\Config;
- use think\facade\Log;
- use think\facade\Cache;
- use tw\redis\UserRds;
- /**
- *
- * activities json 配置:
- mining:
- {
- "enabled": 1,
- "symbol": "btc",
- }
- * Class UserNotificationController
- * @package app\api\controller\user
- */
- class UserNotificationController {
- /**
- * 定时请求的状态接口
- * @param Request $request
- */
- public function snapshot(Request $request) {
- $uid = $request->uid();
- // 未读消息
- $unread = (new UserRds)->get($uid, UserRds::FIELD_UNREAD) ?? 0;
- return app('json')->successful([
- 'unread'=> intval($unread),
- ]);
- }
- }
|