From 05531b5fe1a9e37d9a72d8aca1a2f885e0cbea8e Mon Sep 17 00:00:00 2001
From: qkqpttgf <45693631+qkqpttgf@users.noreply.github.com>
Date: Wed, 1 Dec 2021 14:51:43 +0800
Subject: [PATCH] add setup=auth
---
platform/TencentSCF_file.php | 95 ++++++++++++++++++++++++++++--------
1 file changed, 76 insertions(+), 19 deletions(-)
diff --git a/platform/TencentSCF_file.php b/platform/TencentSCF_file.php
index 78e8600..9f53d92 100644
--- a/platform/TencentSCF_file.php
+++ b/platform/TencentSCF_file.php
@@ -1,4 +1,7 @@
- ', 'Program updating', 201);
+ ', 'Program updating', 201, 1);
}
- return output('Jump
+ return message(getconstStr('Success') . '
- ', 302);
+ var i = 0;
+ var uploadList = setInterval(function(){
+ if (document.getElementById("dis").style.display=="none") {
+ console.log(i++);
+ } else {
+ clearInterval(uploadList);
+ location.href = "' . path_format($_SERVER['base_path'] . '/') . '";
+ }
+ }, 1000);
+ ', 201, 1);
}
if ($_GET['install1']) {
$tmp['timezone'] = $_COOKIE['timezone'];
- $SecretId = getConfig('SecretId');
- if ($SecretId=='') {
- $SecretId = $_POST['SecretId'];
- $tmp['SecretId'] = $SecretId;
- }
- $SecretKey = getConfig('SecretKey');
- if ($SecretKey=='') {
- $SecretKey = $_POST['SecretKey'];
- $tmp['SecretKey'] = $SecretKey;
- }
+ $SecretId = $_POST['SecretId'];
+ $tmp['SecretId'] = $SecretId;
+ $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)) {
@@ -211,7 +216,7 @@ function install()
if ($tmp['ONEMANAGER_CONFIG_SAVE'] != 'file') {
$html = getconstStr('ONEMANAGER_CONFIG_SAVE_ENV') . '
' . getconstStr('Home') . '';
$title = 'Reinstall';
- return message($html, $title, 201);
+ return message($html, $title, 201, 1);
}
$html .= '