This commit is contained in:
zdx
2020-12-31 08:43:25 +08:00
parent 775bc8d0c0
commit 550edad8a8
4 changed files with 136 additions and 116 deletions

View File

@@ -7,20 +7,24 @@ Page({
dynamic_id: '', //活动id
info: '', //详情信息
loaded: false,
company_id: wx.getStorageSync('company_id'),
loaded: false
},
onLoad(e) {
this.setData({
dynamic_id: e.id
})
this.dynamicsDetail();
wx.getStorage({
key: 'company_id',
success: res=>{
this.dynamicsDetail(res.data);
}
})
},
/**
* 获取详情
*/
dynamicsDetail() {
wx.$api.companyModule.dynamicsDetail(this.data.company_id, this.data.dynamic_id).then(res => {
dynamicsDetail(companyId) {
wx.$api.companyModule.dynamicsDetail(companyId, this.data.dynamic_id).then(res => {
if (res.content) {
var nodes = res.content.replace('<img', '<img style="max-width:100%;height:auto""');
}