Jelajahi Sumber

大致页面搭建完成

yang yi 7 bulan lalu
induk
melakukan
b780c6f263

+ 74 - 12
app.js

@@ -1,19 +1,81 @@
 // app.js
+const mockData = require('./utils/mockData.js')
+
 App({
   onLaunch() {
-    // 展示本地存储能力
-    const logs = wx.getStorageSync('logs') || []
-    logs.unshift(Date.now())
-    wx.setStorageSync('logs', logs)
-
-    // 登录
-    wx.login({
-      success: res => {
-        // 发送 res.code 到后台换取 openId, sessionKey, unionId
-      }
-    })
+    console.log('低空药品运输APP启动')
+    
+    // 初始化全局数据
+    this.initGlobalData()
+    
+    // 检查登录状态
+    this.checkLoginStatus()
+  },
+
+  // 初始化全局数据
+  initGlobalData() {
+    // 初始化用户信息
+    const storedUserInfo = wx.getStorageSync('userInfo')
+    if (storedUserInfo) {
+      this.globalData.userInfo = storedUserInfo
+    } else {
+      this.globalData.userInfo = mockData.userInfo
+      wx.setStorageSync('userInfo', mockData.userInfo)
+    }
+
+    // 初始化订单数据
+    const storedOrders = wx.getStorageSync('orders')
+    if (!storedOrders) {
+      wx.setStorageSync('orders', mockData.orders)
+    }
+
+    // 初始化诊断历史
+    const storedDiagnosisHistory = wx.getStorageSync('diagnosisHistory')
+    if (!storedDiagnosisHistory) {
+      wx.setStorageSync('diagnosisHistory', [])
+    }
+  },
+
+  // 检查登录状态
+  checkLoginStatus() {
+    const userInfo = wx.getStorageSync('userInfo')
+    if (!userInfo) {
+      // 可以在这里添加登录逻辑
+      console.log('用户未登录')
+    } else {
+      console.log('用户已登录:', userInfo.name)
+    }
   },
+
+  // 全局方法:更新用户信息
+  updateUserInfo(userInfo) {
+    this.globalData.userInfo = userInfo
+    wx.setStorageSync('userInfo', userInfo)
+  },
+
+  // 全局方法:添加订单
+  addOrder(order) {
+    const orders = wx.getStorageSync('orders') || []
+    orders.unshift(order)
+    wx.setStorageSync('orders', orders)
+    
+    // 更新全局数据
+    this.globalData.orders = orders
+  },
+
+  // 全局方法:添加诊断记录
+  addDiagnosisRecord(record) {
+    const diagnosisHistory = wx.getStorageSync('diagnosisHistory') || []
+    diagnosisHistory.unshift(record)
+    wx.setStorageSync('diagnosisHistory', diagnosisHistory)
+    
+    // 更新全局数据
+    this.globalData.diagnosisHistory = diagnosisHistory
+  },
+
   globalData: {
-    userInfo: null
+    userInfo: null,
+    orders: [],
+    diagnosisHistory: []
   }
 })

+ 36 - 2
app.json

@@ -1,13 +1,47 @@
 {
   "pages": [
     "pages/index/index",
-    "pages/logs/logs"
+    "pages/order/order",
+    "pages/diagnosis/diagnosis",
+    "pages/profile/profile"
   ],
   "window": {
     "navigationBarTextStyle": "black",
-    "navigationBarTitleText": "Weixin",
+    "navigationBarTitleText": "低空药品运输",
     "navigationBarBackgroundColor": "#ffffff"
   },
+  "tabBar": {
+    "color": "#7A7E83",
+    "selectedColor": "#3cc51f",
+    "borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [
+      {
+        "pagePath": "pages/index/index",
+        "iconPath": "images/tab-home.png",
+        "selectedIconPath": "images/tab-home-active.png",
+        "text": "首页"
+      },
+      {
+        "pagePath": "pages/order/order",
+        "iconPath": "images/tab-order.png",
+        "selectedIconPath": "images/tab-order-active.png",
+        "text": "下单"
+      },
+      {
+        "pagePath": "pages/diagnosis/diagnosis",
+        "iconPath": "images/tab-diagnosis.png",
+        "selectedIconPath": "images/tab-diagnosis-active.png",
+        "text": "智能诊断"
+      },
+      {
+        "pagePath": "pages/profile/profile",
+        "iconPath": "images/tab-profile.png",
+        "selectedIconPath": "images/tab-profile-active.png",
+        "text": "我的"
+      }
+    ]
+  },
   "style": "v2",
   "componentFramework": "glass-easel",
   "sitemapLocation": "sitemap.json",

+ 7 - 2
app.wxss

@@ -4,7 +4,12 @@
   display: flex;
   flex-direction: column;
   align-items: center;
-  justify-content: space-between;
-  padding: 200rpx 0;
+  justify-content: flex-start;
+  padding: 0;
   box-sizing: border-box;
+}
+
+page {
+  background-color: #f5f5f5;
+  height: 100%;
 } 

TEMPAT SAMPAH
images/banner1.png


TEMPAT SAMPAH
images/default-avatar.png


TEMPAT SAMPAH
images/diagnosis-icon.png


TEMPAT SAMPAH
images/hospital.png


TEMPAT SAMPAH
images/order-icon.png


TEMPAT SAMPAH
images/price_icon.png


TEMPAT SAMPAH
images/profile-icon.png


TEMPAT SAMPAH
images/tab-diagnosis-active.png


TEMPAT SAMPAH
images/tab-diagnosis.png


TEMPAT SAMPAH
images/tab-home-active.png


TEMPAT SAMPAH
images/tab-home.png


TEMPAT SAMPAH
images/tab-order-active.png


TEMPAT SAMPAH
images/tab-order.png


TEMPAT SAMPAH
images/tab-profile-active.png


TEMPAT SAMPAH
images/tab-profile.png


+ 183 - 0
pages/diagnosis/diagnosis.js

@@ -0,0 +1,183 @@
+// diagnosis.js
+const mockData = require('../../utils/mockData.js')
+
+Page({
+  data: {
+    symptomText: '',
+    commonSymptoms: ['头痛', '发烧', '咳嗽', '流鼻涕', '胃痛', '恶心', '皮肤瘙痒', '关节疼痛'],
+    isDiagnosing: false,
+    diagnosisResult: null,
+    diagnosisHistory: []
+  },
+
+  onLoad() {
+    console.log('智能诊断页面加载完成')
+    // 加载诊断历史
+    this.loadDiagnosisHistory()
+  },
+
+  // 输入症状
+  onSymptomInput(e) {
+    this.setData({
+      symptomText: e.detail.value
+    })
+  },
+
+  // 添加常见症状
+  addSymptom(e) {
+    const symptom = e.currentTarget.dataset.symptom
+    const currentText = this.data.symptomText
+    const newText = currentText ? `${currentText}、${symptom}` : symptom
+    
+    this.setData({
+      symptomText: newText
+    })
+  },
+
+  // 开始诊断
+  startDiagnosis() {
+    if (!this.data.symptomText.trim()) {
+      wx.showToast({
+        title: '请输入症状描述',
+        icon: 'none'
+      })
+      return
+    }
+
+    this.setData({
+      isDiagnosing: true
+    })
+
+    // 模拟AI诊断过程
+    setTimeout(() => {
+      const result = this.analyzeSymptoms(this.data.symptomText)
+      this.setData({
+        isDiagnosing: false,
+        diagnosisResult: result
+      })
+      
+      // 保存到历史记录
+      this.saveToHistory(result)
+    }, 2000)
+  },
+
+  // 分析症状(模拟AI诊断)
+  analyzeSymptoms(symptomText) {
+    const symptoms = symptomText.split(/[、,,。.\s]+/).filter(s => s.trim())
+    
+    // 简单的关键词匹配算法
+    for (const [condition, data] of Object.entries(mockData.aiDiagnosis)) {
+      const matchedSymptoms = data.symptoms.filter(symptom => 
+        symptoms.some(s => s.includes(symptom) || symptom.includes(s))
+      )
+      
+      if (matchedSymptoms.length >= Math.min(2, data.symptoms.length)) {
+        return {
+          condition: condition,
+          diagnosis: data.diagnosis,
+          symptoms: matchedSymptoms,
+          suggestion: data.suggestion,
+          recommendedMedicines: data.recommendedMedicines
+        }
+      }
+    }
+
+    // 如果没有匹配到特定疾病,返回通用建议
+    return {
+      condition: '一般不适',
+      diagnosis: '症状需要进一步观察',
+      symptoms: symptoms,
+      suggestion: '建议多休息,注意饮食,如症状持续或加重请及时就医',
+      recommendedMedicines: []
+    }
+  },
+
+  // 保存诊断记录
+  saveToHistory(result) {
+    const historyItem = {
+      id: Date.now(),
+      date: new Date().toLocaleString(),
+      symptoms: this.data.symptomText,
+      diagnosis: result.diagnosis,
+      condition: result.condition,
+      suggestion: result.suggestion
+    }
+
+    const newHistory = [historyItem, ...this.data.diagnosisHistory].slice(0, 10) // 保留最近10条
+    
+    this.setData({
+      diagnosisHistory: newHistory
+    })
+
+    // 保存到本地存储
+    wx.setStorageSync('diagnosisHistory', newHistory)
+  },
+
+  // 加载诊断历史
+  loadDiagnosisHistory() {
+    const history = wx.getStorageSync('diagnosisHistory') || []
+    this.setData({
+      diagnosisHistory: history
+    })
+  },
+
+  // 查看历史记录
+  viewHistory(e) {
+    const item = e.currentTarget.dataset.item
+    this.setData({
+      diagnosisResult: {
+        diagnosis: item.diagnosis,
+        symptoms: item.symptoms.split(/[、,,。.\s]+/).filter(s => s.trim()),
+        suggestion: item.suggestion,
+        recommendedMedicines: []
+      }
+    })
+  },
+
+  // 重置诊断
+  resetDiagnosis() {
+    this.setData({
+      symptomText: '',
+      diagnosisResult: null
+    })
+  },
+
+  // 保存诊断记录
+  saveDiagnosis() {
+    if (this.data.diagnosisResult) {
+      wx.showToast({
+        title: '已保存到诊断历史',
+        icon: 'success'
+      })
+    }
+  },
+
+  // 导航到药品购买页面
+  navigateToMedicine(e) {
+    const medicineName = e.currentTarget.dataset.medicine
+    wx.showModal({
+      title: '购买药品',
+      content: `是否要购买"${medicineName}"?`,
+      success: (res) => {
+        if (res.confirm) {
+          // 切换到下单页面并搜索该药品
+          wx.switchTab({
+            url: '/pages/order/order'
+          })
+          
+          // 这里可以传递参数到下单页面进行自动搜索
+          setTimeout(() => {
+            const pages = getCurrentPages()
+            const orderPage = pages.find(page => page.route === 'pages/order/order')
+            if (orderPage) {
+              orderPage.setData({
+                currentTab: 1,
+                medicineKeyword: medicineName
+              })
+            }
+          }, 500)
+        }
+      }
+    })
+  }
+})

