37 lines
674 B
JavaScript
37 lines
674 B
JavaScript
Page({
|
|
|
|
/**
|
|
* 页面的初始数据
|
|
*/
|
|
data: {
|
|
|
|
dynamic_id: '', //活动id
|
|
info: '', //详情信息
|
|
loaded: false,
|
|
company_id: wx.getStorageSync('company_id'),
|
|
},
|
|
onLoad(e) {
|
|
this.setData({
|
|
dynamic_id: e.id
|
|
})
|
|
this.dynamicsDetail();
|
|
},
|
|
/**
|
|
* 获取详情
|
|
*/
|
|
dynamicsDetail() {
|
|
wx.$api.companyModule.dynamicsDetail(this.data.company_id, this.data.dynamic_id).then(res => {
|
|
if (res.content) {
|
|
var nodes = res.content.replace('<img', '<img style="max-width:100%;height:auto""');
|
|
}
|
|
this.setData({
|
|
info: res,
|
|
content: nodes,
|
|
loaded: true,
|
|
})
|
|
})
|
|
},
|
|
|
|
|
|
|
|
}) |