From fe4f4e50d735c3e54bcc51697faebb12987fc6f5 Mon Sep 17 00:00:00 2001 From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com> Date: Thu, 6 Aug 2020 10:50:09 +0800 Subject: [PATCH] SCF:select save in env or file --- platform/TencentSCF_env.php | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/platform/TencentSCF_env.php b/platform/TencentSCF_env.php index cfbf00e..366ffd5 100644 --- a/platform/TencentSCF_env.php +++ b/platform/TencentSCF_env.php @@ -160,12 +160,18 @@ function install() $SecretKey = $_POST['SecretKey']; $tmp['SecretKey'] = $SecretKey; } + $tmp['ONEMANAGER_CONFIG_SAVE'] = $_POST['ONEMANAGER_CONFIG_SAVE']; $response = json_decode(SetbaseConfig($tmp, $_SERVER['function_name'], $_SERVER['Region'], $_SERVER['namespace'], $SecretId, $SecretKey), true)['Response']; if (api_error($response)) { $html = api_error_msg($response); $title = 'Error'; return message($html, $title, 201); } else { + if ($tmp['ONEMANAGER_CONFIG_SAVE'] == 'file') { + $html = getconstStr('ONEMANAGER_CONFIG_SAVE_FILE') . '
' . getconstStr('Home') . ''; + $title = 'Reinstall'; + return message($html, $title, 201); + } $html .= '

@@ -194,10 +200,13 @@ language:
';
'; } if (getConfig('SecretId')==''||getConfig('SecretKey')=='') $html .= ' - '.getconstStr('Create').' SecretId & SecretKey
+ ' . getconstStr('Create') . ' SecretId & SecretKey


'; $html .= ' +
+
'; + $html .= '