const app = getApp() import { getBannerList } from '~/api/global' Page({ data: { bannerList: [] }, onShow() { if (typeof this.getTabBar === 'function') { this.getTabBar().setData({ selected: 2 }) } getApp().callBack = (res) => { } }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })