123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- const _Http = getApp().globalData.http;
- Page({
- data: {
- detailsData: []
- },
- onLoad(options) {
- _Http.basic({
- "classname": "system.message.Message",
- "method": "readMessage",
- "content": {
- "messageid": options.id
- }
- }).then(res => {
- if (res.msg != '成功') return wx.showToast({
- title: res.msg,
- icon: "none"
- })
- this.setData({
- detailsData: res.data
- })
- })
- },
- async toDetails() {
- const {
- objectname,
- objectid
- } = this.data.detailsData;
- /* const res = await _Http.basic({
- "classname": "saletool.common.auth",
- "method": "isAuth",
- "content": {
- objectid,
- objectname
- }
- });
- if (res.msg != '成功' || res.data[0].isAuth != 1) return wx.showToast({
- title: '暂无权限进入应用',
- icon: "none"
- }); */
- switch (objectname) {
- case 'sat_courseware':
- wx.navigateTo({
- url: `/pages/college/index`,
- })
- break;
- case 'sat_sharematerial':
- wx.navigateTo({
- url: `/pages/promotional/index`,
- })
- break;
- case 'sat_notice':
- wx.navigateTo({
- url: `/pages/annunciate/index`,
- })
- break;
- case 'sat_submitedit':
- wx.navigateTo({
- url: `/pages/submission/index`,
- })
- break;
- case 'sat_orderclue':
- wx.navigateTo({
- url: `/packageA/saleClue/index`,
- })
- break;
- case 'sys_attachment':
- let item = {
- attachmentid: objectid,
- document: '营销物料'
- }
- wx.navigateTo({
- url: '/pages/tabbar/smartStore/folder?item=' + JSON.stringify(item),
- })
- break;
- default:
- console.log(objectname)
- wx.showToast({
- title: '当前应用暂不支持跳转',
- icon: "none"
- })
- break;
- }
- },
- onShareAppMessage(res) { }
- })
|