contact.js 2.24 KB
// pages/contact/contact.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    meng: true,
    block: false,
    block1: false
  
  },
  getmenu: function () {
    var that = this
    var block = that.data.block
    var block1 = that.data.block1
    var meng = that.data.meng
    if (block == false) {
      that.setData({
        block: true,
        meng: false,
        block1: false
      });
    } else {
      that.setData({
        block: false,
        meng: true
      });
    }
  },
  getmenu1: function () {
    var that = this
    var block = that.data.block
    var block1 = that.data.block1
    var meng = that.data.meng

    if (block1 == false) {
      that.setData({
        block1: true,
        meng: false,
        block: false
      });
    } else {
      that.setData({
        block1: false,
        meng: true

      });
    }
  },
  meng: function () {
    var that = this
    var block = that.data.block
    var block1 = that.data.block1
    var meng = that.data.meng
    that.setData({
      block1: false,
      meng: true,
      block: false
    });
  },

  callmex: function () {
    var that = this
    wx.makePhoneCall({
      phoneNumber:'02124225066'
    })

  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    wx.getSystemInfo({
      success: function (res) {
        console.log(res.windowHeight)
        var windowHeight = res.windowHeight 
        console.log('windowHeight', windowHeight)
        that.setData({
          styleheight: windowHeight-77,
        });
        
      }
    })
        
  },

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

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

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

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

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

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

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