//app.js
import util from './utils_sand/util.js';
App({
  onError: function (err) {
    // wx.showToast({
    //   title: '下单失败',
    //   icon: 'none',
    //   duration: 2000
    // })

  },
  onLaunch: function (e) {
    wx.login({
      success: res => {
      }
    })
    wx.getSetting({
      success: res => {
        if (res.authSetting['scope.userInfo']) {
          wx.getUserInfo({
            success: res => {
              this.globalData.userInfo = res.userInfo
              if (this.userInfoReadyCallback) {
                this.userInfoReadyCallback(res)
              }
            }
          })
        }
      }
    })
  },
  onShow:function(e){
    // wx.setStorageSync('info', e)
    var date = new Date();
  },
  globalData: {
    userInfo: null
  },
  Tips: function (opt, to_url) {
    return util.Tips(opt, to_url);
  },
  onHide: function () {
   
  }
})