import {Grid, ConfigProvider} from '@nutui/nutui-react-taro' import navTo from "@/utils/common"; import Taro from '@tarojs/taro' import {View, Button} from '@tarojs/components' import { ShieldCheck, Location, Tips, Ask, // Dongdong, People, // AfterSaleService, Logout, Shop, Jdl, Service } from '@nutui/icons-react-taro' import {useUser} from "@/hooks/useUser"; const UserCell = () => { const {logoutUser, hasRole} = useUser(); const onLogout = () => { Taro.showModal({ title: '提示', content: '确定要退出登录吗?', success: function (res) { if (res.confirm) { // 使用 useUser hook 的 logoutUser 方法 logoutUser(); Taro.reLaunch({ url: '/pages/index/index' }) } } }) } return ( <> 我的服务 {hasRole('store') && ( navTo('/store/index', true)}> )} {hasRole('rider') && ( navTo('/rider/index', true)}> )} {(hasRole('staff') || hasRole('admin')) && ( navTo('/user/store/orders/index', true)}> )} navTo('/user/address/index', true)}> navTo('/user/help/index')}> {/* 修改联系我们为微信客服 */} navTo('/user/userVerify/index', true)}> navTo('/dealer/team/index', true)}> {/* navTo('/dealer/qrcode/index', true)}>*/} {/* */} {/* */} {/* */} {/* */} {/* */} {/**/} {/* navTo('/admin/index', true)}>*/} {/* */} {/* */} {/* */} {/* */} {/* */} {/**/} navTo('/user/about/index')}> {/**/} {/* 账号管理*/} {/* */} {/* */} {/* navTo('/user/profile/profile', true)}>*/} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* navTo('/user/theme/index', true)}>*/} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* navTo('/user/about/index')}>*/} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/* */} {/**/} ) } export default UserCell