master
鲁誉程 1 year ago
parent 4841b701b7
commit 668f391ac9

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

Loading…
Cancel
Save