From 50982b7c0263ba91a35f45836d833fba046fd181 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Sun, 7 Sep 2025 22:52:13 +0800 Subject: [PATCH] 1 --- src/app.ts | 2 +- src/components/UserInfo/index.tsx | 30 +++++++++++++++++------------- src/services/userService.ts | 14 +++++++------- 3 files changed, 25 insertions(+), 21 deletions(-) diff --git a/src/app.ts b/src/app.ts index 03ca3a2..81452fa 100644 --- a/src/app.ts +++ b/src/app.ts @@ -22,7 +22,7 @@ class App extends Component { // 初始化字典数据 this.initDictionaryData() this.getNavBarHeight() - this.getLocation() + // this.getLocation() } componentDidShow() { } diff --git a/src/components/UserInfo/index.tsx b/src/components/UserInfo/index.tsx index 1a777a5..929c9b0 100644 --- a/src/components/UserInfo/index.tsx +++ b/src/components/UserInfo/index.tsx @@ -21,8 +21,12 @@ export interface UserInfo { ntrp_level: string; phone?: string; gender?: string; + + latitude?: number, + longitude?: number, } + // 用户信息卡片组件属性 interface UserInfoCardProps { user_info: UserInfo; @@ -34,12 +38,12 @@ interface UserInfoCardProps { } - // 处理编辑用户信息 - const on_edit = () => { - Taro.navigateTo({ - url: '/pages/userInfo/edit/index' - }); - }; +// 处理编辑用户信息 +const on_edit = () => { + Taro.navigateTo({ + url: '/pages/userInfo/edit/index' + }); +}; // 用户信息卡片组件 export const UserInfoCard: React.FC = ({ user_info, @@ -60,11 +64,11 @@ export const UserInfoCard: React.FC = ({ {user_info.nickname} {user_info.join_date} - + + className="tag_icon" + src={require('../../static/userInfo/edit.svg')} + /> {/* 统计数据 */} @@ -112,7 +116,7 @@ export const UserInfoCard: React.FC = ({ /> )} - + {/* 只有当前用户才显示分享按钮 */} {is_current_user && on_share && (