App({ globalData: { apiBase: 'https://api.example.com', appKey: 'hub' }, onLaunch: function () { var token = xhs.getStorageSync('pk_token'); if (token) this.globalData.token = token; } });