Jelajahi Sumber

旧项目默认值问题

MaiXinRong 2 tahun lalu
induk
melakukan
cf47042daa
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      app/service/tender_info.js

+ 1 - 1
app/service/tender_info.js

@@ -75,7 +75,7 @@ module.exports = app => {
             if (!info) info = await this.addTenderInfo(tenderId, this.ctx.session.sessionProject.id);
             for (const pi of parseInfo) {
                 info[pi] = !info[pi] || info[pi] === '' ? (pi === 'shenpi' ? JSON.parse(JSON.stringify(defaultInfo[pi])) : defaultInfo[pi]) : JSON.parse(info[pi]);
-                this.ctx.helper._.defaults(info[pi], defaultInfo[pi]);
+                this.ctx.helper._.defaultsDeep(info[pi], defaultInfo[pi]);
             }
             for (const ai of arrayInfo) {
                 info[ai] = !info[ai] || info[ai] === '' ? defaultInfo[ai] : JSON.parse(info[ai]);