MaiXinRong 5 bulan lalu
induk
melakukan
3405b17aba

+ 1 - 1
app/controller/sub_proj_setting_controller.js

@@ -326,7 +326,7 @@ module.exports = app => {
                 const result2 = await ctx.service.subProject.updatePageshow(ctx.subProject.id);
                 if (!result2) throw '保存数据失败';
                 if (data.addFunSet) {
-                    const funSet = ctx.subProject.fun_set ? JSON.parse(ctx.subProject.fun_set) : {};
+                    const funSet = ctx.subProject.fun_set;
                     ctx.helper._.defaultsDeep(data.addFunSet, funSet);
                     const result3 = await ctx.service.subProject.updateFunSet(ctx.subProject.id, data.addFunSet);
                     if (!result3) throw '保存数据失败';

+ 1 - 1
app/service/sub_project.js

@@ -561,7 +561,7 @@ module.exports = app => {
 
         async updatePageshow(id) {
             const result = await this.db.update(this.tableName, {
-                id, page_show: JSON.stringify(this.ctx.session.sessionProject.page_show),
+                id, page_show: JSON.stringify(this.ctx.subProject.page_show),
             });
             return result.affectedRows === 1;
         }