字段修改

This commit is contained in:
kron
2025-06-17 13:47:33 +08:00
parent 16c1840cdd
commit a74fd1e744
14 changed files with 26 additions and 26 deletions

View File

@@ -29,7 +29,7 @@ const props = defineProps({
<AppBackground :type="1" />
<view class="header">
<view>
<Avatar :src="user.avatarUrl" frame :size="50" />
<Avatar :src="user.avatar" frame :size="50" />
<view>
<text>{{ user.nickName }}</text>
<text>砖石1级</text>

View File

@@ -67,7 +67,7 @@ const saveImage = () => {
<view class="content">
<image src="../static/share-bg.png" mode="widthFix" />
<view>
<Avatar :src="user.avatarUrl" :size="40" frame />
<Avatar :src="user.avatar" :size="40" frame />
<view>
<text>{{ user.nickName }}</text>
<text>砖石1级</text>

View File

@@ -1,22 +1,15 @@
<script setup>
import { computed } from "vue";
import Avatar from "@/components/Avatar.vue";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const props = defineProps({
showRank: {
type: Boolean,
default: false,
},
user: {
type: Object,
default: () => ({
nickName: "",
avatarUrl: "",
lvl: 0,
points: 0,
rankLvl: 0,
lvlPoints: 0,
}),
},
});
const containerWidth = computed(() => (props.showRank ? "72vw" : "100vw"));
const toUserPage = () => {
@@ -37,7 +30,7 @@ const toUserPage = () => {
<view class="container" :style="{ width: containerWidth }">
<Avatar
:frame="true"
:src="user.avatarUrl"
:src="user.avatar"
:onClick="toUserPage"
:size="42"
/>