修复:解决测试发现的问题

This commit is contained in:
2025-11-12 16:00:44 +08:00
parent 1da75a59f2
commit 1daa6367c9
29 changed files with 133 additions and 182 deletions

View File

@@ -128,7 +128,7 @@
</text>
</view>
</view>
<wd-button type="primary" custom-class="buy-btn" @click="handlePurchase">
<wd-button type="primary" block @click="handlePurchase">
{{ $t('bookDetails.buy') }}
</wd-button>
</view>
@@ -222,15 +222,12 @@ function initScrollHeight() {
// 加载书籍详情
async function loadBookInfo() {
try {
uni.showLoading({ title: t('global.loading') })
const res = await bookApi.getBookInfo(bookId.value)
uni.hideLoading()
if (res.bookInfo) {
bookInfo.value = res.bookInfo
}
} catch (error) {
uni.hideLoading()
console.error('Failed to load book info:', error)
}
}
@@ -531,6 +528,7 @@ function goToDetail(id: number) {
&.buy-full {
flex: 1;
padding: 0 30rpx;
text-align: center;
}
}
}