wechat_jiaxuan/pages/kefu/index.js
@@ -1,11 +1,12 @@ // pages/kefu/index.js import { getCustomizedNewsDetail } from '../../api/index' Page({ /** * 页面的初始数据 */ data: { bottomLift: 0 bottomLift: 0, info: {} }, /** @@ -16,11 +17,17 @@ this.setData({ bottomLift: app.bottomLift }) if(options && options.id){ this.getDetail(options.id) } }, /** * 生命周期函数--监听页面初次渲染完成 */ getDetail(id) { getCustomizedNewsDetail({id}).then(res => { this.setData({ info: { ...res.data } }) }) }, onReady() { },