mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-12 19:02:49 +00:00
update
This commit is contained in:
parent
d9db301efd
commit
6cb144d8c0
@ -613,9 +613,8 @@ const getInstallTask = (first: boolean = true) => {
|
||||
} else {
|
||||
if (!first) {
|
||||
installStep.value = 3
|
||||
userStore.clearRouters()
|
||||
localListFn()
|
||||
userStore.getAppList()
|
||||
userStore.clearRouters()
|
||||
notificationEl.close()
|
||||
}
|
||||
}
|
||||
@ -733,7 +732,7 @@ const uninstallAddonFn = (key: string) => {
|
||||
if (data.is_pass) {
|
||||
uninstallAddon({ addon: key }).then(res => {
|
||||
localListFn()
|
||||
userStore.getAppList()
|
||||
userStore.clearRouters()
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
|
||||
@ -24,9 +24,9 @@ const prop = defineProps({
|
||||
type: String,
|
||||
default: 'sys/document/document'
|
||||
},
|
||||
accept:{
|
||||
accept: {
|
||||
type: String,
|
||||
default: '.doc,.docx,.xml,.txt,.pem,.zip,.rar,.7z,.crt'
|
||||
default: '.doc,.docx,.xml,.txt,.pem,.zip,.rar,.7z,.crt,.key'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@ -13,6 +13,7 @@ namespace app\service\core\addon;
|
||||
|
||||
use app\model\addon\AddonDevelop;
|
||||
use app\service\core\niucloud\CoreCloudBaseService;
|
||||
use app\service\core\niucloud\CoreModuleService;
|
||||
use core\exception\CommonException;
|
||||
use core\util\niucloud\CloudService;
|
||||
use GuzzleHttp\Client;
|
||||
@ -71,7 +72,7 @@ class CoreAddonCloudService extends CoreCloudBaseService
|
||||
'authorize_code' => $this->auth_code,
|
||||
'timestamp' => $install_task['timestamp']
|
||||
];
|
||||
(new CloudService())->httpPost('cloud/build?' . http_build_query($query), [
|
||||
$response = (new CloudService())->httpPost('cloud/build?' . http_build_query($query), [
|
||||
'multipart' => [
|
||||
[
|
||||
'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);
|
||||
@ -212,7 +214,8 @@ class CoreAddonCloudService extends CoreCloudBaseService
|
||||
$query = [
|
||||
'authorize_code' => $this->auth_code,
|
||||
'addon_name' => $addon,
|
||||
'addon_version' => $version
|
||||
'addon_version' => $version,
|
||||
// 'token' => (new CoreModuleService())->getActionToken('download', ['app_key' => $addon, 'version' => $version])
|
||||
];
|
||||
|
||||
// 获取文件大小
|
||||
|
||||
@ -157,7 +157,7 @@ class CoreAddonInstallService extends CoreAddonBaseService
|
||||
|
||||
// 是否通过校验
|
||||
$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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user