var Api = require("../../../utils/util.js"); Page({ data: { detail:{} }, onLoad: function(options) { if(options.id){ this.setData({ id: options.id, }) } var that = this, data = { id: options.id, readId: wx.getStorageSync('userId'), } wx.showLoading({ title: '加载中...', }) Api.req('sf/platformAnnouncement/detail', data, 'get') .then(res => { wx.hideLoading() if(res.code == 200){ var html = res.data.html html = html.replace(' { if(res.code == 200){ }else{ wx.showToast({ title: res.msg, icon: 'none' }) } }) } })