PC-20230314RMCU\Administrator 2 years ago
parent
commit
34f5a1e3e8

+ 1 - 1
application/api/controller/Distribution.php

@@ -93,7 +93,7 @@ class Distribution extends Api
             ->alias('a')
             ->join('user b', 'a.phone = b.mobile', 'LEFT')
             ->join('method c', 'c.id = a.method_id', 'LEFT')
-            ->field('a.phone,b.id as user_id,b.nickname,c.show_images')
+            ->field('a.phone,a.number,b.id as user_id,b.nickname,c.show_images')
             ->where("a.method_id",$method_id)
             ->select();
 

+ 2 - 3
application/api/controller/Sms.php

@@ -40,8 +40,6 @@ class Sms extends Api
             "TemplateParam" => $TemplateParam
         ];
         $res = Alisms::sendSmsCode($sendSmsRequest);
-        echo 3;
-        var_dump($res);die;
 
         \app\api\model\SmsLog::create([
             'params' => json_encode($sendSmsRequest, JSON_UNESCAPED_UNICODE),
@@ -101,7 +99,8 @@ class Sms extends Api
             $event = 'tongzhi';
             $TemplateCode = "SMS_270945003";
             $phoneNumber = $value['phone'];
-            $code = $this->SmsTemplate($TemplateCode, $phoneNumber, '', $event, 0000);
+            $TemplateParam = $value['number'];
+            $code = $this->SmsTemplate($TemplateCode, $phoneNumber, $TemplateParam, $event, 0000);
             if($code){
                 $this->add_sms_log($user_id);
             } else {

+ 0 - 4
extend/Alicode/Alisms.php

@@ -52,12 +52,8 @@ class Alisms
 
             return $result->toArray();
         } catch (ClientException $e) {
-            echo 1;
-            var_dump($e->getErrorMessage());die;
            $e->getErrorMessage() . PHP_EOL;
         } catch (ServerException $e) {
-            echo 2;
-            var_dump($e->getErrorMessage());die;
            $e->getErrorMessage() . PHP_EOL;
         }
     }