添加全局提示

This commit is contained in:
kron
2025-07-02 17:21:44 +08:00
parent 5c5b72d556
commit 7fb72c9b1e
6 changed files with 261 additions and 228 deletions

View File

@@ -1,6 +1,5 @@
<script setup>
import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
import Container from "@/components/Container.vue";
import UserHeader from "@/components/UserHeader.vue";
import UserItem from "@/components/UserItem.vue";
import Avatar from "@/components/Avatar.vue";
@@ -55,44 +54,46 @@ const logout = () => {
</script>
<template>
<view>
<AppBackground />
<Header title="用户信息" />
<UserHeader :user="user" />
<view class="container">
<UserItem title="用户名">{{ user.nickName }}</UserItem>
<UserItem title="头像">
<Avatar :src="user.avatar" :size="35" />
</UserItem>
<UserItem
title="订单"
:customStyle="{
marginTop: '10px',
}"
:onClick="toOrderPage"
/>
<UserItem
title="新手试炼场"
:onClick="user.trio > 0 ? null : toFristTryPage"
>
<text v-if="user.trio > 0" :style="{ color: '#259249' }">完成</text>
<text v-else :style="{ color: '#CC311F' }">未完成</text>
</UserItem>
<UserItem title="会员" :onClick="toBeVipPage"> 已赠送6个月会员 </UserItem>
<UserItem title="等级介绍" :onClick="toGradeIntroPage" />
<UserItem
title="段位介绍"
:customStyle="{
marginBottom: '10px',
}"
:onClick="toRankIntroPage"
/>
<view class="my-grow" @click="toMyGrowthPage">
<image src="../static/my-grow.png" mode="widthFix" />
<Container title="用户信息">
<view :style="{ width: '100%' }">
<UserHeader :user="user" />
<view class="container">
<UserItem title="用户名">{{ user.nickName }}</UserItem>
<UserItem title="头像">
<Avatar :src="user.avatar" :size="35" />
</UserItem>
<UserItem
title="订单"
:customStyle="{
marginTop: '10px',
}"
:onClick="toOrderPage"
/>
<UserItem
title="新手试炼场"
:onClick="user.trio > 0 ? null : toFristTryPage"
>
<text v-if="user.trio > 0" :style="{ color: '#259249' }">已完成</text>
<text v-else :style="{ color: '#CC311F' }">完成</text>
</UserItem>
<UserItem title="会员" :onClick="toBeVipPage">
已赠送6个月会员
</UserItem>
<UserItem title="等级介绍" :onClick="toGradeIntroPage" />
<UserItem
title="段位介绍"
:customStyle="{
marginBottom: '10px',
}"
:onClick="toRankIntroPage"
/>
<view class="my-grow" @click="toMyGrowthPage">
<image src="../static/my-grow.png" mode="widthFix" />
</view>
<UserItem title="退出登录(仅用于测试)" :onClick="logout" />
</view>
<UserItem title="退出登录(仅用于测试)" :onClick="logout" />
</view>
</view>
</Container>
</template>
<style scoped>