cosmetology_list.js 1017 Bytes
var e = getApp(),
  a = e.globalData.setting,
  os = a,
  t = e.request;
Page({

  /**
   * 页面的初始数据
   */
  data: {
    iurl: a.imghost,
    cosmetology_list: null, //美容师列表
  },
  query_cosmetology: function() {
    var th = this;
    var url = "http://localhost:8022/api/weshop/yy_fuwu_meirongshi";
    wx.request({
      url: url,
      success: function(res) {
        if (res.data.code == 0) {
          th.setData({
            cosmetology_list: res.data.data.pageData
          })
        }
      }

    })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function(options) {
    // var th = this;
    // var label = "技术好|长得帅|很可爱";
    // var split = label.split("|");//标签通过分割符
    // for (var i = 0; i < split.length; i++) {
    //      console.log("成功啦啦啦啦"+split[i]+i);
    // }
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function() {
    var th = this;
    th.query_cosmetology();
  },

})