|
|
|
@ -48,24 +48,24 @@ const CoreArea: FC<PageProps> = ({
|
|
|
|
|
// 在指定的目录下安装快捷方式
|
|
|
|
|
const installSuccess = async () => {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch('http://localhost:3000/createShortcut', {
|
|
|
|
|
method: 'POST',
|
|
|
|
|
headers: { 'Content-Type': 'application/json' },
|
|
|
|
|
mode: "cors",
|
|
|
|
|
body: JSON.stringify({
|
|
|
|
|
folderPath: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`,
|
|
|
|
|
shortcutName: '专用核心密码综合管理系统',
|
|
|
|
|
shortcutURL: `http://localhost:8000/initialSystem/${urlParams?.fileType}`
|
|
|
|
|
}),
|
|
|
|
|
});
|
|
|
|
|
const data = await response.text();
|
|
|
|
|
message.success(data)
|
|
|
|
|
|
|
|
|
|
// 储存信息
|
|
|
|
|
let installExe: any = localStorage.getItem('installExe')
|
|
|
|
|
let obj = JSON.parse(installExe);
|
|
|
|
|
obj[9].select = true;
|
|
|
|
|
localStorage.setItem('installExe', JSON.stringify(obj));
|
|
|
|
|
// const response = await fetch('http://localhost:3000/createShortcut', {
|
|
|
|
|
// method: 'POST',
|
|
|
|
|
// headers: { 'Content-Type': 'application/json' },
|
|
|
|
|
// mode: "cors",
|
|
|
|
|
// body: JSON.stringify({
|
|
|
|
|
// folderPath: `C:/Users/lyc/Desktop/${countType[urlParams?.fileType]}`,
|
|
|
|
|
// shortcutName: '专用核心密码综合管理系统',
|
|
|
|
|
// shortcutURL: `http://localhost:8000/initialSystem/${urlParams?.fileType}`
|
|
|
|
|
// }),
|
|
|
|
|
// });
|
|
|
|
|
// const data = await response.text();
|
|
|
|
|
// message.success(data)
|
|
|
|
|
|
|
|
|
|
// // 储存信息
|
|
|
|
|
// let installExe: any = localStorage.getItem('installExe')
|
|
|
|
|
// let obj = JSON.parse(installExe);
|
|
|
|
|
// obj[9].select = true;
|
|
|
|
|
// localStorage.setItem('installExe', JSON.stringify(obj));
|
|
|
|
|
|
|
|
|
|
onCancel()
|
|
|
|
|
} catch (error) {
|
|
|
|
|