123456789101112131415161718192021222324252627282930313233343536373839 |
- const app = getApp(),
- {
- globalData: {
- WxParse,
- util: {
- regeneratorRuntime,
- api:{
- newsDetail,
- },
- request:{
- get,
- }
- }
- }
- } = app;
- Page({
- async onLoad({
- id
- }) {
- let {
- news: {
- title,
- content,
- image,
- type
- },
- _err
- } = await get(newsDetail, {id});
- if(_err)return
- WxParse.wxParse('content', 'html', content, this);
- this.setData({
- title,
- id,
- type,
- image
- })
-
- }
- })
|