taro中如何定义全局变量
打开 config/dev.js (橙色为全局变量)
module.exports = { env: { NODE_ENV: '"development"', }, defineConstants: { BASE_URL: JSON.stringify('https://****.com/api'), IMG_URL: JSON.stringify('https://****.com/url')
}, mini: {}, h5: {} }
打开 config/dev.js (橙色为全局变量)
module.exports = { env: { NODE_ENV: '"development"', }, defineConstants: { BASE_URL: JSON.stringify('https://****.com/api'), IMG_URL: JSON.stringify('https://****.com/url')
}, mini: {}, h5: {} }