import common from '../../utils/util'; import main from '../../utils/main'; import constant from '../../utils/constant'; const app = getApp(); var canPage=true; Page({ data: { PageType:"scoreline", DistrictID:1, ScoreTypeID:1, YearIndex:0, IsSearch:false, Accommodation:constant.arrAccommodation, TailScore:constant.arrTailScore, PublicOrPrivate:constant.arrPublicOrPrivate, LocalOrNolocal:constant.arrLocalOrNolocal, }, onLoad: function (options) { var that = this; that.setData({ Containnerheight: main.getWindowHeight(), IsShow:app.globalData.userInfo.IsShow, Years:app.globalData.userInfo.ArrYear, ScoreTypeID:options.ScoreTypeID, DistrictID:options.DistrictID, YearIndex:options.YearIndex, PageType:options.PageType, SchoolType1:options.SchoolType1, IsSearch:false, IsFocus:false, PageCount:app.globalData.PageCount,//翻页数 }); var b=true; var title=""; if (options.PageType=="collect"){ var collectSchool=wx.getStorageSync('CollectList'); var schoolCount=0; if (options.SchoolType1=="高中") schoolCount=collectSchool.收藏的高中.length; else schoolCount=collectSchool.收藏的初中.length; that.setData({ SchoolCount:schoolCount, }); if (schoolCount==0){ that.setData({ List:[], }); b=false; } else{ var arr=[]; var name=""; for(var i=0;i { wx.hideLoading(); } }); return; } for(var i=0;i0) isContrastNull=true; if (data.length>0){ that.setData({ Accommodation:constant.arrAccommodation, List:data, IsSearch:false, IsListAll:isListAll, TailScore:that.data.TailScore, PageCount:pageCount, PageFilterCount:data.length, ContrastNull:isContrastNull, }); } else{ // wx.showModal({ // title: '暂无公布', // showCancel:false, // content: '教育局暂未公布2024年1-15志愿信息,正式数据一般在7月公布,敬请期待。', // confirmText: '知道了', // complete: (res) => { // if (res.confirm) { // wx.redirectTo({ // url: 'scoreline?PageType='+that.data.PageType+'&SchoolType1='+that.data.SchoolType1+'&ScoreTypeID='+that.data.ScoreTypeID+'&DistrictID='+that.data.DistrictID+"&YearIndex=1", // }); // } // } // }) } } var timeTimeout=2000; if (that.data.ScoreTypeID==3 && that.data.DistrictID==11){ timeTimeout=3000; if (app.globalData.IsAndroid) timeTimeout=4000; } setTimeout(function(){ wx.hideLoading(); },timeTimeout); }); } function realData(obj,data){ //名额到校将收藏初中提前显示 if (obj.data.ScoreTypeID==3){ //debugger; var schoolList=wx.getStorageSync('CollectList')["收藏的初中"]; if (schoolList && schoolList.length>0){ var arr=[]; for(var i=0;i0){ for(var i=arr.length-1;i>=0;i--){ data.unshift(arr[i]); } } } } return data; } function realData2(obj,data){ //若是高中收藏对比 if (obj.data.SchoolType1=='高中' && obj.data.PageType=="collect"){ var schoolList=wx.getStorageSync('CollectList')["收藏的高中"]; for(var i=0;i