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
f6e6fb2c
Commit
f6e6fb2c
authored
Apr 26, 2022
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理编辑器请求数据的问题
parent
730dd9c5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
editor.ts
app/controller/editor.ts
+1
-1
index.ts
app/web/page/editor/component/BasicPageFormModal/index.ts
+3
-1
index.ts
app/web/page/editor/component/DynamicPageForm/index.ts
+3
-1
No files found.
app/controller/editor.ts
View file @
f6e6fb2c
...
@@ -37,7 +37,7 @@ export default class EditorController extends Controller {
...
@@ -37,7 +37,7 @@ export default class EditorController extends Controller {
}
}
try
{
try
{
const
result
=
await
ctx
.
model
.
PageInfo
.
update
(
pageInfo
,
{
where
:
{
uuid
:
pageInfo
.
uuid
,
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
.
del
(
`pageInfo:
${
pageInfo
.
uuid
}
`
,
pageInfo
);
await
ctx
.
service
.
redis
.
del
(
`pageInfo:
${
pageInfo
.
uuid
}
`
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageInfo
.
uuid
}
`
);
await
ctx
.
service
.
redis
.
del
(
`page:
${
pageInfo
.
uuid
}
`
);
ctx
.
body
=
ctx
.
helper
.
ok
(
result
);
ctx
.
body
=
ctx
.
helper
.
ok
(
result
);
}
catch
(
error
)
{
}
catch
(
error
)
{
...
...
app/web/page/editor/component/BasicPageFormModal/index.ts
View file @
f6e6fb2c
...
@@ -34,7 +34,9 @@ export default class DynamicForm extends Vue {
...
@@ -34,7 +34,9 @@ export default class DynamicForm extends Vue {
@
Watch
(
'
pageData
'
,
{
immediate
:
true
})
@
Watch
(
'
pageData
'
,
{
immediate
:
true
})
onPageDataChange
(
newVal
)
{
onPageDataChange
(
newVal
)
{
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
,
shareCoverImage
,
shareOpenMethod
,
diversion
}
=
this
.
pageInfo
;
const
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
,
isTemplate
,
shareCoverImage
,
diversion
,
page
}
=
this
.
pageInfo
;
console
.
log
(
page
,
'
page1
'
);
const
{
shareOpenMethod
}
=
page
.
props
;
this
.
formCustom
=
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
:
!!
isPublish
,
isTemplate
:
!!
isTemplate
,
shareCoverImage
,
shareOpenMethod
,
diversion
};
this
.
formCustom
=
{
pageName
,
pageDescribe
,
pageKeywords
,
coverImage
,
isPublish
:
!!
isPublish
,
isTemplate
:
!!
isTemplate
,
shareCoverImage
,
shareOpenMethod
,
diversion
};
}
}
...
...
app/web/page/editor/component/DynamicPageForm/index.ts
View file @
f6e6fb2c
...
@@ -159,7 +159,9 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
...
@@ -159,7 +159,9 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
}
}
];
];
get
propsSchema
()
{
get
propsSchema
()
{
return
[...
this
.
titleSchema
,
...
this
.
bottomSchema
,
...
this
.
floatSchema
];
return
[...
this
.
titleSchema
,
...
this
.
bottomSchema
,
...
this
.
floatSchema
,
{
key
:
'
shareOpenMethod
'
// 这块用于让被污染的pageInfo的page.props返回shareOpenMethod
}];
}
}
@
Watch
(
'
cartAndShareBtn
'
,
{
immediate
:
true
})
@
Watch
(
'
cartAndShareBtn
'
,
{
immediate
:
true
})
...
...
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