Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
quantum-blocks
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
quantum-blocks
Commits
8199c09f
Commit
8199c09f
authored
Nov 30, 2021
by
郭志伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(update): 存储方式调整
parent
1b84bf96
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
editor.ts
app/controller/editor.ts
+3
-0
index.ts
app/web/page/editor/view/dashboard/index.ts
+5
-0
No files found.
app/controller/editor.ts
View file @
8199c09f
...
...
@@ -24,6 +24,9 @@ export default class EditorController extends Controller {
if
(
!
pageInfo
.
uuid
)
{
pageInfo
.
uuid
=
uuidv1
().
replace
(
/-/g
,
''
);
}
if
(
ctx
.
headers
[
'
qg-tenant-id
'
])
{
pageInfo
.
tenantId
=
+
ctx
.
headers
[
'
qg-tenant-id
'
];
}
const
result
=
await
ctx
.
model
.
PageInfo
.
update
(
pageInfo
,
{
where
:
{
uuid
:
pageInfo
.
uuid
,
tenantId
:
ctx
.
headers
[
'
qg-tenant-id
'
]
}});
await
ctx
.
service
.
redis
.
set
(
`pageInfo:
${
pageInfo
.
uuid
}
`
,
pageInfo
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageInfo
.
uuid
}
`
);
...
...
app/web/page/editor/view/dashboard/index.ts
View file @
8199c09f
...
...
@@ -88,6 +88,11 @@ export default class DashBoard extends Mixins(ContextMenuMixin, GoodsTabsMixin,
pageData
=
this
.
handleComAchorScrollEnable
();
pageData
=
this
.
handleGoodsTabs
();
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
,
diversion
}
=
pageConfig
;
// !diversion shareCoverImage shareOpenMethod没有作为单独的sql字段存储下来,只是单纯的存储到的redis中
// 目前对此打了补丁,存放到page的props中
pageData
.
props
.
diversion
=
diversion
;
pageData
.
props
.
shareCoverImage
=
shareCoverImage
;
pageData
.
props
.
shareOpenMethod
=
shareOpenMethod
;
const
pageInfo
=
{
diversion
,
page
:
JSON
.
stringify
(
pageData
),
author
:
user
?.
account
,
isPublish
,
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
}
as
pageInfo
;
if
(
this
.
uuid
)
{
pageInfo
.
uuid
=
this
.
uuid
;
}
await
this
.
savePageData
({
pageInfo
,
pageData
:
this
.
pageData
});
...
...
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