var app = getApp() Page({ data: { img:app.globalData.imgUrl }, onLoad: function (options) { }, goHome(){ if(app.globalData.compatible){ wx.reLaunch({ url: '/pages/compatible/index/index', }) }else{ wx.reLaunch({ url: '/pages/index/index', }) } }, onReady: function () { }, onShow: function () { }, onHide: function () { }, onUnload: function () { }, onPullDownRefresh: function () { }, onReachBottom: function () { }, onShareAppMessage: function () { } })