import common from '../../utils/util'; import main from '../../utils/main'; import constant from '../../utils/constant'; const app = getApp(); Page({ data: { ImagePath: app.globalData.uploadImageUrl, DistrictID: "01", SchoolType:constant.arrSchoolType, Article:[ {ID:1,Title:"查询市实验性示范性高中、市特色普通高中、\n市级优秀体育学生、艺术骨干学生",Url:"recruitment?PanelType=1&DistrictID="}, {ID:2,Title:"查询国际课程班和中外合作办学高中",Url:"recruitment?PanelType=2&DistrictID="}, {ID:3,Title:"查询中本贯通、五年一贯制、中高职费通",Url:"subscribe?"}, ], }, onLoad: function (options) { var that = this; that.setData({ Containnerheight: main.getWindowHeight(), DistrictID:options.ID, DistrictName:options.Name, }); wx.setNavigationBarTitle({ title: "招生计划·"+that.data.DistrictName, }); that.init(); }, init:function(){ var that = this; var id=Number(that.data.DistrictID); main.getData("GetMPSDistrictPersonNum?DistrictID="+id, function (data) { if (data) { that.setData({ DistrictPersonNum: data, }); main.getData("GetMPSSchool?SelectType=structure&DistrictID="+id, function (data) { if (data) { that.setData({ SchoolAll: data, SchoolCurrent:data[0].List }); } }); } }); }, onSelect:function(event){ var that=this; main.onSelect(that,event,function(obj,e,result){ if (e.currentTarget.dataset.object=="SchoolType"){ that.setData({ SchoolCurrent:that.data.SchoolAll[e.currentTarget.dataset.index].List }); } }); }, goto: function (e) { main.goto(e); }, returnTop:function(){ main.returnTop(); }, onShareTimeline: function () { return this.onShareAppMessage(); }, onShareAppMessage: function () { var that=this; var url=that.data.ImagePath+"web/_ScoreLine/fs_b"+that.data.DistrictID+".png"; return { title: that.data.DistrictName+"中考招生信息", path: app.globalData.SharePath + '?type=district&ID='+that.data.DistrictID+'&Name='+that.data.DistrictName+'&UserID=' + app.globalData.userInfo.UserID, imageUrl: url, } }, })