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: '座位图'}, }, data: { url: '', }, onLoad: function (options) { wx.setNavigationBarTitle({ title: options.title, }) if (options.type == htmlTypes.SEAT) { this.setData({ url: `${Config.HTML_API}${this.dict[htmlTypes.SEAT].url}${options.id}&studentId=${options.eId}` }) } else { this.setData({ url: `${Config.HTML_API}${this.dict[options.type].url}${options.id}` }) } }, })