- 新增路由:GET /template - 实现功能:获取腾讯云短信模板列表 - 返回成功响应,包含模板列表数据
@@ -0,0 +1,7 @@
+<?php
+declare(strict_types=1);
+
+use SixShop\TencentCloudSms\Controller\IndexController;
+use think\facade\Route;
+Route::get('template', [IndexController::class, 'template']);
@@ -0,0 +1,17 @@
+namespace SixShop\TencentCloudSms\Controller;
+use SixShop\TencentCloudSms\Config;
+use think\Response;
+use function SixShop\Core\success_response;
+class IndexController
+{
+ /**
+ * 获取模板列表
+ */
+ public function template(Config $config): Response
+ {
+ return success_response($config->tencent_sms_templates);
+ }
+}