var network = require("../../../utils/network.js");
const baseUrl = require('../../../api/index.js').config;
const Method = require('../../../api/method.js').Method;
const member = require('../../../api/member.js');
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    details:[]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.takeExplanationDetail(options.id)
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  // 解释与说明的接口
  takeExplanationDetail: function (id) {
    var that = this;
    member.takeExplanationDetail(`${baseUrl.merchantUrl}/client/agreement/${id}`, {}, {
    }, '加载中',
      function (res) {
        var result = res.results;
        that.setData({
          details: result,
        })
      },
      function (err) {
        wx.showToast({
          title: '失败',
        })
      }
    )
  },
})