123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- namespace app\api\controller;
-
- use app\common\basics\Api;
- use app\common\logic\SmsLogic;
- use app\api\validate\SmsSend;
- use app\common\server\JsonServer;
-
- class Sms extends Api
- {
- public $like_not_need_login = ['send'];
-
-
-
- public function send()
- {
- $client = $this->client;
- $mobile = $this->request->post('mobile');
- $key = $this->request->post('key');
- (new SmsSend())->goCheck('', ['mobile' => $mobile, 'key' => $key,'client' => $client,'user_id' => $this->user_id]);
- $result = SmsLogic::send($mobile, $key, $this->user_id);
- if (true === $result) {
- return JsonServer::success('发送成功');
- }
- return JsonServer::error('发送失败');
- }
- }
|