diff --git a/src/bootstrap/global.js b/src/bootstrap/global.js index 2207fc6b00b05672c89f002276c1195af0e93026..360b0af6ce6fb7a6a22bad65edf77c08ec22e194 100644 --- a/src/bootstrap/global.js +++ b/src/bootstrap/global.js @@ -1238,10 +1238,10 @@ global.update_cache = async(type) => { await think.cache('get_model', null);// 清除模型缓存 break; case 'ext': - await think.cache('extcache'); + await think.cache('extcache',null); break; case 'hooks': - await think.cache('hookscache'); + await think.cache('hookscache',null); break; } }; diff --git a/src/model/cmswing/menu.js b/src/model/cmswing/menu.js index c27b0992f456d444d2bc0008e87b9f7ba3b423f8..727491d4bd8eea16c87e493cf9dd7449617142a0 100644 --- a/src/model/cmswing/menu.js +++ b/src/model/cmswing/menu.js @@ -10,7 +10,7 @@ module.exports = class extends think.Model { async getallmenu(uid, is_admin) { const where = {}; where.hide = 0; - if (!think.config('setup.DEVELOP_MODE')) { // 是否开发者模式 + if (think.config('setup.DEVELOP_MODE')==1) { // 是否开发者模式 where.is_dev = 0; } const groups = think.config('setup.MENU_GROUP'); @@ -54,7 +54,7 @@ module.exports = class extends think.Model { const where = {}; where.hide = 0; where.pid = 0; - if (!think.config('setup.DEVELOP_MODE')) { // 是否开发者模式 + if (think.config('setup.DEVELOP_MODE')==1) { // 是否开发者模式 where.is_dev = 0; } const menu = await this.where(where).order('sort asc').select(); @@ -67,7 +67,7 @@ module.exports = class extends think.Model { const where = {}; where.hide = 0; where.pid = id; - if (!think.config('setup.DEVELOP_MODE')) { // 是否开发者模式 + if (think.config('setup.DEVELOP_MODE')==1) { // 是否开发者模式 where.is_dev = 0; } const groups = await this.where(where).field('group').order('sort asc').select();