116 lines
4.0 KiB
Plaintext
116 lines
4.0 KiB
Plaintext
<scroll-view
|
|
class="user-scroll"
|
|
id="userScroll"
|
|
scroll-y="true"
|
|
refresher-enabled="true"
|
|
refresher-triggered="{{refresherTriggered}}"
|
|
refresher-threshold="80"
|
|
refresher-default-style="black"
|
|
refresher-background="#f5f5f5"
|
|
bindrefresherpulling="onRefresherPulling"
|
|
bindrefresherrefresh="onRefresherRefresh"
|
|
bindrefresherrestore="onRefresherRestore"
|
|
bindscrolltolower="onReachBottom"
|
|
>
|
|
<view class="user-contain">
|
|
<!-- 头像与用户名区域 -->
|
|
<view class="user-avatar">
|
|
<t-avatar class="avatar-example" image="{{image || 'https://picsum.photos/id/64/200/200'}}" size="large" />
|
|
<a class="avatar-font" bind:tap="userlogin">
|
|
{{hasToken ? (userinfo.username || '用户中心') : '点击登录/注册'}}
|
|
</a>
|
|
<t-toast id="t-toast" />
|
|
</view>
|
|
|
|
<!-- 分割线 -->
|
|
<t-divider />
|
|
|
|
<!-- 积分与发布统计区 -->
|
|
<view class="stats-container">
|
|
<view class="stat-item" bind:tap="gotoPoints">
|
|
<view class="stat-value">{{userinfo.total_points || 0}}</view>
|
|
<view class="stat-label">我的积分</view>
|
|
</view>
|
|
<view class="stat-item" bind:tap="gotoMyPosts">
|
|
<view class="stat-value">{{userinfo.postCount || 0}}</view>
|
|
<view class="stat-label">我的发布</view>
|
|
</view>
|
|
<view class="stat-item" bind:tap="gotoCollections">
|
|
<view class="stat-value">{{userinfo.collectionCount || 0}}</view>
|
|
<view class="stat-label">我的收藏</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 功能区标题 -->
|
|
<view class="section-title">常用功能</view>
|
|
|
|
<!-- 第一行功能按钮 -->
|
|
<view class="function-grid">
|
|
<view class="function-item" bind:tap="gotoOrders">
|
|
<view class="function-icon">
|
|
<t-icon name="article" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">我的订单</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="gotoAddress">
|
|
<view class="function-icon">
|
|
<t-icon name="map-marker" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">收货地址</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="gotoCoupons">
|
|
<view class="function-icon">
|
|
<t-icon name="ticket" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">内推码</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="gotoMessage">
|
|
<view class="function-icon">
|
|
<t-icon name="chat-double" size="40rpx" />
|
|
<view class="notification-badge" wx:if="{{unreadCount > 0}}">{{unreadCount}}</view>
|
|
</view>
|
|
<view class="function-name">消息通知</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 第二行功能按钮 -->
|
|
<view class="function-grid">
|
|
<view class="function-item" bind:tap="gotoSetting">
|
|
<view class="function-icon">
|
|
<t-icon name="setting" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">设置</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="gotoHelp">
|
|
<view class="function-icon">
|
|
<t-icon name="help-circle" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">帮助中心</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="gotoFeedback">
|
|
<view class="function-icon">
|
|
<t-icon name="edit" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">意见反馈</view>
|
|
</view>
|
|
<view class="function-item" bind:tap="logout" wx:if="{{hasToken}}">
|
|
<view class="function-icon">
|
|
<t-icon name="logout" size="40rpx" />
|
|
</view>
|
|
<view class="function-name">抽奖券</view>
|
|
</view>
|
|
</view>
|
|
<t-cell-group theme="card">
|
|
|
|
<t-divider />
|
|
|
|
<t-cell title="最新活动" leftIcon="logout" hover arrow class="redicon"/>
|
|
|
|
</t-cell-group>
|
|
<!-- 底部区域 -->
|
|
<view class="footer">
|
|
<text class="copyright">© 2025 投投看 版权所有</text>
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
|