mirror of
https://gitee.com/niucloud-team/niucloud-admin.git
synced 2025-12-13 19:22:48 +00:00
update
This commit is contained in:
parent
d9db301efd
commit
6cb144d8c0
@ -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
|
||||||
|
|||||||
@ -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'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -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])
|
||||||
];
|
];
|
||||||
|
|
||||||
// 获取文件大小
|
// 获取文件大小
|
||||||
|
|||||||
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user