Files
lcb/pages/customer/score/exchange.js
T
maclien 103013c1bf feat(核销记录): 添加核销记录页面功能及样式
实现核销记录页面的完整功能,包括:
- 日期选择器组件
- 订单列表展示
- 优惠券信息卡片
- 搜索功能
- 订单详情查看
- 完整的页面样式
2025-06-24 06:31:45 +08:00

134 lines
2.2 KiB
JavaScript

// pages/customer/score/exchange.js
Page({
/**
* 页面的初始数据
*/
data: {
startDate: '2025-05-18',
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'
}
]
},
/**
* 开始日期选择
*/
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() {
}
})