app.js 402 B

123456789101112131415161718
  1. App({
  2. onLaunch: function () {
  3. try {
  4. this.globalData.userInfo = JSON.parse(wx.getStorageSync('userInfo'));
  5. this.globalData.token = wx.getStorageSync('token');
  6. } catch (e) {
  7. console.log(e);
  8. }
  9. },
  10. globalData: {
  11. userInfo: {
  12. nickname: '点击登录',
  13. avatar: 'http://yanxuan.nosdn.127.net/8945ae63d940cc42406c3f67019c5cb6.png'
  14. },
  15. token: '',
  16. }
  17. })