+ 4 - 0
pages/diagnosis/diagnosis.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "智能诊断",
+  "enablePullDownRefresh": false
+}

+ 135 - 0
pages/diagnosis/diagnosis.wxml

@@ -0,0 +1,135 @@
+<!--diagnosis.wxml-->
+<view class="container">
+  <!-- AI医生介绍 -->
+  <view class="ai-doctor-section">
+    <view class="doctor-avatar">
+      <image class="avatar" src="/images/ai-doctor.png"></image>
+    </view>
+    <view class="doctor-info">
+      <text class="doctor-name">AI医生助手</text>
+      <text class="doctor-desc">基于大数据分析的智能诊断系统</text>
+    </view>
+  </view>
+
+  <!-- 症状输入区域 -->
+  <view class="symptom-section">
+    <view class="section-title">
+      <text>请描述您的症状</text>
+    </view>
+    <view class="input-area">
+      <textarea class="symptom-input" placeholder="例如:头痛、发烧、咳嗽..." 
+                value="{{symptomText}}" bindinput="onSymptomInput" 
+                maxlength="500" show-confirm-bar="false"></textarea>
+      <view class="input-tips">
+        <text class="char-count">{{symptomText.length}}/500</text>
+        <text class="tip-text">请尽量详细描述症状</text>
+      </view>
+    </view>
+  </view>
+
+  <!-- 常见症状快捷输入 -->
+  <view class="quick-symptoms" wx:if="{{!diagnosisResult}}">
+    <view class="section-title">
+      <text>常见症状</text>
+    </view>
+    <view class="symptom-tags">
+      <view class="symptom-tag" wx:for="{{commonSymptoms}}" wx:key="*this" 
+            bindtap="addSymptom" data-symptom="{{item}}">
+        <text>{{item}}</text>
+      </view>
+    </view>
+  </view>
+
+  <!-- 诊断按钮 -->
+  <view class="diagnosis-action" wx:if="{{!diagnosisResult}}">
+    <button class="diagnosis-btn" bindtap="startDiagnosis" disabled="{{!symptomText}}">
+      <text>开始AI诊断</text>
+    </button>
+  </view>
+
+  <!-- 诊断结果 -->
+  <view class="result-section" wx:if="{{diagnosisResult}}">
+    <view class="result-header">
+      <text class="result-title">AI诊断结果</text>
+      <view class="result-status">
+        <text class="status-text">诊断完成</text>
+        <image class="status-icon" src="/images/success-icon.png"></image>
+      </view>
+    </view>
+
+    <!-- 诊断详情 -->
+    <view class="diagnosis-detail">
+      <view class="detail-item">
+        <text class="item-label">初步诊断:</text>
+        <text class="item-value diagnosis-name">{{diagnosisResult.diagnosis}}</text>
+      </view>
+      <view class="detail-item">
+        <text class="item-label">症状匹配:</text>
+        <view class="symptom-match">
+          <text class="match-tag" wx:for="{{diagnosisResult.symptoms}}" wx:key="*this">
+            {{item}}
+          </text>
+        </view>
+      </view>
+      <view class="detail-item">
+        <text class="item-label">专业建议:</text>
+        <text class="item-value suggestion">{{diagnosisResult.suggestion}}</text>
+      </view>
+    </view>
+
+    <!-- 推荐药品 -->
+    <view class="recommend-medicine" wx:if="{{diagnosisResult.recommendedMedicines}}">
+      <view class="section-title">
+        <text>推荐药品</text>
+      </view>
+      <view class="medicine-list">
+        <view class="medicine-item" wx:for="{{diagnosisResult.recommendedMedicines}}" wx:key="*this" 
+              bindtap="navigateToMedicine" data-medicine="{{item}}">
+          <image class="medicine-icon" src="/images/medicine-icon.png"></image>
+          <view class="medicine-info">
+            <text class="medicine-name">{{item}}</text>
+            <text class="medicine-action">立即购买 ></text>
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <!-- 操作按钮 -->
+    <view class="action-buttons">
+      <button class="btn secondary" bindtap="resetDiagnosis">
+        <text>重新诊断</text>
+      </button>
+      <button class="btn primary" bindtap="saveDiagnosis">
+        <text>保存记录</text>
+      </button>
+    </view>
+  </view>
+
+  <!-- 诊断历史 -->
+  <view class="history-section" wx:if="{{diagnosisHistory.length > 0}}">
+    <view class="section-title">
+      <text>诊断历史</text>
+    </view>
+    <view class="history-list">
+      <view class="history-item" wx:for="{{diagnosisHistory}}" wx:key="id">
+        <view class="history-content">
+          <text class="history-date">{{item.date}}</text>
+          <text class="history-symptom">{{item.symptoms}}</text>
+          <text class="history-diagnosis">{{item.diagnosis}}</text>
+        </view>
+        <view class="history-action">
+          <text class="view-btn" bindtap="viewHistory" data-item="{{item}}">查看</text>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 加载状态 -->
+  <view class="loading-section" wx:if="{{isDiagnosing}}">
+    <view class="loading-content">
+      <image class="loading-icon" src="/images/loading.gif"></image>
+      <text class="loading-text">AI医生正在分析中...</text>
+      <text class="loading-desc">请耐心等待,这通常需要几秒钟</text>
+    </view>
+  </view>
+</view>

+ 407 - 0
pages/diagnosis/diagnosis.wxss

