uid(); return app('json')->successful(UserNotice::getNoticeList($uid, intval($page), intval($limit))); } /** * @api {post} /user/messages 标记已读 * @apiName PostUserMessages * @apiGroup User.Message * */ public function read(Request $request) { list($ids, $read) = UtilService::postMore([ ['ids', []], ['read', 1] ], $request, true); if (count($ids) <= 0) { return app('json')->fail('未选择'); } if ($read == 0 ) { return app('json')->fail('暂不支持'); } $uid = $request->uid(); UserNotice::seeNotice($uid, $ids); return app('json')->successful([]); } /** * @api {post} /user/messages/del 删除消息 * @apiName PostUserMessageDel * @apiGroup User.Message * */ public function del(Request $request) { list($ids) = UtilService::postMore([ ['ids', []] ], $request, true); $uid = $request->uid(); UserNotice::delNotice($uid, $ids); return app('json')->successful([]); } }