myteam.js 1.3 KB
const app = getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        list: []

    },
    onLoad: function (options) {


    },


    onReady: function () {

    },

    onShow: function () {
        let that = this;
        that.getactive();
    },
    getactive() {
        let that = this;
        let url = '/index/second/myTeam';
        let head = {
            'XX-Token': wx.getStorageSync('token')
        }

        app.post(url, '', head).then((res) => {

            console.log(res)

            this.setData({

                list: res
            })
        })
    },

    // 详情页
    getdetail(e) {
        console.log(e)
        var id = e.currentTarget.dataset.id
        wx.navigateTo({
            url: '/pages/Volunteer_detail/Volunteer_detail?id='+id,
        })

    },


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

    },

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

    },

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

    },

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

    },

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

    }
})