forked from gxwebsoft/mp-10550
refactor(components): 优化多个组件的样式和功能
-调整 AdminPanel 组件的样式,移除 max-h-[70vh] 类 - 更新 Header组件的参数类型 - 在 QRLoginButton 组件中添加日志输出 - 重构 qr-login 页面的导航栏,目前已被注释掉
This commit is contained in:
@@ -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>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user