// pages/customer/score/exchange.js 20250624 Page({ /** * 页面的初始数据 */ data: { startDate: '', endDate: '', orderList: [ { id: 1, orderNumber: 'LC202505101913247', customerName: '李先生', customerPhone: '138****382', points: 3000, couponAmount: 2000, couponTitle: '购车补贴', validityPeriod: '2025-01-01~2025-12-12', orderTime: '2025-05-10 19:13' }, { id: 2, orderNumber: 'LC202505101913247', customerName: '李先生', customerPhone: '138****382', points: 3000, couponAmount: 2000, couponTitle: '购车补贴', validityPeriod: '2025-01-01~2025-12-12', orderTime: '2025-05-10 19:13' } ], loading: true, end: false, noData: false }, /** * 开始日期选择 */ onStartDateChange(e) { this.setData({ startDate: e.detail.value }); }, /** * 结束日期选择 */ onEndDateChange(e) { this.setData({ endDate: e.detail.value }); }, /** * 搜索按钮点击 */ onSearch() { console.log('搜索', this.data.startDate, this.data.endDate); // 这里可以添加搜索逻辑 }, /** * 查看订单详情 */ viewOrderDetail(e) { const orderId = e.currentTarget.dataset.id; console.log('查看订单详情', orderId); // 这里可以跳转到订单详情页面 }, /** * 查看优惠券使用规则 */ viewCouponRules() { console.log('查看优惠券使用规则'); // 这里可以显示优惠券使用规则弹窗 }, /** * 生命周期函数--监听页面加载 */ onLoad(options) { }, /** * 生命周期函数--监听页面初次渲染完成 */ onReady() { }, /** * 生命周期函数--监听页面显示 */ onShow() { }, /** * 生命周期函数--监听页面隐藏 */ onHide() { }, /** * 生命周期函数--监听页面卸载 */ onUnload() { }, /** * 页面相关事件处理函数--监听用户下拉动作 */ onPullDownRefresh() { }, /** * 页面上拉触底事件的处理函数 */ onReachBottom() { }, /** * 用户点击右上角分享 */ onShareAppMessage() { } })