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
b1226def
Commit
b1226def
authored
Aug 10, 2024
by
朱哲铨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug 修复
parent
84cfda63
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
9 deletions
+10
-9
src/server/utils/index.js
+10
-9
No files found.
src/server/utils/index.js
View file @
b1226def
...
...
@@ -20,13 +20,14 @@ function zip(from, to) {
console
.
log
(
"success"
);
let
data
=
fs
.
readdirSync
(
dirName
);
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
let
fileName
=
uuid
.
v4
()
+
".png"
;
let
el
=
data
[
i
];
let
file_path
=
path
.
join
(
dirName
,
el
);
console
.
log
(
file_path
,
to
);
fs
.
renameSync
(
file_path
,
path
.
join
(
to
,
el
));
fs
.
renameSync
(
file_path
,
path
.
join
(
to
,
fileName
));
arr
.
push
({
fileName
:
el
,
productionFile
:
path
.
join
(
to
,
el
)
fileName
:
fileName
,
productionFile
:
path
.
join
(
to
,
fileName
)
});
}
...
...
@@ -69,8 +70,8 @@ export const downloadImage = list => {
.
length
>
0
;
if
(
flag
)
{
fileName
=
list
[
i
].
productionFile
.
split
(
"/"
)[
list
[
i
].
productionFile
.
split
(
"/"
).
length
-
1
];
list
[
i
].
productionFile
.
split
(
"/"
).
length
-
1
];
type
=
1
;
}
else
{
fileName
=
uuid
.
v4
()
+
".png"
;
...
...
@@ -141,16 +142,16 @@ export const toSend = body => {
path
.
join
(
process
.
cwd
(),
"print/Profile/"
+
body
.
fileName
.
replace
(
".png"
,
""
)
+
".xml"
body
.
fileName
.
replace
(
".png"
,
""
)
+
".xml"
)
);
fs
.
unlinkSync
(
path
.
join
(
process
.
cwd
(),
"print/Output/"
+
body
.
fileName
.
replace
(
".png"
,
""
)
+
".arxp"
body
.
fileName
.
replace
(
".png"
,
""
)
+
".arxp"
)
);
resolve
(
"操作成功"
);
...
...
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