feat: harden phase one workflows
This commit is contained in:
@@ -1,34 +1,48 @@
|
||||
<view class="page" wx:if="{{product}}">
|
||||
<view class="card">
|
||||
<view class="section-title">{{product.name}}</view>
|
||||
<view class="muted">{{product.description || '社区商品'}}</view>
|
||||
<view class="page detail-page" wx:if="{{product}}">
|
||||
<view class="detail-hero">
|
||||
<image wx:if="{{product.coverUrl}}" class="detail-cover" src="{{product.coverUrl}}" mode="aspectFill" />
|
||||
<view wx:else class="detail-cover media-placeholder">货</view>
|
||||
<view class="detail-info">
|
||||
<view class="tag">{{product.status}}</view>
|
||||
<view class="detail-title">{{product.name}}</view>
|
||||
<view class="muted">{{product.description || '社区商品'}}</view>
|
||||
<view wx:if="{{product.skus.length}}" class="detail-price">¥{{product.skus[skuIndex].priceCent / 100}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="card">
|
||||
<view class="muted">规格</view>
|
||||
<view class="purchase-card form-card" wx:if="{{product.skus.length}}">
|
||||
<view class="card-title form-title">下单信息</view>
|
||||
<view class="field-label">规格</view>
|
||||
<picker mode="selector" range="{{product.skus}}" range-key="skuName" value="{{skuIndex}}" bindchange="onSkuChange">
|
||||
<view class="picker">{{product.skus[skuIndex].skuName}} / ¥{{product.skus[skuIndex].priceCent / 100}} / 库存 {{product.skus[skuIndex].stock}}</view>
|
||||
</picker>
|
||||
<view class="muted">数量</view>
|
||||
|
||||
<view class="field-label">数量</view>
|
||||
<input class="input" type="number" value="{{form.quantity}}" bindinput="onQuantityChange" />
|
||||
<view class="muted">配送方式</view>
|
||||
<radio-group bindchange="onMethodChange">
|
||||
|
||||
<view class="field-label">配送方式</view>
|
||||
<radio-group class="radio-grid" bindchange="onMethodChange">
|
||||
<label class="radio"><radio value="IMMEDIATE" checked="{{form.deliveryMethod === 'IMMEDIATE'}}" />立即配送</label>
|
||||
<label class="radio"><radio value="SCHEDULED" checked="{{form.deliveryMethod === 'SCHEDULED'}}" />预约配送</label>
|
||||
<label class="radio"><radio value="SELF_PICKUP" checked="{{form.deliveryMethod === 'SELF_PICKUP'}}" />自提</label>
|
||||
</radio-group>
|
||||
|
||||
<view wx:if="{{form.deliveryMethod !== 'SELF_PICKUP'}}">
|
||||
<view class="muted">收货地址</view>
|
||||
<view class="field-label">收货地址</view>
|
||||
<picker mode="selector" range="{{addresses}}" range-key="detail" value="{{addressIndex}}" bindchange="onAddressChange">
|
||||
<view class="picker">{{addresses[addressIndex] ? addresses[addressIndex].building + ' ' + addresses[addressIndex].room + ' ' + addresses[addressIndex].detail : '请选择地址'}}</view>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{form.deliveryMethod === 'SCHEDULED'}}">
|
||||
<view class="muted">预约时间</view>
|
||||
<view class="field-label">预约时间</view>
|
||||
<input class="input" placeholder="2026-07-07T18:30:00" bindinput="onScheduledTimeChange" />
|
||||
</view>
|
||||
<view class="muted">备注</view>
|
||||
<textarea class="textarea" bindinput="onRemarkInput" />
|
||||
<button class="primary" loading="{{submitting}}" bindtap="submit">提交订单</button>
|
||||
|
||||
<view class="field-label">备注</view>
|
||||
<textarea class="textarea" placeholder="口味、送达说明等" bindinput="onRemarkInput" />
|
||||
<button class="primary action-button" loading="{{submitting}}" bindtap="submit">提交订单</button>
|
||||
</view>
|
||||
|
||||
<view wx:else class="empty-state">暂无可选规格</view>
|
||||
</view>
|
||||
|
||||
Reference in New Issue
Block a user