lwrs.js 2.97 KB
// pages/lwrs/lwrs.js
var app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    currentTab:0,
    skey: '',
    meng: true,
    url: 'http://authorservices.springernature.com/scientific-editing/#!/request-a-quote',
    con:[
      {
        name:"自然科研语言",
        body:"/static/images/lwrs.png",
      },
      {
        name: "自然科研科学",
        body: "/static/images/lwrs.png",
      }
    ],
    block: false,
    block1: false
  },

  /**
   * 生命周期函数--监听页面加载
   */
  show: function () {
    let that = this
    wx.setClipboardData({
      data: that.data.url,
      success() {
        that.setData({
          url: 'http://authorservices.springernature.com/scientific-editing/#!/request-a-quote'
        })
        console.log('success')
      }
    })
    wx.getClipboardData({
      success(res) {
        console.log(res.data)
      }
    })
    wx.showToast({
      title: '复制成功'
    })
  },
  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
    });
  },
  getcon: function(e){
    var that = this
    var list = that.data.list
    var con = that.data.con
    console.log('this', this)
    if (this.data.currentTab === e.target.dataset.index) {
      return false;
    } else {
      that.setData({
        currentTab: e.target.dataset.current
      })
    }
    var index = e.currentTarget.dataset.index
  },
  onLoad: function (options) {
    var that = this
    var con = that.data.con
  },

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

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

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

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

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

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

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