69 lines
3.1 KiB
Plaintext
69 lines
3.1 KiB
Plaintext
<view class="apply-page">
|
||
<mp-navigation-bar title="报名" background-color="#ffffff" color="#333" bind:click-left="onBack" left-arrow></mp-navigation-bar>
|
||
<!-- 未登录 -->
|
||
<view wx:if="{{!loggedIn}}" class="not-login">
|
||
<text class="not-login-tip">登录后才能提交报名信息</text>
|
||
<button class="go-login-btn" bindtap="onGoMineLogin">去登录</button>
|
||
</view>
|
||
<!-- 已登录 -->
|
||
<block wx:else>
|
||
<scroll-view class="scroll" scroll-y>
|
||
<!-- 项目分组列表 -->
|
||
<view class="project-card" wx:for="{{projectGroups}}" wx:key="projectId">
|
||
<!-- 项目标题行 -->
|
||
<view class="project-head">
|
||
<view class="project-tag">项目{{item.index}}</view>
|
||
<text class="project-name">{{item.projectName}}</text>
|
||
</view>
|
||
<view class="divider"></view>
|
||
<!-- 组别标签 -->
|
||
<view class="group-tags">
|
||
<view wx:for="{{item.groups}}" wx:for-item="group" wx:key="groupId" class="group-tag {{group.selected ? 'selected' : ''}}" bindtap="onGroupTap" data-project-id="{{item.projectId}}" data-group-id="{{group.groupId}}">
|
||
{{group.groupName}}|
|
||
{{group.ageRequirement}}|
|
||
{{group.genderRequirementText}}
|
||
<!-- {{group.ageRange || ''}}|{{group.gender || ''}} -->
|
||
</view>
|
||
</view>
|
||
</view>
|
||
<!-- 优惠券 -->
|
||
<view class="coupon-row">
|
||
<input class="coupon-input" placeholder="请输入优惠卷兑换码" placeholder-class="coupon-placeholder" value="{{couponCode}}" bindinput="onCouponInput" />
|
||
<button class="coupon-btn" bindtap="onValidateCoupon">验证</button>
|
||
</view>
|
||
|
||
<!-- 金额显示 -->
|
||
<view class="price-section">
|
||
<view wx:if="{{discountPrice > 0}}" class="price-row">
|
||
<text class="price-label">原价:</text>
|
||
<text class="original-price">¥{{originalPrice}}</text>
|
||
</view>
|
||
<view wx:if="{{discountPrice > 0}}" class="price-row">
|
||
<text class="price-label">优惠:</text>
|
||
<text class="discount-price">-¥{{discountPrice}}</text>
|
||
</view>
|
||
<view class="price-row total">
|
||
<text class="price-label">合计:</text>
|
||
<text class="total-price">¥{{totalPrice}}</text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 底部占位,避免被 bottom-bar 遮挡 -->
|
||
<view style="height: 200rpx;"></view>
|
||
</scroll-view>
|
||
<!-- 底部支付按钮 -->
|
||
<view class="bottom-bar">
|
||
<!-- <button class="btn-offline" bindtap="onPayOffline" loading="{{submitting}}">线下支付</button> -->
|
||
<button class="btn-online" bindtap="onPayOnline" loading="{{submitting}}">
|
||
<view wx:if="{{discountPrice > 0}}" class="price-display">
|
||
<text class="small-price">¥{{originalPrice}}</text>
|
||
<text class="main-price">¥{{totalPrice}}</text>
|
||
</view>
|
||
<view wx:else class="price-display">
|
||
<text class="main-price">¥{{totalPrice}}</text>
|
||
</view>
|
||
<text class="btn-text">线上支付</text>
|
||
</button>
|
||
</view>
|
||
</block>
|
||
</view> |