108 lines
4.0 KiB
Plaintext
108 lines
4.0 KiB
Plaintext
<!-- 智能饭菜规划页面 -->
|
||
<view class="container">
|
||
<!-- 页面标题 -->
|
||
<view class="page-header">
|
||
<view class="page-title">
|
||
<text class="title-icon">🍽️</text>
|
||
<text class="title-text">智能饭菜规划</text>
|
||
</view>
|
||
<view class="page-subtitle">AI驱动的个性化饭菜清单规划师</view>
|
||
</view>
|
||
|
||
<!-- 表单区域 -->
|
||
<view class="form-container">
|
||
<view class="form-section">
|
||
<view class="section-title">规划参数</view>
|
||
|
||
<!-- 地区类型 -->
|
||
<view class="form-item">
|
||
<view class="form-label">地区类型</view>
|
||
<picker bindchange="onRegionChange" value="{{regionIndex}}" range="{{regionOptions}}">
|
||
<view class="picker-display">{{regionOptions[regionIndex]}}</view>
|
||
</picker>
|
||
</view>
|
||
|
||
<!-- 就餐人数 -->
|
||
<view class="form-item">
|
||
<view class="form-label">就餐人数</view>
|
||
<picker bindchange="onDinerCountChange" value="{{dinerCountIndex}}" range="{{dinerCountOptions}}">
|
||
<view class="picker-display">{{dinerCountOptions[dinerCountIndex]}}</view>
|
||
</picker>
|
||
</view>
|
||
|
||
<!-- 用餐类型 -->
|
||
<view class="form-item">
|
||
<view class="form-label">用餐类型</view>
|
||
<picker bindchange="onMealTypeChange" value="{{mealTypeIndex}}" range="{{mealTypeOptions}}">
|
||
<view class="picker-display">{{mealTypeOptions[mealTypeIndex]}}</view>
|
||
</picker>
|
||
</view>
|
||
|
||
<!-- 用餐者家乡 -->
|
||
<view class="form-item">
|
||
<view class="form-label">用餐者家乡 <text class="required">*</text></view>
|
||
<input class="form-input" placeholder="如:四川成都" value="{{hometown}}" bindinput="onHometownInput" />
|
||
</view>
|
||
|
||
<!-- 个人喜好 -->
|
||
<view class="form-item">
|
||
<view class="form-label">个人喜好</view>
|
||
<textarea class="form-textarea" placeholder="如:喜欢辣味、偏爱素食、喜欢海鲜等" value="{{preferences}}" bindinput="onPreferencesInput"></textarea>
|
||
</view>
|
||
|
||
<!-- 饮食禁忌 -->
|
||
<view class="form-item">
|
||
<view class="form-label">饮食禁忌</view>
|
||
<textarea class="form-textarea" placeholder="如:不吃猪肉、对花生过敏、素食主义等" value="{{dietaryRestrictions}}" bindinput="onDietaryRestrictionsInput"></textarea>
|
||
</view>
|
||
|
||
<!-- 预算范围 -->
|
||
<view class="form-item">
|
||
<view class="form-label">预算范围(元)</view>
|
||
<picker bindchange="onBudgetChange" value="{{budgetIndex}}" range="{{budgetOptions}}">
|
||
<view class="picker-display">{{budgetOptions[budgetIndex]}}</view>
|
||
</picker>
|
||
</view>
|
||
|
||
<!-- 生成按钮 -->
|
||
<button class="generate-btn" bindtap="generateMealPlan" disabled="{{isGenerating}}">
|
||
<text wx:if="{{!isGenerating}}">🎯 生成饭菜规划</text>
|
||
<text wx:else>⏳ 生成中...</text>
|
||
</button>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 结果展示区域 -->
|
||
<view class="result-container" wx:if="{{mealPlanResult}}">
|
||
<view class="result-header">
|
||
<view class="result-title">🍽️ 饭菜规划结果</view>
|
||
<view class="result-actions">
|
||
<button class="action-btn copy-btn" bindtap="copyResult">📋 复制</button>
|
||
<button class="action-btn save-btn" bindtap="saveResult">💾 保存</button>
|
||
</view>
|
||
</view>
|
||
<view class="result-content">
|
||
<rich-text nodes="{{mealPlanResult}}"></rich-text>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 历史记录入口 -->
|
||
<view class="history-entry">
|
||
<navigator url="/pages/meal-history/meal-history" class="history-link">
|
||
<text class="history-icon">📚</text>
|
||
<text class="history-text">查看历史规划</text>
|
||
</navigator>
|
||
</view>
|
||
</view>
|
||
|
||
<!-- 加载提示 -->
|
||
<view class="loading-overlay" wx:if="{{isGenerating}}">
|
||
<view class="loading-content">
|
||
<view class="loading-spinner"></view>
|
||
<view class="loading-text">AI正在为您制定个性化的饭菜清单,请稍候...</view>
|
||
</view>
|
||
</view>
|
||
|
||
|
||
|