123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318 |
- <!-- pages/ai-plan/ai-plan.wxml -->
- <view class="ai-plan-page" style="--primary-color:#e54d42">
- <!-- 顶部导航 -->
- <view class="nav-header">
- <image src="/images/icons/back.png" class="back-icon" bindtap="navigateBack"></image>
- <text class="nav-title">AI红色旅游规划</text>
- <image src="/images/icons/red-flag.png" class="flag-icon"></image>
- </view>
-
- <!-- 进度指示器 -->
- <view class="progress-steps">
- <view class="step {{currentStep >= 1 ? 'active' : ''}}">
- <view class="step-number">1</view>
- <text class="step-text">偏好设置</text>
- </view>
- <view class="step-line {{currentStep >= 2 ? 'active' : ''}}"></view>
- <view class="step {{currentStep >= 2 ? 'active' : ''}}">
- <view class="step-number">2</view>
- <text class="step-text">行程生成</text>
- </view>
- <view class="step-line {{currentStep >= 3 ? 'active' : ''}}"></view>
- <view class="step {{currentStep >= 3 ? 'active' : ''}}">
- <view class="step-number">3</view>
- <text class="step-text">完成</text>
- </view>
- </view>
-
- <!-- 步骤1: 偏好设置 -->
- <block wx:if="{{currentStep === 1}}">
- <view class="step-container">
- <!-- 城市选择 -->
- <view class="form-section">
- <text class="section-title">选择城市</text>
- <view class="interest-tags">
- <view
- wx:for="{{cityOptions}}"
- wx:key="value"
- class="tag city-tag {{selectedCities.indexOf(item.value) !== -1 ? 'selected' : ''}}"
- bindtap="toggleCity"
- data-value="{{item.value}}"
- >
- {{item.label}}
- <image
- src="/images/icons/checked-red.png"
- class="tag-icon"
- wx:if="{{selectedCities.indexOf(item.value) !== -1}}"
- ></image>
- </view>
- </view>
- </view>
-
- <!-- 天数选择 -->
- <view class="form-section">
- <text class="section-title">旅行天数</text>
- <view class="day-selector">
- <view
- wx:for="{{dayOptions}}"
- wx:key="value"
- class="day-option {{selectedDays === item.value ? 'selected' : ''}}"
- bindtap="selectDays"
- data-value="{{item.value}}"
- >
- {{item.label}}
- </view>
- </view>
- </view>
-
- <!-- 兴趣偏好 -->
- <view class="form-section">
- <text class="section-title">兴趣偏好</text>
- <view class="interest-tags">
- <view
- wx:for="{{interestOptions}}"
- wx:key="value"
- class="tag interest-tag {{selectedInterests.indexOf(item.value) !== -1 ? 'selected' : ''}}"
- bindtap="toggleInterest"
- data-value="{{item.value}}"
- >
- {{item.label}}
- <image
- src="/images/icons/red-check.png"
- class="tag-icon"
- wx:if="{{selectedInterests.indexOf(item.value) !== -1}}"
- ></image>
- </view>
- </view>
- </view>
-
- <!-- 出行方式 -->
- <view class="form-section">
- <text class="section-title">出行方式</text>
- <view class="transport-options">
- <view
- wx:for="{{transportOptions}}"
- wx:key="value"
- class="transport-option {{selectedTransport === item.value ? 'selected' : ''}}"
- bindtap="selectTransport"
- data-value="{{item.value}}"
- >
- <image src="{{item.icon}}" class="transport-icon"></image>
- <text>{{item.label}}</text>
- </view>
- </view>
- </view>
-
- <!-- 特殊需求 -->
- <view class="form-section">
- <text class="section-title">特殊需求</text>
- <textarea
- class="custom-input"
- placeholder="如:需要轮椅通道、希望包含党史讲解等"
- value="{{customRequirements}}"
- bindinput="updateCustomRequirements"
- ></textarea>
- </view>
-
- <button class="next-btn" bindtap="goToNextStep">下一步</button>
- </view>
- </block>
-
- <!-- 步骤2: 行程生成 -->
- <block wx:if="{{currentStep === 2}}">
- <view class="step-container">
- <!-- 加载状态 -->
- <view wx:if="{{!planGenerated || isLoading}}" class="generating-container">
- <image src="/images/loading.gif" class="loading-gif" mode="aspectFit"></image>
- <text class="generating-text">AI正在规划红色路线...</text>
- </view>
- <!-- 行程结果 -->
- <view wx:else class="plan-result">
- <!-- 行程标题 -->
- <view class="plan-header">
- <text class="plan-title">{{planData.title}}</text>
- <text class="plan-desc">{{planData.description}}</text>
- </view>
- <!-- 统计信息面板(新增) -->
- <view class="stats-panel">
- <view class="stat-item">
- <text class="stat-value">{{planData.statistics.red_attractions_count}}</text>
- <text class="stat-label">红色景点</text>
- </view>
- <view class="stat-item">
- <text class="stat-value">{{planData.statistics.total_attractions}}</text>
- <text class="stat-label">总景点数</text>
- </view>
- <view class="stat-item">
- <text class="stat-value">{{planData.statistics.educational_points_count}}</text>
- <text class="stat-label">教育要点</text>
- </view>
- </view>
- <!-- 每日行程 -->
- <scroll-view scroll-y class="day-list">
- <view wx:for="{{planData.days}}" wx:key="day" class="day-item">
- <!-- 天数和主题 -->
- <view class="day-header">
- <text class="day-title">第{{item.day}}天: {{item.theme}}</text>
- </view>
-
- <!-- 教育要点展示(新增) -->
- <view class="education-points">
- <view class="section-title">
- <image src="/images/icons/edu-point.png"></image>
- <text>今日教育要点</text>
- </view>
- <view wx:for="{{item.educational_points}}" wx:key="name" class="point-item">
- <text class="point-name">{{item.name}}</text>
- <text class="point-desc">{{item.description}}</text>
- </view>
- </view>
- <!-- 景点卡片列表(替换原有attractions-list) -->
- <view class="attractions-list">
- <view class="attraction-card" wx:for="{{item.attractions}}" wx:key="id">
- <image src="{{item.image}}" class="card-image"></image>
- <view class="card-content">
- <view class="card-header">
- <text class="card-title">{{item.name}}</text>
- <text class="card-tag {{item.is_red_tourism?'red':'blue'}}">
- {{item.is_red_tourism?'红色景点':'常规景点'}}
- </text>
- </view>
- <text class="card-desc">{{item.description}}</text>
- <view class="card-meta">
- <text>教育价值: {{item.educational_value}}</text>
- <text>开放时间: {{item.open_hours}}</text>
- </view>
- </view>
- </view>
- </view>
- <!-- 交通信息 -->
- <view class="transport-info">
- <image src="/images/icons/transport.png"></image>
- <text>交通方式: {{item.transport}}</text>
- </view>
- </view>
- </scroll-view>
- <!-- 操作按钮 -->
- <view class="action-buttons">
- <button bindtap="savePlan">保存行程</button>
- <button bindtap="regeneratePlan">重新生成</button>
- </view>
- </view>
- </view>
- </block>
-
- <!-- 景点详情弹窗 -->
- <view
- class="attraction-detail-modal"
- wx:if="{{showAttractionDetail}}"
- catchtap="closeAttractionDetail"
- >
- <view class="detail-content" catchtap="stopPropagation">
- <!-- 顶部图片和标题 -->
- <view class="detail-header">
- <image src="{{currentAttraction.image}}" class="detail-image" mode="aspectFill"></image>
- <view class="detail-title-wrap">
- <text class="detail-title">{{currentAttraction.name}}</text>
- <view class="detail-subtitle">
- <image src="/images/icons/location-small.png" class="detail-icon"></image>
- <text>{{currentAttraction.address}}</text>
- </view>
- </view>
- <image
- src="/images/icons/close-white.png"
- class="close-icon"
- bindtap="closeAttractionDetail"
- ></image>
- </view>
-
- <!-- 详情内容 -->
- <scroll-view scroll-y class="detail-body">
- <!-- 基础信息 -->
- <view class="detail-section">
- <view class="section-header">
- <image src="/images/icons/info-icon.png" class="section-icon"></image>
- <text class="section-title">景点介绍</text>
- </view>
- <text class="section-text">{{currentAttraction.description}}</text>
- </view>
-
- <!-- 历史背景 -->
- <view class="detail-section" wx:if="{{currentAttraction.history}}">
- <view class="section-header">
- <image src="/images/icons/history-icon.png" class="section-icon"></image>
- <text class="section-title">历史背景</text>
- </view>
- <text class="section-text">{{currentAttraction.history}}</text>
- </view>
-
- <!-- 实用信息 -->
- <view class="practical-info">
- <view class="info-row">
- <view class="info-item">
- <image src="/images/icons/time-icon.png" class="info-icon"></image>
- <text>开放时间: {{currentAttraction.open_hours || '暂无信息'}}</text>
- </view>
- <view class="info-item">
- <image src="/images/icons/ticket-icon.png" class="info-icon"></image>
- <text>门票: {{currentAttraction.ticket_price || '免费'}}</text>
- </view>
- </view>
-
- <view class="info-row">
- <view class="info-item">
- <image src="/images/icons/edu-value-icon.png" class="info-icon"></image>
- <text>教育价值: {{currentAttraction.educational_value || '高'}}</text>
- </view>
- <view class="info-item">
- <image src="/images/icons/time-cost-icon.png" class="info-icon"></image>
- <text>建议时长: {{currentAttraction.visit_time || '1-2小时'}}</text>
- </view>
- </view>
- </view>
-
- <!-- 参观建议 -->
- <view class="detail-section">
- <view class="section-header">
- <image src="/images/icons/suggestion-icon.png" class="section-icon"></image>
- <text class="section-title">参观建议</text>
- </view>
- <text class="section-text">{{currentAttraction.recommendation || '暂无特别建议'}}</text>
- </view>
-
- <!-- 参观礼仪 -->
- <view class="detail-section" wx:if="{{currentAttraction.is_red_tourism}}">
- <view class="section-header">
- <image src="/images/icons/etiquette-icon.png" class="section-icon"></image>
- <text class="section-title">参观礼仪</text>
- </view>
- <view class="etiquette-list">
- <view class="etiquette-item">
- <image src="/images/icons/check-circle.png" class="etiquette-icon"></image>
- <text>请保持庄严肃穆</text>
- </view>
- <view class="etiquette-item">
- <image src="/images/icons/check-circle.png" class="etiquette-icon"></image>
- <text>勿大声喧哗</text>
- </view>
- <view class="etiquette-item" wx:if="{{currentAttraction.tags && currentAttraction.tags.includes('memorial')}}">
- <image src="/images/icons/check-circle.png" class="etiquette-icon"></image>
- <text>纪念馆内请勿拍照</text>
- </view>
- </view>
- </view>
- </scroll-view>
-
- <!-- 底部操作 -->
- <view class="detail-footer">
- <button class="nav-btn" bindtap="navigateToAttraction">导航前往</button>
- </view>
- </view>
- </view>
- </view>
|