diff --git a/project.config.json b/project.config.json index 0838f2c..f086173 100644 --- a/project.config.json +++ b/project.config.json @@ -2,7 +2,7 @@ "miniprogramRoot": "dist/", "projectname": "template-10582", "description": "南南佐顿门窗", - "appid": "wx51962d6ac21f2ed2", + "appid": "wx644669e2da8d6519", "setting": { "urlCheck": true, "es6": false, diff --git a/src/dealer/apply/add.tsx b/src/dealer/apply/add.tsx index 674ed61..bd26cd5 100644 --- a/src/dealer/apply/add.tsx +++ b/src/dealer/apply/add.tsx @@ -135,7 +135,7 @@ const AddUserAddress = () => { console.log('正在提交中,请勿重复点击') return } - + setSubmitting(true) try { // 验证必填字段 @@ -412,7 +412,7 @@ const AddUserAddress = () => { - + diff --git a/src/pages/index/Header.tsx b/src/pages/index/Header.tsx index 1fe1e3f..ac551e8 100644 --- a/src/pages/index/Header.tsx +++ b/src/pages/index/Header.tsx @@ -1,8 +1,7 @@ import {useEffect, useState} from "react"; import Taro from '@tarojs/taro'; import {Space} from '@nutui/nutui-react-taro' -import {TriangleDown} from '@nutui/icons-react-taro' -import {Avatar, NavBar} from '@nutui/nutui-react-taro' +import {NavBar} from '@nutui/nutui-react-taro' import {getWxOpenId} from "@/api/layout"; // import {TenantId} from "@/config/app"; import {getOrganization} from "@/api/system/organization"; @@ -20,7 +19,6 @@ import {getShopDealerRefereeByUserId} from "@/api/shop/shopDealerReferee"; const Header = (props: any) => { // 使用新的useShopInfo Hook const { - getWebsiteLogo, getWebsiteName } = useShopInfo(); @@ -260,12 +258,7 @@ const Header = (props: any) => { ) : ( - - {getWebsiteName()} - + {getWebsiteName()} )} diff --git a/src/pages/user/components/UserCard.tsx b/src/pages/user/components/UserCard.tsx index 5fefc6e..f337c19 100644 --- a/src/pages/user/components/UserCard.tsx +++ b/src/pages/user/components/UserCard.tsx @@ -162,7 +162,7 @@ function UserCard() { background: 'linear-gradient(to bottom, #ffffff, #ffffff)', // 这种情况建议使用类名来控制样式(引入外联样式) // width: '720rpx', // margin: '10px auto 0px auto', - height: '170px', + height: '120px', // borderRadius: '22px 22px 0 0', }} > @@ -198,27 +198,27 @@ function UserCard() { - - navTo('/user/wallet/wallet', true)}> - 余额 - {data?.balance || '0.00'} - - - 积分 - {data?.points || 0} - - navTo('/user/coupon/index', true)}> - 优惠券 - {data?.coupons || 0} - - navTo('/user/gift/index', true)}> - 礼品卡 - {data?.giftCards || 0} - - + {/**/} + {/* navTo('/user/wallet/wallet', true)}>*/} + {/* 余额*/} + {/* {data?.balance || '0.00'}*/} + {/* */} + {/* */} + {/* 积分*/} + {/* {data?.points || 0}*/} + {/* */} + {/* navTo('/user/coupon/index', true)}>*/} + {/* 优惠券*/} + {/* {data?.coupons || 0}*/} + {/* */} + {/* navTo('/user/gift/index', true)}>*/} + {/* 礼品卡*/} + {/* {data?.giftCards || 0}*/} + {/* */} + {/**/} diff --git a/src/pages/user/components/UserCell.tsx b/src/pages/user/components/UserCell.tsx index 7aa218d..3ca229c 100644 --- a/src/pages/user/components/UserCell.tsx +++ b/src/pages/user/components/UserCell.tsx @@ -117,17 +117,17 @@ const UserCell = () => { }> } onClick={() => navTo('/user/profile/profile', true)} /> } - onClick={() => navTo('/user/theme/index', true)} + onClick={() => Taro.reLaunch({url: '/pages/index/index'})} /> () const { isAdmin } = useUser(); useEffect(() => { + Taro.getSystemInfo({ + success: (res) => { + setStatusBarHeight(res.statusBarHeight) + }, + }) }, []); /** @@ -34,6 +43,28 @@ function User() { return ( <> + { + }} + left={ +
+ Taro.reLaunch({url: '/pages/index/index'})} style={{color: 'black', marginBottom: '1px'}} /> +
+ } + > + 我的 +
diff --git a/src/utils/common.ts b/src/utils/common.ts index ef152e8..4938f63 100644 --- a/src/utils/common.ts +++ b/src/utils/common.ts @@ -1,7 +1,7 @@ import Taro from '@tarojs/taro' export default function navTo(url: string, isLogin = false) { - if (isLogin) { + if (isLogin && url != '/pages/user/user') { if (!Taro.getStorageSync('access_token') || !Taro.getStorageSync('UserId')) { Taro.showToast({ title: '请先登录',