Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
electron-printer
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhuzhequan
electron-printer
Commits
a842320a
Commit
a842320a
authored
Aug 08, 2025
by
linjinhong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:修改问题
parent
25a79519
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/server/entity/function.js
+6
-2
No files found.
src/server/entity/function.js
View file @
a842320a
...
@@ -413,6 +413,7 @@ export default {
...
@@ -413,6 +413,7 @@ export default {
let
dirPath
=
path
.
join
(
process
.
cwd
(),
`./print/Input`
);
let
dirPath
=
path
.
join
(
process
.
cwd
(),
`./print/Input`
);
if
(
!
fs
.
existsSync
(
dirPath
))
{
if
(
!
fs
.
existsSync
(
dirPath
))
{
console
.
log
(
`目录不存在:
${
dirPath
}
`
);
console
.
log
(
`目录不存在:
${
dirPath
}
`
);
res
.
json
({
code
:
500
,
msg
:
`目录不存在:
${
dirPath
}
`
});
return
;
return
;
}
}
try
{
try
{
...
@@ -426,14 +427,17 @@ export default {
...
@@ -426,14 +427,17 @@ export default {
console
.
log
(
`已删除文件:
${
fullPath
}
`
);
console
.
log
(
`已删除文件:
${
fullPath
}
`
);
}
}
}
}
res
.
json
({
code
:
200
,
msg
:
`
已删除文件:
${
deletedFiles
.
join
(
","
)}
`
});
res
.
json
({
code
:
200
,
msg
:
`
删除成功!`
,
data
:
deletedFiles
});
}
catch
(
error
)
{
}
catch
(
error
)
{
let
msg
=
""
;
if
(
error
.
code
===
"ENOENT"
)
{
if
(
error
.
code
===
"ENOENT"
)
{
msg
=
`目录不存在:
${
dirPath
}
`
;
console
.
warn
(
`目录不存在:
${
dirPath
}
`
);
console
.
warn
(
`目录不存在:
${
dirPath
}
`
);
}
else
{
}
else
{
msg
=
`清理错误:
${
error
.
message
}
`
;
console
.
error
(
`清理错误:
${
error
.
message
}
`
);
console
.
error
(
`清理错误:
${
error
.
message
}
`
);
}
}
res
.
json
({
code
:
500
,
msg
:
error
.
message
});
res
.
json
({
code
:
500
,
msg
:
msg
});
}
}
},
},
saveToPng
:
async
(
req
,
res
)
=>
{
saveToPng
:
async
(
req
,
res
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment