//index.js //获取应用实例 const app = getApp(); const util = app.loadUtils("util") const { Getauth } = app.loadModel("user") const getauth = new Getauth() const { StorageSync } = app.loadModel("getSetting") const storage = new StorageSync() Page({ data: { motto: 'Hello World', userInfo: {}, hasUserInfo: false, canIUse: wx.canIUse('button.open-type.getUserInfo') }, onLoad: function (options) { // if (!!options.inviteId) { // storage.setStorage("inviteId", options.inviteId) // } getauth.userInfo() // storage.deleteStorage('nearestStore') }, onPullDownRefresh() { util.heavyLoad() } })