Files
edu_mp/pages/mine/mine.wxml
2025-12-05 15:41:32 +08:00

75 lines
1.8 KiB
Plaintext

<!--pages/mine/mine.wxml-->
<view class="container">
<!-- 用户信息区域 -->
<view class="user-section">
<view class="user-info" wx:if="{{ isLogin && userInfo }}">
<van-image
class="user-avatar"
round
width="120rpx"
height="120rpx"
src="{{ userInfo.avatarUrl }}"
/>
<view class="user-detail">
<text class="user-name">{{ userInfo.nickName }}</text>
<text class="user-desc">欢迎使用信息服务</text>
</view>
</view>
<view class="login-section" wx:else>
<van-image
class="default-avatar"
round
width="120rpx"
height="120rpx"
src="/assets/images/default-avatar.png"
/>
<view class="login-info">
<text class="login-hint">登录后享受更多服务</text>
<van-button
type="primary"
size="small"
round
bindtap="onGetUserInfo"
>
立即登录
</van-button>
</view>
</view>
</view>
<!-- 功能菜单 -->
<view class="menu-section">
<van-cell-group>
<van-cell
wx:for="{{ menuList }}"
wx:key="id"
title="{{ item.title }}"
is-link
data-id="{{ item.id }}"
data-url="{{ item.url }}"
bindtap="onMenuTap"
>
<van-icon slot="icon" name="{{ item.icon }}" size="40rpx" color="#1890ff" style="margin-right: 20rpx;" />
</van-cell>
</van-cell-group>
</view>
<!-- 退出登录 -->
<view class="logout-section" wx:if="{{ isLogin }}">
<van-button
type="default"
block
round
bindtap="onLogout"
>
退出登录
</van-button>
</view>
<!-- 版本信息 -->
<view class="version-info">
<text>版本 1.0.0</text>
</view>
</view>