From 064e129342d71af00901056b97c4fb48ab4e2a3f Mon Sep 17 00:00:00 2001 From: Karson Date: Mon, 2 Apr 2018 22:26:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8DAPI=E4=B8=80=E9=94=AE?= =?UTF-8?q?=E7=94=9F=E6=88=90=E6=97=B6ApiReturn=E7=9A=84=E9=94=99=E8=AF=AF?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E9=BB=98=E8=AE=A4Token=E9=A9=B1=E5=8A=A8?= =?UTF-8?q?=E4=B8=BAMysql=20=E4=BF=AE=E5=A4=8D=E5=9C=A8=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=B8=AD=E4=BD=BF=E7=94=A8=E5=AF=8C=E6=96=87?= =?UTF-8?q?=E6=9C=AC=E7=BC=96=E8=BE=91=E5=99=A8=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../admin/command/Api/library/Extractor.php | 15 +++++++++++---- application/admin/view/general/config/index.html | 6 +++--- application/config.php | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/application/admin/command/Api/library/Extractor.php b/application/admin/command/Api/library/Extractor.php index 49bdf282..1dc62e34 100644 --- a/application/admin/command/Api/library/Extractor.php +++ b/application/admin/command/Api/library/Extractor.php @@ -2,6 +2,8 @@ namespace app\admin\command\Api\library; +use Exception; + /** * Class imported from https://github.com/eriknyk/Annotations * @author Erik Amaru Ortiz https://github.com/eriknyk‎ @@ -329,11 +331,16 @@ class Extractor { $argsParts = trim($matches['args'][$i]); $name = $matches['name'][$i]; - $argsParts = preg_replace("/\{(\w+)\}/", '#$1#', $argsParts); - $value = self::parseArgs($argsParts); - if(is_string($value)) + if($name == 'ApiReturn') { - $value = preg_replace("/\#(\w+)\#/", '{$1}', $argsParts); + $value = $argsParts; + } else { + $argsParts = preg_replace("/\{(\w+)\}/", '#$1#', $argsParts); + $value = self::parseArgs($argsParts); + if(is_string($value)) + { + $value = preg_replace("/\#(\w+)\#/", '{$1}', $argsParts); + } } } else diff --git a/application/admin/view/general/config/index.html b/application/admin/view/general/config/index.html index 9875aab4..44edef96 100644 --- a/application/admin/view/general/config/index.html +++ b/application/admin/view/general/config/index.html @@ -51,7 +51,7 @@ {/case} {case editor} - + {/case} {case array}
@@ -176,8 +176,8 @@
- +
diff --git a/application/config.php b/application/config.php index 3bfb1d6d..b7472467 100755 --- a/application/config.php +++ b/application/config.php @@ -247,7 +247,7 @@ return [ // +---------------------------------------------------------------------- 'token' => [ // 驱动方式 - 'type' => 'Redis', + 'type' => 'Mysql', // 缓存前缀 'key' => 'i3d6o32wo8fvs1fvdpwens', // 加密方式