const WxParse = require('../../wxParse/wxParse.js') const $ = global new $.Page({ onLoad(options) { const id = options.id; const meta = $.router.getMeta(); const content = meta && meta.params && meta.params.content; if (content) { WxParse.wxParse('article', 'html', content, this, 5); }else if (id) { $.request(`server_info/${id}`, 'GET', {}).then((res) => { var article = res.data.content || ''; WxParse.wxParse('article', 'html', article, this, 5); }); } } })