1. 可以将参数挂载到Vue.prototype上 // main.js // Vue.prototype.baseURL = 'http://uniapp.dcloud.io' // 全局参数 在 pages/index/index.vue 中调用 <script> export default { onLoad(){ console.log(