writinglist.js 3.82 KB
// pages/activity/join/join.js
var app = getApp();

Page({

  /**
   * 页面的初始数据
   */
  data: {
    skey: '',
    img: '',
    list: [
      {
        name: '学术会议',
        title: 'Naturejobs Career Expo|',
        title1: 'Jobs in China',
        mode: 'aturejobs Career Expo | aturejobs Career Expo'
      },
      {
        name: '招聘会',
        title: 'Naturejobs Career Expo|',
        title1: 'Jobs in China',
        mode: 'aturejobs Career Expo | aturejobs Career Expo'
      },
      {
        name: '学术会议',
        title: 'Naturejobs Career Expo|',
        title1: 'Jobs in China',
        mode: 'aturejobs Career Expo | aturejobs Career Expo'
      },
      {
        name: '招聘会',
        title: 'Naturejobs Career Expo|',
        title1: 'Jobs in China',
        mode: 'aturejobs Career Expo | aturejobs Career Expo'
      },
    ],
    con: [
      {
        name: '招聘会',
        num: "3",
        list1: [
          {
            title: 'Naturejobs Career Expo| ceshi1',
            title1: 'Jobs in China',
            mode: 'aturejobs Career Expo | aturejobs Career Expo'
          },
          {
            title: 'Naturejobs Career Expo|',
            title1: 'Jobs in China',
            mode: 'aturejobs Career Expo | aturejobs Career Expo'
          },
          {
            title: 'Naturejobs Career Expo|',
            title1: 'Jobs in China',
            mode: 'aturejobs Career Expo | aturejobs Career Expo'
          },
          {
            title: 'Naturejobs Career Expo|',
            title1: 'Jobs in China',
            mode: 'aturejobs Career Expo | aturejobs Career Expo'
          },
        ]
      },
      {
        name: '学术会议',
        num: "",
        list1: ''
      }
    ]
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    var that = this
    var skey = wx.getStorageSync('key')
    var img = that.data.img
    console.log('skey', skey)
    that.setData({
      skey: skey
    })
    wx.request({
      url: app.url + '/mpapi/1.0.0/academic-conference?tag=&offset=&limit=',
      method: 'GET',
      header: {
        'content-type': 'application/json',
        'x-wx-skey': skey
      },
      data: {
        contentType: 'date,top',
        offset: 0,
        limit: 6
      },
      success: function (res) {
        console.log('list', res.data.data)
        that.setData({
          list: res.data.data,
        })
      }
    })
  },

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

  },
  getmenu: function () {
    var that = this
    var block = that.data.block
    var block1 = that.data.block1
    if (block == false) {
      that.setData({
        block: true,
        block1: false
      });
    } else {
      that.setData({
        block: false
      });
    }
  },
  getmenu1: function () {
    var that = this
    var block = that.data.block
    var block1 = that.data.block1
    if (block1 == false) {
      that.setData({
        block1: true,
        block: false
      });
    } else {
      that.setData({
        block1: false
      });
    }
  },
  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

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

  },

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

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
    var that = this
    wx.showToast({
      title: 'loading...',
      icon: 'loading'
    })
    setTimeout(function () {
      wx.stopPullDownRefresh()
    }, 1500)
    that.onLoad()
  },

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

  },

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

  }
})