123456789101112131415161718192021222324252627282930313233343536373839404142 |
- <?php
- declare (strict_types = 1);
- namespace library\utils;
- use library\utils\Sms\TencentSms;
- class Sms {
-
- public function SmsCode($tel, $code, $array = array()) {
- $data = $this->SmsSendTpl($tel, $code, $array);
- if ($data['Code'] == 'OK') {
- $r['status'] = 1;
- $r['error'] = 'ok';
- } else {
- $r['status'] = -1;
- $r['error'] = $data['Message'];
- }
- return $r;
- }
-
- function SmsSendTpl($tel, $code, $array = array()) {
- $tencent = new TencentSms();
- $r = $tencent->SmsSendTmplete($tel,$code,$array);
- return $r;
- }
- }
|