refactor(components): 优化多个组件的样式和功能

-调整 AdminPanel 组件的样式,移除 max-h-[70vh] 类
- 更新 Header组件的参数类型
- 在 QRLoginButton 组件中添加日志输出
- 重构 qr-login 页面的导航栏,目前已被注释掉
This commit is contained in:
2025-09-01 16:09:16 +08:00
parent 23f7e72d3d
commit d43977f0b7
8 changed files with 44 additions and 135 deletions

View File

@@ -1,6 +1,7 @@
import Header from './Header';
import BestSellers from './BestSellers';
import Taro from '@tarojs/taro';
import { View, Text } from '@tarojs/components';
import {useShareAppMessage} from "@tarojs/taro"
import {useEffect, useState} from "react";
import {getShopInfo, loginByOpenId} from "@/api/layout";
@@ -242,32 +243,32 @@ function Home() {
// 如果还在加载中,显示加载页面
if (pageLoading) {
return (
<div className="flex flex-col items-center justify-center min-h-screen bg-gray-50 p-4">
<div className="text-center">
<div className="mb-6">
<div className="animate-spin rounded-full h-16 w-16 border-b-2 border-blue-500 mx-auto"></div>
</div>
<div className="text-lg text-gray-700 mb-4">...</div>
<div className="text-sm text-gray-500 mb-6 space-y-1">
<div>: {initStatus.shopInfo ? '✅ 完成' : '⏳ 加载中'}</div>
<div>: {initStatus.userAuth ? '✅ 完成' : '⏳ 检查中'}</div>
<div>: {initStatus.userLogin ? '✅ 完成' : '⏳ 登录中'}</div>
</div>
<View className="flex flex-col items-center justify-center min-h-screen bg-gray-50 p-4">
<View className="text-center">
<View className="mb-6">
<View className="animate-spin rounded-full h-16 w-16 border-b-2 border-blue-500 mx-auto"></View>
</View>
<View className="text-lg text-gray-700 mb-4">...</View>
<View className="text-sm text-gray-500 mb-6 space-y-1">
<Text>: {initStatus.shopInfo ? '✅ 完成' : '⏳ 加载中'}</Text>
<Text>: {initStatus.userAuth ? '✅ 完成' : '⏳ 检查中'}</Text>
<Text>: {initStatus.userLogin ? '✅ 完成' : '⏳ 登录中'}</Text>
</View>
{/* 如果加载时间过长,显示帮助按钮 */}
<div className="space-y-3">
<button
<View className="space-y-3">
<View
className="px-4 py-2 bg-blue-500 text-white rounded-lg text-sm"
onClick={() => showNetworkDiagnosis(BaseUrl)}
>
</button>
<div className="text-xs text-gray-400">
</View>
<View className="text-xs text-gray-400">
</div>
</div>
</div>
</div>
</View>
</View>
</View>
</View>
);
}