Page({

  /**
   * 页面的初始数据
   */
  data: {

    dynamic_id: '', //活动id
    info: '', //详情信息
    loaded: false
  },
  onLoad(e) {
    this.setData({
      dynamic_id: e.id
    })
    wx.getStorage({
      key: 'company_id',
      success: res=>{
        this.dynamicsDetail(res.data);
      }
    })
  },
  /**
   * 获取详情
   */
  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""');
      }
      this.setData({
        info: res,
        content: nodes,
        loaded: true,
      })
    })
  },



})