12345678910111213141516171819202122232425262728293031323334353637 |
- import Config from "../../model/config";
- import {htmlTypes} from "../../model/enum";
- Page({
- dict: {
- [htmlTypes.BANNER]: {url: 'propagandaVideo.html?', title: 'banner链接'},
- [htmlTypes.NEWS]: {url: 'articles.html?', title: '文章链接'},
- [htmlTypes.COURSE]: {url: 'courseMng.html?', title: '精品课链接'},
- [htmlTypes.HELP]: {url: 'appInfoList.html?', title: '帮助文档链接'},
- [htmlTypes.SEAT]: {url: 'seatArrange.html?scheduleId=', title: '座位图'},
- [htmlTypes.STUDENT_BOOK]: {url: 'studentBook.html?teamId=', title: '学员手册'},
- },
- data: {
- url: '',
- },
- onLoad: function (options) {
- const {title, type, id, eId, teamId, index} = options;
- wx.setNavigationBarTitle({
- title,
- })
- if (type == htmlTypes.SEAT) {
- this.setData({
- url: `${Config.HTML_API}${this.dict[htmlTypes.SEAT].url}${id}&studentId=${eId}`
- })
- } else if (type == htmlTypes.STUDENT_BOOK) {
- this.setData({
- url: `${Config.HTML_API}${this.dict[htmlTypes.STUDENT_BOOK].url}${teamId}&active=${index}`
- })
- } else {
- this.setData({
- url: `${Config.HTML_API}${this.dict[type].url}${id}`
- })
- }
- },
- })
|