From bc665a5d82fbd6a2bc47a5449443975a0ab4ee8c Mon Sep 17 00:00:00 2001 From: ws Date: Fri, 24 Apr 2026 18:00:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9C=80=E6=96=B0?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E5=8A=A0=E8=BD=BD=E9=AA=A8=E6=9E=B6=E5=B1=8F?= =?UTF-8?q?=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/index.js | 6 +++++- pages/index/index.wxml | 14 +++++++++++++- pages/index/index.wxss | 21 +++++++++++++++++++++ utils/config.js | 2 +- 4 files changed, 40 insertions(+), 3 deletions(-) diff --git a/pages/index/index.js b/pages/index/index.js index 88a3110..8aa845a 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -6,7 +6,8 @@ Page({ data: { isLoggedIn: false, loginFailed: false, - latestRecord: null + latestRecord: null, + recordLoading: false }, onLoad() { @@ -53,6 +54,7 @@ Page({ }, async loadLatestRecord() { + this.setData({ recordLoading: true }) try { const openid = app.globalData.userInfo.openid const record = await appointmentDB.getLatest(openid) @@ -64,6 +66,8 @@ Page({ } catch (err) { console.error('加载最新预约失败', err) this.setData({ latestRecord: null }) + } finally { + this.setData({ recordLoading: false }) } }, diff --git a/pages/index/index.wxml b/pages/index/index.wxml index 95f8be0..f6852ff 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -43,7 +43,19 @@ - + + + 最新预约 + + + + + + + + + + 最新预约 diff --git a/pages/index/index.wxss b/pages/index/index.wxss index 9b130ee..b962f37 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -285,3 +285,24 @@ page { color: #b8c9db; letter-spacing: 4rpx; } + +/* 骨架屏 */ +.skeleton-row { + display: flex; + justify-content: flex-start; + align-items: center; + padding: 8rpx 0; +} + +.skeleton-bar { + height: 24rpx; + border-radius: 8rpx; + background: linear-gradient(90deg, #e8eef5 25%, #dbeafe 50%, #e8eef5 75%); + background-size: 200% 100%; + animation: skeleton-pulse 1.5s ease-in-out infinite; +} + +@keyframes skeleton-pulse { + 0% { background-position: 200% 0; } + 100% { background-position: -200% 0; } +} diff --git a/utils/config.js b/utils/config.js index 16954f3..169fcd7 100644 --- a/utils/config.js +++ b/utils/config.js @@ -6,7 +6,7 @@ const ENV_CONFIG = { // release: 'https://xcx.yun.588580.xyz', trial: 'https://qywx.yun.588580.xyz', // 开发版 & 体验版 - develop: 'http://172.16.60.235:8080' + develop: 'https://qywx.yun.588580.xyz' } // 自动判断当前运行环境