<view class="container">
    <page-loding wx:if="{{showLoding}}"></page-loding>
    <block wx:if="{{edition==2}}">
        <view class="money">
            <my-money user="{{user}}"></my-money>
        </view>
        <view class="list-box">
            <view class="{{item.selected?'item active':'item'}}" wx:for="{{list}}" wx:key="index">
                <view class="info">
                    <view class="name">{{item.title}}</view>
                    <view class="include">{{item.message}} </view>
                    <view class="price">
                        <view class="now">￥{{item.paymentamount}}元</view>
                        <view class="origin">￥{{item.money*1+item.bonusamount*1}}元</view>
                    </view>
                </view>
                <view bindtap="tobuy" class="buy-btn" data-id="{{item.id}}">
                    <text decode="true">优惠
购买</text>
                </view>
            </view>
        </view>
        <service-tel tel="{{servicetel+''}}"></service-tel>
        <navigator class="scan-btn" url="/pages/myDiscount/myDiscount">我的优惠券</navigator>
    </block>
    <block wx:if="{{edition==1}}">
        <view class="edition1-money">
            <view class="l">选择充值金额</view>
            <view class="r">余额：{{user.money}}</view>
        </view>
        <view class="edition1-list">
            <view bindtap="selectItem" class="{{selectItemID==item.id?item.special?'edition1-item edition1-select active':'edition1-item active':item.special?'edition1-item edition1-select':'edition1-item'}}" data-id="{{item.id}}" wx:for="{{list}}" wx:key="index">
                <view class="now">{{item.paymentamount}}元</view>
                <view class="origin">赠送{{item.bonusamount*1}}元</view>
            </view>
            <view></view>
            <view></view>
            <view></view>
        </view>
        <view class="no-content" wx:if="{{list.length==0&&!loading}}">
            <image src="/img/nocontent.png"></image>
            <view>暂无相关数据</view>
        </view>
        <view bindtap="tobuyNow" class="tobuy-btn {{approve?'':'disabled'}}" wx:if="{{list.length>0}}">立即充值</view>
        <checkbox-group bindchange="change">
            <label class="provision">
                <checkbox checked value="{{approve}}"></checkbox> 充值即表示同意 <navigator class="text" url="/pages/webview/webview?url={{protocol.url}}">《{{protocol.name}}》</navigator>
            </label>
        </checkbox-group>
        <view catchtap="showprovision" class="provision-box" wx:if="{{showTips}}">
            <view class="inner">
                <view class="title">{{protocol.name}}</view>
                <view class="richbox">
                    <view wx:for="{{tips}}">{{item}}</view>
                </view>
            </view>
        </view>
        <view class="warm-prompt">
            <view class="title">温馨提示:</view>
            <view class="content">
                <view wx:for="{{tips}}">{{item}}</view>
            </view>
        </view>
    </block>
</view>
