default.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import common from '../../utils/util';
  2. import main from '../../utils/main';
  3. import constant from '../../utils/constant';
  4. const app = getApp();
  5. Page({
  6. data: {
  7. ImagePath: app.globalData.uploadImageUrl,
  8. ArticleList:constant.arrArticleList,
  9. District:constant.arrDistrict,
  10. Version:app.globalData.Version,
  11. },
  12. onLoad: function (options) {
  13. var that = this;
  14. that.setData({
  15. Containnerheight: main.getWindowHeight(),
  16. });
  17. if (app.globalData.GotoUrl) {
  18. //console.log(app.globalData.GotoUrl);
  19. wx.navigateTo({
  20. url: app.globalData.GotoUrl,
  21. });
  22. app.globalData.GotoUrl = "";
  23. }
  24. else{
  25. //获得收藏学校数据
  26. main.getCollect();
  27. }
  28. that.getWish();
  29. },
  30. getWish:function(){
  31. var that = this;
  32. main.getData("GetMPSWish?WishType=all", function (data) {
  33. if (data) {
  34. that.setData({
  35. WishList: data,
  36. });
  37. }
  38. });
  39. },
  40. goto: function (e) {
  41. main.goto(e);
  42. },
  43. onShareTimeline: function () {
  44. return this.onShareAppMessage();
  45. },
  46. onShareAppMessage: function () {
  47. return {
  48. title: "上海中考招生信息查询工具",
  49. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  50. imageUrl: app.globalData.ShareImage,
  51. }
  52. },
  53. })