input('code'); if(!$code) { return $this->error()->fail('code参数不能为空'); } return UserFacade::wxMPLogin($code); } /** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { // $code = request()->input('code'); if(!$code) { return $this->error()->fail('code参数不能为空'); } $wxUserInfo = request()->input('wx_user_info'); if(!$wxUserInfo) { return $this->error()->fail('用户数据不能为空'); } return UserFacade::wxMPRegister($code, $wxUserInfo); } /** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { // } /** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { // } /** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { // } }