| | |
| | | <view class="profile-content"> |
| | | <view class="profile-header"> |
| | | <view class="avatar-container"> |
| | | <image class="avatar" src="https://ai-public.mastergo.com/ai/img_res/e8ae645c666c247b895b488e60b048f5.jpg" |
| | | 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"> |
| | | <up-icon name="plus" size="20rpx" color="#333" /> |
| | | </view> |
| | | </view> |
| | | <view class="user-info"> |
| | | <view class="username">小红薯 6786F040</view> |
| | | <view class="user-id">小红书号:95619601810</view> |
| | | <view class="location">IP 属地:江苏</view> |
| | | <view class="username">影途 {{ userStore?.userInfo?.customerDTO?.name }}</view> |
| | | <view class="user-id">影途号:{{ userStore?.userInfo?.customerDTO?.id }}</view> |
| | | <view class="location">IP 属地:{{ userStore.address?.ad_info?.province }}</view> |
| | | </view> |
| | | </view> |
| | | |
| | |
| | | <view class="action-buttons"> |
| | | <up-button text="编辑资料" size="mini" type="info" plain hairline |
| | | :custom-style="{ backgroundColor: 'transparent', borderColor: '#B1ABA9' }" /> |
| | | <up-icon name="setting" size="40rpx" /> |
| | | <up-icon name="setting" size="40rpx" @click="gotoUrl('/sub-pages/mine/settings')" /> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { ref, computed } from 'vue'; |
| | | import { ref, computed, watch } from 'vue'; |
| | | import { onShow } from '@dcloudio/uni-app' |
| | | import SettingPopup from '@/components/setting/setting-popup.vue'; |
| | | import { usePlatformLoginType } from '@/composables/usePlatformLoginType' |
| | | import { useUserStore } from '@/store/user' |
| | | import { useLocation } from '@/composables/useLocation' |
| | | import { useNavigator } from '@/composables/useNavigator' |
| | | |
| | | const { apitype } = usePlatformLoginType() |
| | | const userStore = useUserStore() |
| | | const { navigateTo } = useNavigator() |
| | | const {getLocation,province } = useLocation() |
| | | |
| | | |
| | | const gotoUrl = (url: string) => { |
| | | navigateTo(url) |
| | | } |
| | | |
| | | watch( |
| | | () => userStore.userInfo, // 监听 userInfo 这个响应式属性 |
| | | (newVal, oldVal) => { |
| | | console.log('userInfo 发生变化:', newVal) |
| | | }, |
| | | { deep: true } // 如果 userInfo 是对象,需要深度监听其属性变化 |
| | | ) |
| | | |
| | | onShow(() => { |
| | | console.log('我的') |
| | | getLocation() |
| | | }); |
| | | |
| | | |
| | | |
| | | // 当前 tab 索引 |
| | | const current = ref(0); |