63 lines
2.3 KiB
Plaintext
63 lines
2.3 KiB
Plaintext
<!--pages/index/camera.wxml - AI拍照页面(按旧版模板重构)-->
|
||
<view class="container">
|
||
<view class="progress-section">
|
||
<view class="progress-info">
|
||
<text class="step-text">步骤 {{photoIndex + 1}}/3</text>
|
||
<text class="photo-count">{{photos.length}}/3 张照片已完成</text>
|
||
</view>
|
||
<view class="progress-bars">
|
||
<view class="progress-bar {{photos.length >= 1 ? 'completed' : 'pending'}}"></view>
|
||
<view class="progress-bar {{photos.length >= 2 ? 'completed' : 'pending'}}"></view>
|
||
<view class="progress-bar {{photos.length >= 3 ? 'completed' : 'pending'}}"></view>
|
||
</view>
|
||
<view class="instruction-card">
|
||
<view class="instruction-content">
|
||
<view class="step-number">{{photoIndex + 1}}</view>
|
||
<view class="instruction-text">
|
||
<text class="angle-text">{{guideText}}</text>
|
||
<text class="tip-text">请保持自然表情,确保光线充足</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="camera-container">
|
||
<view wx:if="{{photos.length < 3}}" class="camera-preview">
|
||
<camera
|
||
class="camera"
|
||
device-position="front"
|
||
flash="off"
|
||
binderror="onCameraError"
|
||
></camera>
|
||
</view>
|
||
|
||
<view wx:else class="photos-preview">
|
||
<view class="photo-item" wx:for="{{photos}}" wx:key="index">
|
||
<image class="photo-image" src="{{item}}" mode="aspectFill"></image>
|
||
<view class="photo-label">{{index === 0 ? '正面' : (index === 1 ? '左侧' : '右侧')}}</view>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
<view class="button-container">
|
||
<view wx:if="{{photos.length < 3}}" class="capture-actions">
|
||
<view class="capture-button" bindtap="takePhoto">
|
||
<text class="button-text">拍摄{{guideText}}照片</text>
|
||
</view>
|
||
<view class="album-button" bindtap="goToUpload">
|
||
<text class="album-button-text">从相册选择</text>
|
||
</view>
|
||
</view>
|
||
|
||
<view wx:else class="action-buttons">
|
||
<view class="action-button secondary" bindtap="retakeAll">
|
||
<text class="action-button-text">重新拍摄</text>
|
||
</view>
|
||
<view class="action-button primary" bindtap="completeCapture">
|
||
<text class="action-button-text">立即{{aiAnalysisText || '智能分析'}}</text>
|
||
</view>
|
||
</view>
|
||
</view>
|
||
|
||
</view>
|