news.js 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. import Config from "../../model/config";
  2. import {htmlTypes} from "../../model/enum";
  3. Page({
  4. dict: {
  5. [htmlTypes.BANNER]: {url: 'propagandaVideo.html?', title: 'banner链接'},
  6. [htmlTypes.NEWS]: {url: 'articles.html?', title: '文章链接'},
  7. [htmlTypes.COURSE]: {url: 'courseMng.html?', title: '精品课链接'},
  8. [htmlTypes.HELP]: {url: 'appInfoList.html?', title: '帮助文档链接'},
  9. [htmlTypes.SEAT]: {url: 'seatArrange.html?scheduleId=', title: '座位图'},
  10. },
  11. data: {
  12. url: '',
  13. },
  14. onLoad: function (options) {
  15. wx.setNavigationBarTitle({
  16. title: options.title,
  17. })
  18. if (options.type == htmlTypes.SEAT) {
  19. this.setData({
  20. url: `${Config.HTML_API}${this.dict[htmlTypes.SEAT].url}${options.id}&studentId=${options.eId}`
  21. })
  22. } else {
  23. this.setData({
  24. url: `${Config.HTML_API}${this.dict[options.type].url}${options.id}`
  25. })
  26. }
  27. },
  28. })