let app = getApp()
Page({

  /**
   * 页面的初始数据
   */
  data: {
    homelist: [],
    IMG_NAME: app.IMG_NAME
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (e) {
    var data = JSON.parse(e.data)
    let that = this
    console.log(data)
    wx.setNavigationBarTitle({
      title: data.menuName,
    })
    app.AjaxRequest('get', {
      'content-type': 'application/json',
      'Authorization': 'Bearer ' + app.Getopenid()
    }, '/manage/list', {
      menuId: data.id
    }, function (res) {
      that.setData({
        homelist: res.data
      })
    })
  },

  navDetail(e) {
    wx.navigateTo({
      url: '../serviceDetail/serviceDetail?id=' + e.currentTarget.dataset.id,
    })
  }
})