123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- 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: '学员手册'
- },
- [htmlTypes.INTEGRAL_RULE]: {
- url: 'integralRule.html?',
- 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}`
- // })
- // }
- let url = "";
- switch (parseInt(type)) {
- case htmlTypes.SEAT:
- url = `${Config.HTML_API}${this.dict[htmlTypes.SEAT].url}${id}&studentId=${eId}`;
- break;
- case htmlTypes.STUDENT_BOOK:
- url = `${Config.HTML_API}${this.dict[htmlTypes.STUDENT_BOOK].url}${teamId}&active=${index}`;
- break;
- case htmlTypes.INTEGRAL_RULE:
- url = `${Config.HTML_API}${this.dict[htmlTypes.INTEGRAL_RULE].url}`;
- break;
- default:
- url = `${Config.HTML_API}${this.dict[type].url}${id}`;
- break;
- }
- this.setData({
- url
- });
- },
- })
|