|
|
@ -1,8 +1,8 @@ |
|
|
|
import {Button} from '@nutui/nutui-react-taro' |
|
|
|
import {Avatar, Tag} from '@nutui/nutui-react-taro' |
|
|
|
import {Avatar, Tag, Space} from '@nutui/nutui-react-taro' |
|
|
|
import {View, Text, Image} from '@tarojs/components' |
|
|
|
import {Scan} from '@nutui/icons-react-taro'; |
|
|
|
import {getUserInfo, getWxOpenId} from '@/api/layout'; |
|
|
|
import {Scan} from '@nutui/icons-react-taro'; |
|
|
|
import Taro from '@tarojs/taro'; |
|
|
|
import {useEffect, useState, forwardRef, useImperativeHandle} from "react"; |
|
|
|
import {User} from "@/api/system/user/model"; |
|
|
@ -11,7 +11,7 @@ import {TenantId} from "@/config/app"; |
|
|
|
import {useUser} from "@/hooks/useUser"; |
|
|
|
import {useUserData} from "@/hooks/useUserData"; |
|
|
|
import {getStoredInviteParams} from "@/utils/invite"; |
|
|
|
import QRLoginButton from "@/components/QRLoginButton"; |
|
|
|
// import QRLoginButton from "@/components/QRLoginButton";
|
|
|
|
|
|
|
|
const UserCard = forwardRef<any, any>((_, ref) => { |
|
|
|
const { |
|
|
@ -185,10 +185,14 @@ const UserCard = forwardRef<any, any>((_, ref) => { |
|
|
|
<View className={'flex items-center mx-4'}> |
|
|
|
{ |
|
|
|
IsLogin ? ( |
|
|
|
<Avatar size="large" src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'} shape="round"/> |
|
|
|
<Avatar size="large" |
|
|
|
src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'} |
|
|
|
shape="round"/> |
|
|
|
) : ( |
|
|
|
<Button className={'text-black'} open-type="getPhoneNumber" onGetPhoneNumber={handleGetPhoneNumber}> |
|
|
|
<Avatar size="large" src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'} shape="round"/> |
|
|
|
<Avatar size="large" |
|
|
|
src={userInfo?.avatar || 'https://oss.wsdns.cn/20250623/62f830b85edb4a7293b8948c25e6f987.jpeg'} |
|
|
|
shape="round"/> |
|
|
|
</Button> |
|
|
|
) |
|
|
|
} |
|
|
@ -205,11 +209,25 @@ const UserCard = forwardRef<any, any>((_, ref) => { |
|
|
|
) : ''} |
|
|
|
</View> |
|
|
|
</View> |
|
|
|
{userInfo?.userId === 33738 && |
|
|
|
<QRLoginButton /> |
|
|
|
<Space style={{ |
|
|
|
marginTop: '30px', |
|
|
|
marginRight: '10px' |
|
|
|
}}> |
|
|
|
{/*{userInfo?.userId === 33738 &&*/} |
|
|
|
{/* <QRLoginButton/>*/} |
|
|
|
{/*}*/} |
|
|
|
{!isAdmin() && |
|
|
|
<Button |
|
|
|
size={'small'} |
|
|
|
onClick={() => navTo('/user/store/verification', true)} |
|
|
|
> |
|
|
|
<View className="flex items-center justify-center"> |
|
|
|
<Scan className="mr-1" /> |
|
|
|
扫码核销 |
|
|
|
</View> |
|
|
|
</Button> |
|
|
|
} |
|
|
|
{isAdmin() && |
|
|
|
<Scan className={'text-gray-900'} size={24} onClick={() => navTo('/user/store/verification', true)}/>} |
|
|
|
</Space> |
|
|
|
</View> |
|
|
|
<View className={'flex justify-around mt-1'}> |
|
|
|
<View className={'item flex justify-center flex-col items-center'} |
|
|
@ -238,14 +256,14 @@ const UserCard = forwardRef<any, any>((_, ref) => { |
|
|
|
<View |
|
|
|
className="absolute top-0 right-0 overflow-hidden" |
|
|
|
style={{ |
|
|
|
borderRadius:"0 0.75rem 0 0" |
|
|
|
borderRadius: "0 0.75rem 0 0" |
|
|
|
}} |
|
|
|
onClick={() => navTo('/user/profile/profile', true)} |
|
|
|
> |
|
|
|
<Image |
|
|
|
src="https://oss.wsdns.cn/20250913/7c3de38b377344b89131aba40214f63f.png" |
|
|
|
style={{ |
|
|
|
width:"200rpx" |
|
|
|
width: "200rpx" |
|
|
|
}} |
|
|
|
mode="widthFix" |
|
|
|
/> |
|
|
|