微信小程序 全局变量 微信小程序里面有个app.js,我们可以在这个里面设置全局变量, App({ globalData:{ url:"http://xxx.xxx.xx:3000" } }) 在外面就这样引用就可以了,这个真的是简单 getApp().globalData.url