"use strict"; const core_config_defaultConfig = require("./defaultConfig.js"); const mergeConfig = Object.assign({}, core_config_defaultConfig.defaultConfig); const config = { // 获取全部配置 all() { return mergeConfig; }, // 获取指定配置 get(key, def = void 0) { if (mergeConfig.hasOwnProperty(key)) { return mergeConfig[key]; } console.error(`检测到不存在的配置项: ${key}`); return def; }, getResource(imgName) { return `${mergeConfig.apiUrl}images/${imgName}`; } }; exports.config = config;