123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- <view class="container">
- <view class="section account-type">
- <view class="section-title">选择账户类型</view>
- <view class="account-type-grid">
- <view
- class="account-type-item {{selectedAccountType === item.type ? 'selected' : ''}}"
- wx:for="{{accountTypes}}"
- wx:key="type"
- data-type="{{item.type}}"
- bindtap="selectAccountType"
- >
- <image class="account-type-icon" src="{{item.icon}}"></image>
- <text>{{item.name}}</text>
- </view>
- </view>
- </view>
- <view class="section account-info" wx:if="{{selectedAccountType}}">
- <view class="section-title">{{selectedAccountType === 'bank' ? '银行卡信息' : '账户信息'}}</view>
- <view class="input-group">
- <view wx:if="{{selectedAccountType === 'bank'}}" class="input-item bank-select-item">
- <text class="label">银行</text>
- <view
- class="bank-select"
- bindtap="showBankList"
- >
- <input
- class="bank-name"
- type="text"
- placeholder="请选择银行"
- value="{{selectedBank ? selectedBank.name : ''}}"
- disabled
- />
- <text class="select-icon">▼</text>
- </view>
- </view>
- <view class="input-item">
- <text class="label">
- {{selectedAccountType === 'bank' ? '卡号' :
- (selectedAccountType === 'alipay' ? '支付宝账号' : '微信账号')}}
- </text>
- <input
- class="input"
- type="text"
- placeholder="{{selectedAccountType === 'bank' ? '请输入银行卡号' : (selectedAccountType === 'alipay' ? '请输入支付宝账号' : '请输入微信账号')}}"
- value="{{accountNumber}}"
- bindinput="onAccountNumberInput"
- />
- </view>
- <view class="input-item">
- <text class="label">
- {{selectedAccountType === 'bank' ? '持卡人' : '账户姓名'}}
- </text>
- <input
- class="input"
- type="text"
- placeholder="{{selectedAccountType === 'bank' ? '请输入持卡人姓名' : (selectedAccountType === 'alipay' ? '请输入支付宝实名' : '请输入微信实名')}}"
- value="{{accountName}}"
- bindinput="onAccountNameInput"
- />
- </view>
- </view>
- </view>
- <view class="section default-setting">
- <view class="default-label">设为默认账户</view>
- <switch
- checked="{{isDefault}}"
- bindchange="toggleDefault"
- />
- </view>
- <button
- class="save-btn"
- bindtap="saveAccount"
- >
- 保存账户
- </button>
- <!-- 银行选择弹窗 -->
- <view
- class="bank-list-modal {{showBankList ? 'show' : ''}}"
- catchtap="hideBankList"
- >
- <view
- class="bank-list-content"
- catchtap="preventTap"
- >
- <view class="bank-list-title">选择银行</view>
- <scroll-view
- scroll-y
- class="bank-list-scroll"
- >
- <view
- class="bank-list-item"
- wx:for="{{bankList}}"
- wx:key="code"
- data-code="{{item.code}}"
- bindtap="selectBank"
- >
- {{item.name}}
- </view>
- </scroll-view>
- </view>
- </view>
- </view>
|