myfeedback_lists.js 1.5 KB
const app = getApp()
Page({

    /**
     * 页面的初始数据
     */
    data: {
        nav: 0,
        list: ''
    },

    bindNav(e) {
        var nav = e.currentTarget.dataset.nav
        console.log(nav)
        this.setData({
            nav
        })
        this.getList();
    },

    // 列表
    getList() {

        let that = this;
        let url = '/index/second/orderList';
        let head = {
            'XX-Token': wx.getStorageSync('token')
        }
        let d = {
            type: that.data.nav
        }
        app.post(url, d, head).then((res) => {
            console.log(res)
            that.setData({
                list: res
            })

        }).catch((err) => {

        })
    },

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

    },

    onLoad: function (options) {

    },


    onReady: function () {

    },

    onShow: function () {
        let that = this;
        that.getList();


    },


    onHide: function () {

    },


    onUnload: function () {

    },

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

    },

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

    },

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

    }
})