itinerary.js 4.26 KB
// pages/reserveNew/itinerary.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        barHeight: '', //状态栏+导航栏高度
        activeId: '2', //选择的tab
        tabList: [{
                title: '我的受邀',
                id: '1'
            },
            {
                title: '我的预订',
                id: '2'
            }
        ],
        bookList: [{
                id: "1439387",
                mname: "晚餐",
                week: '周二',
                ddate: "2024年8月25日",
                ddate1: "8月25日",
                tableinfo: "吉祥",
                rname: '王先生',
                status: '0',
                statusTitle: '待确认',
                "sellername": "石府大酒店",
                "seller_image": "http://libpc.colorcun.com/20250313162436_f5f597ea863038dbfbe3ee31287a915a",
            },
            {
                id: "1439387",
                mname: "晚餐",
                week: '周二',
                ddate: "2024年8月25日",
                ddate1: "8月25日",
                tableinfo: "吉祥",
                rname: '王先生',
                status: '1',
                statusTitle: '待赴约',
                "sellername": "石府大酒店",
                "seller_image": "http://libpc.colorcun.com/20250313162436_f5f597ea863038dbfbe3ee31287a915a",
            },
            {
                id: "1439387",
                mname: "晚餐",
                week: '周二',
                ddate: "2024年8月25日",
                ddate1: "8月25日",
                tableinfo: "吉祥",
                rname: '王先生',
                status: '3',
                statusTitle: '待反馈',
                isPj: '0',
                "sellername": "石府大酒店",
                "seller_image": "http://libpc.colorcun.com/20250313162436_f5f597ea863038dbfbe3ee31287a915a",
            },
            {
                id: "1439387",
                mname: "晚餐",
                week: '周二',
                ddate: "2024年8月25日",
                ddate1: "8月25日",
                tableinfo: "吉祥",
                rname: '王先生',
                status: '3',
                statusTitle: '已结束',
                isPj: '1',
                "sellername": "石府大酒店",
                "seller_image": "http://libpc.colorcun.com/20250313162436_f5f597ea863038dbfbe3ee31287a915a",
            },
            {
                id: "1439387",
                mname: "晚餐",
                week: '周二',
                ddate: "2024年8月25日",
                ddate1: "8月25日",
                tableinfo: "吉祥",
                rname: '王先生',
                status: '4',
                statusTitle: '已取消',
                "sellername": "石府大酒店",
                "seller_image": "http://libpc.colorcun.com/20250313162436_f5f597ea863038dbfbe3ee31287a915a",
            },
        ]
    },
    // 切换tab
    checkTabFun(e) {
        let activeId = e.currentTarget.dataset['id'];
        this.setData({
            activeId,
        })
    },
    /**
     * 生命周期函数--监听页面加载
     */
    onLoad(options) {

    },

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

    },

    /**
     * 生命周期函数--监听页面显示
     */
    onShow() {
        //导航栏自适应
        let systemInfo = wx.getSystemInfoSync();
        let reg = /ios/i;
        let pt = 20; //导航状态栏上内边距
        let h = 44; //导航状态栏高度
        if (reg.test(systemInfo.system)) {
            pt = systemInfo.statusBarHeight;
            h = 44;
        } else {
            pt = systemInfo.statusBarHeight;
            h = 48;
        }
        this.setData({
            barHeight: pt + h,
        })
    },

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

    },

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

    },

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

    },

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

    },

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

    }
})