改为店务小程序原生时间选择器
This commit is contained in:
@@ -59,13 +59,15 @@
|
||||
</view>
|
||||
<view class="field">
|
||||
<text class="field-label required">预约时间</text>
|
||||
<view class="field-value time-value {{form.appointmentTime ? '' : 'placeholder'}}" bindtap="openTimeSheet">
|
||||
<view>
|
||||
<text>{{form.appointmentTime || timeSelectTip}}</text>
|
||||
<text wx:if="{{form.appointmentTime}}" class="time-range">{{form.appointmentDate}} · {{selectedArtist.name}} · {{form.durationMinutes}}分钟</text>
|
||||
<picker class="time-native-picker" mode="time" value="{{timePickerValue || form.appointmentTime || '00:00'}}" start="00:00" end="23:59" disabled="{{pageMaskVisible || timePickerConfirming}}" bindchange="onNativeTimeChange">
|
||||
<view class="field-value time-value {{form.appointmentTime ? '' : 'placeholder'}}">
|
||||
<view>
|
||||
<text>{{form.appointmentTime || timeSelectTip}}</text>
|
||||
<text wx:if="{{form.appointmentTime}}" class="time-range">{{form.appointmentDate}} · {{selectedArtist.name}} · {{form.durationMinutes}}分钟</text>
|
||||
</view>
|
||||
<text class="time-arrow">›</text>
|
||||
</view>
|
||||
<text class="time-arrow">›</text>
|
||||
</view>
|
||||
</picker>
|
||||
</view>
|
||||
<view class="appointment-flags">
|
||||
<view class="flag-card {{form.depositPaid ? 'active' : ''}}" data-field="depositPaid" bindtap="toggleFlag">
|
||||
@@ -221,45 +223,6 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{timeSheetVisible}}" class="modal-mask" bindtap="closeTimeSheet">
|
||||
<view class="time-modal" catchtap="stopTap">
|
||||
<view class="modal-head">
|
||||
<view>
|
||||
<text class="modal-title">选择预约时间</text>
|
||||
<text class="modal-subtitle">{{form.appointmentDate}} · {{selectedArtist.name}} · {{form.durationMinutes}}分钟</text>
|
||||
</view>
|
||||
<view class="modal-close" bindtap="closeTimeSheet">×</view>
|
||||
</view>
|
||||
<view class="time-picker-panel">
|
||||
<view class="time-picker-summary">
|
||||
<text class="time-picker-label">开始时间</text>
|
||||
<text class="time-picker-value">{{timePickerValue || '--:--'}}</text>
|
||||
</view>
|
||||
<view class="time-picker-head">
|
||||
<text>时</text>
|
||||
<text>分</text>
|
||||
</view>
|
||||
<view class="time-picker-stage">
|
||||
<picker-view class="time-picker-view" value="{{timePickerIndices}}" bindchange="onTimePickerChange" indicator-class="time-picker-indicator" mask-class="time-picker-mask">
|
||||
<picker-view-column>
|
||||
<view wx:for="{{timePickerHours}}" wx:for-index="hourIndex" wx:key="*this" class="time-picker-item {{timePickerIndices[0] == hourIndex ? 'selected' : ''}}">{{item}}</view>
|
||||
</picker-view-column>
|
||||
<picker-view-column>
|
||||
<view wx:for="{{timePickerMinutes}}" wx:for-index="minuteIndex" wx:key="*this" class="time-picker-item {{timePickerIndices[1] == minuteIndex ? 'selected' : ''}}">{{item}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
<view class="time-picker-selected-overlay" aria-hidden="true">
|
||||
<text>{{timePickerHours[timePickerIndices[0]] || '--'}}</text>
|
||||
<text>{{timePickerMinutes[timePickerIndices[1]] || '--'}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="time-picker-actions">
|
||||
<button class="time-confirm-btn" loading="{{timePickerConfirming}}" disabled="{{timePickerConfirming || !timePickerValue || pageMaskVisible}}" bindtap="confirmTimeSelection">确认时间</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="fixed-bottom">
|
||||
<view wx:if="{{canCreateAppointment}}" class="action-row">
|
||||
<button class="secondary-btn draft-btn" disabled="{{pageMaskVisible || loading}}" bindtap="saveDraft">保存草稿</button>
|
||||
|
||||
Reference in New Issue
Block a user