diff --git a/src/dealer/index.tsx b/src/dealer/index.tsx index 9a1a37b..97f7a95 100644 --- a/src/dealer/index.tsx +++ b/src/dealer/index.tsx @@ -1,6 +1,6 @@ import React, {useState, useEffect} from 'react' import {View, Text} from '@tarojs/components' -import {ConfigProvider, Button, Grid, Avatar} from '@nutui/nutui-react-taro' +import {ConfigProvider, Grid, Avatar} from '@nutui/nutui-react-taro' import { User, Shopping, @@ -11,16 +11,14 @@ import { } from '@nutui/icons-react-taro' import {useDealerUser} from '@/hooks/useDealerUser' import {useThemeStyles} from '@/hooks/useTheme' -import {businessGradients, cardGradients, gradientUtils} from '@/styles/gradients' +import {businessGradients, cardGradients} from '@/styles/gradients' import Taro from '@tarojs/taro' import {getShopDealerRefereeByUserId} from "@/api/shop/shopDealerReferee"; import {ShopDealerUser} from "@/api/shop/shopDealerUser/model"; const DealerIndex: React.FC = () => { const { - dealerUser, - error, - refresh, + dealerUser } = useDealerUser() const [dealer, setDealer] = useState() @@ -45,16 +43,16 @@ const DealerIndex: React.FC = () => { } // 获取用户主题 - const userTheme = gradientUtils.getThemeByUserId(dealerUser?.userId) + // const userTheme = gradientUtils.getThemeByUserId(dealerUser?.userId) // 获取渐变背景 - const getGradientBackground = (themeColor?: string) => { - if (themeColor) { - const darkerColor = gradientUtils.adjustColorBrightness(themeColor, -30) - return gradientUtils.createGradient(themeColor, darkerColor) - } - return userTheme.background - } + // const getGradientBackground = (themeColor?: string) => { + // if (themeColor) { + // const darkerColor = gradientUtils.adjustColorBrightness(themeColor, -30) + // return gradientUtils.createGradient(themeColor, darkerColor) + // } + // return userTheme.background + // } // 初始化当前用户名称 @@ -65,20 +63,20 @@ const DealerIndex: React.FC = () => { }, [dealerUser]) - console.log(getGradientBackground(), 'getGradientBackground()') - - if (error) { - return ( - - - {error} - - - - ) - } + // console.log(getGradientBackground(), 'getGradientBackground()') + // + // if (error) { + // return ( + // + // + // {error} + // + // + // + // ) + // } return (