Commit 1c25160bd3064722d48a4066ea6e01eb61b2a4c8

Authored by ly525
1 parent 7fe6408f

chore: set default width value of work for service-api

back-end/h5-api/api/work/controllers/Work.js
@@ -31,6 +31,7 @@ module.exports = { @@ -31,6 +31,7 @@ module.exports = {
31 // 非预览模式, 查看不到内容 31 // 非预览模式, 查看不到内容
32 const canRender = view_mode === VIEW_MODE.PREVIEW || work.is_publish; 32 const canRender = view_mode === VIEW_MODE.PREVIEW || work.is_publish;
33 if (!canRender) work.pages = []; 33 if (!canRender) work.pages = [];
  34 + work.width = work.width || 320;
34 return ctx.render('engine', { work }); 35 return ctx.render('engine', { work });
35 }, 36 },
36 renderCoreEditor: async (ctx) => { 37 renderCoreEditor: async (ctx) => {