wanghousheng 8 months ago
parent 1fc368ce02
commit b05ef66043
  1. 5
      app/api/controller/Captcha.php
  2. 18
      app/api/controller/Controller.php
  3. 4
      app/store/controller/Order.php

@ -12,9 +12,9 @@ declare (strict_types=1);
namespace app\api\controller;
use think\response\Json;
use app\api\service\passport\{Captcha as CaptchaService, SmsCaptcha as SmsCaptchaService};
use cores\exception\BaseException;
use think\response\Json;
/**
* 验证码管理
@ -40,8 +40,9 @@ class Captcha extends Controller
*/
public function sendSmsCaptcha(): Json
{
$data['mobile'] = $this->request->post('mobile');
$SmsCaptchaService = new SmsCaptchaService;
if ($SmsCaptchaService->handle($this->postForm())) {
if ($SmsCaptchaService->handle($data)) {
return $this->renderSuccess('发送成功,请注意查收');
}
return $this->renderError($SmsCaptchaService->getError() ?: '短信发送失败');

@ -12,14 +12,14 @@ declare (strict_types=1);
namespace app\api\controller;
use cores\BaseController;
use app\api\model\User as UserModel;
use app\api\model\Store as StoreModel;
use app\api\model\store\Module as StoreModuleModel;
use app\api\model\User as UserModel;
use app\api\service\User as UserService;
use cores\BaseController;
use cores\exception\BaseException;
use think\db\exception\DbException;
use think\db\exception\DataNotFoundException;
use think\db\exception\DbException;
use think\db\exception\ModelNotFoundException;
/**
@ -47,12 +47,12 @@ class Controller extends BaseController
$this->checkStore();
// 验证当前客户端状态
$this->checkClient();
$user = $this->getLoginUser();
if ($user) {
if ($user->user_type == 0 || $user->status == 0) {
throwError('很抱歉,您没有权限进入系统');
}
}
//$user = $this->getLoginUser();
// if ($user) {
// if ($user->user_type == 0 || $user->status == 0) {
// throwError('很抱歉,您没有权限进入系统');
// }
// }
}

@ -65,10 +65,6 @@ class Order extends Controller
return $this->renderSuccess(compact('dataType', 'list'));
}
private function getText()
{
}
/**
* 订单详情

Loading…
Cancel
Save