import common from '../../utils/util'; import main from '../../utils/main'; import constant from '../../utils/constant'; const app = getApp(); Page({ data: { PageType:"school", ScoreTypeID:1,//四种得分类型 IsFold:false, Years:constant.arrYear, YearIndex:0, ImagePath: app.globalData.uploadImageUrl, ScoreType:constant.arrScoreType, TailScore:constant.arrTailScore, IsShowClickLike:false, }, onLoad: function (options) { var that = this; that.setData({ Containnerheight: main.getWindowHeight(), IsShow:app.globalData.userInfo.IsShow, SchoolID:options.ID, IsCollect:false, HasWish:false, }); if (!options.ID){ wx.navigateBack({ delta: 1, }); } else that.init(); }, onShow:function(){ this.getWish(); }, init:function(){ var that = this; wx.showLoading({title:"加载中"}); main.getData("GetMPSSchoolInfo?SchoolID="+that.data.SchoolID, function (data) { if (data) { var list=[]; that.data.ScoreTypeID=1; if (data['1-15志愿'] && !(data['自主招生'])){ that.data.ScoreTypeID=4; var name=that.data.ScoreType[that.data.ScoreTypeID-1].Name; list=data[name][that.data.YearIndex].List; } else if (data['名额到校'] && data.SchoolType1=='初中'){ that.data.ScoreTypeID=3; var name=that.data.ScoreType[that.data.ScoreTypeID-1].Name; list=data[name][that.data.YearIndex].List; } wx.setNavigationBarTitle({ title: data.SchoolType1, }); var schoolList=wx.getStorageSync('CollectList'); if (schoolList && schoolList["收藏的"+data.SchoolType1]){ schoolList=schoolList["收藏的"+data.SchoolType1]; for(var i=0;i26){ var str1=data.Website.substr(0,26); var str2=data.Website.substr(26); data.WebsiteStr=str1+"\n"+str2; } else data.WebsiteStr=data.Website; if (data.ImageOther) data.ImageOtherStr=data.ImageOther.join(","); //将保存的用户习惯(显示列表样式)提取出来 var isListAll=wx.getStorageSync('TailScore'); if (isListAll){ that.data.TailScore[0].CSS="Selected"; } data.PersonCount1=0; data.PersonCount2=0; for(var i=0;i0) { app.globalData.MyWish=data2[0]; that.setData({ HasWish: true, }); } else{ that.setData({ HasWish: false, }); } that.getSchoolClickLike(); }); } }); }, getSchoolClickLike:function(){ var that = this; var arr2=[]; var arr=constant.arrUserSchoolClickLike; for(var j=0;j