Enhance mini program environment configuration and chapter loading logic

- Introduced a debugging environment configuration in app.js, allowing for dynamic API endpoint selection based on the environment.
- Implemented lazy loading for chapter parts in chapters.js, improving performance by only fetching necessary data.
- Updated UI elements in chapters.wxml to reflect changes in chapter loading and added loading indicators.
- Enhanced error handling and data management for chapter retrieval, ensuring a smoother user experience.
- Added functionality for switching API environments in settings.js, visible only in development mode.
This commit is contained in:
Alex-larget
2026-03-14 18:04:05 +08:00
parent 1edceda4db
commit d82ef6d8e4
22 changed files with 1184 additions and 899 deletions

View File

@@ -339,6 +339,12 @@
margin-left: 16rpx;
}
.chapters-loading {
padding: 24rpx;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.5);
}
.chapter-group {
background: rgba(28, 28, 30, 0.5);
border-radius: 16rpx;