monthClub.js 2.8 KB
// pages/cityWide/monthClub/monthClub.js
const app=getApp();
var WxParse = require('../../../wxParse/wxParse.js');
Page({

  /**
   * 页面的初始数据
   */
  data: {
    monthCon:[{
      id: "01",
      mtitle: "找月嫂全攻略",
      content: "你满意的月嫂,得这样找",
      imagesUrl: "http://pi4orwnti.bkt.clouddn.com/bicon34@2x.png"
    }, {
      id: "02",
        mtitle: "图说月嫂",
        content: "三张图告诉你月嫂都干了些什么?",
        imagesUrl: "http://pi4orwnti.bkt.clouddn.com/bicon34@2x.png"
      }, {
      id: "03",
        mtitle: "教你如何面试月嫂",
        content: "面试月嫂需要注意啥?最全参考在这里",
        imagesUrl: "http://pi4orwnti.bkt.clouddn.com/bicon34@2x.png"
    }],

    freegetwrap:false,
    secretary:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.yuesisuo()
  },
  yuesisuo(){
    let that = this;
    var url = '/api/portal/Club/index';
    var params = {
      // token: wx.getStorageSync('token'),

    }
    app.post(url, params).then((res) => {
      console.log(res);

      that.setData({
         content:res,
         monthCon: res.strategy,


      })

      WxParse.wxParse('article', 'html', res.buttom, that, 5)

    }).catch((err) => {

    })

  },
  freeget(){
    let that=this;
      that.setData({
        freegetwrap:true
      })

    var url = '/api/portal/Club/call';
    var params = {
      // token: wx.getStorageSync('token'),

    }
    app.post(url, params).then((res) => {
      console.log(res);
      that.setData({
        secretary: res.secretary
      })



    }).catch((err) => {

    })
  },
  hidefreeget(){
      this.setData({
        freegetwrap: false
      })
  },

  

  //复制

  copycode: function () {
    console.log(666)
    let that = this;
    wx.setClipboardData({
      data: that.data.secretary,
      success: function (res) {
        // console.log("复制成功")
      }
    })
  },

  //跳转
  jumpmonth_list(e) {
    let that = this;
    let url = e.currentTarget.dataset.link;
    wx.navigateTo({
      url: '../../sharepage/sharepage?url=' + url,
    })


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

  },

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

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})