支付通路
This commit is contained in:
1 parent
c7f43e30a9
commit
85b0e70907
26 files changed
+1324
-74
No files matched your search
@@ -1,7 +1,34 @@
|
||||
<!--pages/buy/buy.wxml-->
|
||||
|
||||
<!-- UI 待设计。支付链路(buyNow / waitForDelivery)已经在 buy.js 里就位,
|
||||
设计稿定了直接替换下面这个占位块即可。 -->
|
||||
<view class="buy-page">
|
||||
<text class="buy-placeholder">购买页(待设计)</text>
|
||||
<!-- 带 ?code= 进来就只买这一门,否则列出全部课程、一门一个购买按钮。
|
||||
注意别在 wx:if 和 wx:else 之间插注释。 -->
|
||||
<view class="buy-single" wx:if="{{code}}">
|
||||
<text class="buy-title">{{title}}</text>
|
||||
<text class="buy-price">¥{{priceYuan}}</text>
|
||||
<button
|
||||
class="buy-btn"
|
||||
disabled="{{buying || owned}}"
|
||||
bindtap="buyNow"
|
||||
>{{owned ? '已拥有' : (buying ? '支付中…' : '立即购买')}}</button>
|
||||
</view>
|
||||
|
||||
<view class="buy-list" wx:else>
|
||||
<view class="buy-item" wx:for="{{list}}" wx:key="code">
|
||||
<view class="buy-item-main">
|
||||
<text class="buy-item-title">{{item.title}}</text>
|
||||
<text class="buy-item-price">¥{{item.priceYuan}}</text>
|
||||
</view>
|
||||
<button
|
||||
class="buy-btn buy-btn-mini"
|
||||
size="mini"
|
||||
disabled="{{buying || item.owned}}"
|
||||
data-code="{{item.code}}"
|
||||
bindtap="buyNow"
|
||||
>{{item.owned ? '已拥有' : '购买'}}</button>
|
||||
</view>
|
||||
<view class="buy-empty" wx:if="{{!loading && list.length === 0}}">
|
||||
<text>暂无可购买的课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
Reference in new issue
Block a user