133 lines
5.0 KiB
Plaintext
Executable File
133 lines
5.0 KiB
Plaintext
Executable File
<!--profile.wxml - 个人中心页面-->
|
|
<view class="profile-container">
|
|
<!-- 主要内容 -->
|
|
<scroll-view
|
|
class="main-content"
|
|
scroll-y="{{true}}"
|
|
enable-back-to-top="{{true}}"
|
|
refresher-enabled="{{false}}"
|
|
scroll-with-animation="{{true}}"
|
|
>
|
|
|
|
<!-- 用户信息 -->
|
|
<view class="avatar-section">
|
|
<view class="avatar-container" bindtap="changeAvatar">
|
|
<image wx:if="{{userInfo && userInfo.avatar_url}}" class="avatar-image" src="{{userInfo.avatar_url}}" mode="aspectFill"></image>
|
|
<view wx:else class="avatar-placeholder">
|
|
<image class="avatar-svg" src="{{avatarSvgData}}" mode="aspectFit"></image>
|
|
<!-- <text class="avatar-text">•ᴗ•</text> -->
|
|
<!-- <text class="avatar-text">•◡•</text> -->
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 统计信息 -->
|
|
<!-- <view class="user-info-section"> -->
|
|
<!-- <view class="stats-card" bindtap="navigateToHistory">
|
|
<text class="section-title">使用统计</text>
|
|
<view class="stats-grid">
|
|
<view class="stat-item">
|
|
<text class="stat-number">{{stats.imageRecognitions}}</text>
|
|
<text class="stat-label">图片总数</text>
|
|
</view>
|
|
<view class="stat-item">
|
|
<text class="stat-number">{{stats.totalRecognitions}}</text>
|
|
<text class="stat-label">总识别次数</text>
|
|
</view>
|
|
<view class="stat-item">
|
|
<text class="stat-number">{{stats.todayRecognitions}}</text>
|
|
<text class="stat-label">今日识别</text>
|
|
</view>
|
|
</view>
|
|
</view> -->
|
|
<!-- </view> -->
|
|
|
|
<!-- 设置选项 -->
|
|
<view class="section-title">个人中心</view>
|
|
<view class="settings-section">
|
|
<view class="settings-card">
|
|
<t-dialog
|
|
visible="{{showCouponInput}}"
|
|
title="请输出兑换码"
|
|
confirm-btn="确定"
|
|
cancel-btn="取消"
|
|
bind:confirm="confirmCouponDialog"
|
|
bind:cancel="closeCouponDialog"
|
|
>
|
|
<t-input
|
|
class="coupon-input"
|
|
clearable
|
|
boderless
|
|
auto-focus
|
|
slot="content"
|
|
placeholder="6 位兑换码"
|
|
placeholder-class="placeholder"
|
|
value="{{couponCode}}"
|
|
type="text"
|
|
bind:change="onCouponInput"
|
|
maxcharacter="{{6}}"
|
|
/>
|
|
</t-dialog>
|
|
<navigator url="/pages/coupon/coupon" class="cell-navigator">
|
|
<t-cell title="积分" hover note="{{points.balance}}">
|
|
<t-icon slot="left-icon" name="star" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
</navigator>
|
|
<t-cell title="兑换码" hover arrow bindtap="showCouponDialog">
|
|
<t-icon slot="left-icon" name="coupon" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
<t-cell title="消息" hover arrow>
|
|
<t-icon slot="left-icon" name="notification" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 设置选项 -->
|
|
<view class="section-title">应用设置</view>
|
|
<view class="settings-section">
|
|
<view class="settings-card">
|
|
<!-- <t-action-sheet id="t-action-sheet" bind:selected="handleSelected" /> -->
|
|
<!-- <t-cell title="单词等级" hover note="{{dictLevelOptions[dictLevel] || '小学'}}" bindtap="handleAction" /> -->
|
|
<t-cell title="缓存数据" hover note="{{cacheStats.totalSize}}" data-key="showClearConfirm" bind:tap="showDialog" >
|
|
<t-icon slot="left-icon" name="data-base" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
<t-dialog
|
|
visible="{{showClearConfirm}}"
|
|
content="{{cacheStats.details || '暂无缓存数据'}}"
|
|
confirm-btn="{{ { content: '清除', variant: 'base' } }}"
|
|
cancel-btn="取消"
|
|
bind:confirm="handleClearCache"
|
|
bind:cancel="closeDialog"
|
|
/>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 帮助信息 -->
|
|
<view class="section-title">帮助与支持</view>
|
|
<view class="settings-section">
|
|
<view class="settings-card">
|
|
<t-cell title="使用条款" bindtap="handleViewTerms" hover arrow>
|
|
<t-icon slot="left-icon" name="file-1" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
<t-cell title="隐私政策" bindtap="handleViewPrivacy" hover arrow>
|
|
<t-icon slot="left-icon" name="secured" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
<t-cell title="关于我们" bindtap="handleAboutUs" hover arrow>
|
|
<t-icon slot="left-icon" name="info-circle" size="44rpx"></t-icon>
|
|
</t-cell>
|
|
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 退出登录 -->
|
|
<!-- <view class="logout-section">
|
|
<button class="logout-btn" bindtap="handleLogout">
|
|
<text class="logout-text">退出登录</text>
|
|
</button>
|
|
</view> -->
|
|
|
|
<!-- 版本信息 -->
|
|
<view class="version-section">
|
|
<text class="version-text">版本 {{appInfo.version}}</text>
|
|
</view>
|
|
</scroll-view>
|
|
</view> |