正在显示
1 个修改的文件
包含
8 行增加
和
6 行删除
| @@ -3,6 +3,7 @@ | @@ -3,6 +3,7 @@ | ||
| 3 | namespace App\Http\Controllers\Bside; | 3 | namespace App\Http\Controllers\Bside; |
| 4 | 4 | ||
| 5 | use App\Enums\Common\Code; | 5 | use App\Enums\Common\Code; |
| 6 | +use App\Helper\FormGlobalsoApi; | ||
| 6 | use App\Http\Logic\Bside\User\UserLogic; | 7 | use App\Http\Logic\Bside\User\UserLogic; |
| 7 | use App\Http\Logic\Bside\User\UserLoginLogic; | 8 | use App\Http\Logic\Bside\User\UserLoginLogic; |
| 8 | use App\Models\Project\Project; | 9 | use App\Models\Project\Project; |
| @@ -125,25 +126,26 @@ class ComController extends BaseController | @@ -125,25 +126,26 @@ class ComController extends BaseController | ||
| 125 | $mobile = $request->input('mobile'); | 126 | $mobile = $request->input('mobile'); |
| 126 | $user = UserModel::where(['mobile' => $mobile])->first(); | 127 | $user = UserModel::where(['mobile' => $mobile])->first(); |
| 127 | if (empty($user)) { | 128 | if (empty($user)) { |
| 128 | - return $this->response('请输入正确的手机号码!', Code::USER_LOGIN_ERROE); | 129 | + $this->response('请输入正确的手机号码!', Code::USER_LOGIN_ERROE); |
| 129 | } | 130 | } |
| 130 | $last_sms = SmsLog::getLastLog($mobile, SmsLog::TYPE_LOGIN); | 131 | $last_sms = SmsLog::getLastLog($mobile, SmsLog::TYPE_LOGIN); |
| 131 | if ($last_sms && $last_sms->use = SmsLog::USE_USABLE && time() - strtotime($last_sms->created_at) < 60) { | 132 | if ($last_sms && $last_sms->use = SmsLog::USE_USABLE && time() - strtotime($last_sms->created_at) < 60) { |
| 132 | - return $this->response('请不要重复发送短信!', Code::USER_LOGIN_ERROE); | 133 | + $this->response('请不要重复发送短信!', Code::USER_LOGIN_ERROE); |
| 133 | } | 134 | } |
| 134 | $template = config('aliyunsms.login_sms_temp'); | 135 | $template = config('aliyunsms.login_sms_temp'); |
| 135 | $code['code'] = rand(100000,999999); | 136 | $code['code'] = rand(100000,999999); |
| 136 | $ali_sms = new AliSms(); | 137 | $ali_sms = new AliSms(); |
| 137 | $send = $ali_sms->sendSms(strval($mobile), $template, $code); | 138 | $send = $ali_sms->sendSms(strval($mobile), $template, $code); |
| 138 | if (empty($send->Code) && $send->Code != 'OK') { | 139 | if (empty($send->Code) && $send->Code != 'OK') { |
| 139 | - return $this->response('发送失败, 请稍后重试!', Code::USER_LOGIN_ERROE); | 140 | + $this->response('发送失败, 请稍后重试!', Code::USER_LOGIN_ERROE); |
| 140 | } | 141 | } |
| 141 | SmsLog::createLog($mobile, $code['code']); | 142 | SmsLog::createLog($mobile, $code['code']); |
| 142 | - return $this->response('success'); | 143 | + $this->response('success'); |
| 143 | } | 144 | } |
| 144 | 145 | ||
| 145 | public function ceshi(){ | 146 | public function ceshi(){ |
| 146 | - $country = new \App\Helper\Country(); | ||
| 147 | - return $country->set_country(); | 147 | + $from = new FormGlobalsoApi(); |
| 148 | + $list = $from->getInquiryList('https://demomark.globalso.com/',[],1,100000000); | ||
| 149 | + $this->response('success',Code::SUCCESS,$list); | ||
| 148 | } | 150 | } |
| 149 | } | 151 | } |
-
请 注册 或 登录 后发表评论