This commit is contained in:
全栈小学生 2023-10-24 18:43:42 +08:00
parent d9db301efd
commit 6cb144d8c0
4 changed files with 10 additions and 8 deletions

View File

@ -613,9 +613,8 @@ const getInstallTask = (first: boolean = true) => {
} else { } else {
if (!first) { if (!first) {
installStep.value = 3 installStep.value = 3
userStore.clearRouters()
localListFn() localListFn()
userStore.getAppList() userStore.clearRouters()
notificationEl.close() notificationEl.close()
} }
} }
@ -733,7 +732,7 @@ const uninstallAddonFn = (key: string) => {
if (data.is_pass) { if (data.is_pass) {
uninstallAddon({ addon: key }).then(res => { uninstallAddon({ addon: key }).then(res => {
localListFn() localListFn()
userStore.getAppList() userStore.clearRouters()
loading.value = false loading.value = false
}).catch(() => { }).catch(() => {
loading.value = false loading.value = false

View File

@ -24,9 +24,9 @@ const prop = defineProps({
type: String, type: String,
default: 'sys/document/document' default: 'sys/document/document'
}, },
accept:{ accept: {
type: String, type: String,
default: '.doc,.docx,.xml,.txt,.pem,.zip,.rar,.7z,.crt' default: '.doc,.docx,.xml,.txt,.pem,.zip,.rar,.7z,.crt,.key'
} }
}) })

View File

@ -13,6 +13,7 @@ namespace app\service\core\addon;
use app\model\addon\AddonDevelop; use app\model\addon\AddonDevelop;
use app\service\core\niucloud\CoreCloudBaseService; use app\service\core\niucloud\CoreCloudBaseService;
use app\service\core\niucloud\CoreModuleService;
use core\exception\CommonException; use core\exception\CommonException;
use core\util\niucloud\CloudService; use core\util\niucloud\CloudService;
use GuzzleHttp\Client; use GuzzleHttp\Client;
@ -71,7 +72,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
'authorize_code' => $this->auth_code, 'authorize_code' => $this->auth_code,
'timestamp' => $install_task['timestamp'] 'timestamp' => $install_task['timestamp']
]; ];
(new CloudService())->httpPost('cloud/build?' . http_build_query($query), [ $response = (new CloudService())->httpPost('cloud/build?' . http_build_query($query), [
'multipart' => [ 'multipart' => [
[ [
'name' => 'file', 'name' => 'file',
@ -80,6 +81,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
] ]
], ],
]); ]);
if (isset($response['code']) && $response['code'] == 0) throw new CommonException($response['msg']);
// 删除临时文件 // 删除临时文件
del_target_dir($temp_dir, true); del_target_dir($temp_dir, true);
@ -212,7 +214,8 @@ class CoreAddonCloudService extends CoreCloudBaseService
$query = [ $query = [
'authorize_code' => $this->auth_code, 'authorize_code' => $this->auth_code,
'addon_name' => $addon, 'addon_name' => $addon,
'addon_version' => $version 'addon_version' => $version,
// 'token' => (new CoreModuleService())->getActionToken('download', ['app_key' => $addon, 'version' => $version])
]; ];
// 获取文件大小 // 获取文件大小

View File

@ -157,7 +157,7 @@ class CoreAddonInstallService extends CoreAddonBaseService
// 是否通过校验 // 是否通过校验
$data['is_pass'] = !in_array(false, $check_res); $data['is_pass'] = !in_array(false, $check_res);
Cache::set($this->cache_key . '_install_check', $data['is_pass'], 120); Cache::set($this->cache_key . '_install_check', $data['is_pass']);
return $data; return $data;
} }