明树Git Lab
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
J
jt_backend
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zengfanpei
jt_backend
Commits
b5cf3a4e
Commit
b5cf3a4e
authored
Dec 03, 2025
by
zfp1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
b86ed16d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
projectController.js
controller/projectController.js
+2
-2
projectModule.js
module/projectModule.js
+4
-1
No files found.
controller/projectController.js
View file @
b5cf3a4e
...
...
@@ -696,8 +696,8 @@ async function getOwnProjects(req, res, next) {
search
.
raw
=
true
;
console
.
log
(
search
,
"-=="
)
let
ret
=
await
DB
.
Project
.
findAndCountAll
(
search
);
//
let lastRet = await projectModule.handleProjectData(ret, search.attributes);
return
res
.
sendData
(
r
et
);
let
lastRet
=
await
projectModule
.
handleProjectData
(
ret
,
search
.
attributes
);
return
res
.
sendData
(
lastR
et
);
}
catch
(
error
)
{
next
(
error
);
}
...
...
module/projectModule.js
View file @
b5cf3a4e
...
...
@@ -16,11 +16,14 @@ const projectModule = require('../module/projectModule');
async
function
handleProjectData
(
ret
,
queryAttrs
)
{
let
rawAttributes
=
DB
.
Project
.
rawAttributes
;
console
.
log
(
rawAttributes
,
"===="
)
let
queryRawAtr
=
[];
let
queryRawAtr
=
[]
,
resourceKeys
=
[]
;
for
(
let
index
=
0
;
index
<
queryAttrs
.
length
;
index
++
)
{
const
element
=
queryAttrs
[
index
];
if
(
rawAttributes
[
element
])
{
queryRawAtr
.
push
(
rawAttributes
[
element
]);
if
([
'danxuan'
].
includes
(
element
.
zjType
))
{
resourceKeys
.
push
(
element
);
}
}
}
console
.
log
(
queryRawAtr
);
...
...
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