MaiXinRong 4 年之前
父节点
当前提交
1b325494cd
共有 1 个文件被更改,包括 8 次插入1 次删除
  1. 8 1
      app/service/project.js

+ 8 - 1
app/service/project.js

@@ -79,6 +79,7 @@ module.exports = app => {
             });
             });
             const [sql, sqlParam] = this.sqlBuilder.build(this.tableName);
             const [sql, sqlParam] = this.sqlBuilder.build(this.tableName);
             const projectData = await this.db.queryOne(sql, sqlParam);
             const projectData = await this.db.queryOne(sql, sqlParam);
+
             return projectData;
             return projectData;
         }
         }
 
 
@@ -143,7 +144,13 @@ module.exports = app => {
 
 
         async getPageshow(id) {
         async getPageshow(id) {
             const projectData = await this.db.get(this.tableName, { id });
             const projectData = await this.db.get(this.tableName, { id });
-            return projectData.page_show ? JSON.parse(projectData.page_show) : null;
+            const pageShow = projectData.page_show ? JSON.parse(projectData.page_show) : null;
+            if (pageShow) {
+                if (pageShow.stageExtra === undefined) pageShow.stageExtra = '1';
+                return pageShow;
+            } else {
+                return { stageExtra: '1' };
+            }
         }
         }
 
 
         /**
         /**