const app = getApp() Page({ data: { show:false, conHeight: (wx.getMenuButtonBoundingClientRect().top +wx.getMenuButtonBoundingClientRect().height)*2 + 330, backgroundColor:app.data.backgroundColor, isShow: true, notice: '公告:“-”代表该视频号预估粉丝增量数据获取异常,对您造成的不便尽请谅解.', buttonTop: wx.getMenuButtonBoundingClientRect().top, infoList: [], isIpx: app.data.systemInfo.isIpx ? true : false, //底部按钮适配Iphone X rankType:3, statusNavBarHeight:app.data.statusNavBarHeight, safeAreaTop:0,//距离上面的安全距离 authorTypeList:[{ id:'', top_label:'全部' }], }, onLoad: function (options) { this.setData({safeAreaTop:app.data.safeAreaTop}) if (app.globalData.checkLogin){ this.setData({show:true}) this.getAuthorType() }else{ app.checkLoginReadyCallback = res => { this.setData({show:true}) this.getAuthorType() }; } }, rankTypeClick(e){//头部榜单type var data = e.currentTarget.dataset if(this.data.rankType == data.type){ return; } this.setData({ rankType: data.type, }) app.data.sph_type = this.data.rankType }, getAuthorType(){//获取作者类别 app.func.req('/api/sphUserList/labelList', 'get', { }, (res) => { if(res && res.errno == 0){ var arr = [{ id:'', top_label:'全部' }] this.setData({ authorTypeList:arr.concat(res.rst) }) }else{ wx.showToast({ title: res.err, icon: 'none', duration: 2000 }) } },()=>{ }) }, goSearch() { wx.navigateTo({ url: '/pages/search/search', }) }, /** * 用户点击右上角分享 */ onShareAppMessage: function (res) { return { title:'【免费】视频号分析平台,盘点不同分类下互动最好的视频号', } } })