default.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. },
  29. goto: function (e) {
  30. main.goto(e);
  31. },
  32. onShareTimeline: function () {
  33. return this.onShareAppMessage();
  34. },
  35. onShareAppMessage: function () {
  36. return {
  37. title: "上海中考招生信息查询工具",
  38. path: app.globalData.SharePath + '?UserID=' + app.globalData.userInfo.UserID,
  39. imageUrl: app.globalData.ShareImage,
  40. }
  41. },
  42. })