From 365f673a7d5d84a97486b6fd3dc2e90a29fc7db7 Mon Sep 17 00:00:00 2001
From: tj <1378534974@qq.com>
Date: 星期五, 06 六月 2025 18:16:07 +0800
Subject: [PATCH] 1.评论
---
sub-pages/mine/index.vue | 27 +++++++++++++--------------
1 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/sub-pages/mine/index.vue b/sub-pages/mine/index.vue
index 6a80c45..cb9b46d 100644
--- a/sub-pages/mine/index.vue
+++ b/sub-pages/mine/index.vue
@@ -12,8 +12,8 @@
<view class="profile-content">
<view class="profile-header">
<view class="avatar-container">
- <image v-if="userStore.userInfo.customerDTO.cover" class="avatar"
- :src="userStore.userInfo.customerDTO.cover" mode="aspectFill" />
+ <image v-if="userStore?.userInfo?.customerDTO?.cover" class="avatar"
+ :src="userStore?.userInfo?.customerDTO?.cover" mode="aspectFill" />
<image v-else class="avatar"
src="https://ai-public.mastergo.com/ai/img_res/e8ae645c666c247b895b488e60b048f5.jpg" mode="aspectFill" />
<view class="add-icon">
@@ -27,7 +27,7 @@
</view>
</view>
- <view class="edit-profile">点击这里,填写简介</view>
+ <view class="edit-profile" >点击这里,填写简介</view>
<view class="stats">
<view class="stat-row">
@@ -45,9 +45,9 @@
</view>
</view>
<view class="action-buttons">
- <up-button text="编辑资料" size="mini" type="info" plain hairline
+ <up-button text="编辑资料" size="mini" type="info" plain hairline @click="navigateTo('/sub-pages/mine/profile-edit')"
:custom-style="{ backgroundColor: 'transparent', borderColor: '#B1ABA9' }" />
- <up-icon name="setting" size="40rpx" @click="gotoUrl('/sub-pages/mine/settings')" />
+ <up-icon name="setting" size="40rpx" @click="navigateTo('/sub-pages/mine/settings')" />
</view>
</view>
</view>
@@ -100,10 +100,6 @@
const {getLocation,province } = useLocation()
-const gotoUrl = (url: string) => {
- navigateTo(url)
-}
-
watch(
() => userStore.userInfo, // 监听 userInfo 这个响应式属性
(newVal, oldVal) => {
@@ -113,10 +109,8 @@
)
onShow(() => {
- console.log('我的')
getLocation()
});
-
// 当前 tab 索引
@@ -151,17 +145,22 @@
});
// 方法定义
-function onSettingClick() {
+const onSettingClick= ()=> {
settingShow.value = true;
}
-function onTabChange(item: { index: number }) {
+const onTabChange=(item: { index: number })=> {
current.value = item.index;
}
-function onSwiperChange(e: any) {
+const onSwiperChange=(e: any) => {
current.value = e.detail.current;
}
+
+
+const goToProfile= ()=> {
+ navigateTo('/sub-pages/mine/edit-profile');
+}
</script>
--
Gitblit v1.9.3