request->params([['code', '']]); $weapp_auth_service = new WeappAuthService(); return success($weapp_auth_service->login($data['code'])); } /** * 注册 * @return Response */ public function register(){ $data = $this->request->params([ ['openid', ''], ['mobile_code', ''], ['mobile', ''], ]); $weapp_auth_service = new WeappAuthService(); return success($weapp_auth_service->register($data['openid'], $data['mobile'], $data['mobile_code'])); } public function subscribeMessage(){ $data = $this->request->params([ ['keys', ''] ]); return success((new NoticeService())->getWeappNoticeTemplateId($data['keys'])); } }