Files
qipai/miniapp/pages/profile/index.wxml
T
2026-06-25 11:43:25 +08:00

89 lines
3.2 KiB
Plaintext

<scroll-view class="scrollarea" scroll-y type="list">
<view class="page">
<view class="title">个人中心</view>
<view wx:if="{{errorMessage}}" class="error">{{errorMessage}}</view>
<view wx:if="{{profile}}" class="card">
<view class="member-name">{{profile.nickname || '微信用户'}}</view>
<view class="muted">{{profile.maskedPhone || '未绑定手机号'}}</view>
<view class="muted">注册:{{profile.registeredText}}</view>
<view class="muted">最近登录:{{profile.lastLoginText}}</view>
</view>
<view wx:if="{{profile}}" class="balance-band">
<view>
<view class="label">总余额</view>
<view class="balance">{{profile.wallet.totalText}}</view>
</view>
<view class="balance-split">
<view>现金 {{profile.wallet.cashText}}</view>
<view>赠送 {{profile.wallet.giftText}}</view>
</view>
</view>
<view wx:if="{{profile}}" class="metric-grid">
<view class="metric">
<view class="metric-value">{{profile.benefits.availableCoupons}}</view>
<view class="metric-label">可用券</view>
</view>
<view class="metric">
<view class="metric-value">{{profile.benefits.activePackages}}</view>
<view class="metric-label">套餐</view>
</view>
<view class="metric">
<view class="metric-value">{{profile.benefits.packageMinutes}}</view>
<view class="metric-label">分钟</view>
</view>
<view class="metric">
<view class="metric-value">{{profile.orders.orderCount}}</view>
<view class="metric-label">订单</view>
</view>
</view>
<view wx:if="{{profile}}" class="card">
<view class="section-title">权益</view>
<view class="row">
<text>冻结券</text>
<text>{{profile.benefits.frozenCoupons}}</text>
</view>
<view class="row">
<text>冻结套餐</text>
<text>{{profile.benefits.frozenPackages}}</text>
</view>
<view class="row">
<text>套餐余额</text>
<text>{{profile.benefits.packageAmountText}}</text>
</view>
</view>
<view wx:if="{{profile}}" class="card">
<view class="section-title">充值与消费</view>
<view class="row">
<text>已充值</text>
<text>{{profile.recharge.creditedText}}</text>
</view>
<view class="row">
<text>已赠送</text>
<text>{{profile.recharge.giftedText}}</text>
</view>
<view class="row">
<text>已消费</text>
<text>{{profile.orders.paidAmountText}}</text>
</view>
<button bindtap="openOrders">查看订单</button>
</view>
<view class="section-title ledger-title">最近账单</view>
<view wx:if="{{!loading && recentLedger.length === 0}}" class="empty">暂无账单</view>
<view wx:for="{{recentLedger}}" wx:key="ledgerId" class="ledger-item">
<view class="row">
<text>{{item.entryType}}</text>
<text>{{item.deltaText}}</text>
</view>
<view class="muted">{{item.businessType}} {{item.businessId}}</view>
<view class="muted">余额 {{item.balanceText}}</view>
<view class="muted">{{item.createdText}}</view>
</view>
</view>
</scroll-view>