96 lines
3.8 KiB
Plaintext
96 lines
3.8 KiB
Plaintext
<view class="page mall-page">
|
|
<navigation-bar title="额度与会员" />
|
|
|
|
<!-- 商城视图 -->
|
|
<scroll-view wx:if="{{view === 'mall'}}" scroll-y class="scroll-body">
|
|
<!-- 会员卡 -->
|
|
<view class="card member-card">
|
|
<view class="member-left">
|
|
<view class="icon icon-crown member-icon"></view>
|
|
<view>
|
|
<view class="member-name">{{isVip ? '月度会员' : '开通会员'}}</view>
|
|
<view class="member-desc">{{isVip ? vipExpireText : '开通会员,解锁更多 AI 与上传权益'}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="member-btn" bindtap="onTapMember">{{isVip ? '立即续费' : '立即开通'}}</view>
|
|
</view>
|
|
|
|
<!-- 额度网格 -->
|
|
<view class="quota-grid">
|
|
<view class="quota-cell" wx:for="{{quotas}}" wx:key="quota_type">
|
|
<view class="quota-name">{{item._name}}</view>
|
|
<view class="quota-num">{{item.remain}}<text class="quota-total">/ {{item.total}}</text></view>
|
|
<view class="quota-bar">
|
|
<view class="quota-fill {{item._percent >= 80 ? 'warn' : ''}}" style="width: {{item._percent}}%"></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 额度明细入口 -->
|
|
<view class="card flow-entry" bindtap="onSwitchFlow">
|
|
<text>额度明细</text>
|
|
<view class="icon icon-chevron-right"></view>
|
|
</view>
|
|
|
|
<!-- 商品筛选 -->
|
|
<scroll-view scroll-x class="goods-filter" show-scrollbar="{{false}}">
|
|
<view class="filter-row">
|
|
<view
|
|
wx:for="{{goodsFilters}}"
|
|
wx:key="name"
|
|
class="filter-item {{activeFilter === index ? 'active' : ''}}"
|
|
data-index="{{index}}"
|
|
bindtap="onGoodsFilter"
|
|
>{{item.name}}</view>
|
|
</view>
|
|
</scroll-view>
|
|
|
|
<!-- 商品列表 -->
|
|
<view class="goods-list">
|
|
<view class="goods-card card" wx:for="{{goods}}" wx:key="goods_code">
|
|
<view class="icon {{item._icon}} goods-icon"></view>
|
|
<view class="goods-info">
|
|
<view class="goods-name">{{item.goods_name}}</view>
|
|
<view class="goods-desc">{{item.description}}</view>
|
|
</view>
|
|
<view class="goods-right">
|
|
<view class="goods-price num">{{item._priceText}}</view>
|
|
<view class="goods-origin num" wx:if="{{item.price > item.discount_price}}">{{item._originText}}</view>
|
|
<view class="buy-btn" data-goods="{{item}}" bindtap="onBuy">购买</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="footer-space"></view>
|
|
</scroll-view>
|
|
|
|
<!-- 额度明细视图 -->
|
|
<scroll-view wx:else scroll-y class="scroll-body">
|
|
<view class="flow-head" bindtap="onSwitchMall">← 返回商城</view>
|
|
<view class="flow-list">
|
|
<view class="flow-row card" wx:for="{{flowList}}" wx:key="quota_flow_uuid">
|
|
<view class="flow-left">
|
|
<view class="flow-reason">{{item.reason || item._name}}</view>
|
|
<view class="flow-time">{{item._time}}</view>
|
|
</view>
|
|
<view class="flow-right">
|
|
<view class="flow-num {{item.change_num > 0 ? 'plus' : ''}}">{{item._sign}}</view>
|
|
<view class="flow-after">剩余 {{item.new_value}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<empty-state wx:if="{{!flowList.length}}" icon="icon-doc" title="暂无额度明细" />
|
|
</scroll-view>
|
|
|
|
<!-- 订单确认弹窗 -->
|
|
<view wx:if="{{orderVisible}}" class="mask" bindtap="onCloseOrder">
|
|
<view class="sheet" catchtap="noop">
|
|
<view class="sheet-grabber"></view>
|
|
<view class="order-goods">{{orderGoods.goods_name}}</view>
|
|
<view class="order-desc">{{orderGoods.description}}</view>
|
|
<view class="order-amount">实付 <text class="order-price num">{{orderGoods._priceText}}</text></view>
|
|
<view class="btn btn-primary {{submitting ? 'disabled' : ''}}" bindtap="confirmPay">{{submitting ? '下单中…' : '立即支付'}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|