hookehuyr

feat(offlineBooking): 调整二维码样式并添加离线预约码模拟数据

调整二维码组件的内边距和尺寸以改善显示效果
为离线预约码页面添加模拟数据功能,当缓存为空时自动使用模拟数据
......@@ -180,10 +180,10 @@ watch(() => props.list, (newVal) => {
.center {
border: 2rpx solid #D1D1D1;
border-radius: 40rpx;
padding: 16rpx;
padding: 46rpx;
position: relative;
image {
width: 480rpx; height: 480rpx;
width: 400rpx; height: 400rpx;
}
}
.right {
......
<!--
* @Date: 2024-01-16 10:06:47
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-07 21:25:49
* @LastEditTime: 2026-01-08 16:02:07
* @FilePath: /xyxBooking-weapp/src/components/qrCode.vue
* @Description: 预约码卡组件
-->
......@@ -282,10 +282,10 @@ const toRecord = () => {
.center {
border: 2rpx solid #D1D1D1;
border-radius: 40rpx;
padding: 16rpx;
padding: 46rpx;
position: relative;
image {
width: 480rpx; height: 480rpx;
width: 400rpx; height: 400rpx;
}
.qrcode-used {
position: absolute;
......
/*
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-08 15:58:36
* @FilePath: /xyxBooking-weapp/src/pages/offlineBookingCode/index.config.js
* @Description: 线下预约码配置
*/
export default {
navigationBarTitleText: '离线预约码'
}
<!--
* @Date: 2026-01-07 20:41:49
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2026-01-08 13:01:20
* @LastEditTime: 2026-01-08 15:58:10
* @FilePath: /xyxBooking-weapp/src/pages/offlineBookingCode/index.vue
* @Description: 线下预约码页面
-->
......@@ -40,14 +40,39 @@ const toHome = () => {
Taro.reLaunch({ url: '/pages/index/index' });
}
// TODO: Mock Data as per requirement
const getMockData = () => {
return [
{
name: '测试用户1',
id_number: '110101199003078888',
qr_code: 'OFFLINE_MOCK_QR_001',
datetime: '2026-01-08 08:30-10:30',
sort: 0
},
{
name: '测试用户2',
id_number: '110101199205126666',
qr_code: 'OFFLINE_MOCK_QR_002',
datetime: '2026-01-08 08:30-10:30',
sort: 0
}
];
}
onMounted(() => {
try {
const cachedData = Taro.getStorageSync('OFFLINE_QR_DATA');
if (cachedData && cachedData.length > 0) {
qrList.value = cachedData;
} else {
// Requirement 4: Mock data if no data
console.log('No cached data found, using mock data');
qrList.value = getMockData();
}
} catch (e) {
console.error('Read storage failed', e);
qrList.value = getMockData();
}
});
......