Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Dui123
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
王天宇
Dui123
Commits
51a6b4ff
Commit
51a6b4ff
authored
Oct 28, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复问题4
parent
95cdbd11
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
main.600ac631.chunk.js
build/static/js/main.600ac631.chunk.js
+2
-0
main.600ac631.chunk.js.map
build/static/js/main.600ac631.chunk.js.map
+1
-0
add.js
server/routes/add.js
+5
-2
No files found.
build/static/js/main.600ac631.chunk.js
0 → 100644
View file @
51a6b4ff
This diff is collapsed.
Click to expand it.
build/static/js/main.600ac631.chunk.js.map
0 → 100644
View file @
51a6b4ff
This diff is collapsed.
Click to expand it.
server/routes/add.js
View file @
51a6b4ff
...
@@ -17,11 +17,14 @@ getMysql.then(Mysql => {
...
@@ -17,11 +17,14 @@ getMysql.then(Mysql => {
}
}
request
(
domain
+
'/query/queryToolBox'
,
{},
(
error
,
response
,
body
)
=>
{
request
(
domain
+
'/query/queryToolBox'
,
{},
(
error
,
response
,
body
)
=>
{
console
.
log
(
domain
+
'/query/queryToolBox'
)
console
.
log
(
domain
+
'/query/queryToolBox'
)
console
.
log
(
'body:'
,
body
)
console
.
log
(
'body:'
,
body
)
const
data
=
JSON
.
parse
(
body
).
data
const
data
=
JSON
.
parse
(
body
).
data
const
lastToolBoxId
=
data
[
data
.
length
-
1
].
toolbox_id
const
lastToolBoxId
=
data
[
data
.
length
-
1
].
toolbox_id
const
SQL
=
'INSERT INTO type_childtype_toolbox (toolbox_id,type_id,child_type_id) VALUES (?,?,?)'
const
SQL
=
'INSERT INTO type_childtype_toolbox (toolbox_id,type_id,child_type_id) VALUES (?,?,?)'
Mysql
.
query
(
SQL
,
[
lastToolBoxId
,
type_id
,
child_type_id
],
(
err
,
result
)
=>
{
const
params
=
[
lastToolBoxId
,
type_id
]
if
(
typeof
child_type_id
!==
'number'
)
params
.
push
(
null
)
else
params
.
push
(
child_type_id
)
Mysql
.
query
(
SQL
,
params
,
(
err
,
result
)
=>
{
if
(
err
)
{
if
(
err
)
{
res
.
send
({
res
.
send
({
success
:
false
,
success
:
false
,
...
...
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