# 0225剑桥22计科12-VUE **Repository Path**: darkTchr/0225jq22jk12-vue ## Basic Information - **Project Name**: 0225剑桥22计科12-VUE - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2025-02-25 - **Last Updated**: 2025-06-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 结课报告 - 综合项目:城市生活助手 - 核心概念:通过天气数据影响电商商品推荐(如雨天推荐雨具) - 技术栈:Vue CLI + 组件化 + 事件总线EventBus + localStorage  ### 核心功能 1. 智能天气推荐(原天气面板升级) 用户输入城市后: 显示实时天气(温度、降雨概率) 根据天气自动推荐商品: ``` // 推荐逻辑示例 getRecommendations() { if (this.weather.rainProbability > 30) { return this.products.filter(p => p.tags.includes('rain')) } if (this.weather.temp > 28) { return this.products.filter(p => p.tags.includes('summer')) } } ``` 2. 情景化电商展示(原电商系统升级) 商品数据新增tags字段: ``` products: [ { id: 1, name: "折叠雨伞", price: 59, tags: ["rain"], // 新增情景标签 recommendText: "雨天必备" // 推荐话术 }, { id: 2, name: "冰镇可乐", price: 3, tags: ["summer"], recommendText: "解暑佳品" } ] ``` 3. 联动交互设计 当用户查看某城市天气时: 商品列表自动切换为「天气推荐」模式 商品卡片显示推荐理由标签: ```