fix(mp): 小程序页面优化 + E2E 测试报告更新

- 小程序各页面优化和修复
- 更新联调报告和 E2E 测试报告
- 更新 miniprogram wiki
This commit is contained in:
iven
2026-05-15 23:03:21 +08:00
parent ced1c0ad0c
commit c06e986090
24 changed files with 905 additions and 441 deletions

View File

@@ -7,6 +7,7 @@ import type { PointsProduct } from '../../services/points';
import { useAuthStore } from '../../stores/auth';
import { usePointsStore } from '../../stores/points';
import Loading from '../../components/Loading';
import ErrorState from '../../components/ErrorState';
import { useElderClass } from '../../hooks/useElderClass';
import './index.scss';
@@ -37,11 +38,13 @@ export default function Mall() {
const [loading, setLoading] = useState(false);
const [checkinLoading, setCheckinLoading] = useState(false);
const [noProfile, setNoProfile] = useState(false);
const [error, setError] = useState(false);
const modeClass = useElderClass();
const fetchProducts = useCallback(
async (pageNum: number, type: string, isRefresh = false) => {
setLoading(true);
setError(false);
try {
const res = await listProducts({
page: pageNum,
@@ -57,6 +60,7 @@ export default function Mall() {
setTotal(res.total);
setPage(pageNum);
} catch {
setError(true);
Taro.showToast({ title: '加载失败', icon: 'none' });
} finally {
setLoading(false);
@@ -188,7 +192,9 @@ export default function Mall() {
</View>
{/* 商品列表 */}
{products.length === 0 && !loading ? (
{error ? (
<ErrorState onRetry={() => loadAll()} />
) : products.length === 0 && !loading ? (
<View className='mall-empty-state'>
<View className='empty-icon'>
<Text className='empty-char'></Text>