import { API } from './../../../utils/network/api'
let api = new API()
Page({

  data: {
    navbarData: {
      showCapsule: 1, //是否显示左上角图标   1表示显示    0表示不显示
      title: '协议详情', //导航栏 中间的标题
    },
    agreement_id: "",
    agreement_content: ""
  },

  onLoad(option){
    this.setData({
      agreement_id: option.agreement_id
    })
  },

  onShow(){
    //获取医生我的账户数据
    api.getBasicAgreement({agreement_id: this.data.agreement_id}).then(response => {
      console.log(response);
      this.setData({
        agreement_content: response.data.agreement_content,
        "navbarData.title": response.data.agreement_name,
      })
    }).catch(errors => {console.error(errors);})
  }
})