diff --git a/collection/uni-cms-articles/schema.ext.js b/collection/uni-cms-articles/schema.ext.js index b6b7e1c..50ca259 100644 --- a/collection/uni-cms-articles/schema.ext.js +++ b/collection/uni-cms-articles/schema.ext.js @@ -180,6 +180,10 @@ module.exports = { throw new Error('请在 uni-cms 配置文件中配置 clientAppIds 字段后访问,详见:https://uniapp.dcloud.net.cn/uniCloud/uni-cms.html#uni-cms-config') } + if (isAdmin && config.clientAppIds && config.clientAppIds.includes(clientInfo.appId)) { + throw new Error('uni-cms 配置文件中的 clientAppIds 字段请勿添加管理端的 appid,请移除后重试') + } + // 如果clientAppIds字段未配置或当前appId不在clientAppIds中,则返回 if (!config.clientAppIds || !config.clientAppIds.includes(clientInfo.appId)) return