u
This commit is contained in:
1 parent
7971c527af
commit
b8a6b15355
27 files changed
+480
-399
No files matched your search
@@ -1,15 +1,28 @@
|
||||
import { ScrollView, Text, View } from 'react-native'
|
||||
import { ScrollView, Text } from 'react-native'
|
||||
import { AButton } from '@/components/common/ao'
|
||||
import { useUserStore } from '@/store/user'
|
||||
|
||||
export default function Chat() {
|
||||
const userStore = useUserStore()
|
||||
|
||||
return (
|
||||
<ScrollView contentContainerStyle={{ padding: 16 }}>
|
||||
{Array.from({ length: 50 }).map((_, i) => (
|
||||
<Text key={i} style={{ marginBottom: 10, fontSize: 16 }}>
|
||||
Chat message
|
||||
{' '}
|
||||
{i + 1}
|
||||
</Text>
|
||||
))}
|
||||
<ScrollView contentContainerStyle={{ padding: 16, marginTop: 22 }}>
|
||||
<AButton
|
||||
onPress={() => {
|
||||
userStore.setUserInfo({
|
||||
...(userStore.userInfo as any),
|
||||
token: `test-token-${Date.now()}`,
|
||||
})
|
||||
}}
|
||||
>
|
||||
测试
|
||||
</AButton>
|
||||
|
||||
<Text style={{ marginTop: 12 }}>
|
||||
当前 token:
|
||||
{' '}
|
||||
{userStore.userInfo?.token ?? '(无)'}
|
||||
</Text>
|
||||
</ScrollView>
|
||||
)
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
import type { MoneyCategoryResult } from '@/request/api/money'
|
||||
import type { MoneyCategory } from '@/types/money'
|
||||
import { DeleteIcon } from 'lucide-react-native'
|
||||
import { useEffect, useState } from 'react'
|
||||
import { Pressable, Text, View } from 'react-native'
|
||||
import { useSafeAreaInsets } from 'react-native-safe-area-context'
|
||||
import { AInput } from '@/components/common/ao'
|
||||
import SegmentedTabs from '@/components/common/ao/SegmentedTabs'
|
||||
import {
|
||||
Drawer,
|
||||
DrawerBackdrop,
|
||||
DrawerBody,
|
||||
DrawerContent,
|
||||
DrawerFooter,
|
||||
DrawerHeader,
|
||||
} from '@/components/ui/drawer'
|
||||
import { Grid, GridItem } from '@/components/ui/grid'
|
||||
@@ -20,6 +23,37 @@ interface AddMoneyDrawerProps {
|
||||
onClose: () => void
|
||||
}
|
||||
|
||||
interface KeydownItem {
|
||||
key: string | number
|
||||
content: React.ReactNode
|
||||
}
|
||||
const keys: KeydownItem[] = [
|
||||
{ key: '1', content: <Text className="text-2xl">1</Text> },
|
||||
{ key: '2', content: <Text className="text-2xl">2</Text> },
|
||||
{ key: '3', content: <Text className="text-2xl">3</Text> },
|
||||
{ key: 'del', content: <DeleteIcon strokeWidth={1} /> },
|
||||
{ key: '4', content: <Text className="text-2xl">4</Text> },
|
||||
{ key: '5', content: <Text className="text-2xl">5</Text> },
|
||||
{ key: '6', content: <Text className="text-2xl">6</Text> },
|
||||
{ key: '+', content: <Text className="text-2xl">+</Text> },
|
||||
{ key: '7', content: <Text className="text-2xl">7</Text> },
|
||||
{ key: '8', content: <Text className="text-2xl">8</Text> },
|
||||
{ key: '9', content: <Text className="text-2xl">9</Text> },
|
||||
{ key: '-', content: <Text className="text-2xl">-</Text> },
|
||||
{ key: 'clear', content: (
|
||||
<View className="w-full h-full flex items-center justify-center">
|
||||
<Text className="text-2xl text-red-500">AC</Text>
|
||||
</View>
|
||||
) },
|
||||
{ key: '0', content: <Text className="text-2xl">0</Text> },
|
||||
{ key: '.', content: <Text>.</Text> },
|
||||
{ key: '/', content: (
|
||||
<View className="w-full h-full bg-amber-100 flex items-center justify-center">
|
||||
<Text className="text-2xl">完成</Text>
|
||||
</View>
|
||||
) },
|
||||
]
|
||||
|
||||
export default function AddMoneyDrawer({
|
||||
isOpen,
|
||||
onClose,
|
||||
@@ -27,12 +61,18 @@ export default function AddMoneyDrawer({
|
||||
const insets = useSafeAreaInsets()
|
||||
const [selectedIndex, setSelectedIndex] = useState(0)
|
||||
const [selectedCategoryId, setSelectedCategoryId] = useState<number | null>(null)
|
||||
const [showKeydown, setShowKeydown] = useState(false)
|
||||
|
||||
const [categories, setCategories] = useState<MoneyCategoryResult>({
|
||||
income: [],
|
||||
expense: [],
|
||||
})
|
||||
|
||||
function selectCategory(item: MoneyCategory) {
|
||||
setSelectedCategoryId(item.id)
|
||||
setShowKeydown(true)
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
if (isOpen) {
|
||||
const fetchCategories = async () => {
|
||||
@@ -50,72 +90,139 @@ export default function AddMoneyDrawer({
|
||||
}
|
||||
}, [isOpen])
|
||||
|
||||
const handlePress = (key: string | number, idx: number) => {
|
||||
console.log('点击了格子 key:', key, '索引:', idx)
|
||||
}
|
||||
|
||||
return (
|
||||
<Drawer
|
||||
isOpen={isOpen}
|
||||
size="full"
|
||||
anchor="bottom"
|
||||
onClose={onClose}
|
||||
>
|
||||
<DrawerBackdrop />
|
||||
<DrawerContent style={{ padding: 0, paddingLeft: 16, paddingRight: 16 }}>
|
||||
<DrawerHeader
|
||||
className="flex items-center justify-between"
|
||||
style={{ paddingTop: insets.top, margin: 0, padding: 0 }}
|
||||
>
|
||||
<View className="w-1" />
|
||||
<SegmentedTabs
|
||||
value={selectedIndex}
|
||||
tabs={[{ label: '收入' }, { label: '支出' }]}
|
||||
onChange={setSelectedIndex}
|
||||
style={{ width: 180 }}
|
||||
className="mx-auto"
|
||||
/>
|
||||
<Pressable onPress={onClose}>
|
||||
<Text className="text-gray-500 font-medium">取消</Text>
|
||||
</Pressable>
|
||||
</DrawerHeader>
|
||||
<>
|
||||
<Drawer
|
||||
isOpen={isOpen}
|
||||
size="full"
|
||||
anchor="bottom"
|
||||
onClose={onClose}
|
||||
>
|
||||
<DrawerBackdrop />
|
||||
<DrawerContent style={{ padding: 0, paddingLeft: 16, paddingRight: 16 }}>
|
||||
<DrawerHeader
|
||||
className="flex items-center justify-between"
|
||||
style={{ paddingTop: insets.top + 8, margin: 0, padding: 0 }}
|
||||
>
|
||||
<View className="w-1" />
|
||||
<SegmentedTabs
|
||||
value={selectedIndex}
|
||||
tabs={[{ label: '收入' }, { label: '支出' }]}
|
||||
onChange={setSelectedIndex}
|
||||
style={{ width: 180 }}
|
||||
className="mx-auto"
|
||||
/>
|
||||
<Pressable onPress={onClose}>
|
||||
<Text className="text-gray-500 font-medium">取消</Text>
|
||||
</Pressable>
|
||||
</DrawerHeader>
|
||||
|
||||
<DrawerBody>
|
||||
<Grid className="gap-4" _extra={{ className: 'grid-cols-4' }}>
|
||||
{(() => {
|
||||
const list = selectedIndex === 0 ? categories.income : categories.expense
|
||||
const items = list.map((item) => {
|
||||
const isSelected = selectedCategoryId === item.id
|
||||
return (
|
||||
<GridItem key={item.id} _extra={{ className: 'col-span-1' }}>
|
||||
<Pressable
|
||||
className="flex flex-col items-center justify-center rounded"
|
||||
onPress={() => setSelectedCategoryId(item.id)}
|
||||
>
|
||||
<View
|
||||
className={`w-14 h-14 rounded-full flex items-center justify-center ${
|
||||
isSelected ? 'bg-blue-600' : 'bg-gray-200'
|
||||
}`}
|
||||
<DrawerBody>
|
||||
<Grid className="gap-4" _extra={{ className: 'grid-cols-4' }}>
|
||||
{(() => {
|
||||
const list = selectedIndex === 0 ? categories.income : categories.expense
|
||||
const items = list.map((item) => {
|
||||
const isSelected = selectedCategoryId === item.id
|
||||
return (
|
||||
<GridItem key={item.id} _extra={{ className: 'col-span-1' }}>
|
||||
<Pressable
|
||||
className="flex flex-col items-center justify-center rounded"
|
||||
onPress={() => selectCategory(item)}
|
||||
>
|
||||
<MoneyCategoryIcon name={item.icon} size={28} />
|
||||
</View>
|
||||
<Text className="text-sm mt-1">
|
||||
{item.name}
|
||||
</Text>
|
||||
</Pressable>
|
||||
</GridItem>
|
||||
)
|
||||
})
|
||||
<View
|
||||
className={`w-14 h-14 rounded-full flex items-center justify-center ${
|
||||
isSelected ? 'bg-blue-100' : 'bg-gray-100'
|
||||
}`}
|
||||
>
|
||||
<MoneyCategoryIcon name={item.icon} size={28} />
|
||||
</View>
|
||||
<Text className="text-sm mt-1">
|
||||
{item.name}
|
||||
</Text>
|
||||
</Pressable>
|
||||
</GridItem>
|
||||
)
|
||||
})
|
||||
|
||||
const remainder = list.length % 4
|
||||
if (remainder > 0) {
|
||||
const emptyCount = 4 - remainder
|
||||
for (let i = 0; i < emptyCount; i++) {
|
||||
items.push(<GridItem key={`empty-${i}`} _extra={{ className: 'col-span-1' }} />)
|
||||
const remainder = list.length % 4
|
||||
if (remainder > 0) {
|
||||
const emptyCount = 4 - remainder
|
||||
for (let i = 0; i < emptyCount; i++) {
|
||||
items.push(<GridItem key={`empty-${i}`} _extra={{ className: 'col-span-1' }} />)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return items
|
||||
})()}
|
||||
</Grid>
|
||||
</DrawerBody>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
return items
|
||||
})()}
|
||||
</Grid>
|
||||
</DrawerBody>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
|
||||
<Drawer
|
||||
isOpen={showKeydown}
|
||||
size="md"
|
||||
anchor="bottom"
|
||||
>
|
||||
<DrawerContent
|
||||
style={{
|
||||
padding: 0,
|
||||
margin: 0,
|
||||
borderTopWidth: 0,
|
||||
elevation: 30,
|
||||
backgroundColor: 'white',
|
||||
height: 360,
|
||||
}}
|
||||
>
|
||||
<View className="flex-1">
|
||||
<View className="p-4">
|
||||
<Text className="text-3xl text-blue-700 text-right">0.00</Text>
|
||||
<AInput
|
||||
value=""
|
||||
placeholder="备注"
|
||||
className="bg-[#f2f3f5] border-0 mt-2"
|
||||
size="sm"
|
||||
/>
|
||||
</View>
|
||||
|
||||
<View className="flex-1">
|
||||
<View className="flex flex-row flex-wrap h-full">
|
||||
{keys.map((item, idx) => {
|
||||
const isFirstCol = idx % 4 === 0
|
||||
const isFirstRow = idx < 4
|
||||
const isLastCol = (idx + 1) % 4 === 0
|
||||
const isLastRow = idx >= 12
|
||||
|
||||
return (
|
||||
<Pressable
|
||||
key={item.key}
|
||||
onPress={() => handlePress(item.key, idx)}
|
||||
style={{
|
||||
width: '25%',
|
||||
height: '25%',
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
borderTopWidth: isFirstRow ? 0.3 : 0,
|
||||
borderLeftWidth: isFirstCol ? 0.3 : 0,
|
||||
borderRightWidth: !isLastCol ? 0.3 : 0,
|
||||
borderBottomWidth: !isLastRow ? 0.3 : 0,
|
||||
borderColor: '#ddd',
|
||||
}}
|
||||
>
|
||||
{item.content}
|
||||
</Pressable>
|
||||
)
|
||||
})}
|
||||
</View>
|
||||
</View>
|
||||
|
||||
</View>
|
||||
</DrawerContent>
|
||||
</Drawer>
|
||||
</>
|
||||
)
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
import React from 'react'
|
||||
import {
|
||||
IconGongzi,
|
||||
IconJiaotong,
|
||||
IconLingshi,
|
||||
IconRiyongpin,
|
||||
@@ -13,18 +14,19 @@ const iconMap: Record<string, React.ElementType> = {
|
||||
jiaotong: IconJiaotong,
|
||||
lingshi: IconLingshi,
|
||||
riyongpin: IconRiyongpin,
|
||||
shouru: IconShouru,
|
||||
shucai: IconShucai,
|
||||
yule: IconYule,
|
||||
zhichu: IconZhichu,
|
||||
gongzi: IconGongzi,
|
||||
}
|
||||
|
||||
const DefaultIcon = IconLingshi
|
||||
const DefaultIncomeIcon = IconShouru
|
||||
const DefaultExpenseIcon = IconZhichu
|
||||
|
||||
interface CategoryIconProps {
|
||||
name?: string
|
||||
size?: number
|
||||
color?: string
|
||||
type?: 0 | 1
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -34,7 +36,10 @@ export default function MoneyCategoryIcon({
|
||||
name,
|
||||
size = 24,
|
||||
color,
|
||||
type = 1,
|
||||
}: CategoryIconProps) {
|
||||
const IconComponent = iconMap[name ?? ''] || DefaultIcon
|
||||
const IconComponent
|
||||
= iconMap[name ?? ''] || (type === 0 ? DefaultIncomeIcon : DefaultExpenseIcon)
|
||||
|
||||
return <IconComponent size={size} color={color} />
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Pressable, Text, View } from 'react-native'
|
||||
import Animated, { useAnimatedStyle, withSpring, withTiming } from 'react-native-reanimated'
|
||||
import { IconQuxian1 } from '@/components/iconfont'
|
||||
// import { IconQuxian1 } from '@/components/iconfont'
|
||||
|
||||
interface TabSelectorProps {
|
||||
options: string[]
|
||||
@@ -43,7 +43,7 @@ const TabSelector: React.FC<TabSelectorProps> = ({ options, selected, onSelect }
|
||||
animatedStyle,
|
||||
]}
|
||||
>
|
||||
<IconQuxian1 size={22} color="#7566f3" />
|
||||
{/* <IconQuxian1 size={22} color="#7566f3" /> */}
|
||||
</Animated.View>
|
||||
</Pressable>
|
||||
</View>
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
let IconGongzi: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M274.285714 56.685714c0-27.428571-3.657143-51.2-36.571428-51.2-3.657143 0-7.314286 0-10.971429 1.828572 25.6 25.6 42.057143 60.342857 45.714286 96.914285V56.685714z m0 0"
|
||||
fill={getIconColor(color, 0, '#333333')}
|
||||
/>
|
||||
<Path
|
||||
d="M716.8 0H184.685714C160.914286 0 138.971429 5.485714 120.685714 12.8c58.514286 23.771429 96.914286 82.285714 96.914286 144.457143v709.485714c0 78.628571 58.514286 144.457143 137.142857 153.6 85.942857-5.485714 155.428571-84.114286 168.228572-170.057143h352.914285V159.085714c0-42.057143-16.457143-82.285714-45.714285-111.542857C799.085714 16.457143 758.857143 0 716.8 0z m0 0"
|
||||
fill={getIconColor(color, 1, '#0FCEA0')}
|
||||
/>
|
||||
<Path
|
||||
d="M764.342857 499.2c0 5.485714-1.828571 10.971429-5.485714 14.628571-3.657143 3.657143-9.142857 5.485714-14.628572 5.485715h-115.2V566.857143l115.2-1.828572c5.485714 0 10.971429 1.828571 14.628572 5.485715 3.657143 3.657143 5.485714 9.142857 5.485714 14.628571v25.6c0 10.971429-9.142857 20.114286-20.114286 20.114286l-115.2 3.657143v53.028571c0 5.485714-1.828571 10.971429-5.485714 14.628572-3.657143 3.657143-9.142857 7.314286-16.457143 7.314285l-29.257143 3.657143c-12.8 0-21.942857-9.142857-21.942857-20.114286v-54.857142l-131.657143 5.485714c-12.8 0-25.6-9.142857-25.6-21.942857v-27.428572c0-12.8 10.971429-21.942857 25.6-21.942857l131.657143-1.828571v-49.371429h-131.657143c-12.8 0-25.6-9.142857-25.6-21.942857v-27.428571c0-5.485714 1.828571-10.971429 7.314286-16.457143 5.485714-3.657143 10.971429-5.485714 18.285714-5.485715l106.057143 1.828572-87.771428-85.942857c-3.657143-3.657143-7.314286-9.142857-7.314286-16.457143 0-5.485714 1.828571-10.971429 7.314286-14.628572l21.942857-18.285714c5.485714-3.657143 10.971429-5.485714 16.457143-5.485714 5.485714 0 12.8 3.657143 16.457143 7.314286l80.457142 78.628571c3.657143 3.657143 9.142857 7.314286 16.457143 7.314286 5.485714 0 10.971429-1.828571 16.457143-5.485715l74.971429-67.657142c3.657143-3.657143 9.142857-5.485714 14.628571-5.485715 5.485714 0 10.971429 3.657143 14.628572 7.314286l18.285714 18.285714c7.314286 9.142857 7.314286 21.942857 0 29.257143l-76.8 71.314286 87.771428 1.828571c5.485714 0 10.971429 1.828571 14.628572 5.485715 3.657143 3.657143 5.485714 9.142857 5.485714 14.628571v25.6z m0 0"
|
||||
fill={getIconColor(color, 2, '#FFFFFF')}
|
||||
/>
|
||||
<Path
|
||||
d="M215.771429 144.457143v-3.657143c0-5.485714-1.828571-12.8-3.657143-18.285714 0-1.828571-1.828571-3.657143-1.828572-7.314286-1.828571-7.314286-5.485714-14.628571-9.142857-21.942857V91.428571c-3.657143-7.314286-7.314286-14.628571-12.8-21.942857-1.828571-1.828571-1.828571-3.657143-3.657143-5.485714-3.657143-5.485714-7.314286-10.971429-10.971428-14.628571l-1.828572-1.828572C157.257143 32.914286 138.971429 21.942857 120.685714 12.8c-64 27.428571-100.571429 95.085714-100.571428 173.714286h197.485714V159.085714c0-5.485714-1.828571-10.971429-1.828571-14.628571z m0 0"
|
||||
fill={getIconColor(color, 3, '#0FB58A')}
|
||||
/>
|
||||
<Path
|
||||
d="M874.057143 850.285714H521.142857c-10.971429 87.771429-80.457143 166.4-168.228571 170.057143 5.485714 0 12.8 1.828571 18.285714 1.828572h455.314286c89.6 0 164.571429-80.457143 177.371428-171.885715h-129.828571z m0 0"
|
||||
fill={getIconColor(color, 4, '#13EAB2')}
|
||||
/>
|
||||
</Svg>
|
||||
);
|
||||
};
|
||||
|
||||
IconGongzi.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconGongzi = React.memo ? React.memo(IconGongzi) : IconGongzi;
|
||||
|
||||
export default IconGongzi;
|
||||
@@ -1,64 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconIcon: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M834.80808 440.235536c-2.707668-17.020652-18.621103-28.635177-35.722596-25.941835-1.290389 0.203638-130.923842 20.465101-286.911522 20.465101-155.991774 0-285.626249-20.261463-286.916639-20.465101-17.050328-2.712785-33.019021 8.922207-35.722596 25.941835-2.697435 17.020652 8.906857 33.013905 25.931602 35.71748 5.456269 0.86367 135.542023 21.237697 296.706609 21.237697 161.15947 0 291.245224-20.374026 296.701492-21.237697C825.902246 473.250464 837.506539 457.256188 834.80808 440.235536z"
|
||||
fill={getIconColor(color, 0, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M397.310911 539.004027c-17.238616 0-31.215956 13.972223-31.215956 31.215956l0 28.716019c0 17.243733 13.977339 31.215956 31.215956 31.215956s31.215956-13.972223 31.215956-31.215956L428.526867 570.219983C428.525843 552.97625 414.549527 539.004027 397.310911 539.004027z"
|
||||
fill={getIconColor(color, 1, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M627.033943 539.004027c-17.238616 0-31.215956 13.972223-31.215956 31.215956l0 28.716019c0 17.243733 13.977339 31.215956 31.215956 31.215956 17.238616 0 31.215956-13.972223 31.215956-31.215956L658.249899 570.219983C658.249899 552.97625 644.272559 539.004027 627.033943 539.004027z"
|
||||
fill={getIconColor(color, 2, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M511.88232 761.598708c42.195008 0 72.079642-29.081339 83.089393-46.264697 9.206686-14.378475 5.02955-33.298384-9.221012-42.698474-14.246469-9.419534-33.537837-5.41636-43.135426 8.68787-0.121773 0.183172-12.335956 17.84339-30.732955 17.84339-17.807574 0-29.046546-16.237823-29.859052-17.447371-9.175987-14.419408-28.268834-18.778692-42.794665-9.734712-14.647605 9.094122-19.144012 28.340465-10.044774 42.982954C439.944917 732.294288 469.469348 761.598708 511.88232 761.598708z"
|
||||
fill={getIconColor(color, 3, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M889.99703 326.56566c-10.898211-18.908652-44.732807-72.77856-103.051027-123.781164-12.985756-11.360745-32.694633-10.029424-44.049239 2.947122-11.350512 12.976546-10.029424 32.69975 2.947122 44.039006 60.703547 53.088102 91.617627 110.648053 92.577488 112.451118 2.573615 5.492084 6.757914 10.29753 12.374842 13.610996 33.553187 19.814278 50.786687 37.352723 45.746904 73.243141-20.927635 149.880589-79.161944 246.209518-183.300746 303.174927-1.590218 0.873903-3.236718 1.706875-4.88731 2.550079-12.493545 6.401804-35.752272 18.300808-40.162722 46.600341-8.56098 54.983265-38.678928 59.270918-100.546997 63.11241l-2.373047 0.14224c-43.617403 2.76395-91.736331 1.077541-147.091056-5.131881-44.51689-5.009084-55.17667-20.74958-58.549487-46.285163-4.964058-37.220716-32.633235-52.188616-49.160653-61.131289-2.402723-1.300622-4.816702-2.601244-7.138584-3.953032-98.219999-57.421804-153.909345-151.373593-175.253466-295.655673-5.131881-34.778084 6.343475-57.314357 37.969776-73.561389 0.813528 0.064468 1.626034 0.267083 2.436492 0.267083 11.700483 0 22.924105-6.614651 28.248368-17.904789 0.954745-2.022053 98.138134-202.597231 315.423903-202.597231 17.238616 0 31.215956-13.977339 31.215956-31.215956 0-17.238616-13.977339-31.215956-31.215956-31.215956-219.425502 0-332.189751 167.32489-363.060853 221.73715-80.433914 35.284621-89.613994 97.308233-82.779332 143.625118 24.00574 162.256454 91.223654 273.605471 205.539236 340.436576 2.926656 1.706875 5.918803 3.332908 8.901741 4.948709 15.536858 8.403391 16.400528 10.04989 16.984836 14.429641 7.767917 58.833967 45.939285 92.51916 113.472378 100.120278 40.558741 4.542456 77.643358 6.797823 112.211664 6.797823 15.739473 0 30.962176-0.467651 45.746904-1.401929l2.337231-0.14224c55.821353-3.464915 139.881864-8.677637 157.806095-112.394836 2.02717-1.25969 5.187139-2.87549 7.483438-4.044106 2.194992-1.127683 4.369517-2.246157 6.442736-3.384074 121.199363-66.303079 191.567014-180.557262 215.126592-349.266685C969.146695 380.950292 918.747841 344.137875 889.99703 326.56566z"
|
||||
fill={getIconColor(color, 4, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M607.719038 172.250062c18.407232 5.395894 36.631292 12.498662 54.175877 21.10569 4.424776 2.174526 9.109472 3.200902 13.722536 3.200902 11.537777 0 22.629393-6.42227 28.05087-17.477047 7.590885-15.47546 1.199315-34.177404-14.277168-41.773406-20.723997-10.166547-42.291199-18.564821-64.092737-24.961508-16.568351-4.877077-33.892925 4.618181-38.745443 21.160949C581.701478 150.047388 591.177294 167.392428 607.719038 172.250062z"
|
||||
fill={getIconColor(color, 5, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M422.688905 322.749752c4.028757 0 8.129144-0.793062 12.07706-2.448772 15.897062-6.67605 23.366174-24.976858 16.685008-40.868803l-10.791787-25.677822c-6.670933-15.902178-24.966625-23.350824-40.868803-16.685008-15.897062 6.67605-23.366174 24.976858-16.685008 40.868803l10.791787 25.677822C398.916479 315.566142 410.495188 322.749752 422.688905 322.749752z"
|
||||
fill={getIconColor(color, 6, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M644.058688 363.426173l21.196765-25.677822c10.973936-13.300934 9.094122-32.973996-4.201695-43.947931-13.295817-10.984169-32.963763-9.083889-43.942815 4.196579l-21.196765 25.677822c-10.973936 13.300934-9.094122 32.973996 4.201695 43.947931 5.817496 4.806469 12.853749 7.143701 19.85521 7.143701C628.963898 374.766452 637.886105 370.894262 644.058688 363.426173z"
|
||||
fill={getIconColor(color, 7, '#999999')}
|
||||
/>
|
||||
<Path
|
||||
d="M310.776046 368.872209c5.522784 3.983731 11.904121 5.89322 18.22406 5.89322 9.69378 0 19.250436-4.501524 25.352411-12.966313 10.075473-13.992689 6.909363-33.502022-7.077186-43.572378l-21.196765-15.272845c-13.987572-10.089799-33.486672-6.909363-43.577494 7.072069-10.075473 13.992689-6.909363 33.502022 7.077186 43.572378L310.776046 368.872209z"
|
||||
fill={getIconColor(color, 8, '#999999')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconIcon);
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconJiaotong: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconJiaotong: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M32.698182 259.258182h953.832727v194.909091H32.698182z"
|
||||
@@ -117,8 +111,13 @@ const IconJiaotong: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 23, '#1D1C1A')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconJiaotong);
|
||||
IconJiaotong.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconJiaotong = React.memo ? React.memo(IconJiaotong) : IconJiaotong;
|
||||
|
||||
export default IconJiaotong;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconLingshi: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconLingshi: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M676.73 604.6925c0 21.9-17.925 39.825-39.8325 39.825H501.4625c-21.9075 0-39.8325-17.925-39.8325-39.825V86.855c0-21.9075 17.925-39.825 39.8325-39.825h135.435c21.9075 0 39.825 17.925 39.825 39.825v517.83z"
|
||||
@@ -69,8 +63,13 @@ const IconLingshi: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 11, '#000000')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconLingshi);
|
||||
IconLingshi.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconLingshi = React.memo ? React.memo(IconLingshi) : IconLingshi;
|
||||
|
||||
export default IconLingshi;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconQq: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconQq: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M511.09761 957.257c-80.159 0-153.737-25.019-201.11-62.386-24.057 6.702-54.831 17.489-74.252 30.864-16.617 11.439-14.546 23.106-11.55 27.816 13.15 20.689 225.583 13.211 286.912 6.767v-3.061z"
|
||||
@@ -61,8 +55,13 @@ const IconQq: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 9, '#EB1C26')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconQq);
|
||||
IconQq.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconQq = React.memo ? React.memo(IconQq) : IconQq;
|
||||
|
||||
export default IconQq;
|
||||
@@ -1,32 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconQuxian1: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1377 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M1108.943077 682.832417c0-86.82715-84.780144-178.17477-385.178201-274.042861-98.426848-28.146326-41.281278-95.015172 129.302514-152.416617a1050.11382 1050.11382 0 0 1 426.459479-85.291896s85.291896-7.420395 85.291895-85.291896a78.383252 78.383252 0 0 0-85.291895-85.291895 1658.756787 1658.756787 0 0 0-682.335166 170.583791c-101.326772 74.630409-226.535275 221.247177-85.291896 341.167583 60.557246 68.233517 565.058809 111.902967 335.794194 245.2142-242.570151 93.224042-410.509894 95.953383-762.253672 95.953383a82.136096 82.136096 0 0 0-85.291896 85.291895c0 78.127376 85.291896 85.291896 85.291896 85.291896 326.241501 0 646.768445-21.322974 767.627061-85.291896 87.594777-46.398791 255.875687-145.76385 255.875687-255.875687z"
|
||||
fill={getIconColor(color, 0, '#898E95')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconQuxian1);
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconRiyongpin: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconRiyongpin: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M133.12 1024c-16.896 0-30.72-13.824-30.72-30.72V30.72C102.4 13.824 116.224 0 133.12 0c16.896 0 30.72 13.824 30.72 30.72v962.56c0 16.896-13.824 30.72-30.72 30.72z"
|
||||
@@ -53,8 +47,13 @@ const IconRiyongpin: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 7, '#474A54')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconRiyongpin);
|
||||
IconRiyongpin.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconRiyongpin = React.memo ? React.memo(IconRiyongpin) : IconRiyongpin;
|
||||
|
||||
export default IconRiyongpin;
|
||||
@@ -1,32 +1,51 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconShouru: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconShouru: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M430.417902 1023.906918C223.867952 1023.906918 51.339636 917.234433 51.339636 694.767385A313.315517 313.315517 0 0 1 151.12402 479.374602a520.423961 520.423961 0 0 1 65.80929-56.733751 50.404145 50.404145 0 0 0 11.402599-6.795019 91.732752 91.732752 0 0 1-54.499772-79.538951 107.417144 107.417144 0 0 1 115.980729-95.362967 104.62467 104.62467 0 0 1 38.582674 6.84156 35.324789 35.324789 0 0 1 13.590037 6.795019c2.233979 2.187438 6.795019 0 6.795019 2.187437a115.329152 115.329152 0 0 1 22.758658-24.946096 82.564131 82.564131 0 0 1 122.729207 0 106.020907 106.020907 0 0 1 22.758658 24.946096 13.590037 13.590037 0 0 0 8.982456 2.233979 74.791746 74.791746 0 0 1 13.590037-6.795019 104.671212 104.671212 0 0 1 38.582675-6.84156 106.020907 106.020907 0 0 1 115.608399 95.269885 91.593128 91.593128 0 0 1-54.499773 79.49241c4.654122 2.28052 6.795019 4.654122 11.309517 6.84156a372.329788 372.329788 0 0 1 65.855832 56.733751 315.921825 315.921825 0 0 1 102.390692 211.064449c0 222.467048-172.481774 329.139533-379.031725 329.139533z m-133.945641-288.555586a21.502045 21.502045 0 0 0 22.712117 22.758658h90.755386v88.428325a22.712117 22.712117 0 1 0 45.424234 0v-88.428325h90.848468a22.712117 22.712117 0 1 0 0-45.424234H455.363998v-54.453232h93.082447a22.712117 22.712117 0 1 0 0-45.424234H480.635882l74.93137-74.884828a22.479411 22.479411 0 0 0-31.787656-31.787656l-90.848468 90.848468-91.034633-90.615762a22.479411 22.479411 0 0 0-31.694573 31.787656l74.838287 74.465957H316.950399a22.758658 22.758658 0 0 0 0 45.517317h93.082447v54.453231H319.184378a21.362422 21.362422 0 0 0-22.712117 22.712117z m419.708753-532.431597h85.58931V0h85.449687v202.919735h85.356604l-129.943096 215.439323z"
|
||||
fill={getIconColor(color, 0, '#DFA46E')}
|
||||
d="M58.666667 149.333333m40.32 0l604.8 0q40.32 0 40.32 40.32l0 544.32q0 40.32-40.32 40.32l-604.8 0q-40.32 0-40.32-40.32l0-544.32q0-40.32 40.32-40.32Z"
|
||||
fill={getIconColor(color, 0, '#C1D4FA')}
|
||||
/>
|
||||
<Path
|
||||
d="M631.381333 546.133333v29.845334h-89.536v59.733333h89.6v29.866667h-89.6v59.754666h-59.733333v-59.733333h-89.6v-29.866667h89.642667v-59.754666h-89.642667v-29.866667l92.416 0.362667L362.666667 426.666667h59.733333l89.6 89.6 89.6-89.6h59.733333l-111.914666 119.808z"
|
||||
fill={getIconColor(color, 1, '#6C89DD')}
|
||||
/>
|
||||
<Path
|
||||
d="M159.466667 229.973333h685.44v100.8H159.466667z"
|
||||
fill={getIconColor(color, 2, '#FF9579')}
|
||||
/>
|
||||
<Path
|
||||
d="M832 554.666667a170.666667 170.666667 0 0 0-170.666667 170.666666 170.666667 170.666667 0 1 0 170.666667-170.666666z"
|
||||
fill={getIconColor(color, 3, '#FAAD14')}
|
||||
/>
|
||||
<Path
|
||||
d="M938.666667 726.144c0-11.477333-10.282667-22.144-23.381334-22.144h-166.506666c-13.098667 0-24.32 10.666667-23.381334 22.144 0 11.498667 11.221333 20.522667 23.381334 20.522667h164.629333c13.098667 0 25.258667-9.024 25.258667-20.522667z"
|
||||
fill={getIconColor(color, 4, '#FFFFFF')}
|
||||
/>
|
||||
<Path
|
||||
d="M831.189333 832c11.477333 0 22.144-10.282667 22.144-23.381333v-166.506667c0-13.098667-10.666667-24.32-22.144-23.381333-11.498667 0-20.522667 11.221333-20.522666 23.381333v164.629333c0 13.098667 9.024 25.258667 20.522666 25.258667z"
|
||||
fill={getIconColor(color, 5, '#FFFFFF')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconShouru);
|
||||
IconShouru.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconShouru = React.memo ? React.memo(IconShouru) : IconShouru;
|
||||
|
||||
export default IconShouru;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconShucai: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconShucai: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M988.86528 307.2s185.6 651.2-299.2 688S96.06528 859.2 25.66528 696l963.2-388.8z"
|
||||
@@ -41,8 +35,13 @@ const IconShucai: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 4, '#FFFFFF')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconShucai);
|
||||
IconShucai.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconShucai = React.memo ? React.memo(IconShucai) : IconShucai;
|
||||
|
||||
export default IconShucai;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconWeixin: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconWeixin: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M1024 619.52c0-143.36-138.24-256-307.2-256s-307.2 112.64-307.2 256 138.24 256 307.2 256c30.72 0 61.44-5.12 92.16-10.24l97.28 51.2-25.6-76.8c87.04-51.2 143.36-128 143.36-220.16z m-414.72-40.96c-30.72 0-51.2-20.48-51.2-51.2s20.48-51.2 51.2-51.2 51.2 20.48 51.2 51.2c0 25.6-25.6 51.2-51.2 51.2z m209.92 0c-30.72 0-51.2-20.48-51.2-51.2s20.48-51.2 51.2-51.2 51.2 20.48 51.2 51.2c0 25.6-25.6 51.2-51.2 51.2z"
|
||||
@@ -29,8 +23,13 @@ const IconWeixin: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 1, '#4CBF00')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconWeixin);
|
||||
IconWeixin.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconWeixin = React.memo ? React.memo(IconWeixin) : IconWeixin;
|
||||
|
||||
export default IconWeixin;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconYule: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconYule: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M455.7312 262.0928V147.3536c0-31.1296 25.1904-56.32 56.32-56.32s56.32 25.1904 56.32 56.32v114.7392c0 31.1296-25.1904 56.32-56.32 56.32s-56.32-25.1904-56.32-56.32z"
|
||||
@@ -65,8 +59,13 @@ const IconYule: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 10, '#FFE576')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconYule);
|
||||
IconYule.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconYule = React.memo ? React.memo(IconYule) : IconYule;
|
||||
|
||||
export default IconYule;
|
||||
@@ -1,32 +0,0 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconYule1: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M903.966695 700.247408 602.093413 325.978283c0.403183-5.686513 0.868787-11.330046 0.868787-17.141402 0-135.12656-109.933785-245.060345-245.071601-245.060345-135.147026 0-245.081835 109.934808-245.081835 245.060345 0 135.136793 109.934808 245.070578 245.081835 245.070578 5.78168 0 11.455913-0.466628 17.132192-0.847298l374.235356 301.883515c5.028527 4.02978 11.085476 6.024204 17.119913 6.024204 7.011694 0 14.002922-2.671852 19.285229-7.976672l21.341051-21.340027c0.040932 8.228405-1.01819 16.927531-4.158716 25.454742-7.021927 18.96698-23.557532 34.07098-49.143257 44.804439-30.124088 12.68695-76.985372-9.289574-131.244136-34.70543-99.908454-46.840818-236.712213-110.995977-383.123794 3.734044-11.860119 9.29162-13.928221 26.476001-4.647857 38.311561 9.29162 11.837606 26.435069 13.916964 38.293141 4.626367 119.989815-94.065376 229.604328-42.642193 326.332347 2.714831 47.416939 22.234397 92.857874 43.532469 134.733611 43.532469 14.023388 0 27.665083-2.376117 40.828894-7.933693 40.030715-16.844643 66.655096-42.472324 79.118965-76.203566 13.035898-35.217083 6.576789-70.261227 0.044002-91.3925l47.985898-47.987944C911.876851 726.764342 912.726196 711.064778 903.966695 700.247408zM167.350984 308.836881c0-105.054661 85.473697-190.517101 190.539614-190.517101 105.055684 0 190.529381 85.46244 190.529381 190.517101s-85.473697 190.548824-190.529381 190.548824C252.824681 499.385704 167.350984 413.891542 167.350984 308.836881zM764.427638 797.111526 443.481975 538.209942c66.295915-24.865317 118.916367-77.476559 143.749962-143.752008l258.902608 320.93543-38.642089 38.651298c-3.53143 2.249227-6.417153 5.133927-8.528234 8.529257L764.427638 797.111526zM600.172667 515.89061c-10.660804-10.649548-27.918863-10.649548-38.568411 0-10.648524 10.648524-10.648524 27.918863 0 38.568411l59.093886 59.104119c5.325285 5.303796 12.304234 7.977695 19.284205 7.977695 6.970762 0 13.948687-2.673899 19.273972-7.977695 10.660804-10.649548 10.660804-27.91784 0-38.567387L600.172667 515.89061z"
|
||||
fill={getIconColor(color, 0, '#272636')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconYule1);
|
||||
@@ -1,32 +1,51 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconZhichu: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconZhichu: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M430.344938 1024C223.816193 1024 51.299735 917.308826 51.299735 694.822436A313.424504 313.424504 0 0 1 151.08616 479.240797 515.861545 515.861545 0 0 1 217.013736 422.570701a50.327956 50.327956 0 0 0 11.303331-6.853604 91.705309 91.705309 0 0 1-54.521952-79.481345A107.407222 107.407222 0 0 1 289.59033 240.899056a104.696469 104.696469 0 0 1 38.564308 6.853604 36.416163 36.416163 0 0 1 13.604914 6.802457c2.250437 2.199291 6.802457 0 6.802458 2.199291a114.925728 114.925728 0 0 1 22.708955-24.959393 99.735278 99.735278 0 0 1 145.357775 24.959393 13.604915 13.604915 0 0 0 9.001748 2.250437 73.088058 73.088058 0 0 1 13.604915-6.751311 117.125019 117.125019 0 0 1 154.359522 88.431946 91.705309 91.705309 0 0 1-54.521952 79.481345c4.55202 2.250437 6.802457 4.603167 11.303332 6.802457a375.20923 375.20923 0 0 1 65.87643 56.721243 316.288697 316.288697 0 0 1 102.292592 211.131911c0 222.486389-172.567604 329.177564-379.045202 329.177564z m-133.901004-288.362819a21.430298 21.430298 0 0 0 22.708955 22.708956h90.73353v88.534239a22.760102 22.760102 0 0 0 45.520204 0v-88.534239h90.784676a22.708956 22.708956 0 1 0 0-45.366765H455.355477v-54.41966h93.137405a22.760102 22.760102 0 0 0 0-45.469057H480.366016l74.929324-74.929324a22.50437 22.50437 0 0 0-31.812996-31.76185l-90.784677 90.784676-90.835822-90.784676a22.50437 22.50437 0 0 0-31.812996 31.76185l74.929324 74.775885H316.902452a22.708956 22.708956 0 1 0 0 45.417911h93.035114v54.521952H319.152889a21.379152 21.379152 0 0 0-22.708955 22.708956z m505.223116-317.107038V215.581639H716.201588L842.737526 0.204585l129.962739 215.377054h-85.516608v202.948504z"
|
||||
fill={getIconColor(color, 0, '#10B213')}
|
||||
d="M149.333333 320m42.666667 0l661.333333 0q42.666667 0 42.666667 42.666667l0 448q0 42.666667-42.666667 42.666666l-661.333333 0q-42.666667 0-42.666667-42.666666l0-448q0-42.666667 42.666667-42.666667Z"
|
||||
fill={getIconColor(color, 0, '#D6D7BD')}
|
||||
/>
|
||||
<Path
|
||||
d="M64 234.666667h682.666667v469.333333a42.666667 42.666667 0 0 1-42.666667 42.666667H106.666667a42.666667 42.666667 0 0 1-42.666667-42.666667V234.666667z"
|
||||
fill={getIconColor(color, 1, '#FAF2DD')}
|
||||
/>
|
||||
<Path
|
||||
d="M524.714667 460.8v29.845333H435.2v59.733334h89.6v29.866666h-89.6V640h-59.733333v-59.733333h-89.6v-29.866667h89.642666v-59.754667h-89.642666v-29.866666l92.416 0.362666L256 341.333333h59.733333l89.6 89.6L494.933333 341.333333H554.666667l-111.914667 119.808z"
|
||||
fill={getIconColor(color, 2, '#FF856A')}
|
||||
/>
|
||||
<Path
|
||||
d="M21.333333 170.666667m42.666667 0l682.666667 0q42.666667 0 42.666666 42.666666l0 0q0 42.666667-42.666666 42.666667l-682.666667 0q-42.666667 0-42.666667-42.666667l0 0q0-42.666667 42.666667-42.666666Z"
|
||||
fill={getIconColor(color, 3, '#497D51')}
|
||||
/>
|
||||
<Path
|
||||
d="M810.666667 533.333333a170.666667 170.666667 0 0 0-170.666667 170.666667 170.666667 170.666667 0 1 0 170.666667-170.666667z"
|
||||
fill={getIconColor(color, 4, '#FAAD14')}
|
||||
/>
|
||||
<Path
|
||||
d="M917.333333 704.810667C917.333333 693.333333 907.050667 682.666667 893.952 682.666667h-166.506667c-13.098667 0-24.32 10.666667-23.381333 22.144 0 11.498667 11.221333 20.522667 23.381333 20.522666h164.629334c13.098667 0 25.258667-9.024 25.258666-20.522666z"
|
||||
fill={getIconColor(color, 5, '#FFFFFF')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconZhichu);
|
||||
IconZhichu.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconZhichu = React.memo ? React.memo(IconZhichu) : IconZhichu;
|
||||
|
||||
export default IconZhichu;
|
||||
@@ -1,24 +1,18 @@
|
||||
/* eslint-disable */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
|
||||
import React from 'react';
|
||||
import type { FunctionComponent } from 'react';
|
||||
import type { ViewProps } from 'react-native';
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { Svg, GProps, Path } from 'react-native-svg';
|
||||
import { getIconColor } from './helper';
|
||||
|
||||
interface Props extends Omit<GProps, 'color'>, ViewProps {
|
||||
interface Props extends GProps, ViewProps {
|
||||
size?: number;
|
||||
color?: string | string[];
|
||||
}
|
||||
|
||||
const IconZhiwen: FunctionComponent<Props> = ({
|
||||
size = 18,
|
||||
color,
|
||||
...rest
|
||||
}) => {
|
||||
let IconZhiwen: FunctionComponent<Props> = ({ size, color, ...rest }) => {
|
||||
return (
|
||||
|
||||
<Svg viewBox="0 0 1024 1024" width={size} height={size} {...rest}>
|
||||
<Path
|
||||
d="M671.232 309.248c-3.584-1.536-7.168-2.048-10.752-2.048-11.776 0-22.528 7.168-27.136 18.432-5.632 14.848 1.536 31.744 16.384 37.888 68.096 26.624 126.464 72.704 167.424 133.632 41.472 60.416 62.976 131.584 62.976 204.8 0 10.24 5.632 19.968 14.336 25.088 9.216 5.12 19.968 5.12 29.184 0 9.216-5.12 14.336-14.848 14.336-25.088 1.024-175.104-103.936-329.216-266.752-392.704zM523.776 309.76c0-15.872-13.312-29.184-29.184-29.184-232.448 0-421.376 188.928-421.376 421.376 0 10.752 5.12 20.992 14.336 26.112 9.216 5.12 20.48 5.12 29.696 0 9.216-5.12 14.848-15.36 14.336-25.6 0-200.704 162.816-363.52 363.008-363.52 15.872-0.512 29.184-13.312 29.184-29.184z"
|
||||
@@ -37,8 +31,13 @@ const IconZhiwen: FunctionComponent<Props> = ({
|
||||
fill={getIconColor(color, 3, '#FFBB12')}
|
||||
/>
|
||||
</Svg>
|
||||
|
||||
);
|
||||
};
|
||||
|
||||
export default React.memo(IconZhiwen);
|
||||
IconZhiwen.defaultProps = {
|
||||
size: 18,
|
||||
};
|
||||
|
||||
IconZhiwen = React.memo ? React.memo(IconZhiwen) : IconZhiwen;
|
||||
|
||||
export default IconZhiwen;
|
||||
@@ -4,34 +4,30 @@
|
||||
import React, { FunctionComponent } from 'react';
|
||||
import { ViewProps } from 'react-native';
|
||||
import { GProps } from 'react-native-svg';
|
||||
import IconIcon from './IconIcon';
|
||||
import IconYule1 from './IconYule1';
|
||||
import IconZhichu from './IconZhichu';
|
||||
import IconShouru from './IconShouru';
|
||||
import IconGongzi from './IconGongzi';
|
||||
import IconJiaotong from './IconJiaotong';
|
||||
import IconShucai from './IconShucai';
|
||||
import IconRiyongpin from './IconRiyongpin';
|
||||
import IconYule from './IconYule';
|
||||
import IconLingshi from './IconLingshi';
|
||||
import IconQuxian1 from './IconQuxian1';
|
||||
import IconWeixin from './IconWeixin';
|
||||
import IconZhiwen from './IconZhiwen';
|
||||
import IconQq from './IconQq';
|
||||
export { default as IconIcon } from './IconIcon';
|
||||
export { default as IconYule1 } from './IconYule1';
|
||||
export { default as IconZhichu } from './IconZhichu';
|
||||
export { default as IconShouru } from './IconShouru';
|
||||
export { default as IconGongzi } from './IconGongzi';
|
||||
export { default as IconJiaotong } from './IconJiaotong';
|
||||
export { default as IconShucai } from './IconShucai';
|
||||
export { default as IconRiyongpin } from './IconRiyongpin';
|
||||
export { default as IconYule } from './IconYule';
|
||||
export { default as IconLingshi } from './IconLingshi';
|
||||
export { default as IconQuxian1 } from './IconQuxian1';
|
||||
export { default as IconWeixin } from './IconWeixin';
|
||||
export { default as IconZhiwen } from './IconZhiwen';
|
||||
export { default as IconQq } from './IconQq';
|
||||
|
||||
export type IconNames = 'icon' | 'yule1' | 'zhichu' | 'shouru' | 'jiaotong' | 'shucai' | 'riyongpin' | 'yule' | 'lingshi' | 'quxian1' | 'weixin' | 'zhiwen' | 'QQ';
|
||||
export type IconNames = 'zhichu' | 'shouru' | 'gongzi' | 'jiaotong' | 'shucai' | 'riyongpin' | 'yule' | 'lingshi' | 'weixin' | 'zhiwen' | 'QQ';
|
||||
|
||||
interface Props extends GProps, ViewProps {
|
||||
name: IconNames;
|
||||
@@ -41,32 +37,28 @@ interface Props extends GProps, ViewProps {
|
||||
|
||||
let IconFont: FunctionComponent<Props> = ({ name, ...rest }) => {
|
||||
switch (name) {
|
||||
case 'icon':
|
||||
return <IconIcon key="1" {...rest} />;
|
||||
case 'yule1':
|
||||
return <IconYule1 key="2" {...rest} />;
|
||||
case 'zhichu':
|
||||
return <IconZhichu key="3" {...rest} />;
|
||||
return <IconZhichu key="1" {...rest} />;
|
||||
case 'shouru':
|
||||
return <IconShouru key="4" {...rest} />;
|
||||
return <IconShouru key="2" {...rest} />;
|
||||
case 'gongzi':
|
||||
return <IconGongzi key="3" {...rest} />;
|
||||
case 'jiaotong':
|
||||
return <IconJiaotong key="5" {...rest} />;
|
||||
return <IconJiaotong key="4" {...rest} />;
|
||||
case 'shucai':
|
||||
return <IconShucai key="6" {...rest} />;
|
||||
return <IconShucai key="5" {...rest} />;
|
||||
case 'riyongpin':
|
||||
return <IconRiyongpin key="7" {...rest} />;
|
||||
return <IconRiyongpin key="6" {...rest} />;
|
||||
case 'yule':
|
||||
return <IconYule key="8" {...rest} />;
|
||||
return <IconYule key="7" {...rest} />;
|
||||
case 'lingshi':
|
||||
return <IconLingshi key="9" {...rest} />;
|
||||
case 'quxian1':
|
||||
return <IconQuxian1 key="10" {...rest} />;
|
||||
return <IconLingshi key="8" {...rest} />;
|
||||
case 'weixin':
|
||||
return <IconWeixin key="11" {...rest} />;
|
||||
return <IconWeixin key="9" {...rest} />;
|
||||
case 'zhiwen':
|
||||
return <IconZhiwen key="12" {...rest} />;
|
||||
return <IconZhiwen key="10" {...rest} />;
|
||||
case 'QQ':
|
||||
return <IconQq key="13" {...rest} />;
|
||||
return <IconQq key="11" {...rest} />;
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -18,7 +18,7 @@ interface LoginDefaultParams {
|
||||
interface LoginDefaultResult {
|
||||
token: string
|
||||
refreshToken: string
|
||||
userId: string
|
||||
userId: number
|
||||
username: string
|
||||
seqNo: number
|
||||
gender: number
|
||||
|
||||
@@ -3,7 +3,7 @@ import type { AxiosError } from 'axios'
|
||||
import { axiosRequestAdapter } from '@alova/adapter-axios'
|
||||
import { createAlova } from 'alova'
|
||||
import { router } from 'expo-router'
|
||||
import { userStore } from '@/store/user'
|
||||
import { useUserStore } from '@/store/user'
|
||||
import { toast } from '@/utils/toast'
|
||||
|
||||
enum HttpCode {
|
||||
@@ -30,9 +30,11 @@ function isWhiteListed(url: string) {
|
||||
}
|
||||
|
||||
const alovaInstance = createAlova({
|
||||
baseURL: 'http://192.168.1.136:8085/app',
|
||||
baseURL: 'http://192.168.5.6:8085/app',
|
||||
// baseURL: 'http://192.168.1.136:8085/app',
|
||||
requestAdapter: axiosRequestAdapter(),
|
||||
timeout: 5000,
|
||||
cacheLogger: false,
|
||||
responded: {
|
||||
onSuccess: async (response, method: Method) => {
|
||||
const resData = response.data as ResponseData<any>
|
||||
@@ -53,7 +55,7 @@ const alovaInstance = createAlova({
|
||||
// Access Token 过期但 Refresh Token 有效 → 刷新 token 并重试
|
||||
if (resData.code === HttpCode.RefreshToken) {
|
||||
try {
|
||||
const refreshToken = userStore.getState().userInfo?.refreshToken
|
||||
const refreshToken = useUserStore.getState().userInfo?.refreshToken
|
||||
if (!refreshToken) {
|
||||
router.replace('/auth/login')
|
||||
return
|
||||
@@ -61,26 +63,24 @@ const alovaInstance = createAlova({
|
||||
|
||||
// 调用刷新接口
|
||||
const res = await alovaInstance.Get<ResponseData<string>>('/auth/refresh/token', {
|
||||
headers: {
|
||||
refreshToken,
|
||||
},
|
||||
})
|
||||
headers: { refreshToken },
|
||||
}).send()
|
||||
|
||||
const newToken = res.data
|
||||
|
||||
// 更新 store
|
||||
userStore.getState().setUserInfo({
|
||||
...userStore.getState().userInfo!,
|
||||
useUserStore.getState().setUserInfo({
|
||||
...useUserStore.getState().userInfo!,
|
||||
token: newToken,
|
||||
})
|
||||
|
||||
// 重试原请求
|
||||
method.config.headers.token = newToken
|
||||
await method.send()
|
||||
const retryResult = await method.send() // ✅ 获取结果
|
||||
|
||||
return
|
||||
return retryResult // ✅ 一定要 return!
|
||||
}
|
||||
catch (err) {
|
||||
// router.replace('/auth/login')
|
||||
return Promise.reject(err)
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,9 @@ const alovaInstance = createAlova({
|
||||
return result
|
||||
},
|
||||
onError: (error: AxiosError, _method) => {
|
||||
console.log('===跳转到error了===')
|
||||
console.log(error.status)
|
||||
|
||||
switch (error.status) {
|
||||
case 400:
|
||||
toast.show({
|
||||
@@ -142,7 +145,7 @@ const alovaInstance = createAlova({
|
||||
if (isWhiteListed(method.url))
|
||||
return
|
||||
|
||||
if (!userStore.getState().isLoggedIn()) {
|
||||
if (!useUserStore.getState().isLoggedIn()) {
|
||||
toast.show({
|
||||
title: '尚未登录,请先登录',
|
||||
})
|
||||
@@ -151,7 +154,8 @@ const alovaInstance = createAlova({
|
||||
return Promise.reject(new Error('未登录'))
|
||||
}
|
||||
|
||||
method.config.headers.token = userStore.getState().userInfo?.token ?? ''
|
||||
method.config.cacheFor = 0
|
||||
method.config.headers.token = useUserStore.getState().userInfo?.token ?? ''
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ const useUserStore = create<UserState>()(
|
||||
userInfo: null,
|
||||
setUserInfo: userInfo => set({ userInfo }),
|
||||
logout: () => {
|
||||
console.log('当前 token:', get().userInfo?.token)
|
||||
set({ userInfo: null })
|
||||
},
|
||||
isLoggedIn: () => !!get().userInfo?.token,
|
||||
@@ -28,6 +27,4 @@ const useUserStore = create<UserState>()(
|
||||
),
|
||||
)
|
||||
|
||||
const userStore = useUserStore
|
||||
|
||||
export { userStore, useUserStore }
|
||||
export { useUserStore }
|
||||
Reference in new issue
Block a user