Bläddra i källkod

feat(six-shop): 添加腾讯云短信扩展

runphp 7 månader sedan
incheckning
83cbb434f4
6 ändrade filer med 192 tillägg och 0 borttagningar
  1. 8 0
      .idea/.gitignore
  2. 6 0
      README.md
  3. 32 0
      composer.json
  4. 116 0
      config.php
  5. 16 0
      info.php
  6. 14 0
      src/Extension.php

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 6 - 0
README.md

@@ -0,0 +1,6 @@
+# tencentcloud_sms
+
+扩展说明
+
+
+https://github.com/tencentcloud-sdk-php/sms

+ 32 - 0
composer.json

@@ -0,0 +1,32 @@
+{
+  "name": "six-shop/tencentcloud-sms",
+  "description": "EAV(Entity-Attribute-Value)模型",
+  "type": "sixshop-extension",
+  "keywords": [
+    "sixshop",
+    "thinkphp"
+  ],
+  "require": {
+    "php": ">=8.3",
+    "six-shop/core": ">=0.4 <1.0",
+    "tencentcloud/sms": "^3.0.1414"
+  },
+  "authors": [
+    {
+      "name": "hui he",
+      "email": "runphp@qq.com"
+    }
+  ],
+  "license": "MIT",
+  "autoload": {
+    "psr-4": {
+      "SixShop\\TencentCloudSms\\": "src"
+    }
+  },
+  "extra": {
+    "sixshop": {
+      "id": "eav",
+      "class": "SixShop\\TencentCloudSms\\Extension"
+    }
+  }
+}

+ 116 - 0
config.php

@@ -0,0 +1,116 @@
+<?php
+declare(strict_types=1);
+
+return [[
+    'type' => 'input',
+    'title' => 'SecretId',
+    'field' => 'secret_id',
+    'props' => [
+        'placeholder' => '请输入腾讯云API密钥SecretId'
+    ],
+    '$required' => true,
+    '_fc_id' => 'id_Fqgfme9rioxkabc',
+    'name' => 'ref_Fomwme9rioxkacc',
+    'display' => true,
+    'hidden' => false,
+    '_fc_drag_tag' => 'input'
+],
+    [
+        'type' => 'input',
+        'title' => 'SecretKey',
+        'field' => 'secret_key',
+        'props' => [
+            'placeholder' => '请输入腾讯云API密钥SecretKey'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_F06jme9rioxkadc',
+        'name' => 'ref_Fn9lme9rioxkaec',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'AppId',
+        'field' => 'app_id',
+        'props' => [
+            'placeholder' => '请输入短信应用ID'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fua8me9rioxkafc',
+        'name' => 'ref_Flzlme9rioxkagc',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'SignName',
+        'field' => 'sign_name',
+        'props' => [
+            'placeholder' => '请输入短信签名内容'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fdvume9rioxkahc',
+        'name' => 'ref_F7ecme9rioxkaic',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'TemplateId',
+        'field' => 'template_id',
+        'props' => [
+            'placeholder' => '请输入短信模板ID'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fev8me9rioxkajc',
+        'name' => 'ref_Fwj5me9rioxkakc',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'SmsSdkAppId',
+        'field' => 'sms_sdk_app_id',
+        'props' => [
+            'placeholder' => '请输入短信SdkAppId'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fmwkme9rioxkalc',
+        'name' => 'ref_Fm8tme9rioxkamc',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'Endpoint',
+        'field' => 'endpoint',
+        'props' => [
+            'placeholder' => '请输入API请求域名(如:sms.tencentcloudapi.com)'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fj0nme9rioxkanc',
+        'name' => 'ref_Fb2wme9rioxkaoc',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ],
+    [
+        'type' => 'input',
+        'title' => 'Region',
+        'field' => 'region',
+        'props' => [
+            'placeholder' => '请输入地域参数(如:ap-guangzhou)'
+        ],
+        '$required' => true,
+        '_fc_id' => 'id_Fwtame9rioxkapc',
+        'name' => 'ref_F3snme9rioxkaqc',
+        'display' => true,
+        'hidden' => false,
+        '_fc_drag_tag' => 'input'
+    ]
+];

+ 16 - 0
info.php

@@ -0,0 +1,16 @@
+<?php
+declare(strict_types=1);
+return [
+  'id' => 'tencentcloud_sms',
+  'name' => '腾讯云短信',
+  'is_core' => false,
+  'category' => 'other',
+  'description' => '腾讯云短信',
+  'version' => '1.0.0',
+  'core_version' => '^1.0',
+  'author' => 'yourname',
+  'email' => '',
+  'website' => '',
+  'image' => '',
+  'license' => 'MIT',
+];

+ 14 - 0
src/Extension.php

@@ -0,0 +1,14 @@
+<?php
+declare(strict_types=1);
+
+namespace TencentCloudSms;
+
+use SixShop\Core\ExtensionAbstract;
+
+class Extension extends ExtensionAbstract
+{
+    protected function getBaseDir(): string
+    {
+        return dirname(__DIR__);
+    }
+}