// 这个需要用es6的export语法 export default function getDefaultConfig(env) { let def = { env: env.env || 'test', desc: env.desc, appid: 'wx2da4f132ebb9a0c0', ver: (env.desc.match(/版本:(.*?) 时间:/) || [])[1] || '', app_name: env.app_name, redirect_root: 'http://shared.ivydad.com.cn', game_root: 'http://game.ivydad.com.cn', } let ext = { production: { appid: 'wx946e48ec53acefad', redirect_root: 'https://shared.ivydad.com', game_root: 'https://game.ivydad.com', } } return {...def, ...ext[def.env]} }