sendEmail($this->request->post()); return json($returnData); } /** * @desc 邮箱注册 * @return Json * @throws \Psr\SimpleCache\InvalidArgumentException * @throws \think\db\exception\DataNotFoundException * @throws \think\db\exception\DbException * @throws \think\db\exception\ModelNotFoundException */ public function registerEmail(): Json { $returnData = (new LoginService())->registerEmail($this->request->post()); return json($returnData); } /** * @desc 登陆接口 * @return Json */ public function loginEmail(): Json { $returnData = (new LoginService())->loginEmail($this->request->post()); return json($returnData); } /** * #desc 发送短信验证码 * @return Json */ public function sendSms(): Json { $returnData = (new LoginService())->sendSms($this->request->post()); return json($returnData); } /** * @desc @desc 短信注册 * @return Json * @throws \Psr\SimpleCache\InvalidArgumentException */ public function registerSms(): Json { $returnData = (new LoginService())->registerSms($this->request->post()); return json($returnData); } /** * @desc 短信验证码登陆 * @return Json * @throws \Psr\SimpleCache\InvalidArgumentException */ public function loginSms(): Json { $returnData = (new LoginService())->loginSms($this->request->post()); return json($returnData); } /** * @desc 忘记密码 根据邮箱设置密码 * @return Json * @throws \Psr\SimpleCache\InvalidArgumentException */ public function resetPasswordByEmail(): Json { $returnData = (new LoginService())->resetPasswordByEmail($this->request->post()); return json($returnData); } /** * @desc 忘记密码 根据短信设置密码 * @return Json */ public function resetPasswordBySms(): Json { $returnData = (new LoginService())->resetPasswordBySms($this->request->post()); return json($returnData); } /** * @desc 手机号登陆 * @return Json */ public function phoneLogin(): Json { $returnData = (new LoginService())->phoneLogin($this->request->post()); return json($returnData); } /** * 免密码登录 * @return Json */ public function autoLogin():Json { $returnData = (new LoginService())->autoLogin($this->request->post()); return json($returnData); } public function getIP():Json { $returnData = (new LoginService())->getIP(); return json($returnData); } }