// subpages/points/pages/demand/index.js // @ts-nocheck import { wxRequestPost, wxNavigateTo } from "@utils/promise-wx-api"; Page({ /** * 页面的初始数据 */ data: { toDetail: false, current: 0, currentStatus: 0, tabsList: [ { name: '需求大厅', id: 0, }, { name: '我的需求', id: 1, } ], commonStatus: [ { name: '未处理', status: 'unprocessed', id: 0, url: 'heart/residemand/list-hall' }, { name: '处理中', status: 'processing', id: 1, url: 'heart/residemand/list-hall' }, { name: '已完成', status: 'finished', id: 2, url: 'heart/residemand/list-hall' } ], myDemand: [ { name: '未处理', status: 'unprocessed', id: 0, url: 'heart/residemand/mydemand' }, { name: '处理中', status: 'processing', id: 1, url: 'heart/residemand/mydemand' }, { name: '已完成', status: 'finished', id: 2, url: 'heart/residemand/mydemand' }, { name: '已取消', status: 'canceled', id: 3, url: 'heart/residemand/mydemand' } ], }, /** * 生命周期函数--监听页面加载 */ onLoad: function (options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady: function () { }, /** * 生命周期函数--监听页面显示 */ onShow: function () { }, handleSwiperChange(e) { const { detail: { current, source }, } = e; if (source == "touch") { this.setData({ current: current }); } }, handleTabs(e) { const id = e.currentTarget.dataset.id this.setData({ current: id }); }, handleTo() { console.log('tooo----') wxNavigateTo('/subpages/points/pages/demand/list') }, /** * 生命周期函数--监听页面隐藏 */ onHide: function () { }, /** * 生命周期函数--监听页面卸载 */ onUnload: function () { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh: function () { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom: function () { }, /** * 用户点击右上角分享 */ onShareAppMessage: function () { } })