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
80f1570e
Commit
80f1570e
authored
Nov 04, 2021
by
wty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新prod3
parent
7cf14eae
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
query.js
server/routes/query.js
+3
-4
index.jsx
src/page/indexAdmin/index.jsx
+1
-1
No files found.
server/routes/query.js
View file @
80f1570e
...
@@ -40,10 +40,9 @@ getMysql.then(Mysql => {
...
@@ -40,10 +40,9 @@ getMysql.then(Mysql => {
router
.
get
(
'/queryToolBox'
,
(
req
,
res
)
=>
{
router
.
get
(
'/queryToolBox'
,
(
req
,
res
)
=>
{
let
{
isFollow
,
type_id
}
=
req
.
query
let
{
isFollow
,
type_id
}
=
req
.
query
let
SQL
=
`SELECT toolbox.*, type_childtype_toolbox.child_type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id WHERE type_childtype_toolbox.type_id = ?`
if
(
!
isFollow
&&
!
type_id
){
let
SQL
=
`SELECT toolbox.*, type_childtype_toolbox.child_type_id, type_childtype_toolbox.type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id`
SQL
=
`SELECT toolbox.*, type_childtype_toolbox.child_type_id, type_childtype_toolbox.type_id FROM type_childtype_toolbox INNER JOIN toolbox ON type_childtype_toolbox.toolbox_id = toolbox.toolbox_id`
}
if
(
isFollow
)
{
if
(
isFollow
)
{
// type_id = JSON.parse(type_id)
// type_id = JSON.parse(type_id)
if
(
Array
.
isArray
(
type_id
)
&&
!
type_id
.
length
){
if
(
Array
.
isArray
(
type_id
)
&&
!
type_id
.
length
){
...
...
src/page/indexAdmin/index.jsx
View file @
80f1570e
...
@@ -65,7 +65,7 @@ function Index() {
...
@@ -65,7 +65,7 @@ function Index() {
src=
"https://i.tianqi.com/?c=code&a=getcode&id=40&icon=1"
/>
src=
"https://i.tianqi.com/?c=code&a=getcode&id=40&icon=1"
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
IndexContentAdmin
typeData=
{
[
{
type_id
:
'all'
,
type_name
:
'全部'
},
{
type_id
:
'follow'
,
type_name
:
'我的收藏'
}]
}
/>
<
IndexContentAdmin
typeData=
{
[
{
type_id
:
'follow'
,
type_name
:
'我的收藏'
}]
}
/>
{
{
Array
.
isArray
(
dataCenter
?.
type
)
&&
dataCenter
?.
type
?.
map
(
v
=>
(
Array
.
isArray
(
dataCenter
?.
type
)
&&
dataCenter
?.
type
?.
map
(
v
=>
(
<
IndexContentAdmin
typeData=
{
[
v
]
}
key=
{
v
.
type_id
}
/>
<
IndexContentAdmin
typeData=
{
[
v
]
}
key=
{
v
.
type_id
}
/>
...
...
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