Commit 8199c09f authored by 郭志伟's avatar 郭志伟

fix(update): 存储方式调整

parent 1b84bf96
......@@ -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}`);
......
......@@ -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 });
......
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