浏览代码

短信改用腾讯云,星链自己的

lizhen_gitee 2 周之前
父节点
当前提交
35bd1cf3b6
共有 4 个文件被更改,包括 20 次插入20 次删除
  1. 10 10
      addons/qcloudsms/config.php
  2. 1 1
      application/api/controller/Sms.php
  3. 3 3
      application/common/library/Sms.php
  4. 6 6
      application/config.php

+ 10 - 10
addons/qcloudsms/config.php

@@ -6,7 +6,7 @@ return [
         'title' => '应用AppID',
         'type' => 'string',
         'content' => [],
-        'value' => '1400926714',
+        'value' => '1400956309',
         'rule' => 'required',
         'msg' => '',
         'tip' => '',
@@ -18,7 +18,7 @@ return [
         'title' => '应用AppKEY',
         'type' => 'string',
         'content' => [],
-        'value' => '7adacdc1ef6c7b3cb8ebb2f2a007fab8',
+        'value' => '13c5f060ee97e8e2ae4be642bab1af2d',
         'rule' => 'required',
         'msg' => '',
         'tip' => '',
@@ -54,7 +54,7 @@ return [
         'title' => '签名',
         'type' => 'string',
         'content' => [],
-        'value' => '乐见交友App',
+        'value' => 'HeartLoveApp',
         'rule' => 'required',
         'msg' => '',
         'tip' => '',
@@ -97,13 +97,13 @@ return [
         'type' => 'array',
         'content' => [],
         'value' => [
-            'register' => '2223032',
-            'resetpwd' => '2223032',
-            'changepwd' => '2223032',
-            'profile' => '2223032',
-            'editpaypwd' => '2223032',
-            'forgetpaypwd' => '2223032',
-            'default' => '2223032',
+            'register' => '2390789',
+            'resetpwd' => '2390789',
+            'changepwd' => '2390789',
+            'profile' => '2390789',
+            'editpaypwd' => '2390789',
+            'forgetpaypwd' => '2390789',
+            'default' => '2390789',
         ],
         'rule' => 'required',
         'msg' => '',

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

@@ -53,7 +53,7 @@ class Sms extends Api
             }
         }
         if (!Hook::get('sms_send')) {
-            $this->error(__('请在后台插件管理安装短信验证插件'));
+            $this->error(__('发送失败'));
         }
         $ret = Smslib::send($mobile, null, $event);
         if ($ret) {

+ 3 - 3
application/common/library/Sms.php

@@ -55,13 +55,13 @@ class Sms
         $time = time();
         $ip = request()->ip();
         $sms = \app\common\model\Sms::create(['event' => $event, 'mobile' => $mobile, 'code' => $code, 'ip' => $ip, 'createtime' => $time]);
-        //$result = Hook::listen('sms_send', $sms, null, true);
+        $result = Hook::listen('sms_send', $sms, null, true);
 
         //阿里短信
-        $params['mobile'] = $mobile;
+        /*$params['mobile'] = $mobile;
         $params['code'] = $code;
 
-        $result = self::smsSend($params,86);
+        $result = self::smsSend($params,86);*/
 
         if (!$result) {
             $sms->delete();

+ 6 - 6
application/config.php

@@ -396,12 +396,12 @@ return [
             'active' => '活动设置',
         ],
 
-    //阿里云短信配置, TKEN正式
+    //阿里云短信配置
     'alisms' =>[
-        'template_cn' => 'SMS_267360101', //国内
-        'template_guoji' => 'SMS_463616976', //国际
-        'sign' => 'TKEN',
-        'key' => 'LTAI5tE7djEZAXJcLtxshRu5',
-        'secret' => 'MK7sRjd2rpZ4PEbngf76PvKhvpTJWc',
+        'template_cn' => '', //国内
+        'template_guoji' => '', //国际
+        'sign' => '',
+        'key' => '',
+        'secret' => '',
     ],
 ];