|
@@ -2,7 +2,7 @@
|
|
|
<view class="page">
|
|
<view class="page">
|
|
|
<!-- 顶部导航栏 -->
|
|
<!-- 顶部导航栏 -->
|
|
|
<view class="nav-bar">
|
|
<view class="nav-bar">
|
|
|
- <view class="nav-left" @tap="goBack">
|
|
|
|
|
|
|
+ <view class="nav-left" @select="goBack">
|
|
|
<text class="nav-icon">‹</text>
|
|
<text class="nav-icon">‹</text>
|
|
|
<text class="nav-title">{{ todayText }}</text>
|
|
<text class="nav-title">{{ todayText }}</text>
|
|
|
</view>
|
|
</view>
|
|
@@ -25,7 +25,7 @@
|
|
|
<view class="tag-row">
|
|
<view class="tag-row">
|
|
|
<TagChip v-for="m in mealTypes" :key="m.value" :label="m.label"
|
|
<TagChip v-for="m in mealTypes" :key="m.value" :label="m.label"
|
|
|
:active="form.mealType === m.value"
|
|
:active="form.mealType === m.value"
|
|
|
- @tap="form.mealType = m.value" />
|
|
|
|
|
|
|
+ @select="form.mealType = m.value" />
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -56,13 +56,13 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="card-body">
|
|
<view class="card-body">
|
|
|
<view class="media-toolbar">
|
|
<view class="media-toolbar">
|
|
|
- <view class="tool-btn" @tap="choosePhoto">
|
|
|
|
|
|
|
+ <view class="tool-btn" @select="choosePhoto">
|
|
|
<text class="tool-icon">📷</text>
|
|
<text class="tool-icon">📷</text>
|
|
|
<text class="tool-label">照片</text>
|
|
<text class="tool-label">照片</text>
|
|
|
<text class="tool-count" v-if="form.photos.length > 0">{{ form.photos.length }}/9</text>
|
|
<text class="tool-count" v-if="form.photos.length > 0">{{ form.photos.length }}/9</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="tool-divider"></view>
|
|
<view class="tool-divider"></view>
|
|
|
- <view class="tool-btn" @tap="toggleRecord">
|
|
|
|
|
|
|
+ <view class="tool-btn" @select="toggleRecord">
|
|
|
<text class="tool-icon">🎙</text>
|
|
<text class="tool-icon">🎙</text>
|
|
|
<text class="tool-label">{{ isRecording ? '录音中…' : (form.voicePath ? '已录制' : '录音') }}</text>
|
|
<text class="tool-label">{{ isRecording ? '录音中…' : (form.voicePath ? '已录制' : '录音') }}</text>
|
|
|
<text class="tool-count" v-if="isRecording">{{ recordSeconds }}s</text>
|
|
<text class="tool-count" v-if="isRecording">{{ recordSeconds }}s</text>
|
|
@@ -70,7 +70,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<!-- 照片缩略图 -->
|
|
<!-- 照片缩略图 -->
|
|
|
<view class="photo-strip" v-if="form.photos.length > 0">
|
|
<view class="photo-strip" v-if="form.photos.length > 0">
|
|
|
- <view class="photo-item" v-for="(img, idx) in form.photos" :key="getItemKey(img, idx)" @tap="removePhoto(idx)">
|
|
|
|
|
|
|
+ <view class="photo-item" v-for="(img, idx) in form.photos" :key="getItemKey(img, idx)" @select="removePhoto(idx)">
|
|
|
<image :src="img" mode="aspectFill" class="photo-img" lazy-load />
|
|
<image :src="img" mode="aspectFill" class="photo-img" lazy-load />
|
|
|
<view class="photo-delete-overlay">
|
|
<view class="photo-delete-overlay">
|
|
|
<text class="delete-icon">×</text>
|
|
<text class="delete-icon">×</text>
|
|
@@ -84,8 +84,8 @@
|
|
|
<view class="wave-bar" v-for="n in 7" :key="n" :style="{animationDelay: (n * 0.1) + 's'}"></view>
|
|
<view class="wave-bar" v-for="n in 7" :key="n" :style="{animationDelay: (n * 0.1) + 's'}"></view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="voice-controls">
|
|
<view class="voice-controls">
|
|
|
- <view class="mini-btn cancel-mini" @tap="cancelRecord"><text>取消</text></view>
|
|
|
|
|
- <view class="mini-btn done-mini" @tap="finishRecord"><text>完成</text></view>
|
|
|
|
|
|
|
+ <view class="mini-btn cancel-mini" @select="cancelRecord"><text>取消</text></view>
|
|
|
|
|
+ <view class="mini-btn done-mini" @select="finishRecord"><text>完成</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="voice-strip" v-else-if="form.voicePath">
|
|
<view class="voice-strip" v-else-if="form.voicePath">
|
|
@@ -93,14 +93,14 @@
|
|
|
<text class="play-icon">▶</text>
|
|
<text class="play-icon">▶</text>
|
|
|
<text class="voice-duration">{{ recordDurationText }}</text>
|
|
<text class="voice-duration">{{ recordDurationText }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="delete-voice" @tap="deleteVoice"><text>×</text></view>
|
|
|
|
|
|
|
+ <view class="delete-voice" @select="deleteVoice"><text>×</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
<!-- 提交按钮 -->
|
|
<!-- 提交按钮 -->
|
|
|
<view class="submit-wrap">
|
|
<view class="submit-wrap">
|
|
|
- <view class="submit-btn" :class="{ 'submitting': submitting }" @tap="doCheckin">
|
|
|
|
|
|
|
+ <view class="submit-btn" :class="{ 'submitting': submitting }" @select="doCheckin">
|
|
|
<text>{{ submitting ? '提交中...' : '✓ 完成打卡' }}</text>
|
|
<text>{{ submitting ? '提交中...' : '✓ 完成打卡' }}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -131,7 +131,7 @@
|
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
|
|
|
|
<!-- 图片识别结果确认弹窗 -->
|
|
<!-- 图片识别结果确认弹窗 -->
|
|
|
- <view class="recognize-overlay" v-if="showRecognizeModal" @tap="cancelRecognize">
|
|
|
|
|
|
|
+ <view class="recognize-overlay" v-if="showRecognizeModal" @select="cancelRecognize">
|
|
|
<view class="recognize-modal" @tap.stop>
|
|
<view class="recognize-modal" @tap.stop>
|
|
|
<view class="recognize-header">
|
|
<view class="recognize-header">
|
|
|
<text class="recognize-title">🍽️ 识别结果</text>
|
|
<text class="recognize-title">🍽️ 识别结果</text>
|
|
@@ -141,15 +141,15 @@
|
|
|
<view class="food-chip" v-for="(f, idx) in recognizedFoods" :key="getFoodsKey(f, idx)">
|
|
<view class="food-chip" v-for="(f, idx) in recognizedFoods" :key="getFoodsKey(f, idx)">
|
|
|
<text class="food-chip-name">{{ f.name }}</text>
|
|
<text class="food-chip-name">{{ f.name }}</text>
|
|
|
<text class="food-chip-cat" v-if="f.category && f.category !== 'unknown'">{{ f.category }}</text>
|
|
<text class="food-chip-cat" v-if="f.category && f.category !== 'unknown'">{{ f.category }}</text>
|
|
|
- <text class="food-chip-del" @tap="removeRecognizedFood(idx)">×</text>
|
|
|
|
|
|
|
+ <text class="food-chip-del" @select="removeRecognizedFood(idx)">×</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="recognize-hint">
|
|
<view class="recognize-hint">
|
|
|
<text>可手动删除不需要的食材,确认后自动填入食物清单</text>
|
|
<text>可手动删除不需要的食材,确认后自动填入食物清单</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="recognize-footer">
|
|
<view class="recognize-footer">
|
|
|
- <view class="btn-cancel" @tap="cancelRecognize"><text>取消</text></view>
|
|
|
|
|
- <view class="btn-confirm" @tap="confirmRecognize"><text>✓ 确认填入</text></view>
|
|
|
|
|
|
|
+ <view class="btn-cancel" @select="cancelRecognize"><text>取消</text></view>
|
|
|
|
|
+ <view class="btn-confirm" @select="confirmRecognize"><text>✓ 确认填入</text></view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|