@@ -0,0 +1,407 @@
+.container {
+  width: 100%;
+  align-items: stretch;
+  padding: 20rpx;
+  box-sizing: border-box;
+}
+
+.ai-doctor-section {
+  background: white;
+  border-radius: 20rpx;
+  padding: 40rpx 30rpx;
+  display: flex;
+  align-items: center;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.doctor-avatar {
+  margin-right: 25rpx;
+  flex-shrink: 0;
+}
+
+.avatar {
+  width: 100rpx;
+  height: 100rpx;
+  border-radius: 50%;
+}
+
+.doctor-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.doctor-name {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 10rpx;
+}
+
+.doctor-desc {
+  font-size: 24rpx;
+  color: #666;
+}
+
+.symptom-section {
+  background: white;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.section-title {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 20rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+}
+
+.input-area {
+  position: relative;
+}
+
+.symptom-input {
+  width: 100%;
+  min-height: 200rpx;
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  padding: 20rpx;
+  font-size: 28rpx;
+  box-sizing: border-box;
+  color: #333;
+}
+
+.input-tips {
+  display: flex;
+  justify-content: space-between;
+  margin-top: 15rpx;
+}
+
+.char-count {
+  font-size: 22rpx;
+  color: #999;
+}
+
+.tip-text {
+  font-size: 22rpx;
+  color: #666;
+}
+
+.quick-symptoms {
+  background: white;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.symptom-tags {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 20rpx;
+}
+
+.symptom-tag {
+  background: #f0f8ff;
+  border: 1rpx solid #007AFF;
+  color: #007AFF;
+  padding: 15rpx 25rpx;
+  border-radius: 30rpx;
+  font-size: 24rpx;
+  transition: all 0.3s;
+}
+
+.symptom-tag:active {
+  background: #007AFF;
+  color: white;
+}
+
+.diagnosis-action {
+  margin-bottom: 30rpx;
+}
+
+.diagnosis-btn {
+  width: 100%;
+  background: #007AFF;
+  color: white;
+  border: none;
+  border-radius: 50rpx;
+  padding: 30rpx 0;
+  font-size: 32rpx;
+  font-weight: bold;
+  box-shadow: 0 4rpx 15rpx rgba(0, 122, 255, 0.3);
+}
+
+.diagnosis-btn:disabled {
+  background: #ccc;
+  color: #999;
+  box-shadow: none;
+}
+
+.result-section {
+  background: white;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.result-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 30rpx;
+  padding-bottom: 20rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.result-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.result-status {
+  display: flex;
+  align-items: center;
+}
+
+.status-text {
+  font-size: 24rpx;
+  color: #52c41a;
+  margin-right: 10rpx;
+}
+
+.status-icon {
+  width: 32rpx;
+  height: 32rpx;
+}
+
+.diagnosis-detail {
+  margin-bottom: 30rpx;
+}
+
+.detail-item {
+  margin-bottom: 25rpx;
+}
+
+.item-label {
+  font-size: 26rpx;
+  font-weight: bold;
+  color: #333;
+  display: block;
+  margin-bottom: 10rpx;
+}
+
+.item-value {
+  font-size: 28rpx;
+  color: #666;
+  line-height: 1.6;
+}
+
+.diagnosis-name {
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.symptom-match {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 15rpx;
+}
+
+.match-tag {
+  background: #e6f7ff;
+  color: #1890ff;
+  padding: 10rpx 20rpx;
+  border-radius: 20rpx;
+  font-size: 22rpx;
+}
+
+.suggestion {
+  background: #f6ffed;
+  border-left: 4rpx solid #52c41a;
+  padding: 20rpx;
+  border-radius: 8rpx;
+  display: block;
+}
+
+.recommend-medicine {
+  margin-bottom: 30rpx;
+}
+
+.medicine-list {
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  overflow: hidden;
+}
+
+.medicine-item {
+  display: flex;
+  align-items: center;
+  padding: 25rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+  transition: background 0.3s;
+}
+
+.medicine-item:last-child {
+  border-bottom: none;
+}
+
+.medicine-item:active {
+  background: #f0f0f0;
+}
+
+.medicine-icon {
+  width: 60rpx;
+  height: 60rpx;
+  margin-right: 20rpx;
+  flex-shrink: 0;
+}
+
+.medicine-info {
+  flex: 1;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.medicine-name {
+  font-size: 28rpx;
+  color: #333;
+  font-weight: 500;
+}
+
+.medicine-action {
+  font-size: 24rpx;
+  color: #007AFF;
+}
+
+.action-buttons {
+  display: flex;
+  gap: 20rpx;
+  margin-top: 30rpx;
+}
+
+.btn {
+  flex: 1;
+  border-radius: 50rpx;
+  padding: 25rpx 0;
+  font-size: 28rpx;
+  font-weight: bold;
+  border: none;
+}
+
+.btn.secondary {
+  background: #f0f0f0;
+  color: #666;
+}
+
+.btn.primary {
+  background: #007AFF;
+  color: white;
+  box-shadow: 0 4rpx 15rpx rgba(0, 122, 255, 0.3);
+}
+
+.history-section {
+  background: white;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  margin-bottom: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.history-list {
+  display: flex;
+  flex-direction: column;
+}
+
+.history-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.history-item:last-child {
+  border-bottom: none;
+}
+
+.history-content {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.history-date {
+  font-size: 22rpx;
+  color: #999;
+  margin-bottom: 8rpx;
+}
+
+.history-symptom {
+  font-size: 26rpx;
+  color: #333;
+  margin-bottom: 8rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.history-diagnosis {
+  font-size: 24rpx;
+  color: #FF6B35;
+}
+
+.history-action {
+  margin-left: 20rpx;
+}
+
+.view-btn {
+  font-size: 24rpx;
+  color: #007AFF;
+  padding: 10rpx 20rpx;
+}
+
+.loading-section {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(255, 255, 255, 0.95);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 1000;
+}
+
+.loading-content {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.loading-icon {
+  width: 120rpx;
+  height: 120rpx;
+  margin-bottom: 30rpx;
+}
+
+.loading-text {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 15rpx;
+}
+
+.loading-desc {
+  font-size: 24rpx;
+  color: #999;
+}

+ 29 - 36
pages/index/index.js

@@ -1,49 +1,42 @@
 // index.js
-const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0'
+const mockData = require('../../utils/mockData.js')
 
 Page({
   data: {
-    motto: 'Hello World',
-    userInfo: {
-      avatarUrl: defaultAvatarUrl,
-      nickName: '',
-    },
-    hasUserInfo: false,
-    canIUseGetUserProfile: wx.canIUse('getUserProfile'),
-    canIUseNicknameComp: wx.canIUse('input.type.nickname'),
+    banners: mockData.banners,
+    hospitals: mockData.hospitals
   },
-  bindViewTap() {
-    wx.navigateTo({
-      url: '../logs/logs'
-    })
+
+  onLoad() {
+    console.log('首页加载完成')
   },
-  onChooseAvatar(e) {
-    const { avatarUrl } = e.detail
-    const { nickName } = this.data.userInfo
-    this.setData({
-      "userInfo.avatarUrl": avatarUrl,
-      hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
+
+  // 导航到下单页面
+  navigateToOrder() {
+    wx.switchTab({
+      url: '/pages/order/order'
     })
   },
-  onInputChange(e) {
-    const nickName = e.detail.value
-    const { avatarUrl } = this.data.userInfo
-    this.setData({
-      "userInfo.nickName": nickName,
-      hasUserInfo: nickName && avatarUrl && avatarUrl !== defaultAvatarUrl,
+
+  // 导航到智能诊断页面
+  navigateToDiagnosis() {
+    wx.switchTab({
+      url: '/pages/diagnosis/diagnosis'
     })
   },
-  getUserProfile(e) {
-    // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认,开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
-    wx.getUserProfile({
-      desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
-      success: (res) => {
-        console.log(res)
-        this.setData({
-          userInfo: res.userInfo,
-          hasUserInfo: true
-        })
-      }
+
+  // 导航到我的页面
+  navigateToProfile() {
+    wx.switchTab({
+      url: '/pages/profile/profile'
     })
   },
+
+  // 导航到医院详情
+  navigateToHospital(e) {
+    const hospital = e.currentTarget.dataset.hospital
+    wx.navigateTo({
+      url: `/pages/hospital/hospital?id=${hospital.id}`
+    })
+  }
 })

+ 91 - 22
pages/index/index.wxml

@@ -1,27 +1,96 @@
 <!--index.wxml-->
-<scroll-view class="scrollarea" scroll-y type="list">
-  <view class="container">
-    <view class="userinfo">
-      <block wx:if="{{canIUseNicknameComp && !hasUserInfo}}">
-        <button class="avatar-wrapper" open-type="chooseAvatar" bind:chooseavatar="onChooseAvatar">
-          <image class="avatar" src="{{userInfo.avatarUrl}}"></image>
-        </button>
-        <view class="nickname-wrapper">
-          <text class="nickname-label">昵称</text>
-          <input type="nickname" class="nickname-input" placeholder="请输入昵称" bind:change="onInputChange" />
+<view class="container">
+  <!-- 轮播图 -->
+  <swiper class="banner-swiper" indicator-dots="true" autoplay="true" interval="3000" duration="500">
+    <swiper-item wx:for="{{banners}}" wx:key="id">
+      <view class="banner-item">
+        <image class="banner-image" src="{{item.image}}" mode="aspectFill"></image>
+        <view class="banner-content">
+          <text class="banner-title">{{item.title}}</text>
+          <text class="banner-desc">{{item.description}}</text>
         </view>
-      </block>
-      <block wx:elif="{{!hasUserInfo}}">
-        <button wx:if="{{canIUseGetUserProfile}}" bindtap="getUserProfile"> 获取头像昵称 </button>
-        <view wx:else> 请使用2.10.4及以上版本基础库 </view>
-      </block>
-      <block wx:else>
-        <image bindtap="bindViewTap" class="userinfo-avatar" src="{{userInfo.avatarUrl}}" mode="cover"></image>
-        <text class="userinfo-nickname">{{userInfo.nickName}}</text>
-      </block>
+      </view>
+    </swiper-item>
+  </swiper>
+
+  <!-- 功能入口 -->
+  <view class="feature-section">
+    <view class="feature-title">
+      <text>快速服务入口</text>
     </view>
-    <view class="usermotto">
-      <text class="user-motto">{{motto}}</text>
+    <view class="feature-grid">
+      <view class="feature-item" bindtap="navigateToOrder">
+        <image class="feature-icon" src="/images/order-icon.png"></image>
+        <text class="feature-text">下单</text>
+      </view>
+      <view class="feature-item" bindtap="navigateToDiagnosis">
+        <image class="feature-icon" src="/images/diagnosis-icon.png"></image>
+        <text class="feature-text">智能诊断</text>
+      </view>
+      <view class="feature-item" bindtap="navigateToProfile">
+        <image class="feature-icon" src="/images/profile-icon.png"></image>
+        <text class="feature-text">我的</text>
+      </view>
     </view>
   </view>
-</scroll-view>
+
+  <!-- 平台介绍 -->
+  <view class="intro-section">
+    <view class="intro-title">
+      <text>无人机药品配送服务</text>
+    </view>
+    <view class="intro-content">
+      <view class="intro-item">
+        <image class="intro-icon" src="/images/fast-icon.png"></image>
+        <view class="intro-text">
+          <text class="intro-subtitle">快速配送</text>
+          <text class="intro-desc">无人机配送,平均30分钟送达</text>
+        </view>
+      </view>
+      <view class="intro-item">
+        <image class="intro-icon" src="/images/safe-icon.png"></image>
+        <view class="intro-text">
+          <text class="intro-subtitle">安全可靠</text>
+          <text class="intro-desc">专业医疗包装,全程温控监控</text>
+        </view>
+      </view>
+      <view class="intro-item">
+        <image class="intro-icon" src="/images/ai-icon.png"></image>
+        <view class="intro-text">
+          <text class="intro-subtitle">AI智能诊断</text>
+          <text class="intro-desc">专业AI医生为您提供初步诊断建议</text>
+        </view>
+      </view>
+      <view class="intro-item">
+        <image class="intro-icon" src="/images/price-icon.png"></image>
+        <view class="intro-text">
+          <text class="intro-subtitle">药品比价</text>
+          <text class="intro-desc">多家医院药品价格对比,帮您省钱</text>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 合作医院展示 -->
+  <view class="hospital-section">
+    <view class="hospital-title">
+      <text>合作医院</text>
+      <text class="hospital-more" bindtap="navigateToOrder">查看更多 ></text>
+    </view>
+    <scroll-view class="hospital-scroll" scroll-x="true">
+      <view class="hospital-list">
+        <view class="hospital-item" wx:for="{{hospitals}}" wx:key="id" bindtap="navigateToHospital" data-hospital="{{item}}">
+          <image class="hospital-image" src="{{item.image}}" mode="aspectFill"></image>
+          <view class="hospital-info">
+            <text class="hospital-name">{{item.name}}</text>
+            <text class="hospital-address">{{item.address}}</text>
+            <view class="hospital-rating">
+              <text class="rating-text">{{item.rating}}分</text>
+              <text class="distance-text">{{item.distance}}</text>
+            </view>
+          </view>
+        </view>
+      </view>
+    </scroll-view>
+  </view>
+</view>

+ 218 - 37
pages/index/index.wxss

@@ -1,62 +1,243 @@
-/**index.wxss**/
-page {
-  height: 100vh;
+.container {
+  width: 100%;
+  align-items: stretch;
+  padding: 0;
+  box-sizing: border-box;
+}
+
+.banner-swiper {
+  width: 100%;
+  height: 380rpx;
+}
+
+.banner-item {
+  width: 100%;
+  height: 100%;
+  position: relative;
+}
+
+.banner-image {
+  width: 100%;
+  height: 100%;
+}
+
+.banner-content {
+  position: absolute;
+  bottom: 0;
+  left: 0;
+  right: 0;
+  padding: 30rpx;
+  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
+  color: white;
+}
+
+.banner-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  display: block;
+  margin-bottom: 10rpx;
+}
+
+.banner-desc {
+  font-size: 24rpx;
+  opacity: 0.9;
+}
+
+.feature-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.feature-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 30rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+}
+
+.feature-grid {
+  display: flex;
+  justify-content: space-around;
+  flex-wrap: wrap;
+}
+
+.feature-item {
   display: flex;
   flex-direction: column;
+  align-items: center;
+  width: 33.33%;
+  padding: 20rpx 0;
 }
-.scrollarea {
-  flex: 1;
-  overflow-y: hidden;
+
+.feature-icon {
+  width: 100rpx;
+  height: 100rpx;
+  margin-bottom: 15rpx;
 }
 
-.userinfo {
+.feature-text {
+  font-size: 26rpx;
+  color: #333;
+}
+
+.intro-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.intro-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 30rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+}
+
+.intro-content {
   display: flex;
   flex-direction: column;
+}
+
+.intro-item {
+  display: flex;
   align-items: center;
-  color: #aaa;
-  width: 80%;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f0f0f0;
 }
 
-.userinfo-avatar {
-  overflow: hidden;
-  width: 128rpx;
-  height: 128rpx;
-  margin: 20rpx;
-  border-radius: 50%;
+.intro-item:last-child {
+  border-bottom: none;
 }
 
-.usermotto {
-  margin-top: 200px;
+.intro-icon {
+  width: 80rpx;
+  height: 80rpx;
+  margin-right: 25rpx;
+  flex-shrink: 0;
 }
 
-.avatar-wrapper {
-  padding: 0;
-  width: 56px !important;
-  border-radius: 8px;
-  margin-top: 40px;
-  margin-bottom: 40px;
+.intro-text {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
 }
 
-.avatar {
-  display: block;
-  width: 56px;
-  height: 56px;
+.intro-subtitle {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 8rpx;
+}
+
+.intro-desc {
+  font-size: 24rpx;
+  color: #999;
+}
+
+.hospital-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+  margin-bottom: 30rpx;
 }
 
-.nickname-wrapper {
+.hospital-title {
   display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 25rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.hospital-more {
+  font-size: 24rpx;
+  color: #007AFF;
+  font-weight: normal;
+}
+
+.hospital-scroll {
   width: 100%;
-  padding: 16px;
-  box-sizing: border-box;
-  border-top: .5px solid rgba(0, 0, 0, 0.1);
-  border-bottom: .5px solid rgba(0, 0, 0, 0.1);
-  color: black;
+  white-space: nowrap;
 }
 
-.nickname-label {
-  width: 105px;
+.hospital-list {
+  display: inline-flex;
+  padding: 10rpx 0;
 }
 
-.nickname-input {
-  flex: 1;
+.hospital-item {
+  display: inline-flex;
+  flex-direction: column;
+  width: 280rpx;
+  margin-right: 20rpx;
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  overflow: hidden;
+  flex-shrink: 0;
+}
+
+.hospital-item:last-child {
+  margin-right: 0;
+}
+
+.hospital-image {
+  width: 100%;
+  height: 160rpx;
+}
+
+.hospital-info {
+  padding: 20rpx;
+  display: flex;
+  flex-direction: column;
+}
+
+.hospital-name {
+  font-size: 26rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 8rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.hospital-address {
+  font-size: 22rpx;
+  color: #999;
+  margin-bottom: 10rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.hospital-rating {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+}
+
+.rating-text {
+  font-size: 22rpx;
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.distance-text {
+  font-size: 22rpx;
+  color: #007AFF;
 }

+ 209 - 0
pages/order/order.js

@@ -0,0 +1,209 @@
+// order.js
+const mockData = require('../../utils/mockData.js')
+
+Page({
+  data: {
+    currentTab: 0,
+    hospitalKeyword: '',
+    medicineKeyword: '',
+    hospitals: mockData.hospitals,
+    filteredHospitals: mockData.hospitals,
+    priceResults: [],
+    hotMedicines: [
+      { name: '阿莫西林胶囊', minPrice: 24.8 },
+      { name: '布洛芬缓释胶囊', minPrice: 17.5 },
+      { name: '氯雷他定片', minPrice: 30.5 },
+      { name: '奥美拉唑肠溶胶囊', minPrice: 45.0 }
+    ],
+    showCaseModal: false,
+    showMedicineModal: false,
+    selectedHospital: null,
+    selectedCase: null,
+    selectedMedicines: [],
+    totalPrice: 0
+  },
+
+  onLoad() {
+    console.log('下单页面加载完成')
+  },
+
+  // 切换选项卡
+  switchTab(e) {
+    const tab = parseInt(e.currentTarget.dataset.tab)
+    this.setData({
+      currentTab: tab
+    })
+  },
+
+  // 医院搜索
+  onHospitalSearch(e) {
+    const keyword = e.detail.value
+    const filteredHospitals = this.data.hospitals.filter(hospital => 
+      hospital.name.includes(keyword) || hospital.address.includes(keyword)
+    )
+    this.setData({
+      hospitalKeyword: keyword,
+      filteredHospitals: filteredHospitals
+    })
+  },
+
+  // 药品搜索
+  onMedicineSearch(e) {
+    const keyword = e.detail.value
+    this.setData({
+      medicineKeyword: keyword
+    })
+
+    if (keyword && mockData.medicinePrices[keyword]) {
+      this.setData({
+        priceResults: mockData.medicinePrices[keyword]
+      })
+    } else {
+      this.setData({
+        priceResults: []
+      })
+    }
+  },
+
+  // 选择医院
+  selectHospital(e) {
+    const hospital = e.currentTarget.dataset.hospital
+    this.setData({
+      selectedHospital: hospital,
+      showCaseModal: true
+    })
+  },
+
+  // 关闭病例单模态框
+  closeCaseModal() {
+    this.setData({
+      showCaseModal: false,
+      selectedHospital: null
+    })
+  },
+
+  // 选择病例单
+  selectCase(e) {
+    const selectedCase = e.currentTarget.dataset.case
+    // 初始化药品数量
+    const medicines = selectedCase.medicines.map(medicine => ({
+      ...medicine,
+      quantity: 0
+    }))
+    
+    this.setData({
+      selectedCase: { ...selectedCase, medicines },
+      showCaseModal: false,
+      showMedicineModal: true
+    })
+  },
+
+  // 关闭药品模态框
+  closeMedicineModal() {
+    this.setData({
+      showMedicineModal: false,
+      selectedCase: null,
+      selectedMedicines: [],
+      totalPrice: 0
+    })
+  },
+
+  // 增加药品数量
+  increaseQuantity(e) {
+    const medicine = e.currentTarget.dataset.medicine
+    const medicines = this.data.selectedCase.medicines.map(item => {
+      if (item.id === medicine.id) {
+        const quantity = (item.quantity || 0) + 1
+        return { ...item, quantity }
+      }
+      return item
+    })
+
+    const totalPrice = medicines.reduce((total, item) => total + (item.price * (item.quantity || 0)), 0)
+    
+    this.setData({
+      'selectedCase.medicines': medicines,
+      totalPrice: totalPrice
+    })
+  },
+
+  // 减少药品数量
+  decreaseQuantity(e) {
+    const medicine = e.currentTarget.dataset.medicine
+    const medicines = this.data.selectedCase.medicines.map(item => {
+      if (item.id === medicine.id && (item.quantity || 0) > 0) {
+        const quantity = item.quantity - 1
+        return { ...item, quantity }
+      }
+      return item
+    })
+
+    const totalPrice = medicines.reduce((total, item) => total + (item.price * (item.quantity || 0)), 0)
+    
+    this.setData({
+      'selectedCase.medicines': medicines,
+      totalPrice: totalPrice
+    })
+  },
+
+  // 确认下单
+  confirmOrder() {
+    const selectedMedicines = this.data.selectedCase.medicines
+      .filter(item => item.quantity > 0)
+      .map(item => ({
+        name: item.name,
+        price: item.price,
+        quantity: item.quantity
+      }))
+
+    if (selectedMedicines.length === 0) {
+      wx.showToast({
+        title: '请选择至少一种药品',
+        icon: 'none'
+      })
+      return
+    }
+
+    // 模拟下单成功
+    wx.showModal({
+      title: '下单成功',
+      content: `订单总价:¥${this.data.totalPrice}\n药品将尽快通过无人机配送`,
+      showCancel: false,
+      success: () => {
+        this.closeMedicineModal()
+        // 可以跳转到订单详情页面
+      }
+    })
+  },
+
+  // 选择热门药品
+  selectHotMedicine(e) {
+    const medicineName = e.currentTarget.dataset.medicine
+    this.setData({
+      medicineKeyword: medicineName
+    })
+    
+    if (mockData.medicinePrices[medicineName]) {
+      this.setData({
+        priceResults: mockData.medicinePrices[medicineName]
+      })
+    }
+  },
+
+  // 通过价格选择医院
+  selectByPrice(e) {
+    const priceInfo = e.currentTarget.dataset.price
+    wx.showModal({
+      title: '确认下单',
+      content: `确认在${priceInfo.hospital}购买${this.data.medicineKeyword},价格:¥${priceInfo.price}`,
+      success: (res) => {
+        if (res.confirm) {
+          wx.showToast({
+            title: '下单成功',
+            icon: 'success'
+          })
+        }
+      }
+    })
+  }
+})

+ 4 - 0
pages/order/order.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "下单",
+  "enablePullDownRefresh": false
+}

+ 137 - 0
pages/order/order.wxml

@@ -0,0 +1,137 @@
+<!--order.wxml-->
+<view class="container">
+  <!-- 选项卡切换 -->
+  <view class="tab-bar">
+    <view class="tab-item {{currentTab === 0 ? 'active' : ''}}" bindtap="switchTab" data-tab="0">
+      <text>医院选择</text>
+    </view>
+    <view class="tab-item {{currentTab === 1 ? 'active' : ''}}" bindtap="switchTab" data-tab="1">
+      <text>药品比价</text>
+    </view>
+  </view>
+
+  <!-- 医院选择页面 -->
+  <view class="tab-content" wx:if="{{currentTab === 0}}">
+    <!-- 搜索框 -->
+    <view class="search-section">
+      <view class="search-box">
+        <image class="search-icon" src="/images/search-icon.png"></image>
+        <input class="search-input" placeholder="搜索医院名称" bindinput="onHospitalSearch" value="{{hospitalKeyword}}" />
+      </view>
+    </view>
+
+    <!-- 医院列表 -->
+    <view class="hospital-list">
+      <view class="hospital-item" wx:for="{{filteredHospitals}}" wx:key="id" bindtap="selectHospital" data-hospital="{{item}}">
+        <image class="hospital-image" src="{{item.image}}" mode="aspectFill"></image>
+        <view class="hospital-info">
+          <text class="hospital-name">{{item.name}}</text>
+          <text class="hospital-address">{{item.address}}</text>
+          <view class="hospital-details">
+            <text class="rating">{{item.rating}}分</text>
+            <text class="distance">{{item.distance}}</text>
+            <text class="case-count">{{item.cases.length}}个病例单</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 药品比价页面 -->
+  <view class="tab-content" wx:if="{{currentTab === 1}}">
+    <!-- 搜索框 -->
+    <view class="search-section">
+      <view class="search-box">
+        <image class="search-icon" src="/images/search-icon.png"></image>
+        <input class="search-input" placeholder="输入药品名称" bindinput="onMedicineSearch" value="{{medicineKeyword}}" />
+      </view>
+    </view>
+
+    <!-- 药品比价结果 -->
+    <view class="price-comparison" wx:if="{{medicineKeyword}}">
+      <view class="medicine-title">
+        <text>药品:{{medicineKeyword}}</text>
+      </view>
+      <view class="price-list">
+        <view class="price-item" wx:for="{{priceResults}}" wx:key="hospital" bindtap="selectByPrice" data-price="{{item}}">
+          <view class="hospital-info">
+            <text class="hospital-name">{{item.hospital}}</text>
+            <text class="price">¥{{item.price}}</text>
+          </view>
+          <view class="action">
+            <text class="select-btn">选择</text>
+          </view>
+        </view>
+      </view>
+    </view>
+
+    <!-- 热门药品推荐 -->
+    <view class="hot-medicines" wx:if="{{!medicineKeyword}}">
+      <view class="section-title">
+        <text>热门药品</text>
+      </view>
+      <view class="medicine-grid">
+        <view class="medicine-item" wx:for="{{hotMedicines}}" wx:key="name" bindtap="selectHotMedicine" data-medicine="{{item.name}}">
+          <text class="medicine-name">{{item.name}}</text>
+          <text class="medicine-price">¥{{item.minPrice}}起</text>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 病例单选择模态框 -->
+  <view class="modal" wx:if="{{showCaseModal}}">
+    <view class="modal-content">
+      <view class="modal-header">
+        <text class="modal-title">选择病例单</text>
+        <text class="modal-close" bindtap="closeCaseModal">×</text>
+      </view>
+      <view class="case-list">
+        <view class="case-item" wx:for="{{selectedHospital.cases}}" wx:key="id" bindtap="selectCase" data-case="{{item}}">
+          <view class="case-info">
+            <text class="case-date">{{item.date}}</text>
+            <text class="case-doctor">{{item.doctor}} - {{item.department}}</text>
+            <text class="case-diagnosis">诊断:{{item.diagnosis}}</text>
+          </view>
+          <view class="case-arrow">
+            <text>></text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 药品选择模态框 -->
+  <view class="modal" wx:if="{{showMedicineModal}}">
+    <view class="modal-content">
+      <view class="modal-header">
+        <text class="modal-title">选择药品</text>
+        <text class="modal-close" bindtap="closeMedicineModal">×</text>
+      </view>
+      <view class="medicine-list">
+        <view class="medicine-item" wx:for="{{selectedCase.medicines}}" wx:key="id">
+          <view class="medicine-info">
+            <text class="medicine-name">{{item.name}}</text>
+            <text class="medicine-price">¥{{item.price}}</text>
+          </view>
+          <view class="medicine-action">
+            <text class="quantity-control">
+              <text class="btn minus" bindtap="decreaseQuantity" data-medicine="{{item}}">-</text>
+              <text class="quantity">{{item.quantity || 0}}</text>
+              <text class="btn plus" bindtap="increaseQuantity" data-medicine="{{item}}">+</text>
+            </text>
+          </view>
+        </view>
+      </view>
+      <view class="modal-footer">
+        <view class="total-price">
+          <text>总计:¥{{totalPrice}}</text>
+        </view>
+        <view class="action-buttons">
+          <button class="btn cancel" bindtap="closeMedicineModal">取消</button>
+          <button class="btn confirm" bindtap="confirmOrder">确认下单</button>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>

+ 458 - 0
pages/order/order.wxss

@@ -0,0 +1,458 @@
+.container {
+  width: 100%;
+  align-items: stretch;
+  padding: 0;
+  box-sizing: border-box;
+  background-color: #f5f5f5;
+}
+
+.tab-bar {
+  display: flex;
+  background: white;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.tab-item {
+  flex: 1;
+  text-align: center;
+  padding: 30rpx 0;
+  font-size: 28rpx;
+  color: #666;
+  position: relative;
+  transition: all 0.3s;
+}
+
+.tab-item.active {
+  color: #007AFF;
+  font-weight: bold;
+}
+
+.tab-item.active::after {
+  content: '';
+  position: absolute;
+  bottom: 0;
+  left: 50%;
+  transform: translateX(-50%);
+  width: 60rpx;
+  height: 6rpx;
+  background: #007AFF;
+  border-radius: 3rpx;
+}
+
+.tab-content {
+  flex: 1;
+  overflow-y: auto;
+}
+
+.search-section {
+  padding: 20rpx;
+  background: white;
+}
+
+.search-box {
+  display: flex;
+  align-items: center;
+  background: #f8f8f8;
+  border-radius: 50rpx;
+  padding: 15rpx 25rpx;
+}
+
+.search-icon {
+  width: 32rpx;
+  height: 32rpx;
+  margin-right: 15rpx;
+}
+
+.search-input {
+  flex: 1;
+  font-size: 28rpx;
+  color: #333;
+}
+
+.hospital-list {
+  padding: 20rpx;
+}
+
+.hospital-item {
+  display: flex;
+  background: white;
+  border-radius: 20rpx;
+  padding: 25rpx;
+  margin-bottom: 20rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+  transition: all 0.3s;
+}
+
+.hospital-item:active {
+  transform: scale(0.98);
+  box-shadow: 0 1rpx 5rpx rgba(0, 0, 0, 0.1);
+}
+
+.hospital-image {
+  width: 160rpx;
+  height: 120rpx;
+  border-radius: 15rpx;
+  margin-right: 20rpx;
+  flex-shrink: 0;
+}
+
+.hospital-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+}
+
+.hospital-name {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 8rpx;
+}
+
+.hospital-address {
+  font-size: 24rpx;
+  color: #999;
+  margin-bottom: 10rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.hospital-details {
+  display: flex;
+  gap: 20rpx;
+  font-size: 22rpx;
+}
+
+.rating {
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.distance {
+  color: #007AFF;
+}
+
+.case-count {
+  color: #52c41a;
+}
+
+.price-comparison {
+  padding: 20rpx;
+}
+
+.medicine-title {
+  background: white;
+  border-radius: 20rpx;
+  padding: 25rpx;
+  margin-bottom: 20rpx;
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.price-list {
+  background: white;
+  border-radius: 20rpx;
+  overflow: hidden;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.price-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+  transition: background 0.3s;
+}
+
+.price-item:last-child {
+  border-bottom: none;
+}
+
+.price-item:active {
+  background: #f8f8f8;
+}
+
+.price-item .hospital-info {
+  display: flex;
+  flex-direction: column;
+}
+
+.price-item .hospital-name {
+  font-size: 28rpx;
+  color: #333;
+  margin-bottom: 8rpx;
+}
+
+.price {
+  font-size: 32rpx;
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.select-btn {
+  background: #007AFF;
+  color: white;
+  padding: 12rpx 30rpx;
+  border-radius: 30rpx;
+  font-size: 24rpx;
+}
+
+.hot-medicines {
+  padding: 20rpx;
+}
+
+.section-title {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 20rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+}
+
+.medicine-grid {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 20rpx;
+}
+
+.medicine-grid .medicine-item {
+  width: calc(50% - 10rpx);
+  background: white;
+  border-radius: 15rpx;
+  padding: 25rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  transition: all 0.3s;
+}
+
+.medicine-grid .medicine-item:active {
+  transform: scale(0.95);
+}
+
+.medicine-grid .medicine-name {
+  font-size: 26rpx;
+  color: #333;
+  margin-bottom: 10rpx;
+  text-align: center;
+}
+
+.medicine-grid .medicine-price {
+  font-size: 24rpx;
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.modal {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 1000;
+}
+
+.modal-content {
+  background: white;
+  border-radius: 20rpx;
+  width: 90%;
+  max-height: 80%;
+  overflow: hidden;
+  display: flex;
+  flex-direction: column;
+}
+
+.modal-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 30rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.modal-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.modal-close {
+  font-size: 48rpx;
+  color: #999;
+  line-height: 1;
+  padding: 0 10rpx;
+}
+
+.case-list {
+  flex: 1;
+  overflow-y: auto;
+  padding: 20rpx;
+}
+
+.case-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx;
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  margin-bottom: 15rpx;
+  transition: all 0.3s;
+}
+
+.case-item:active {
+  background: #f0f0f0;
+}
+
+.case-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.case-date {
+  font-size: 22rpx;
+  color: #999;
+  margin-bottom: 8rpx;
+}
+
+.case-doctor {
+  font-size: 26rpx;
+  color: #333;
+  margin-bottom: 8rpx;
+}
+
+.case-diagnosis {
+  font-size: 24rpx;
+  color: #FF6B35;
+}
+
+.case-arrow {
+  font-size: 32rpx;
+  color: #ccc;
+  margin-left: 15rpx;
+}
+
+.modal-content .medicine-list {
+  flex: 1;
+  overflow-y: auto;
+  padding: 20rpx;
+  background: transparent;
+}
+
+.modal-content .medicine-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx;
+  background: white;
+  border-radius: 15rpx;
+  margin-bottom: 15rpx;
+  box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
+}
+
+.modal-content .medicine-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.modal-content .medicine-name {
+  font-size: 28rpx;
+  color: #333;
+  margin-bottom: 8rpx;
+}
+
+.modal-content .medicine-price {
+  font-size: 26rpx;
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.medicine-action {
+  display: flex;
+  align-items: center;
+}
+
+.quantity-control {
+  display: flex;
+  align-items: center;
+  gap: 15rpx;
+}
+
+.quantity-control .btn {
+  width: 50rpx;
+  height: 50rpx;
+  border-radius: 50%;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  font-size: 32rpx;
+  font-weight: bold;
+}
+
+.quantity-control .minus {
+  background: #f0f0f0;
+  color: #666;
+}
+
+.quantity-control .plus {
+  background: #007AFF;
+  color: white;
+}
+
+.quantity {
+  font-size: 28rpx;
+  color: #333;
+  min-width: 40rpx;
+  text-align: center;
+}
+
+.modal-footer {
+  padding: 20rpx 30rpx;
+  border-top: 1rpx solid #f0f0f0;
+  background: white;
+}
+
+.total-price {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #FF6B35;
+  margin-bottom: 20rpx;
+  text-align: right;
+}
+
+.action-buttons {
+  display: flex;
+  gap: 20rpx;
+}
+
+.action-buttons .btn {
+  flex: 1;
+  border-radius: 50rpx;
+  padding: 25rpx 0;
+  font-size: 28rpx;
+  font-weight: bold;
+  border: none;
+}
+
+.action-buttons .cancel {
+  background: #f0f0f0;
+  color: #666;
+}
+
+.action-buttons .confirm {
+  background: #007AFF;
+  color: white;
+}

+ 288 - 0
pages/profile/profile.js

@@ -0,0 +1,288 @@
+// profile.js
+const mockData = require('../../utils/mockData.js')
+
+Page({
+  data: {
+    userInfo: mockData.userInfo,
+    orderStats: {
+      total: 0,
+      delivering: 0,
+      completed: 0
+    },
+    recentOrders: [],
+    diagnosisStats: {
+      total: 0,
+      recent: 0
+    },
+    recentDiagnosis: [],
+    showFingerprintModal: false,
+    showFaceModal: false
+  },
+
+  onLoad() {
+    console.log('我的页面加载完成')
+    this.loadUserData()
+  },
+
+  onShow() {
+    // 每次页面显示时刷新数据
+    this.loadUserData()
+  },
+
+  // 加载用户数据
+  loadUserData() {
+    // 加载订单数据
+    const orders = mockData.orders
+    const orderStats = {
+      total: orders.length,
+      delivering: orders.filter(order => order.status === '配送中').length,
+      completed: orders.filter(order => order.status === '已完成').length
+    }
+    
+    const recentOrders = orders.slice(0, 3) // 显示最近3个订单
+
+    // 加载诊断记录
+    const diagnosisHistory = wx.getStorageSync('diagnosisHistory') || []
+    const oneWeekAgo = new Date(Date.now() - 7 * 24 * 60 * 60 * 1000)
+    const recentDiagnosis = diagnosisHistory.filter(item => 
+      new Date(item.date) > oneWeekAgo
+    ).slice(0, 3)
+
+    const diagnosisStats = {
+      total: diagnosisHistory.length,
+      recent: recentDiagnosis.length
+    }
+
+    this.setData({
+      orderStats: orderStats,
+      recentOrders: recentOrders,
+      diagnosisStats: diagnosisStats,
+      recentDiagnosis: recentDiagnosis
+    })
+  },
+
+  // 切换指纹验证
+  toggleFingerprint(e) {
+    const enabled = e.detail.value
+    if (enabled) {
+      this.setData({
+        showFingerprintModal: true
+      })
+    } else {
+      this.disableFingerprint()
+    }
+  },
+
+  // 关闭指纹验证模态框
+  closeFingerprintModal() {
+    this.setData({
+      showFingerprintModal: false,
+      'userInfo.fingerprintRegistered': false
+    })
+  },
+
+  // 确认指纹验证
+  confirmFingerprint() {
+    // 模拟指纹验证过程
+    wx.showLoading({
+      title: '验证中...',
+    })
+
+    setTimeout(() => {
+      wx.hideLoading()
+      this.setData({
+        showFingerprintModal: false,
+        'userInfo.fingerprintRegistered': true
+      })
+      
+      wx.showToast({
+        title: '指纹验证成功',
+        icon: 'success'
+      })
+    }, 2000)
+  },
+
+  // 禁用指纹验证
+  disableFingerprint() {
+    this.setData({
+      'userInfo.fingerprintRegistered': false
+    })
+    wx.showToast({
+      title: '已关闭指纹验证',
+      icon: 'success'
+    })
+  },
+
+  // 切换人脸识别
+  toggleFaceRecognition(e) {
+    const enabled = e.detail.value
+    if (enabled) {
+      this.setData({
+        showFaceModal: true
+      })
+    } else {
+      this.disableFaceRecognition()
+    }
+  },
+
+  // 关闭人脸识别模态框
+  closeFaceModal() {
+    this.setData({
+      showFaceModal: false,
+      'userInfo.faceRegistered': false
+    })
+  },
+
+  // 确认人脸识别
+  confirmFaceRecognition() {
+    // 模拟人脸识别过程
+    wx.showLoading({
+      title: '识别中...',
+    })
+
+    setTimeout(() => {
+      wx.hideLoading()
+      this.setData({
+        showFaceModal: false,
+        'userInfo.faceRegistered': true
+      })
+      
+      wx.showToast({
+        title: '人脸识别成功',
+        icon: 'success'
+      })
+    }, 3000)
+  },
+
+  // 禁用人脸识别
+  disableFaceRecognition() {
+    this.setData({
+      'userInfo.faceRegistered': false
+    })
+    wx.showToast({
+      title: '已关闭人脸识别',
+      icon: 'success'
+    })
+  },
+
+  // 切换病历共享
+  toggleMedicalRecords(e) {
+    const enabled = e.detail.value
+    this.setData({
+      'userInfo.medicalRecordsShared': enabled
+    })
+    
+    if (enabled) {
+      wx.showModal({
+        title: '病历共享授权',
+        content: '您确认要授权医院查看您的病历信息吗?',
+        success: (res) => {
+          if (!res.confirm) {
+            this.setData({
+              'userInfo.medicalRecordsShared': false
+            })
+          }
+        }
+      })
+    } else {
+      wx.showToast({
+        title: '已关闭病历共享',
+        icon: 'success'
+      })
+    }
+  },
+
+  // 查看病历记录
+  viewMedicalRecords() {
+    wx.showModal({
+      title: '病历记录',
+      content: '这里将显示您的完整病历记录信息',
+      showCancel: false
+    })
+  },
+
+  // 查看订单
+  viewOrders(e) {
+    const status = e.currentTarget.dataset.status
+    wx.showModal({
+      title: '订单列表',
+      content: `这里将显示${status}的订单列表`,
+      showCancel: false
+    })
+  },
+
+  // 查看订单详情
+  viewOrderDetail(e) {
+    const order = e.currentTarget.dataset.order
+    wx.showModal({
+      title: '订单详情',
+      content: `医院:${order.hospital}\n药品:${order.medicines.join('、')}\n总价:¥${order.totalPrice}\n状态:${order.status}`,
+      showCancel: false
+    })
+  },
+
+  // 查看诊断历史
+  viewDiagnosisHistory() {
+    wx.navigateTo({
+      url: '/pages/diagnosis/diagnosis'
+    })
+  },
+
+  // 查看诊断详情
+  viewDiagnosisDetail(e) {
+    const diagnosis = e.currentTarget.dataset.diagnosis
+    wx.showModal({
+      title: '诊断详情',
+      content: `症状:${diagnosis.symptoms}\n诊断:${diagnosis.diagnosis}\n建议:${diagnosis.suggestion}`,
+      showCancel: false
+    })
+  },
+
+  // 导航到设置页面
+  navigateToSetting(e) {
+    const type = e.currentTarget.dataset.type
+    const titles = {
+      'privacy': '隐私设置',
+      'about': '关于我们',
+      'help': '帮助中心'
+    }
+    
+    wx.showModal({
+      title: titles[type],
+      content: `这里将显示${titles[type]}的相关内容`,
+      showCancel: false
+    })
+  },
+
+  // 联系客服
+  contactSupport() {
+    wx.showModal({
+      title: '联系客服',
+      content: '客服电话:400-123-4567\n工作时间:9:00-18:00',
+      showCancel: false
+    })
+  },
+
+  // 退出登录
+  logout() {
+    wx.showModal({
+      title: '确认退出',
+      content: '您确定要退出登录吗?',
+      success: (res) => {
+        if (res.confirm) {
+          // 模拟退出登录
+          wx.showToast({
+            title: '已退出登录',
+            icon: 'success',
+            success: () => {
+              setTimeout(() => {
+                // 这里可以跳转到登录页面或重新加载用户数据
+                this.loadUserData()
+              }, 1500)
+            }
+          })
+        }
+      }
+    })
+  }
+})

+ 4 - 0
pages/profile/profile.json

@@ -0,0 +1,4 @@
+{
+  "navigationBarTitleText": "我的",
+  "enablePullDownRefresh": false
+}

+ 222 - 0
pages/profile/profile.wxml

@@ -0,0 +1,222 @@
+<!--profile.wxml-->
+<wxs module="utils">
+module.exports = {
+  getStatusClass: function(status) {
+    if (status === '配送中') return 'delivering';
+    if (status === '已完成') return 'completed';
+    if (status === '待支付') return 'pending';
+    return '';
+  }
+}
+</wxs>
+<view class="container">
+  <!-- 用户信息头部 -->
+  <view class="user-header">
+    <view class="user-avatar">
+      <image class="avatar" src="{{userInfo.avatar}}"></image>
+    </view>
+    <view class="user-info">
+      <text class="user-name">{{userInfo.name}}</text>
+      <text class="user-phone">{{userInfo.phone}}</text>
+    </view>
+    <view class="user-status">
+      <text class="status-text">已认证</text>
+    </view>
+  </view>
+
+  <!-- 身份验证模块 -->
+  <view class="auth-section">
+    <view class="section-title">
+      <text>身份验证</text>
+    </view>
+    <view class="auth-list">
+      <view class="auth-item">
+        <view class="auth-info">
+          <image class="auth-icon" src="/images/fingerprint-icon.png"></image>
+          <view class="auth-text">
+            <text class="auth-title">指纹验证</text>
+            <text class="auth-desc">用于快速身份验证</text>
+          </view>
+        </view>
+        <switch class="auth-switch" checked="{{userInfo.fingerprintRegistered}}" 
+                bindchange="toggleFingerprint" color="#007AFF"></switch>
+      </view>
+      <view class="auth-item">
+        <view class="auth-info">
+          <image class="auth-icon" src="/images/face-icon.png"></image>
+          <view class="auth-text">
+            <text class="auth-title">人脸识别</text>
+            <text class="auth-desc">用于高级安全验证</text>
+          </view>
+        </view>
+        <switch class="auth-switch" checked="{{userInfo.faceRegistered}}" 
+                bindchange="toggleFaceRecognition" color="#007AFF"></switch>
+      </view>
+    </view>
+  </view>
+
+  <!-- 病历共享设置 -->
+  <view class="medical-section">
+    <view class="section-title">
+      <text>病历管理</text>
+    </view>
+    <view class="medical-item">
+      <view class="medical-info">
+        <image class="medical-icon" src="/images/medical-record-icon.png"></image>
+        <view class="medical-text">
+          <text class="medical-title">病历共享授权</text>
+          <text class="medical-desc">允许医院查看您的病历信息</text>
+        </view>
+      </view>
+      <switch class="medical-switch" checked="{{userInfo.medicalRecordsShared}}" 
+              bindchange="toggleMedicalRecords" color="#007AFF"></switch>
+    </view>
+    <view class="medical-action" bindtap="viewMedicalRecords">
+      <text class="action-text">查看病历记录</text>
+      <text class="action-arrow">></text>
+    </view>
+  </view>
+
+  <!-- 订单管理 -->
+  <view class="order-section">
+    <view class="section-title">
+      <text>订单管理</text>
+    </view>
+    <view class="order-stats">
+      <view class="stat-item" bindtap="viewOrders" data-status="全部">
+        <text class="stat-number">{{orderStats.total}}</text>
+        <text class="stat-label">全部订单</text>
+      </view>
+      <view class="stat-item" bindtap="viewOrders" data-status="配送中">
+        <text class="stat-number">{{orderStats.delivering}}</text>
+        <text class="stat-label">配送中</text>
+      </view>
+      <view class="stat-item" bindtap="viewOrders" data-status="已完成">
+        <text class="stat-number">{{orderStats.completed}}</text>
+        <text class="stat-label">已完成</text>
+      </view>
+    </view>
+    <view class="recent-orders">
+      <view class="recent-title">
+        <text>最近订单</text>
+        <text class="view-all" bindtap="viewOrders">查看全部 ></text>
+      </view>
+      <view class="order-list">
+        <view class="order-item" wx:for="{{recentOrders}}" wx:key="id" bindtap="viewOrderDetail" data-order="{{item}}">
+          <view class="order-info">
+            <text class="order-hospital">{{item.hospital}}</text>
+            <text class="order-date">{{item.date}}</text>
+            <text class="order-medicines">{{item.medicines.join('、')}}</text>
+          </view>
+          <view class="order-status">
+            <text class="status-badge {{utils.getStatusClass(item.status)}}">{{item.status}}</text>
+            <text class="order-price">¥{{item.totalPrice}}</text>
+          </view>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 诊断记录 -->
+  <view class="diagnosis-section">
+    <view class="section-title">
+      <text>诊断记录</text>
+    </view>
+    <view class="diagnosis-stats">
+      <view class="stat-item" bindtap="viewDiagnosisHistory">
+        <text class="stat-number">{{diagnosisStats.total}}</text>
+        <text class="stat-label">诊断记录</text>
+      </view>
+      <view class="stat-item" bindtap="viewDiagnosisHistory">
+        <text class="stat-number">{{diagnosisStats.recent}}</text>
+        <text class="stat-label">最近7天</text>
+      </view>
+    </view>
+    <view class="recent-diagnosis">
+      <view class="diagnosis-item" wx:for="{{recentDiagnosis}}" wx:key="id" bindtap="viewDiagnosisDetail" data-diagnosis="{{item}}">
+        <view class="diagnosis-info">
+          <text class="diagnosis-date">{{item.date}}</text>
+          <text class="diagnosis-symptoms">{{item.symptoms}}</text>
+          <text class="diagnosis-result">{{item.diagnosis}}</text>
+        </view>
+        <view class="diagnosis-arrow">
+          <text>></text>
+        </view>
+      </view>
+    </view>
+  </view>
+
+  <!-- 设置与帮助 -->
+  <view class="settings-section">
+    <view class="section-title">
+      <text>设置与帮助</text>
+    </view>
+    <view class="settings-list">
+      <view class="setting-item" bindtap="navigateToSetting" data-type="privacy">
+        <image class="setting-icon" src="/images/privacy-icon.png"></image>
+        <text class="setting-text">隐私设置</text>
+        <text class="setting-arrow">></text>
+      </view>
+      <view class="setting-item" bindtap="navigateToSetting" data-type="about">
+        <image class="setting-icon" src="/images/about-icon.png"></image>
+        <text class="setting-text">关于我们</text>
+        <text class="setting-arrow">></text>
+      </view>
+      <view class="setting-item" bindtap="navigateToSetting" data-type="help">
+        <image class="setting-icon" src="/images/help-icon.png"></image>
+        <text class="setting-text">帮助中心</text>
+        <text class="setting-arrow">></text>
+      </view>
+      <view class="setting-item" bindtap="contactSupport">
+        <image class="setting-icon" src="/images/support-icon.png"></image>
+        <text class="setting-text">联系客服</text>
+        <text class="setting-arrow">></text>
+      </view>
+    </view>
+  </view>
+
+  <!-- 退出登录 -->
+  <view class="logout-section">
+    <button class="logout-btn" bindtap="logout">
+      <text>退出登录</text>
+    </button>
+  </view>
+
+  <!-- 指纹验证模态框 -->
+  <view class="modal" wx:if="{{showFingerprintModal}}">
+    <view class="modal-content">
+      <view class="modal-header">
+        <text class="modal-title">指纹验证</text>
+        <text class="modal-close" bindtap="closeFingerprintModal">×</text>
+      </view>
+      <view class="modal-body">
+        <image class="fingerprint-icon" src="/images/fingerprint-scan.png"></image>
+        <text class="modal-text">请将手指放在指纹传感器上</text>
+        <text class="modal-desc">用于快速身份验证</text>
+      </view>
+      <view class="modal-footer">
+        <button class="btn cancel" bindtap="closeFingerprintModal">取消</button>
+        <button class="btn confirm" bindtap="confirmFingerprint">验证</button>
+      </view>
+    </view>
+  </view>
+
+  <!-- 人脸识别模态框 -->
+  <view class="modal" wx:if="{{showFaceModal}}">
+    <view class="modal-content">
+      <view class="modal-header">
+        <text class="modal-title">人脸识别</text>
+        <text class="modal-close" bindtap="closeFaceModal">×</text>
+      </view>
+      <view class="modal-body">
+        <image class="face-icon" src="/images/face-scan.png"></image>
+        <text class="modal-text">请将面部对准摄像头</text>
+        <text class="modal-desc">用于高级安全验证</text>
+      </view>
+      <view class="modal-footer">
+        <button class="btn cancel" bindtap="closeFaceModal">取消</button>
+        <button class="btn confirm" bindtap="confirmFaceRecognition">开始识别</button>
+      </view>
+    </view>
+  </view>
+</view>

+ 538 - 0
pages/profile/profile.wxss

@@ -0,0 +1,538 @@
+.container {
+  width: 100%;
+  align-items: stretch;
+  padding: 0;
+  box-sizing: border-box;
+  background-color: #f5f5f5;
+}
+
+.user-header {
+  background: linear-gradient(135deg, #007AFF 0%, #00D4FF 100%);
+  padding: 60rpx 30rpx 40rpx;
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+
+.user-avatar {
+  margin-right: 25rpx;
+}
+
+.avatar {
+  width: 120rpx;
+  height: 120rpx;
+  border-radius: 50%;
+  border: 4rpx solid rgba(255, 255, 255, 0.3);
+}
+
+.user-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.user-name {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: white;
+  margin-bottom: 10rpx;
+}
+
+.user-phone {
+  font-size: 26rpx;
+  color: rgba(255, 255, 255, 0.8);
+}
+
+.user-status {
+  background: rgba(255, 255, 255, 0.2);
+  padding: 8rpx 20rpx;
+  border-radius: 20rpx;
+}
+
+.status-text {
+  font-size: 22rpx;
+  color: white;
+}
+
+.auth-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.section-title {
+  font-size: 28rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 20rpx;
+  padding-left: 10rpx;
+  border-left: 6rpx solid #007AFF;
+}
+
+.auth-list {
+  display: flex;
+  flex-direction: column;
+}
+
+.auth-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.auth-item:last-child {
+  border-bottom: none;
+}
+
+.auth-info {
+  display: flex;
+  align-items: center;
+  flex: 1;
+}
+
+.auth-icon {
+  width: 50rpx;
+  height: 50rpx;
+  margin-right: 20rpx;
+}
+
+.auth-text {
+  display: flex;
+  flex-direction: column;
+}
+
+.auth-title {
+  font-size: 28rpx;
+  color: #333;
+  margin-bottom: 5rpx;
+}
+
+.auth-desc {
+  font-size: 22rpx;
+  color: #999;
+}
+
+.auth-switch {
+  transform: scale(0.8);
+}
+
+.medical-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.medical-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.medical-info {
+  display: flex;
+  align-items: center;
+  flex: 1;
+}
+
+.medical-icon {
+  width: 50rpx;
+  height: 50rpx;
+  margin-right: 20rpx;
+}
+
+.medical-text {
+  display: flex;
+  flex-direction: column;
+}
+
+.medical-title {
+  font-size: 28rpx;
+  color: #333;
+  margin-bottom: 5rpx;
+}
+
+.medical-desc {
+  font-size: 22rpx;
+  color: #999;
+}
+
+.medical-switch {
+  transform: scale(0.8);
+}
+
+.medical-action {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 25rpx 0;
+}
+
+.action-text {
+  font-size: 28rpx;
+  color: #007AFF;
+}
+
+.action-arrow {
+  font-size: 28rpx;
+  color: #ccc;
+}
+
+.order-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.order-stats {
+  display: flex;
+  justify-content: space-around;
+  padding: 20rpx 0;
+  margin-bottom: 20rpx;
+}
+
+.stat-item {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  flex: 1;
+}
+
+.stat-number {
+  font-size: 36rpx;
+  font-weight: bold;
+  color: #007AFF;
+  margin-bottom: 10rpx;
+}
+
+.stat-label {
+  font-size: 22rpx;
+  color: #666;
+}
+
+.recent-orders {
+  margin-top: 20rpx;
+}
+
+.recent-title {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  margin-bottom: 20rpx;
+  font-size: 26rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.view-all {
+  font-size: 24rpx;
+  color: #007AFF;
+  font-weight: normal;
+}
+
+.order-list {
+  display: flex;
+  flex-direction: column;
+}
+
+.order-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20rpx;
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  margin-bottom: 15rpx;
+}
+
+.order-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.order-hospital {
+  font-size: 26rpx;
+  color: #333;
+  font-weight: bold;
+  margin-bottom: 8rpx;
+}
+
+.order-date {
+  font-size: 22rpx;
+  color: #999;
+  margin-bottom: 8rpx;
+}
+
+.order-medicines {
+  font-size: 24rpx;
+  color: #666;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.order-status {
+  display: flex;
+  flex-direction: column;
+  align-items: flex-end;
+  margin-left: 15rpx;
+}
+
+.status-badge {
+  font-size: 22rpx;
+  padding: 5rpx 15rpx;
+  border-radius: 20rpx;
+  margin-bottom: 8rpx;
+}
+
+.status-badge.delivering {
+  background: #e6f7ff;
+  color: #1890ff;
+}
+
+.status-badge.completed {
+  background: #f6ffed;
+  color: #52c41a;
+}
+
+.status-badge.pending {
+  background: #fff7e6;
+  color: #fa8c16;
+}
+
+.order-price {
+  font-size: 26rpx;
+  color: #FF6B35;
+  font-weight: bold;
+}
+
+.diagnosis-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.diagnosis-stats {
+  display: flex;
+  justify-content: space-around;
+  padding: 20rpx 0;
+  margin-bottom: 20rpx;
+}
+
+.recent-diagnosis {
+  display: flex;
+  flex-direction: column;
+}
+
+.diagnosis-item {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 20rpx;
+  background: #f8f8f8;
+  border-radius: 15rpx;
+  margin-bottom: 15rpx;
+}
+
+.diagnosis-info {
+  flex: 1;
+  display: flex;
+  flex-direction: column;
+}
+
+.diagnosis-date {
+  font-size: 22rpx;
+  color: #999;
+  margin-bottom: 8rpx;
+}
+
+.diagnosis-symptoms {
+  font-size: 26rpx;
+  color: #333;
+  margin-bottom: 8rpx;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  white-space: nowrap;
+}
+
+.diagnosis-result {
+  font-size: 24rpx;
+  color: #FF6B35;
+}
+
+.diagnosis-arrow {
+  font-size: 32rpx;
+  color: #ccc;
+  margin-left: 15rpx;
+}
+
+.settings-section {
+  background: white;
+  margin: 20rpx;
+  border-radius: 20rpx;
+  padding: 30rpx;
+  box-shadow: 0 2rpx 10rpx rgba(0, 0, 0, 0.05);
+}
+
+.settings-list {
+  display: flex;
+  flex-direction: column;
+}
+
+.setting-item {
+  display: flex;
+  align-items: center;
+  padding: 25rpx 0;
+  border-bottom: 1rpx solid #f0f0f0;
+  transition: background 0.3s;
+}
+
+.setting-item:last-child {
+  border-bottom: none;
+}
+
+.setting-item:active {
+  background: #f8f8f8;
+}
+
+.setting-icon {
+  width: 40rpx;
+  height: 40rpx;
+  margin-right: 20rpx;
+}
+
+.setting-text {
+  flex: 1;
+  font-size: 28rpx;
+  color: #333;
+}
+
+.setting-arrow {
+  font-size: 28rpx;
+  color: #ccc;
+}
+
+.logout-section {
+  padding: 30rpx 20rpx;
+  margin-bottom: 30rpx;
+}
+
+.logout-btn {
+  width: 100%;
+  background: white;
+  color: #FF6B35;
+  border: 1rpx solid #FF6B35;
+  border-radius: 50rpx;
+  padding: 28rpx 0;
+  font-size: 28rpx;
+  font-weight: bold;
+}
+
+.logout-btn:active {
+  background: #fff5f0;
+}
+
+.modal {
+  position: fixed;
+  top: 0;
+  left: 0;
+  right: 0;
+  bottom: 0;
+  background: rgba(0, 0, 0, 0.5);
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  z-index: 1000;
+}
+
+.modal-content {
+  background: white;
+  border-radius: 20rpx;
+  width: 85%;
+  overflow: hidden;
+}
+
+.modal-header {
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+  padding: 30rpx;
+  border-bottom: 1rpx solid #f0f0f0;
+}
+
+.modal-title {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+}
+
+.modal-close {
+  font-size: 48rpx;
+  color: #999;
+  line-height: 1;
+  padding: 0 10rpx;
+}
+
+.modal-body {
+  padding: 50rpx 30rpx;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+
+.fingerprint-icon,
+.face-icon {
+  width: 200rpx;
+  height: 200rpx;
+  margin-bottom: 30rpx;
+}
+
+.modal-text {
+  font-size: 32rpx;
+  font-weight: bold;
+  color: #333;
+  margin-bottom: 15rpx;
+}
+
+.modal-desc {
+  font-size: 24rpx;
+  color: #999;
+  text-align: center;
+}
+
+.modal-footer {
+  display: flex;
+  padding: 20rpx 30rpx 30rpx;
+  gap: 20rpx;
+}
+
+.modal-footer .btn {
+  flex: 1;
+  border-radius: 50rpx;
+  padding: 25rpx 0;
+  font-size: 28rpx;
+  font-weight: bold;
+  border: none;
+}
+
+.modal-footer .cancel {
+  background: #f0f0f0;
+  color: #666;
+}
+
+.modal-footer .confirm {
+  background: #007AFF;
+  color: white;
+}

+ 185 - 0
utils/mockData.js

@@ -0,0 +1,185 @@
+const mockData = {
+  // 医院数据
+  hospitals: [
+    {
+      id: 1,
+      name: "北京协和医院",
+      address: "北京市东城区帅府园1号",
+      distance: "3.5km",
+      rating: 4.8,
+      image: "/images/hospital.png",
+      cases: [
+        {
+          id: 1,
+          date: "2024-01-15",
+          doctor: "张医生",
+          department: "内科",
+          diagnosis: "上呼吸道感染",
+          medicines: [
+            { id: 1, name: "阿莫西林胶囊", price: 25.5, stock: true },
+            { id: 2, name: "布洛芬缓释胶囊", price: 18.0, stock: true }
+          ]
+        },
+        {
+          id: 2,
+          date: "2024-02-20",
+          doctor: "李医生",
+          department: "皮肤科",
+          diagnosis: "过敏性皮炎",
+          medicines: [
+            { id: 3, name: "氯雷他定片", price: 32.0, stock: true },
+            { id: 4, name: "氢化可的松乳膏", price: 28.5, stock: true }
+          ]
+        }
+      ]
+    },
+    {
+      id: 2,
+      name: "上海瑞金医院",
+      address: "上海市黄浦区瑞金二路197号",
+      distance: "5.2km",
+      rating: 4.7,
+      image: "/images/hospital.png",
+      cases: [
+        {
+          id: 3,
+          date: "2024-01-10",
+          doctor: "王医生",
+          department: "消化科",
+          diagnosis: "急性胃炎",
+          medicines: [
+            { id: 5, name: "奥美拉唑肠溶胶囊", price: 45.0, stock: true },
+            { id: 6, name: "铝碳酸镁咀嚼片", price: 22.5, stock: true }
+          ]
+        }
+      ]
+    },
+    {
+      id: 3,
+      name: "广州中山医院",
+      address: "广州市越秀区中山二路58号",
+      distance: "7.8km",
+      rating: 4.6,
+      image: "/images/hospital.png",
+      cases: [
+        {
+          id: 4,
+          date: "2024-03-01",
+          doctor: "陈医生",
+          department: "骨科",
+          diagnosis: "软组织损伤",
+          medicines: [
+            { id: 7, name: "云南白药气雾剂", price: 38.0, stock: true },
+            { id: 8, name: "双氯芬酸钠凝胶", price: 26.5, stock: true }
+          ]
+        }
+      ]
+    }
+  ],
+
+  // 药品比价数据
+  medicinePrices: {
+    "阿莫西林胶囊": [
+      { hospital: "北京协和医院", price: 25.5 },
+      { hospital: "上海瑞金医院", price: 26.0 },
+      { hospital: "广州中山医院", price: 24.8 }
+    ],
+    "布洛芬缓释胶囊": [
+      { hospital: "北京协和医院", price: 18.0 },
+      { hospital: "上海瑞金医院", price: 17.5 },
+      { hospital: "广州中山医院", price: 19.0 }
+    ],
+    "氯雷他定片": [
+      { hospital: "北京协和医院", price: 32.0 },
+      { hospital: "上海瑞金医院", price: 30.5 },
+      { hospital: "广州中山医院", price: 33.0 }
+    ]
+  },
+
+  // AI诊断数据
+  aiDiagnosis: {
+    "感冒": {
+      symptoms: ["流鼻涕", "咳嗽", "发烧", "头痛"],
+      diagnosis: "上呼吸道感染",
+      suggestion: "建议多休息,多喝水,可服用感冒药",
+      recommendedMedicines: ["阿莫西林胶囊", "布洛芬缓释胶囊"]
+    },
+    "胃痛": {
+      symptoms: ["胃部不适", "恶心", "食欲不振"],
+      diagnosis: "急性胃炎",
+      suggestion: "建议清淡饮食,避免辛辣刺激食物",
+      recommendedMedicines: ["奥美拉唑肠溶胶囊", "铝碳酸镁咀嚼片"]
+    },
+    "皮肤过敏": {
+      symptoms: ["皮肤瘙痒", "红疹", "皮肤干燥"],
+      diagnosis: "过敏性皮炎",
+      suggestion: "建议避免接触过敏原,保持皮肤清洁",
+      recommendedMedicines: ["氯雷他定片", "氢化可的松乳膏"]
+    }
+  },
+
+  // 用户数据
+  userInfo: {
+    name: "张三",
+    phone: "138****1234",
+    avatar: "/images/default-avatar.png",
+    fingerprintRegistered: false,
+    faceRegistered: false,
+    medicalRecordsShared: false
+  },
+
+  // 订单数据
+  orders: [
+    {
+      id: 1,
+      hospital: "北京协和医院",
+      medicines: ["阿莫西林胶囊", "布洛芬缓释胶囊"],
+      totalPrice: 43.5,
+      status: "已完成",
+      date: "2024-03-01",
+      droneTracking: {
+        status: "已送达",
+        steps: ["订单确认", "药品准备", "无人机起飞", "配送中", "已送达"]
+      }
+    },
+    {
+      id: 2,
+      hospital: "上海瑞金医院",
+      medicines: ["奥美拉唑肠溶胶囊"],
+      totalPrice: 45.0,
+      status: "配送中",
+      date: "2024-03-05",
+      droneTracking: {
+        status: "配送中",
+        steps: ["订单确认", "药品准备", "无人机起飞", "配送中", "待送达"]
+      }
+    }
+  ],
+
+  // 首页轮播图数据
+  banners: [
+    {
+      id: 1,
+      title: "无人机药品配送服务",
+      description: "快速、安全、便捷的药品配送",
+      image: "/images/banner1.png",
+      video: "/videos/delivery.mp4"
+    },
+    {
+      id: 2,
+      title: "AI智能诊断",
+      description: "专业AI医生为您提供初步诊断",
+      image: "/images/banner1.png",
+      video: "/videos/ai_diagnosis.mp4"
+    },
+    {
+      id: 3,
+      title: "药品比价服务",
+      description: "多家医院药品价格对比",
+      image: "/images/banner1.png",
+      video: "/videos/price_comparison.mp4"
+    }
+  ]
+};
+
+module.exports = mockData;