Commit f6e6fb2c authored by Xuguangxing's avatar Xuguangxing

feat: 处理编辑器请求数据的问题

parent 730dd9c5
......@@ -37,7 +37,7 @@ export default class EditorController extends Controller {
}
try {
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}`);
ctx.body = ctx.helper.ok(result);
} catch (error) {
......
......@@ -34,7 +34,9 @@ export default class DynamicForm extends Vue {
@Watch('pageData', { immediate: true })
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 };
}
......
......@@ -159,7 +159,9 @@ export default class DynamicPageForm extends Mixins(ContextMenuMixin) {
}
];
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 })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment