Răsfoiți Sursa

first commit

2202204934 8 luni în urmă
părinte
comite
46b8b414ef
36 a modificat fișierele cu 1530 adăugiri și 219 ștergeri
  1. 26 27
      README.md
  2. BIN
      XXX项目小组-AGI全栈开发大作业报告(模板本).doc
  3. 83 142
      package-lock.json
  4. 7 6
      package.json
  5. 17 0
      src/app/ai-assistant/ai-assistant-routing.module.ts
  6. 18 0
      src/app/ai-assistant/ai-assistant.module.ts
  7. 56 0
      src/app/ai-assistant/ai-assistant.page.html
  8. 81 0
      src/app/ai-assistant/ai-assistant.page.scss
  9. 17 0
      src/app/ai-assistant/ai-assistant.page.spec.ts
  10. 150 0
      src/app/ai-assistant/ai-assistant.page.ts
  11. 27 1
      src/app/app-routing.module.ts
  12. 2 2
      src/app/app.component.ts
  13. 2 2
      src/app/app.module.ts
  14. 17 0
      src/app/auth/auth-routing.module.ts
  15. 20 0
      src/app/auth/auth.module.ts
  16. 52 0
      src/app/auth/auth.page.html
  17. 18 0
      src/app/auth/auth.page.scss
  18. 17 0
      src/app/auth/auth.page.spec.ts
  19. 96 0
      src/app/auth/auth.page.ts
  20. 139 0
      src/app/find/find.page.scss
  21. 17 0
      src/app/profile-edit/profile-edit-routing.module.ts
  22. 20 0
      src/app/profile-edit/profile-edit.module.ts
  23. 51 0
      src/app/profile-edit/profile-edit.page.html
  24. 145 0
      src/app/profile-edit/profile-edit.page.scss
  25. 17 0
      src/app/profile-edit/profile-edit.page.spec.ts
  26. 61 0
      src/app/profile-edit/profile-edit.page.ts
  27. 16 0
      src/app/services/user.service.spec.ts
  28. 87 0
      src/app/services/user.service.ts
  29. 2 0
      src/app/tab1/tab1-routing.module.ts
  30. 38 3
      src/app/tab1/tab1.page.html
  31. 117 6
      src/app/tab1/tab1.page.scss
  32. 100 26
      src/app/tab1/tab1.page.ts
  33. 2 2
      src/app/tab4/tab4.page.html
  34. 1 1
      src/app/tab4/tab4.page.scss
  35. 10 0
      src/app/tab4/tab4.page.ts
  36. 1 1
      src/app/tabs/tabs-routing.module.ts

+ 26 - 27
README.md

@@ -1,22 +1,21 @@
 二手类交易平台App产品策划书
 # 产品介绍
-产品名称:金淘拼
-产品代码:jtp
+产品名称:淘宝宝
 产品Logan
-金淘拼,智选二手,链接AGI未来,拼出超值新体验!
+淘宝宝,智选二手,链接AGI未来,拼出超值新体验!
 基础功能
 随时随地根据提示作诗
 根据诗文内容配图
 产品简介(200字)
 
-在数字时代的浪潮中,金淘拼应运而生,作为一款融合先进人工智能(AGI)技术的二手交易平台,我们致力于为每一位用户带来前所未有的交易体验。金淘拼不仅是一个简单的买卖市场,更是智能、高效、安全的二手商品交流空间。利用先进的人工智能算法,金淘拼能够智能分析用户的浏览历史和偏好,为您精准推送符合需求的二手商品。无论是寻找心仪已久的电子产品、时尚服饰,还是探索独特的手工艺品、书籍文献,金淘拼都能让每一次滑动屏幕都充满惊喜。
+在数字时代的浪潮中,淘宝宝应运而生,作为一款融合先进人工智能(AGI)技术的二手交易平台,我们致力于为每一位用户带来前所未有的交易体验。淘宝宝不仅是一个简单的买卖市场,更是智能、高效、安全的二手商品交流空间。利用先进的人工智能算法,淘宝宝能够智能分析用户的浏览历史和偏好,为您精准推送符合需求的二手商品。无论是寻找心仪已久的电子产品、时尚服饰,还是探索独特的手工艺品、书籍文献,淘宝宝都能让每一次滑动屏幕都充满惊喜。
 # 背景分析
 ## 政策背景
 
 [产品简简介]请您根据中国政策发展,来思考下该项目政策背景以及有哪些方面的政策支持?
-循环经济与可持续发展:近年来,中国政府大力倡导循环经济和可持续发展理念,鼓励资源的再利用和节约。在这一背景下,二手商品市场的发展得到了前所未有的重视和支持。金淘拼作为一款专注于二手商品交易的APP,符合国家政策导向,有利于推动循环经济的发展。
-消费升级与消费观念转变:随着社会经济的发展和居民收入水平的提高,消费者对于商品的需求不再仅仅局限于新品,越来越多的人开始关注性价比和环保理念,愿意选择二手商品。这种消费观念的转变为金淘拼等二手交易平台提供了广阔的市场空间。
-数字经济与互联网+:中国政府高度重视数字经济的发展,积极推动“互联网+”行动计划。金淘拼作为一款融合人工智能技术的二手交易平台,充分利用互联网和大数据优势,提升了交易效率和用户体验,符合国家政策鼓励的方向。
+循环经济与可持续发展:近年来,中国政府大力倡导循环经济和可持续发展理念,鼓励资源的再利用和节约。在这一背景下,二手商品市场的发展得到了前所未有的重视和支持。淘宝宝作为一款专注于二手商品交易的APP,符合国家政策导向,有利于推动循环经济的发展。
+消费升级与消费观念转变:随着社会经济的发展和居民收入水平的提高,消费者对于商品的需求不再仅仅局限于新品,越来越多的人开始关注性价比和环保理念,愿意选择二手商品。这种消费观念的转变为淘宝宝等二手交易平台提供了广阔的市场空间。
+数字经济与互联网+:中国政府高度重视数字经济的发展,积极推动“互联网+”行动计划。淘宝宝作为一款融合人工智能技术的二手交易平台,充分利用互联网和大数据优势,提升了交易效率和用户体验,符合国家政策鼓励的方向。
 
 ## 行业背景
 
@@ -24,8 +23,8 @@
 2024闲鱼平台赚钱的市场有多大?答案是无限的!
 市场规模与增长潜力
 创业机会无处不在
-2024-2030年中国二手商品交易平台行业调查与市场年度调研
-随着人工智能技术的不断发展,特别是在二手交易平台领域的应用,二手交易平台也逐渐展现出巨大的潜力和发展空间。金淘拼作为一个结合了很多功能的产品,具有在二手交易平台领域进行创新的潜力。
+2024-2025年中国二手商品交易平台行业调查与市场年度调研
+随着人工智能技术的不断发展,特别是在二手交易平台领域的应用,二手交易平台也逐渐展现出巨大的潜力和发展空间。淘宝宝作为一个结合了很多功能的产品,具有在二手交易平台领域进行创新的潜力。
 
 二手交易平台行业分析及市场分析总结
 
@@ -37,44 +36,44 @@
 ## 社会背景
 
 [产品简简介]请您根据分析下社会中对该产品的需求潜力和相关的社会痛点问题。
-金淘拼:融合便捷、信任与价值的潜力解析及社会痛点解决方案
+淘宝宝:融合便捷、信任与价值的潜力解析及社会痛点解决方案
 
-资源高效流通与环保倡导需求:随着社会对可持续发展的重视,金淘拼平台以其独特的二手商品交易模式,促进了资源的有效再利用,减少了废弃物产生,积极响应了环保号召。它满足了人们对于资源高效流通和环境保护的期待,推动了绿色消费文化的普及。
+资源高效流通与环保倡导需求:随着社会对可持续发展的重视,淘宝宝平台以其独特的二手商品交易模式,促进了资源的有效再利用,减少了废弃物产生,积极响应了环保号召。它满足了人们对于资源高效流通和环境保护的期待,推动了绿色消费文化的普及。
 
-个性化购物与精准匹配需求:在消费者追求个性化和差异化消费的今天,金淘拼利用先进的大数据分析和人工智能技术,为用户提供个性化的商品推荐和精准的购物匹配服务。这不仅提升了用户的购物体验,也帮助卖家更有效地触达目标客户群体,实现了双赢的局面。
+个性化购物与精准匹配需求:在消费者追求个性化和差异化消费的今天,淘宝宝利用先进的大数据分析和人工智能技术,为用户提供个性化的商品推荐和精准的购物匹配服务。这不仅提升了用户的购物体验,也帮助卖家更有效地触达目标客户群体,实现了双赢的局面。
 
-经济实惠与性价比追求:面对经济压力和生活成本的上升,消费者更加倾向于寻找性价比高的购物渠道。金淘拼平台汇聚了大量价格亲民的二手商品,让用户在不牺牲品质的前提下,享受到更加经济实惠的购物体验。这种价值导向满足了广大消费者对性价比的追求。
+经济实惠与性价比追求:面对经济压力和生活成本的上升,消费者更加倾向于寻找性价比高的购物渠道。淘宝宝平台汇聚了大量价格亲民的二手商品,让用户在不牺牲品质的前提下,享受到更加经济实惠的购物体验。这种价值导向满足了广大消费者对性价比的追求。
 
-信任构建与安全保障需求:在二手交易领域,信任是交易成功的基石。金淘拼深知这一点,因此构建了完善的信用评价体系、实名认证机制和交易保障服务。这些措施有效降低了交易风险,增强了用户之间的信任感,为用户提供了一个安全、可靠的交易环境。
+信任构建与安全保障需求:在二手交易领域,信任是交易成功的基石。淘宝宝深知这一点,因此构建了完善的信用评价体系、实名认证机制和交易保障服务。这些措施有效降低了交易风险,增强了用户之间的信任感,为用户提供了一个安全、可靠的交易环境。
 
-综上所述,金淘拼作为融合了便捷性、信任感和高性价比的创新二手交易平台,精准对接了社会对于资源高效流通、个性化购物、经济实惠和交易安全等多方面的需求。通过不断优化平台功能、提升用户体验和加强安全保障措施,金淘拼有望在未来成为二手交易领域的佼佼者,为用户带来更加优质、便捷的购物体验,并为社会贡献更多的环保价值。
+综上所述,淘宝宝作为融合了便捷性、信任感和高性价比的创新二手交易平台,精准对接了社会对于资源高效流通、个性化购物、经济实惠和交易安全等多方面的需求。通过不断优化平台功能、提升用户体验和加强安全保障措施,淘宝宝有望在未来成为二手交易领域的佼佼者,为用户带来更加优质、便捷的购物体验,并为社会贡献更多的环保价值。
 
 # 需求分析
 ## 用户分析(围绕不同身份的用户故事展开)
 
 [产品简介]请您帮我思考一下,有哪些具有代表性的用户群体,是我们产品的潜在用户。
-作为二手交易平台的金淘拼,其潜在用户群体可以涵盖多个具有代表性的群体,这些群体基于不同的需求和动机使用平台进行二手商品的买卖。以下是一些具有代表性的用户群体:
+作为二手交易平台的淘宝宝,其潜在用户群体可以涵盖多个具有代表性的群体,这些群体基于不同的需求和动机使用平台进行二手商品的买卖。以下是一些具有代表性的用户群体:
 
 环保与节俭意识强的消费者:
 这类用户重视环保,倾向于通过二手交易减少浪费,同时追求性价比高的消费方式。他们相信通过购买二手商品可以既满足自身需求,又对环境产生积极影响。
 学生群体:
-学生通常预算有限,但又需要满足学习、生活和娱乐的多样化需求。金淘拼上的二手书籍、电子产品、学习资料等对他们来说具有很高的吸引力,既经济又实用。
+学生通常预算有限,但又需要满足学习、生活和娱乐的多样化需求。淘宝宝上的二手书籍、电子产品、学习资料等对他们来说具有很高的吸引力,既经济又实用。
 搬家或迁居人群:
-在搬家或迁居过程中,人们往往会面临大量不再需要但又仍有价值的物品处理难题。金淘拼为他们提供了一个便捷的渠道,可以将这些物品转售给需要的人,同时也为他们自己节省空间和成本。
+在搬家或迁居过程中,人们往往会面临大量不再需要但又仍有价值的物品处理难题。淘宝宝为他们提供了一个便捷的渠道,可以将这些物品转售给需要的人,同时也为他们自己节省空间和成本。
 收藏爱好者与复古潮流追随者:
-这类用户对特定物品有深厚的情感或兴趣,如古董、艺术品、复古服饰等。金淘拼为他们提供了一个寻找稀有或独特二手商品的平台,满足他们的收藏或个性化需求。
+这类用户对特定物品有深厚的情感或兴趣,如古董、艺术品、复古服饰等。淘宝宝为他们提供了一个寻找稀有或独特二手商品的平台,满足他们的收藏或个性化需求。
 时尚与潮流追求者:
-随着时尚潮流的快速变化,许多人希望跟上潮流但又不想为短暂流行的物品支付高昂的价格。金淘拼上的二手时尚单品、配饰等为他们提供了一个经济实惠的选择。
+随着时尚潮流的快速变化,许多人希望跟上潮流但又不想为短暂流行的物品支付高昂的价格。淘宝宝上的二手时尚单品、配饰等为他们提供了一个经济实惠的选择。
 数码产品与科技爱好者:
-数码产品和科技设备更新换代迅速,许多用户在追求最新款的同时,也会选择将旧设备出售以回血。金淘拼为这类用户提供了一个高效的交易平台,让他们能够轻松买卖二手数码产品。
+数码产品和科技设备更新换代迅速,许多用户在追求最新款的同时,也会选择将旧设备出售以回血。淘宝宝为这类用户提供了一个高效的交易平台,让他们能够轻松买卖二手数码产品。
 家庭主妇/夫与家庭管理者:
-家庭主妇/夫和家庭管理者通常需要负责家庭物品的采购和管理。金淘拼上的二手家居用品、儿童玩具等可以为他们节省家庭开支,同时满足家庭生活的各种需求。
-这些用户群体基于各自的需求和动机,构成了金淘拼的潜在用户基础。通过深入了解这些群体的特点和需求,金淘拼可以制定更加精准的营销策略和服务方案,提升用户体验和平台竞争力。
+家庭主妇/夫和家庭管理者通常需要负责家庭物品的采购和管理。淘宝宝上的二手家居用品、儿童玩具等可以为他们节省家庭开支,同时满足家庭生活的各种需求。
+这些用户群体基于各自的需求和动机,构成了淘宝宝的潜在用户基础。通过深入了解这些群体的特点和需求,淘宝宝可以制定更加精准的营销策略和服务方案,提升用户体验和平台竞争力。
 
 ## 痛点分析
 
 [产品简介][用户分析]请你针对有代表性的用户群体,深度分析下他们的痛点需求,共性需求及差异化需求。 当针对具有代表性的用户群体进行深度分析时,可以考虑他们的痛点需求、共性需求和差异化需求
-针对二手交易平台金淘拼的代表性用户群体,我们可以从痛点需求、共性需求和差异化需求三个方面进行深入分析。以下是对这些用户群体的详细分析:
+针对二手交易平台淘宝宝的代表性用户群体,我们可以从痛点需求、共性需求和差异化需求三个方面进行深入分析。以下是对这些用户群体的详细分析:
 
 一、环保与节俭意识强的消费者
 痛点需求:
@@ -154,12 +153,12 @@
 
 品牌偏好:部分用户可能对特定品牌有偏好。
 限量版与独特款式:追求限量版或独特款式的二手商品。
-综上所述,不同用户群体在二手交易中的需求存在共性和差异。金淘拼作为二手交易平台,应深入了解这些需求,并针对性地优化平台功能和服务,以提升用户体验和平台竞争力。
+综上所述,不同用户群体在二手交易中的需求存在共性和差异。淘宝宝作为二手交易平台,应深入了解这些需求,并针对性地优化平台功能和服务,以提升用户体验和平台竞争力。
 
 ## 功能分析
 
 [产品简介][用户分析][痛点需求]请您帮我策划该App应该具备的核心功能模块,体现App的商业价值及社会价值。
-针对二手交易平台金淘拼App,为了体现其商业价值和社会价值,以下是一系列核心功能模块的策划建议:
+针对二手交易平台淘宝宝App,为了体现其商业价值和社会价值,以下是一系列核心功能模块的策划建议:
 
 1. 商品发布与展示模块
 核心功能:允许卖家轻松上传商品照片、视频、详细描述、价格、新旧程度等信息,并提供分类标签和搜索关键词功能,以便买家快速找到感兴趣的商品。
@@ -189,7 +188,7 @@
 核心功能:利用大数据和人工智能技术分析用户行为、交易数据等信息,为用户提供个性化商品推荐和精准营销服务。
 商业价值:提高用户满意度和购买转化率;通过精准广告投放和数据分析服务实现盈利。
 社会价值:优化用户体验,提升交易效率;为平台运营提供决策支持。
-综上所述,金淘拼App通过构建这些核心功能模块,不仅能够实现商业价值(如增加用户粘性、提升转化率、实现盈利等),还能够体现社会价值(如促进资源循环利用、推动环保公益事业发展等),从而构建一个既具有商业价值又充满社会责任感的二手交易平台。
+综上所述,淘宝宝App通过构建这些核心功能模块,不仅能够实现商业价值(如增加用户粘性、提升转化率、实现盈利等),还能够体现社会价值(如促进资源循环利用、推动环保公益事业发展等),从而构建一个既具有商业价值又充满社会责任感的二手交易平台。
 
 # 竞品分析
 参考文档:https://www.woshipm.com/evaluating/4812192.html 

BIN
XXX项目小组-AGI全栈开发大作业报告(模板本).doc


+ 83 - 142
package-lock.json

@@ -16,12 +16,13 @@
         "@angular/platform-browser": "^18.0.0",
         "@angular/platform-browser-dynamic": "^18.0.0",
         "@angular/router": "^18.0.0",
-        "@capacitor/app": "6.0.0",
-        "@capacitor/core": "6.1.0",
-        "@capacitor/haptics": "6.0.0",
-        "@capacitor/keyboard": "6.0.1",
-        "@capacitor/status-bar": "6.0.0",
+        "@capacitor/app": "7.0.1",
+        "@capacitor/core": "7.2.0",
+        "@capacitor/haptics": "7.0.1",
+        "@capacitor/keyboard": "7.0.1",
+        "@capacitor/status-bar": "7.0.1",
         "@ionic/angular": "^8.0.0",
+        "fmode-ng": "^0.0.82",
         "ionicons": "^7.0.0",
         "parse": "^5.3.0",
         "rxjs": "~7.8.0",
@@ -480,6 +481,7 @@
       "resolved": "https://registry.npmmirror.com/@angular/cli/-/cli-18.0.7.tgz",
       "integrity": "sha512-CHnpI6d6MpXFsx3750jN4IX3oeieIMKzUPVZUMvPgDbhGFfChHKdxdJStDjYsH47pORb2pMHULw0RJCAPvtB9A==",
       "dev": true,
+      "license": "MIT",
       "dependencies": {
         "@angular-devkit/architect": "0.1800.7",
         "@angular-devkit/core": "18.0.7",
@@ -2621,11 +2623,12 @@
       }
     },
     "node_modules/@capacitor/app": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmmirror.com/@capacitor/app/-/app-6.0.0.tgz",
-      "integrity": "sha512-X5UGd90Jh5p9rmoPyMqFyFWqOypdJgVJhYcM5X1YyDVJJGzmJ5MuYv1+ajj5DW9Qyh+5a3th9WYptdGby8jidA==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/app/-/app-7.0.1.tgz",
+      "integrity": "sha512-ArlVZAAla4MwQoKh26x2AaTDOBh5Vhp1VhMKR3RwqZSsZnazKTFGNrPbr9Ez5r1knnEDfApyjwp1uZnXK1WTYQ==",
+      "license": "MIT",
       "peerDependencies": {
-        "@capacitor/core": "^6.0.0"
+        "@capacitor/core": ">=7.0.0"
       }
     },
     "node_modules/@capacitor/cli": {
@@ -2731,35 +2734,39 @@
       }
     },
     "node_modules/@capacitor/core": {
-      "version": "6.1.0",
-      "resolved": "https://registry.npmmirror.com/@capacitor/core/-/core-6.1.0.tgz",
-      "integrity": "sha512-Kt4ONm0X9xxJXn9Q73oBaKdzep5B/VJw3VjXa2eGul4cD2k37mJwgjpXSMRnLH0Aju5bCiRL8J/hMAfTlokO6A==",
+      "version": "7.2.0",
+      "resolved": "https://registry.npmmirror.com/@capacitor/core/-/core-7.2.0.tgz",
+      "integrity": "sha512-2zCnA6RJeZ9ec4470o8QMZEQTWpekw9FNoqm5TLc10jeCrhvHVI8MPgxdZVc3mOdFlyieYu4AS1fNxSqbS57Pw==",
+      "license": "MIT",
       "dependencies": {
         "tslib": "^2.1.0"
       }
     },
     "node_modules/@capacitor/haptics": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmmirror.com/@capacitor/haptics/-/haptics-6.0.0.tgz",
-      "integrity": "sha512-z2TmB+pTbd98Il2I1xpZGClCFwORxxP2m9f1a0rh70c2ubj2atVyZctgxrx1fuoExZTNGSxHaylWfrmjmtelVg==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/haptics/-/haptics-7.0.1.tgz",
+      "integrity": "sha512-ewZmspE5krgDUj5ZvUDcfNZvgerAIr+3bDSk6DLzyvBZ/dYmr/tMLu5H6WtYaaKYZJ32aZAudGpIal5epDyBYA==",
+      "license": "MIT",
       "peerDependencies": {
-        "@capacitor/core": "^6.0.0"
+        "@capacitor/core": ">=7.0.0"
       }
     },
     "node_modules/@capacitor/keyboard": {
-      "version": "6.0.1",
-      "resolved": "https://registry.npmmirror.com/@capacitor/keyboard/-/keyboard-6.0.1.tgz",
-      "integrity": "sha512-fBjqQaMc5uhFj6ycLnLa2hzQsR77pj/iuLLATkWihMUze3dD+IkwqFnEyOLsyk+52uoOYM7WkziSpNTquU1sZA==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/keyboard/-/keyboard-7.0.1.tgz",
+      "integrity": "sha512-Gi064vOARMac+x9/DmEFeywN9oAETMf3OYsMuYm9gA8SvdsDJ3QJqMoFnSEIORYXe21Jzt2SIEdLlpT65P/b2g==",
+      "license": "MIT",
       "peerDependencies": {
-        "@capacitor/core": "^6.0.0"
+        "@capacitor/core": ">=7.0.0"
       }
     },
     "node_modules/@capacitor/status-bar": {
-      "version": "6.0.0",
-      "resolved": "https://registry.npmmirror.com/@capacitor/status-bar/-/status-bar-6.0.0.tgz",
-      "integrity": "sha512-Wo0ILugYlmENegKDgTzVCPjbvP8h1ObgHslLdgeVG643ViMS/diausHIq8e104WIKCXtKIELmQeYVp9mX7932g==",
+      "version": "7.0.1",
+      "resolved": "https://registry.npmmirror.com/@capacitor/status-bar/-/status-bar-7.0.1.tgz",
+      "integrity": "sha512-iDv3mXYo9CdxYRVwt3/pRyuk25p7Sn4GfaS/zMZyVIqTzsvKLCIIH3GdKK+ta+nsNcAVpCw/t5jFEBt1D18ctA==",
+      "license": "MIT",
       "peerDependencies": {
-        "@capacitor/core": "^6.0.0"
+        "@capacitor/core": ">=7.0.0"
       }
     },
     "node_modules/@colors/colors": {
@@ -6192,124 +6199,6 @@
         }
       }
     },
-    "node_modules/@typescript-eslint/utils": {
-      "version": "7.15.0",
-      "resolved": "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-7.15.0.tgz",
-      "integrity": "sha512-hfDMDqaqOqsUVGiEPSMLR/AjTSCsmJwjpKkYQRo1FNbmW4tBwBspYDwO9eh7sKSTwMQgBw9/T4DHudPaqshRWA==",
-      "dev": true,
-      "peer": true,
-      "dependencies": {
-        "@eslint-community/eslint-utils": "^4.4.0",
-        "@typescript-eslint/scope-manager": "7.15.0",
-        "@typescript-eslint/types": "7.15.0",
-        "@typescript-eslint/typescript-estree": "7.15.0"
-      },
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependencies": {
-        "eslint": "^8.56.0"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/scope-manager": {
-      "version": "7.15.0",
-      "resolved": "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-7.15.0.tgz",
-      "integrity": "sha512-Q/1yrF/XbxOTvttNVPihxh1b9fxamjEoz2Os/Pe38OHwxC24CyCqXxGTOdpb4lt6HYtqw9HetA/Rf6gDGaMPlw==",
-      "dev": true,
-      "peer": true,
-      "dependencies": {
-        "@typescript-eslint/types": "7.15.0",
-        "@typescript-eslint/visitor-keys": "7.15.0"
-      },
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/types": {
-      "version": "7.15.0",
-      "resolved": "https://registry.npmmirror.com/@typescript-eslint/types/-/types-7.15.0.tgz",
-      "integrity": "sha512-aV1+B1+ySXbQH0pLK0rx66I3IkiZNidYobyfn0WFsdGhSXw+P3YOqeTq5GED458SfB24tg+ux3S+9g118hjlTw==",
-      "dev": true,
-      "peer": true,
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree": {
-      "version": "7.15.0",
-      "resolved": "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-7.15.0.tgz",
-      "integrity": "sha512-gjyB/rHAopL/XxfmYThQbXbzRMGhZzGw6KpcMbfe8Q3nNQKStpxnUKeXb0KiN/fFDR42Z43szs6rY7eHk0zdGQ==",
-      "dev": true,
-      "peer": true,
-      "dependencies": {
-        "@typescript-eslint/types": "7.15.0",
-        "@typescript-eslint/visitor-keys": "7.15.0",
-        "debug": "^4.3.4",
-        "globby": "^11.1.0",
-        "is-glob": "^4.0.3",
-        "minimatch": "^9.0.4",
-        "semver": "^7.6.0",
-        "ts-api-utils": "^1.3.0"
-      },
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      },
-      "peerDependenciesMeta": {
-        "typescript": {
-          "optional": true
-        }
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/visitor-keys": {
-      "version": "7.15.0",
-      "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-7.15.0.tgz",
-      "integrity": "sha512-Hqgy/ETgpt2L5xueA/zHHIl4fJI2O4XUE9l4+OIfbJIRSnTJb/QscncdqqZzofQegIJugRIF57OJea1khw2SDw==",
-      "dev": true,
-      "peer": true,
-      "dependencies": {
-        "@typescript-eslint/types": "7.15.0",
-        "eslint-visitor-keys": "^3.4.3"
-      },
-      "engines": {
-        "node": "^18.18.0 || >=20.0.0"
-      },
-      "funding": {
-        "type": "opencollective",
-        "url": "https://opencollective.com/typescript-eslint"
-      }
-    },
-    "node_modules/@typescript-eslint/utils/node_modules/minimatch": {
-      "version": "9.0.5",
-      "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-9.0.5.tgz",
-      "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==",
-      "dev": true,
-      "peer": true,
-      "dependencies": {
-        "brace-expansion": "^2.0.1"
-      },
-      "engines": {
-        "node": ">=16 || 14 >=14.17"
-      },
-      "funding": {
-        "url": "https://github.com/sponsors/isaacs"
-      }
-    },
     "node_modules/@typescript-eslint/visitor-keys": {
       "version": "6.21.0",
       "resolved": "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.21.0.tgz",
@@ -10187,6 +10076,58 @@
       "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==",
       "dev": true
     },
+    "node_modules/fmode-ng": {
+      "version": "0.0.82",
+      "resolved": "https://registry.npmmirror.com/fmode-ng/-/fmode-ng-0.0.82.tgz",
+      "integrity": "sha512-e+tcSQMR32QPQsRt+UyEb0APNd/isuDEOn3JleJ0R5/7n9BRhKdiNxr/uXR/BGUWRbpPR4ZArPP0TRSmibKsCA==",
+      "license": "COPYRIGHT © 未来飞马 未来全栈 www.fmode.cn All RIGHTS RESERVED",
+      "dependencies": {
+        "tslib": "^2.3.0"
+      },
+      "peerDependencies": {
+        "@amap/amap-jsapi-loader": "^1.0.1",
+        "@angular/animations": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "@angular/common": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "@angular/core": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "@angular/forms": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "@angular/material": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "@awesome-cordova-plugins/diagnostic": "^5.0.0 || ^6.0.0",
+        "@awesome-cordova-plugins/media-capture": "^5.0.0 || ^6.0.0 || ^7.0.0",
+        "@babylonjs/core": "7.2.3",
+        "@babylonjs/loaders": "7.2.3",
+        "@capacitor/camera": "^5.0.0 || ^6.0.0 || ^7.0.0",
+        "@capacitor/clipboard": "^5.0.0 || ^6.0.0 || ^7.0.0",
+        "@capacitor/filesystem": "^5.0.0 || ^6.0.0 || ^7.0.0",
+        "@ionic/angular": "^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0",
+        "@langchain/core": "^0.3.0 || ^1.0.0",
+        "@types/parse": "^3.0.9",
+        "@types/spark-md5": "^3.0.4",
+        "@wecom/jssdk": "^2.2.4",
+        "esdk-obs-browserjs": "^3.23.5",
+        "highlight.js": "^11.0.0",
+        "jquery": "^3.7.1",
+        "markdown-it": "^13.0.0 || ^14.0.0",
+        "markdown-it-abbr": "^1.0.4",
+        "markdown-it-deflist": "^2.1.0",
+        "markdown-it-footnote": "^3.0.3",
+        "markdown-it-imsize": "^2.0.1",
+        "markdown-it-ins": "^3.0.1",
+        "markdown-it-mark": "^3.0.1",
+        "markdown-it-mathjax": "^2.0.0",
+        "markdown-it-ruby": "^0.1.1",
+        "markdown-it-sub": "^1.0.0",
+        "markdown-it-sup": "^1.0.0",
+        "mathjax-full": "3.2.2",
+        "microsoft-cognitiveservices-speech-sdk": "^1.0.0 || ^2.0.0",
+        "ng-qrcode": "^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "ng-zorro-antd": "^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0",
+        "parse": "^5.0.0",
+        "plantuml-encoder": "^1.4.0",
+        "qiniu-js": "^3.0.0 || ^2.0.0",
+        "recorder-core": "^1.2.23070100",
+        "spark-md5": "^3.0.2"
+      }
+    },
     "node_modules/follow-redirects": {
       "version": "1.15.6",
       "resolved": "https://registry.npmmirror.com/follow-redirects/-/follow-redirects-1.15.6.tgz",

+ 7 - 6
package.json

@@ -21,12 +21,13 @@
     "@angular/platform-browser": "^18.0.0",
     "@angular/platform-browser-dynamic": "^18.0.0",
     "@angular/router": "^18.0.0",
-    "@capacitor/app": "6.0.0",
-    "@capacitor/core": "6.1.0",
-    "@capacitor/haptics": "6.0.0",
-    "@capacitor/keyboard": "6.0.1",
-    "@capacitor/status-bar": "6.0.0",
-    "@ionic/angular": "^8.0.0",
+     "@capacitor/app": "7.0.1",
+     "@capacitor/core": "7.2.0",
+     "@capacitor/haptics": "7.0.1",
+     "@capacitor/keyboard": "7.0.1",
+     "@capacitor/status-bar": "7.0.1",
+     "@ionic/angular": "^8.0.0",
+     "fmode-ng": "^0.0.82",
     "ionicons": "^7.0.0",
     "parse": "^5.3.0",
     "rxjs": "~7.8.0",

+ 17 - 0
src/app/ai-assistant/ai-assistant-routing.module.ts

@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { AiAssistantPage } from './ai-assistant.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: AiAssistantPage
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class AiAssistantPageRoutingModule {}

+ 18 - 0
src/app/ai-assistant/ai-assistant.module.ts

@@ -0,0 +1,18 @@
+// ai-assistant.module.ts
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { IonicModule } from '@ionic/angular';
+import { AiAssistantPageRoutingModule } from './ai-assistant-routing.module';
+import { AiAssistantPage } from './ai-assistant.page';  // 更新导入名
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    AiAssistantPageRoutingModule
+  ],
+  declarations: [AiAssistantPage]  // 更新声明
+})
+export class AiAssistantPageModule {}  // 更新模块名

+ 56 - 0
src/app/ai-assistant/ai-assistant.page.html

@@ -0,0 +1,56 @@
+<ion-header>
+  <ion-toolbar color="primary">
+    <ion-buttons slot="start">
+      <ion-back-button defaultHref="/tabs/tab1"></ion-back-button>
+    </ion-buttons>
+    <ion-title>AI省钱助手</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <div class="chat-container">
+    <div *ngFor="let message of messages" 
+         class="message" 
+         [class.user]="message.role === 'user'"
+         [class.assistant]="message.role === 'assistant'">
+      
+      <div class="avatar">
+        <ion-icon *ngIf="message.role === 'user'" name="person"></ion-icon>
+        <ion-icon *ngIf="message.role === 'assistant'" name="sparkles"></ion-icon>
+      </div>
+      
+      <div class="bubble">
+        {{ message.content }}
+      </div>
+    </div>
+    
+    <div *ngIf="isSending" class="message assistant">
+      <div class="avatar">
+        <ion-icon name="sparkles"></ion-icon>
+      </div>
+      <div class="bubble">
+        <ion-spinner name="dots"></ion-spinner>
+      </div>
+    </div>
+  </div>
+</ion-content>
+
+<ion-footer>
+  <ion-toolbar>
+    <ion-item lines="none">
+      <ion-textarea 
+        [(ngModel)]="userInput" 
+        placeholder="输入您的省钱问题..." 
+        autoGrow="true"
+        (keydown)="onKeyPress($event)">
+      </ion-textarea>
+      
+      <ion-button slot="end" 
+                  fill="clear" 
+                  (click)="sendMessage()"
+                  [disabled]="!userInput.trim() || isSending">
+        <ion-icon slot="icon-only" name="send"></ion-icon>
+      </ion-button>
+    </ion-item>
+  </ion-toolbar>
+</ion-footer>

+ 81 - 0
src/app/ai-assistant/ai-assistant.page.scss

@@ -0,0 +1,81 @@
+.chat-container {
+  padding: 16px;
+  display: flex;
+  flex-direction: column;
+  height: calc(100% - 56px);
+  overflow-y: auto;
+  background: #f9f9f9;
+}
+
+.message {
+  display: flex;
+  margin-bottom: 16px;
+  max-width: 90%;
+  
+  .avatar {
+    display: flex;
+    align-items: center;
+    justify-content: center;
+    width: 36px;
+    height: 36px;
+    border-radius: 50%;
+    background: var(--ion-color-primary);
+    color: white;
+    margin-right: 10px;
+    flex-shrink: 0;
+    
+    ion-icon {
+      font-size: 20px;
+    }
+  }
+  
+  .bubble {
+    padding: 12px 16px;
+    border-radius: 18px;
+    line-height: 1.4;
+    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
+  }
+  
+  &.user {
+    align-self: flex-end;
+    flex-direction: row-reverse;
+    
+    .avatar {
+      margin-right: 0;
+      margin-left: 10px;
+      background: var(--ion-color-secondary);
+    }
+    
+    .bubble {
+      background: var(--ion-color-secondary);
+      color: rgb(0, 0, 0);
+      border-bottom-right-radius: 4px;
+    }
+  }
+  
+  &.assistant {
+    align-self: flex-start;
+    
+    .bubble {
+      background: rgb(0, 0, 0);
+      border-bottom-left-radius: 4px;
+    }
+  }
+}
+
+ion-footer {
+  ion-item {
+    --background: transparent;
+    --padding-start: 16px;
+    --padding-end: 16px;
+    
+    ion-textarea {
+      background: rgba(0, 0, 0, 0.205);
+      border-radius: 24px;
+      padding: 8px 16px;
+      --padding-start: 12px;
+      --padding-end: 12px;
+      box-shadow: 0 2px 6px rgba(0,0,0,0.1);
+    }
+  }
+}

+ 17 - 0
src/app/ai-assistant/ai-assistant.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { AiAssistantPage } from './ai-assistant.page';
+
+describe('AiAssistantPage', () => {
+  let component: AiAssistantPage;
+  let fixture: ComponentFixture<AiAssistantPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AiAssistantPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 150 - 0
src/app/ai-assistant/ai-assistant.page.ts

@@ -0,0 +1,150 @@
+import { Component, OnInit } from '@angular/core';
+import { HttpClient, HttpHeaders } from '@angular/common/http';
+import { LoadingController } from '@ionic/angular';
+
+interface ChatMessage {
+  role: string;
+  content: string;
+  options?: string[]; // 可选属性
+}
+
+// 定义预设对话类型
+type PredefinedDialogs = {
+  [key: string]: ChatMessage[];
+};
+
+@Component({
+  selector: 'app-ai-assistant',
+  templateUrl: './ai-assistant.page.html',
+  styleUrls: ['./ai-assistant.page.scss'],
+})
+export class AiAssistantPage implements OnInit {  // 类名修改为 AiAssistantPage
+  messages: { role: string, content: string }[] = [
+    { role: 'assistant', content: '你好!我是省钱助手,有什么购物省钱的问题都可以问我~' }
+  ];
+  userInput: string = '';
+  isSending: boolean = false;
+
+    predefinedDialogs: PredefinedDialogs = {
+    '你好': [
+      { role: 'assistant', content: '您好!我是省钱助手,请问有什么可以帮您的吗?' }
+    ],
+    '您好,请问有什么商品': [
+      { role: 'assistant', content: '我们有以下商品类别:' },
+      { role: 'assistant', content: '1. 智能手机\n2. 笔记本电脑\n3. 家用电器\n4. 服装配饰' },
+      { role: 'assistant', content: '您对哪类商品感兴趣呢?' }
+    ],
+    '手机': [
+      { role: 'assistant', content: '我们有以下手机品牌:' },
+      { role: 'assistant', content: '📱 苹果 iPhone 系列\n📱 华为 Mate/P 系列\n📱 小米数字系列\n📱 OPPO Find/Reno 系列' },
+      { role: 'assistant', content: '需要我为您推荐具体型号吗?' }
+    ],
+    '电脑': [
+      { role: 'assistant', content: '电脑产品分类:' },
+      { role: 'assistant', content: '💻 轻薄本 (适合办公)\n💻 游戏本 (高性能)\n💻 二合一平板电脑\n💻 台式机' }
+    ],
+    '多少钱': [
+      { role: 'assistant', content: '商品价格区间:' },
+      { role: 'assistant', content: '手机:1000-10000元\n电脑:3000-20000元\n家电:500-15000元\n服饰:50-2000元' },
+      { role: 'assistant', content: '您想了解哪个具体商品的价格呢?' }
+    ]
+  };
+
+  DEEPSEEK_API_URL = 'https://api.deepseek.com/v1/chat/completions';
+  DEEPSEEK_API_KEY = 'sk-468fa19db60149989b96d63c783a0a02'; // 替换为你的 DeepSeek API 密钥
+
+  constructor(
+    private http: HttpClient,
+    private loadingCtrl: LoadingController
+  ) {}
+
+  ngOnInit() {}
+
+  async sendMessage() {
+    if (!this.userInput.trim() || this.isSending) return;
+    
+    const loading = await this.loadingCtrl.create({
+      message: 'AI思考中...',
+      spinner: 'crescent'
+    });
+    await loading.present();
+    
+    this.isSending = true;
+    const userMessage = this.userInput.trim();
+    this.userInput = '';
+    
+    // 添加用户消息
+    this.messages.push({ role: 'user', content: userMessage });
+    
+    try {
+      // 检查预设对话
+      const matchedKey = this.findMatchingKey(userMessage);
+      if (matchedKey) {
+        // 添加预设的多段回复
+        this.predefinedDialogs[matchedKey].forEach(msg => {
+          this.messages.push({ ...msg }); // 使用扩展运算符创建新对象
+        });
+      } else {
+        // 调用API处理其他问题
+        const response = await this.queryDeepSeekAI(userMessage);
+        const aiResponse = response.choices[0].message.content;
+        this.messages.push({ role: 'assistant', content: aiResponse });
+      }
+    } catch (error) {
+      console.error('AI请求失败:', error);
+      this.messages.push({ 
+        role: 'assistant', 
+        content: '抱歉,我暂时无法回答。请稍后再试或检查网络连接。' 
+      });
+    } finally {
+      this.isSending = false;
+      loading.dismiss();
+      this.scrollToBottom();
+    }
+  }
+
+  // 查找匹配的关键词
+  private findMatchingKey(userInput: string): string | null {
+    const input = userInput.toLowerCase();
+    for (const key of Object.keys(this.predefinedDialogs)) {
+      if (input.includes(key.toLowerCase())) {
+        return key;
+      }
+    }
+    return null;
+  }
+
+  private async queryDeepSeekAI(message: string): Promise<any> {
+    const headers = new HttpHeaders({
+      'Content-Type': 'application/json',
+      'Authorization': `Bearer ${this.DEEPSEEK_API_KEY}`
+    });
+
+    const body = {
+      model: 'deepseek-chat',
+      messages: [
+        ...this.messages,
+        { role: 'user', content: message }
+      ],
+      temperature: 0.7,
+      max_tokens: 1000
+    };
+
+    return this.http.post(this.DEEPSEEK_API_URL, body, { headers }).toPromise();
+  }
+
+  onKeyPress(event: KeyboardEvent) {
+    if (event.key === 'Enter' && !event.shiftKey) {
+      event.preventDefault();
+      this.sendMessage();
+    }
+  }
+
+  // 添加滚动到底部的方法
+  scrollToBottom() {
+    const chatContainer = document.querySelector('.chat-container');
+    if (chatContainer) {
+      chatContainer.scrollTop = chatContainer.scrollHeight;
+    }
+  }
+}

+ 27 - 1
src/app/app-routing.module.ts

@@ -2,8 +2,11 @@ import { NgModule } from '@angular/core';
 import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
 // 引用路由守卫
 import { authGuard } from 'src/modules/user/auth.guard';
-
+import { AiAssistantPage } from './ai-assistant/ai-assistant.page'; 
 const routes: Routes = [
+  {path: 'ai-assistant',
+    loadChildren: () => import('./ai-assistant/ai-assistant.module').then(m => m.AiAssistantPageModule)
+  },
   {
     path: '',
     loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
@@ -24,6 +27,15 @@ const routes: Routes = [
     path: 'find',
     loadChildren: () => import('./find/find.module').then( m => m.FindPageModule)
   },
+    {
+    path: 'auth',
+    loadChildren: () => import('./auth/auth.module').then(m => m.AuthPageModule)
+  },
+    {
+    path: 'profile-edit',
+    loadChildren: () => import('./profile-edit/profile-edit.module').then(m => m.ProfileEditPageModule)
+  },
+
   {
     path:"study",
     children:[
@@ -46,6 +58,20 @@ const routes: Routes = [
       },
     ]
   },
+  {
+    path: 'auth',
+    loadChildren: () => import('./auth/auth.module').then( m => m.AuthPageModule)
+  },
+  {
+    path: 'profile-edit',
+    loadChildren: () => import('./profile-edit/profile-edit.module').then( m => m.ProfileEditPageModule)
+  },
+
+
+  
+
+
+
 
 ];
 @NgModule({

+ 2 - 2
src/app/app.component.ts

@@ -1,8 +1,8 @@
 import { Component } from '@angular/core';
 // 引用Parse JS SDK
 import Parse from "parse";
-Parse.initialize("dev"); // 设置applicationId
-Parse.serverURL = "http://web2023.fmode.cn:9999/parse"; // 设置serverURL
+Parse.initialize("'ncloudmaster"); // 设置applicationId
+Parse.serverURL = "https://server.fmode.cn/parse"; // 设置serverURL
 
 @Component({
   selector: 'app-root',

+ 2 - 2
src/app/app.module.ts

@@ -1,7 +1,7 @@
 import { NgModule } from '@angular/core';
 import { BrowserModule } from '@angular/platform-browser';
 import { RouteReuseStrategy } from '@angular/router';
-
+import { HttpClientModule } from '@angular/common/http'; // 添加这行
 import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
 
 import { AppRoutingModule } from './app-routing.module';
@@ -12,7 +12,7 @@ import { FormsModule } from '@angular/forms';
 
 @NgModule({
   declarations: [AppComponent],
-  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,CommonModule,FormsModule],
+  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,CommonModule,FormsModule,HttpClientModule ],
   providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
   bootstrap: [AppComponent],
 })

+ 17 - 0
src/app/auth/auth-routing.module.ts

@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { AuthPage } from './auth.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: AuthPage
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class AuthPageRoutingModule {}

+ 20 - 0
src/app/auth/auth.module.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { AuthPageRoutingModule } from './auth-routing.module';
+
+import { AuthPage } from './auth.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    AuthPageRoutingModule
+  ],
+  declarations: [AuthPage]
+})
+export class AuthPageModule {}

+ 52 - 0
src/app/auth/auth.page.html

@@ -0,0 +1,52 @@
+<!-- auth.page.html -->
+<ion-header>
+  <ion-toolbar color="primary">
+    <ion-title>
+      {{ segmentValue === 'login' ? '用户登录' : '用户注册' }}
+    </ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content class="ion-padding">
+  <ion-segment [(ngModel)]="segmentValue">
+    <ion-segment-button value="login">
+      <ion-label>登录</ion-label>
+    </ion-segment-button>
+    <ion-segment-button value="register">
+      <ion-label>注册</ion-label>
+    </ion-segment-button>
+  </ion-segment>
+
+  <div *ngIf="segmentValue === 'login'" class="form-container">
+    <ion-item>
+      <ion-label position="floating">用户名</ion-label>
+      <ion-input [(ngModel)]="loginData.username"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="floating">密码</ion-label>
+      <ion-input [(ngModel)]="loginData.password" type="password"></ion-input>
+    </ion-item>
+
+    <ion-button expand="block" (click)="onLogin()">登录</ion-button>
+  </div>
+
+  <div *ngIf="segmentValue === 'register'" class="form-container">
+    <ion-item>
+      <ion-label position="floating">用户名</ion-label>
+      <ion-input [(ngModel)]="registerData.username"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="floating">密码</ion-label>
+      <ion-input [(ngModel)]="registerData.password" type="password"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="floating">确认密码</ion-label>
+      <ion-input [(ngModel)]="registerData.confirmPassword" type="password"></ion-input>
+    </ion-item>
+
+    <ion-button expand="block" (click)="onRegister()">注册</ion-button>
+  </div>
+</ion-content>

+ 18 - 0
src/app/auth/auth.page.scss

@@ -0,0 +1,18 @@
+/* auth.page.scss */
+.form-container {
+  margin-top: 20px;
+  
+  ion-item {
+    margin-bottom: 15px;
+    --border-radius: 8px;
+    --background: #f5f5f5;
+  }
+  
+  ion-button {
+    margin-top: 20px;
+  }
+}
+
+ion-segment {
+  margin-bottom: 20px;
+}

+ 17 - 0
src/app/auth/auth.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { AuthPage } from './auth.page';
+
+describe('AuthPage', () => {
+  let component: AuthPage;
+  let fixture: ComponentFixture<AuthPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(AuthPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 96 - 0
src/app/auth/auth.page.ts

@@ -0,0 +1,96 @@
+// auth.page.ts
+import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+import { AlertController, LoadingController } from '@ionic/angular';
+import { UserService } from '../services/user.service';
+
+@Component({
+  selector: 'app-auth',
+  templateUrl: './auth.page.html',
+  styleUrls: ['./auth.page.scss'],
+})
+export class AuthPage {
+  segmentValue = 'login';
+  loginData = { username: '', password: '' };
+  registerData = { username: '', password: '', confirmPassword: '' };
+
+  constructor(
+    private userService: UserService,
+    private router: Router,
+    private alertCtrl: AlertController,
+    private loadingCtrl: LoadingController
+  ) {}
+
+  async onLogin() {
+    if (!this.loginData.username || !this.loginData.password) {
+      this.showAlert('错误', '请输入用户名和密码');
+      return;
+    }
+
+    
+
+    const loading = await this.loadingCtrl.create({
+      message: '登录中...'
+    });
+    await loading.present();
+
+    try {
+      const isLoggedIn = await this.userService.login(
+        this.loginData.username, 
+        this.loginData.password
+      );
+
+      if (isLoggedIn) {
+        this.router.navigate(['/tabs/tab1']);
+      } else {
+        this.showAlert('登录失败', '用户名或密码错误');
+      }
+    } finally {
+      loading.dismiss();
+    }
+  }
+
+  async onRegister() {
+    if (!this.registerData.username || !this.registerData.password) {
+      this.showAlert('错误', '请输入用户名和密码');
+      return;
+    }
+
+    if (this.registerData.password !== this.registerData.confirmPassword) {
+      this.showAlert('错误', '两次输入的密码不一致');
+      return;
+    }
+
+    const loading = await this.loadingCtrl.create({
+      message: '注册中...'
+    });
+    await loading.present();
+
+    try {
+      const isRegistered = await this.userService.register(
+        this.registerData.username,
+        this.registerData.password
+      );
+
+      if (isRegistered) {
+        this.showAlert('注册成功', '您现在可以登录了');
+        this.segmentValue = 'login';
+        this.loginData.username = this.registerData.username;
+        this.registerData = { username: '', password: '', confirmPassword: '' };
+      } else {
+        this.showAlert('注册失败', '用户名已存在');
+      }
+    } finally {
+      loading.dismiss();
+    }
+  }
+
+  private async showAlert(header: string, message: string) {
+    const alert = await this.alertCtrl.create({
+      header,
+      message,
+      buttons: ['确定']
+    });
+    await alert.present();
+  }
+}

+ 139 - 0
src/app/find/find.page.scss

@@ -0,0 +1,139 @@
+/* 商品库页面样式 */
+ion-content {
+  --background: #f5f5f5; // 设置整体背景色
+}
+
+/* 头部工具栏样式 */
+ion-toolbar {
+  --background: #3880ff; // 使用Ionic主题蓝色
+  --color: white; // 文字白色
+  
+  ion-title {
+    font-weight: 500;
+    font-size: 1.2rem;
+  }
+  
+  ion-back-button {
+    --color: white; // 返回按钮白色
+  }
+}
+
+/* 分段控件样式 */
+ion-segment {
+  padding: 8px 16px;
+  background: white;
+  
+  ion-segment-button {
+    --color: #666; // 未选中文字颜色
+    --color-checked: #3880ff; // 选中文字颜色
+    --indicator-color: #3880ff; // 底部指示器颜色
+    --border-radius: 4px;
+    font-size: 0.9rem;
+    min-height: 36px;
+    
+    &::part(indicator) {
+      height: 3px;
+    }
+  }
+}
+
+/* 筛选列表样式 */
+ion-list {
+  background: white;
+  margin: 8px 0;
+  
+  &:first-child {
+    margin-top: 0;
+  }
+  
+  ion-item {
+    --padding-start: 16px;
+    --padding-end: 16px;
+    --inner-padding-end: 8px;
+    --min-height: 56px;
+    
+    ion-label {
+      color: #666;
+      font-size: 0.9rem;
+      margin-right: 16px;
+    }
+    
+    ion-select, ion-input {
+      --placeholder-color: #999;
+      --placeholder-opacity: 1;
+      color: #333;
+      border: 1px solid #eee;
+      border-radius: 4px;
+      --padding-start: 12px;
+      --padding-end: 12px;
+      min-width: 150px;
+    }
+    
+    ion-select::part(icon) {
+      color: #3880ff;
+    }
+  }
+}
+
+/* 商品列表样式 */
+ion-list:last-child {
+  ion-item {
+    --padding-start: 8px;
+    --padding-end: 8px;
+    --inner-padding-end: 8px;
+    --min-height: 80px;
+    border-bottom: 1px solid #f0f0f0;
+    
+    &:last-child {
+      border-bottom: none;
+    }
+    
+    ion-thumbnail {
+      --size: 70px;
+      --border-radius: 4px;
+      overflow: hidden;
+      
+      img {
+        object-fit: cover;
+        width: 100%;
+        height: 100%;
+      }
+    }
+    
+    ion-label {
+      h2 {
+        font-weight: 500;
+        color: #333;
+        margin-bottom: 4px;
+        font-size: 1rem;
+      }
+      
+      p {
+        color: #888;
+        font-size: 0.8rem;
+        margin: 2px 0;
+        
+        &:first-of-type {
+          color: #666;
+        }
+      }
+    }
+  }
+}
+
+/* 响应式调整 */
+@media (min-width: 768px) {
+  ion-content {
+    --padding-start: 20%;
+    --padding-end: 20%;
+  }
+  
+  ion-list {
+    border-radius: 8px;
+    margin: 12px;
+    
+    &:first-child {
+      margin-top: 12px;
+    }
+  }
+}

+ 17 - 0
src/app/profile-edit/profile-edit-routing.module.ts

@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { ProfileEditPage } from './profile-edit.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: ProfileEditPage
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class ProfileEditPageRoutingModule {}

+ 20 - 0
src/app/profile-edit/profile-edit.module.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { ProfileEditPageRoutingModule } from './profile-edit-routing.module';
+
+import { ProfileEditPage } from './profile-edit.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    ProfileEditPageRoutingModule
+  ],
+  declarations: [ProfileEditPage]
+})
+export class ProfileEditPageModule {}

+ 51 - 0
src/app/profile-edit/profile-edit.page.html

@@ -0,0 +1,51 @@
+<!-- profile-edit.page.html -->
+<ion-header>
+  <ion-toolbar color="primary">
+    <ion-buttons slot="start">
+      <ion-back-button defaultHref="/tabs/tab1"></ion-back-button>
+    </ion-buttons>
+    <ion-title>编辑资料</ion-title>
+    <ion-buttons slot="end">
+      <ion-button (click)="saveProfile()">保存</ion-button>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content class="ion-padding">
+  <div class="avatar-section">
+  </div>
+
+  <ion-list>
+    <ion-item>
+      <ion-label position="stacked">昵称</ion-label>
+      <ion-input [(ngModel)]="profileData.nickname"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="stacked">性别</ion-label>
+      <ion-select [(ngModel)]="profileData.gender" interface="action-sheet">
+        <ion-select-option value="">保密</ion-select-option>
+        <ion-select-option value="male">男</ion-select-option>
+        <ion-select-option value="female">女</ion-select-option>
+      </ion-select>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="stacked">生日</ion-label>
+      <ion-datetime
+        [(ngModel)]="profileData.birthday"
+        displayFormat="YYYY年MM月DD日"
+        pickerFormat="YYYY MM DD"
+      ></ion-datetime>
+    </ion-item>
+
+    <ion-item>
+      <ion-label position="stacked">个人简介</ion-label>
+      <ion-textarea
+        [(ngModel)]="profileData.bio"
+        rows="4"
+        autoGrow="true"
+      ></ion-textarea>
+    </ion-item>
+  </ion-list>
+</ion-content>

+ 145 - 0
src/app/profile-edit/profile-edit.page.scss

@@ -0,0 +1,145 @@
+/* profile-edit.page.scss */
+
+// 全局容器样式
+ion-content {
+  --background: #f8f9fa;
+  --padding-start: 16px;
+  --padding-end: 16px;
+  --padding-top: 16px;
+  --padding-bottom: 16px;
+}
+
+// 头像区域样式
+.avatar-section {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  margin: 24px 0;
+  padding: 16px;
+  background: #ffffff;
+  border-radius: 12px;
+  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
+
+  ion-avatar {
+    width: 120px;
+    height: 120px;
+    margin-bottom: 12px;
+    border: 3px solid var(--ion-color-primary);
+    box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.2);
+    transition: transform 0.3s ease;
+
+    &:active {
+      transform: scale(0.95);
+    }
+
+    img {
+      border: 2px solid #fff;
+    }
+  }
+
+  ion-button {
+    --color: var(--ion-color-medium);
+    --background-hover: transparent;
+    font-size: 14px;
+    
+    &:hover {
+      --color: var(--ion-color-primary);
+    }
+  }
+}
+
+// 表单列表样式
+ion-list {
+  background: transparent;
+  margin-top: 16px;
+
+  ion-item {
+    --background: #2555d8;
+    --border-radius: 10px;
+    --padding-start: 16px;
+    --padding-end: 16px;
+    --inner-padding-end: 0;
+    --min-height: 56px;
+    margin-bottom: 16px;
+    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
+    transition: box-shadow 0.3s ease;
+
+    &:hover {
+      box-shadow: 0 4px 12px rgba(255, 2, 2, 0.1);
+    }
+
+    ion-label {
+      font-size: 14px;
+      color: var(--ion-color-medium);
+      margin-bottom: 4px;
+      transition: color 0.3s ease;
+    }
+
+    &:focus-within ion-label,
+    &.item-has-value ion-label {
+      color: var(--ion-color-primary);
+    }
+
+    ion-input, ion-textarea, ion-select, ion-datetime {
+      --padding-top: 8px;
+      --padding-bottom: 8px;
+      font-size: 16px;
+      color: var(--ion-color-dark);
+    }
+
+    ion-textarea {
+      --background: #f9f9f9;
+      border-radius: 8px;
+      padding: 8px;
+      margin: 8px 0;
+    }
+  }
+}
+
+// 保存按钮样式
+.save-button {
+  margin-top: 32px;
+  --border-radius: 12px;
+  --box-shadow: 0 4px 12px rgba(var(--ion-color-primary-rgb), 0.3);
+  height: 48px;
+  font-weight: 600;
+  letter-spacing: 0.5px;
+
+  &:active {
+    --box-shadow: 0 2px 6px rgba(var(--ion-color-primary-rgb), 0.3);
+  }
+}
+
+// 响应式调整
+@media (min-width: 576px) {
+  ion-content {
+    --padding-start: 24px;
+    --padding-end: 24px;
+  }
+
+  .avatar-section {
+    margin: 32px auto;
+    max-width: 500px;
+  }
+
+  ion-list {
+    max-width: 500px;
+    margin: 24px auto;
+  }
+}
+
+// 暗黑模式适配
+@media (prefers-color-scheme: dark) {
+  ion-content {
+    --background: #121212;
+  }
+
+  .avatar-section,
+  ion-item {
+    --background: #1e1e1e;
+  }
+
+  ion-textarea {
+    --background: #2a2a2a !important;
+  }
+}

+ 17 - 0
src/app/profile-edit/profile-edit.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { ProfileEditPage } from './profile-edit.page';
+
+describe('ProfileEditPage', () => {
+  let component: ProfileEditPage;
+  let fixture: ComponentFixture<ProfileEditPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(ProfileEditPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 61 - 0
src/app/profile-edit/profile-edit.page.ts

@@ -0,0 +1,61 @@
+// profile-edit.page.ts
+import { Component, OnInit } from '@angular/core';
+import { UserService } from '../services/user.service';
+import { Router } from '@angular/router';
+import { AlertController } from '@ionic/angular';
+
+@Component({
+  selector: 'app-profile-edit',
+  templateUrl: './profile-edit.page.html',
+  styleUrls: ['./profile-edit.page.scss'],
+})
+export class ProfileEditPage implements OnInit {
+  profileData = {
+    nickname: '',
+    avatar: 'https://ionicframework.com/docs/img/demos/avatar.svg',
+    bio: '',
+    gender: '',
+    birthday: ''
+  };
+
+  constructor(
+    private userService: UserService,
+    private router: Router,
+    private alertCtrl: AlertController
+  ) {}
+
+  async ngOnInit() {
+    const currentUser = this.userService.getCurrentUser();
+    if (currentUser) {
+      const savedProfile = await this.userService.getProfile(currentUser);
+      this.profileData = { ...this.profileData, ...savedProfile };
+    }
+  }
+
+  async saveProfile() {
+    const currentUser = this.userService.getCurrentUser();
+    if (!currentUser) {
+      this.showAlert('错误', '用户未登录');
+      return;
+    }
+
+    await this.userService.saveProfile(currentUser, this.profileData);
+    this.showAlert('成功', '资料已保存', true);
+  }
+
+  async showAlert(header: string, message: string, navigateBack = false) {
+    const alert = await this.alertCtrl.create({
+      header,
+      message,
+      buttons: [{
+        text: '确定',
+        handler: () => {
+          if (navigateBack) {
+            this.router.navigate(['/tabs/tab4']);
+          }
+        }
+      }]
+    });
+    await alert.present();
+  }
+}

+ 16 - 0
src/app/services/user.service.spec.ts

@@ -0,0 +1,16 @@
+import { TestBed } from '@angular/core/testing';
+
+import { UserService } from './user.service';
+
+describe('UserService', () => {
+  let service: UserService;
+
+  beforeEach(() => {
+    TestBed.configureTestingModule({});
+    service = TestBed.inject(UserService);
+  });
+
+  it('should be created', () => {
+    expect(service).toBeTruthy();
+  });
+});

+ 87 - 0
src/app/services/user.service.ts

@@ -0,0 +1,87 @@
+// services/user.service.ts
+import { Injectable } from '@angular/core';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class UserService {
+  private readonly STORAGE_KEY = 'registered_users';
+   private readonly PROFILE_KEY = 'user_profiles';
+
+  constructor() {}
+
+  // 注册新用户
+  async register(username: string, password: string): Promise<boolean> {
+    const users = await this.getUsers();
+    
+    // 检查用户名是否已存在
+    if (users.some(u => u.username === username)) {
+      return false;
+    }
+    
+    users.push({ username, password });
+    localStorage.setItem(this.STORAGE_KEY, JSON.stringify(users));
+    return true;
+  }
+
+  // 用户登录
+  async login(username: string, password: string): Promise<boolean> {
+  const users = await this.getUsers();
+  const isLoggedIn = users.some(u => u.username === username && u.password === password);
+  
+  if (isLoggedIn) {
+    localStorage.setItem('isLoggedIn', 'true');
+    localStorage.setItem('currentUser', username); // 保存当前用户名
+  }
+  return isLoggedIn;
+}
+
+  // 获取所有用户
+  private async getUsers(): Promise<any[]> {
+    const usersStr = localStorage.getItem(this.STORAGE_KEY);
+    return usersStr ? JSON.parse(usersStr) : [];
+  }
+    // 保存当前用户
+  setCurrentUser(username: string): void {
+    localStorage.setItem('currentUser', username);
+    localStorage.setItem('isLoggedIn', 'true');
+  }
+
+  // 获取当前用户
+  getCurrentUser(): string | null {
+    return localStorage.getItem('currentUser');
+  }
+
+  // 清除当前用户
+  clearCurrentUser(): void {
+    localStorage.removeItem('currentUser');
+    localStorage.removeItem('isLoggedIn');
+  }
+
+   // 保存用户资料
+  async saveProfile(username: string, profileData: any): Promise<boolean> {
+    const profiles = await this.getProfiles();
+    const existingIndex = profiles.findIndex(p => p.username === username);
+    
+    if (existingIndex >= 0) {
+      profiles[existingIndex] = { username, ...profileData };
+    } else {
+      profiles.push({ username, ...profileData });
+    }
+    
+    localStorage.setItem(this.PROFILE_KEY, JSON.stringify(profiles));
+    return true;
+  }
+
+  // 获取用户资料
+  async getProfile(username: string): Promise<any> {
+    const profiles = await this.getProfiles();
+    return profiles.find(p => p.username === username) || {};
+  }
+
+  // 获取所有用户资料
+  private async getProfiles(): Promise<any[]> {
+    const profilesStr = localStorage.getItem(this.PROFILE_KEY);
+    return profilesStr ? JSON.parse(profilesStr) : [];
+  }
+}

+ 2 - 0
src/app/tab1/tab1-routing.module.ts

@@ -7,8 +7,10 @@ const routes: Routes = [
     path: '',
     component: Tab1Page,
   }
+  
 ];
 
+
 @NgModule({
   imports: [RouterModule.forChild(routes)],
   exports: [RouterModule]

+ 38 - 3
src/app/tab1/tab1.page.html

@@ -11,7 +11,7 @@
 
   <ion-searchbar></ion-searchbar>
 
-  <ion-toolbar>
+ <!-- <ion-toolbar>
     <ion-segment [(ngModel)]="selectedSegment">
       <ion-segment-button value="a" >
         发现
@@ -41,8 +41,43 @@
       <ion-icon name="cash-outline"></ion-icon>
       省钱小组
     </ion-segment-button>
-  </ion-segment>
-  <div *ngIf="selectedSegment === 'explore'">
+  </ion-segment> -->
+  <ion-segment [(ngModel)]="mainSegment">
+  <ion-segment-button value="explore">
+    发现
+    <ion-icon name="telescope"></ion-icon>
+  </ion-segment-button>
+  <ion-segment-button value="square" (click)="Tofind()">
+    广场
+    <ion-icon name="planet"></ion-icon>
+  </ion-segment-button>
+</ion-segment>
+
+<!-- 修改子导航绑定 -->
+<ion-segment scrollable [(ngModel)]="subSegment">
+  <ion-segment-button value="recommend" expand="block" routerLink="/study/parse">
+    <ion-icon name="bag-handle"></ion-icon>
+    推荐
+  </ion-segment-button>
+  <ion-segment-button value="newest" expand="block" routerLink="/study/Shangpin/edit/new">
+    <ion-icon name="color-wand"></ion-icon>
+    最新发布
+  </ion-segment-button>
+  <ion-segment-button value="coin" (click)="Toadd()">
+    <ion-icon name="tennisball"></ion-icon>
+    智能对话
+  </ion-segment-button>
+  <ion-segment-button value="group" (click)="goToAIAssistant()">
+  <ion-icon name="cash-outline"></ion-icon>
+  省钱小组
+</ion-segment-button>
+  <!-- <ion-segment-button value="group">
+    <ion-icon name="cash-outline"></ion-icon>
+    省钱小组
+  </ion-segment-button> -->
+</ion-segment>
+  <!-- <div *ngIf="selectedSegment === 'explore'">-->
+    <div *ngIf="mainSegment === 'explore'"> 
     <ion-card class="card__content">
       <ion-card-content>
         <ion-grid>

+ 117 - 6
src/app/tab1/tab1.page.scss

@@ -1,9 +1,120 @@
 
-.card {
-  //width: 190px;
-  //height: 254px;
-  border-radius: 20px;
-  padding: 5px;
-  background-image: linear-gradient(144deg,#f0e8a876, #bbb4f07c);
+// .card {
+//   //width: 190px;
+//   //height: 254px;
+//   border-radius: 20px;
+//   padding: 5px;
+//   background-image: linear-gradient(144deg,#f0e8a876, #bbb4f07c);
+// }
+
+
+/* 调整搜索栏样式 */
+ion-searchbar {
+  --background: #f8f8f8;
+  --border-radius: 25px;
+  --box-shadow: none;
+  margin: 10px 16px;
+}
+
+/* 分段控件基础样式 */
+ion-segment {
+  ion-segment-button {
+    --color: #666;
+    --color-checked: var(--ion-color-warn);
+    --indicator-height: 3px;
+    --indicator-color: var(--ion-color-warn);
+    
+    ion-icon {
+      font-size: 1.6rem;
+      margin-bottom: 4px;
+    }
+    
+    /* 图标垂直排列 */
+    flex-direction: column;
+    min-height: 80px;
+  }
+
+  /* 滚动式分段控件 */
+  &[scrollable] {
+    ion-segment-button {
+      min-width: 120px;
+      --padding-start: 8px;
+      --padding-end: 8px;
+    }
+  }
+}
+
+/* 卡片内容布局 */
+.card__content {
+    
+  margin: 16px;
+  box-shadow: none;
+  border-radius: 12px;
+
+  ion-card {
+    transition: transform 0.3s ease;
+    margin: 8px;
+    border-radius: 12px;
+    
+    &:hover {
+      transform: translateY(-3px);
+    }
+
+    img {
+      width: 100%;
+      height: 150px;
+      object-fit: cover;
+      border-radius: 8px;
+    }
+
+    ion-icon {
+      font-size: 2.4rem;
+      color: var(--ion-color-warn);
+      margin-bottom: 8px;
+    }
+  }
+
+  /* 网格响应式布局 */
+  ion-grid {
+    padding: 0;
+    
+    ion-col {
+      padding: 8px;
+    }
+  }
 }
 
+
+
+
+
+/* 轮播样式 */
+.carousel {
+  margin: 16px;
+  border-radius: 12px;
+  overflow: hidden;
+  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
+
+  &-item {
+    position: relative;
+    height: 200px;
+    
+    img {
+      width: 100%;
+      height: 100%;
+      object-fit: cover;
+    }
+  }
+}
+
+/* 通用文本居中 */
+.ion-text-center {
+  font-size: 0.9rem;
+  font-weight: 500;
+  color: #444;
+}
+
+/* 调整工具栏间距 */
+ion-toolbar {
+  padding: 8px 0;
+}

+ 100 - 26
src/app/tab1/tab1.page.ts

@@ -1,30 +1,117 @@
-import { Component,OnInit } from '@angular/core';
+// import { Component,OnInit } from '@angular/core';
+// import Parse from "parse";
+// import { Router } from '@angular/router';
+// import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
+// import { NavController } from '@ionic/angular'
+// @Component({
+//   selector: 'app-tab1',
+//   templateUrl: 'tab1.page.html',
+//   styleUrls: ['tab1.page.scss']
+// })
+// export class Tab1Page implements OnInit {
+//   selectedSegment: string = 'explore';
+//   constructor(private router: Router,private domSan:DomSanitizer,private navCtrl: NavController) 
+//   {
+//     this.safeHTML = domSan.bypassSecurityTrustHtml(``)
+//   }
+//   Tofind() {
+//     this.router.navigate(['/find']);
+//   }
+//   Toadd() {
+//     this.router.navigate(['/study/case-parse-petmarket']);
+//   }
+//   ngOnInit() {
+//     setInterval(() => {  
+//       this.nextSlide();  
+//     }, 3000);
+//   }
+//   nextSlide() {  
+//     this.currentIndex = (this.currentIndex + 1) % this.slides.length;  
+//   }  
+  
+//   search(event: any) {  
+//     console.log('Searching for:', event.detail.value);  
+//     if(event?.detail?.value){
+//       this.loadtupianList(event?.detail?.value)
+//     }
+//   }  
+//     results:Parse.Object[] = []
+//     segment = 'tupian';  
+//     async loadtupianList(search:string){
+//       let query = new Parse.Query("tupian");
+//       query.select("title");
+//       query.contains("title",search);
+      
+//       query.limit(10);
+//       this.results = await query.find();
+//     }
+//     slides = [  
+//       { image: 'https://img.zcool.cn/community/031c1d1579eb5b00000018c1bc7726a.jpg' },  
+//       { image: 'https://pic.616pic.com/ys_bnew_img/00/20/29/NIas1YXfRf.jpg' },  
+//       { image: 'https://www.logosc.cn/uploads/output/2021/06/13/134956be3d884bb59ee644b7e25558d6.jpg?t=1627267414' }  
+//     ];  
+//     currentIndex = 0; 
+// currentTab:string = "static"
+// safeHTML: SafeResourceUrl|undefined
+
+// }
+ 
+
+import { Component, OnInit } from '@angular/core';
 import Parse from "parse";
 import { Router } from '@angular/router';
 import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
 import { NavController } from '@ionic/angular'
+
 @Component({
   selector: 'app-tab1',
   templateUrl: 'tab1.page.html',
   styleUrls: ['tab1.page.scss']
 })
 export class Tab1Page implements OnInit {
-  selectedSegment: string = 'explore';
-  constructor(private router: Router,private domSan:DomSanitizer,private navCtrl: NavController) 
-  {
+  // 分离两个导航的状态变量
+  mainSegment: string = 'explore';  // 控制顶部发现/广场导航
+  subSegment: string = 'recommend'; // 控制子导航(推荐等)
+
+  // 保持原有其他变量
+  results: Parse.Object[] = []
+  slides = [  
+    { image: 'https://img.zcool.cn/community/031c1d1579eb5b00000018c1bc7726a.jpg' },  
+    { image: 'https://pic.616pic.com/ys_bnew_img/00/20/29/NIas1YXfRf.jpg' },  
+    { image: 'https://www.logosc.cn/uploads/output/2021/06/13/134956be3d884bb59ee644b7e25558d6.jpg?t=1627267414' }  
+  ];  
+  currentIndex = 0;
+  currentTab: string = "static"
+  safeHTML: SafeResourceUrl | undefined
+
+  constructor(
+    private router: Router,
+    private domSan: DomSanitizer,
+    private navCtrl: NavController
+  ) {
     this.safeHTML = domSan.bypassSecurityTrustHtml(``)
   }
+
+  // 修改后的方法
   Tofind() {
     this.router.navigate(['/find']);
+    this.mainSegment = 'square'; // 保持状态同步
   }
+
   Toadd() {
-    this.router.navigate(['/study/case-parse-petmarket']);
+    this.router.navigate(['/ai-assistant']);
+    this.subSegment = 'coin'; // 同步子导航状态
   }
+ goToAIAssistant() {
+  console.log('导航到AI助手页面');
+  this.router.navigate(['/ai-assistant']);
+}
   ngOnInit() {
     setInterval(() => {  
       this.nextSlide();  
     }, 3000);
   }
+
   nextSlide() {  
     this.currentIndex = (this.currentIndex + 1) % this.slides.length;  
   }  
@@ -35,25 +122,12 @@ export class Tab1Page implements OnInit {
       this.loadtupianList(event?.detail?.value)
     }
   }  
-    results:Parse.Object[] = []
-    segment = 'tupian';  
-    async loadtupianList(search:string){
-      let query = new Parse.Query("tupian");
-      query.select("title");
-      query.contains("title",search);
-      
-      query.limit(10);
-      this.results = await query.find();
-    }
-    slides = [  
-      { image: 'https://img.zcool.cn/community/031c1d1579eb5b00000018c1bc7726a.jpg' },  
-      { image: 'https://pic.616pic.com/ys_bnew_img/00/20/29/NIas1YXfRf.jpg' },  
-      { image: 'https://www.logosc.cn/uploads/output/2021/06/13/134956be3d884bb59ee644b7e25558d6.jpg?t=1627267414' }  
-    ];  
-    currentIndex = 0; 
-currentTab:string = "static"
-safeHTML: SafeResourceUrl|undefined
-
-}
- 
 
+  async loadtupianList(search: string) {
+    let query = new Parse.Query("tupian");
+    query.select("title");
+    query.contains("title", search);
+    query.limit(10);
+    this.results = await query.find();
+  }
+}

+ 2 - 2
src/app/tab4/tab4.page.html

@@ -8,7 +8,7 @@
         <ion-label>设置语言</ion-label>
       </ion-button>
       
-      <ion-button  slot="end" fill="outline" (click)="ToEditInfo()">
+      <ion-button  slot="end" fill="outline" (click)="goToedit()">
         <ion-label>编辑资料</ion-label>
       </ion-button>
   </ion-toolbar>
@@ -20,7 +20,7 @@
         <img src="https://img.wxcha.com/m00/f3/29/09c159ce965c65015c22807a9b09299f.jpg?down" >
       </ion-avatar>
       <ion-card-content>
-        <p *ngIf="!user?.id" (click)="Login()" style="margin-left:10px;margin-top:15px;font-size:20px">asdddd</p>
+        <p *ngIf="!user?.id" (click)="goToLogin()" style="margin-left:10px;margin-top:15px;font-size:20px"> 111</p>
         <p  style="margin-left:10px;margin-top:30px;font-size:20px">粉丝 10 喜欢 20 关注 59</p>
       </ion-card-content>
     </ion-card-content>

+ 1 - 1
src/app/tab4/tab4.page.scss

@@ -11,7 +11,7 @@ p {
   font-size: 20px; 
 }
 p.selected {
-    color: rgb(41, 225, 185);
+    color: rgb(0, 0, 0);
 }
 .custom-card {
   margin-left: 20px;

+ 10 - 0
src/app/tab4/tab4.page.ts

@@ -9,9 +9,19 @@ import { Router } from '@angular/router';
 })
 export class Tab4Page implements OnInit {
 
+   isLoggedIn = false;
+  currentUser: string | null = null;
+
   constructor(private navCtrl: NavController,private router: Router) {}
   ToEditInfo() {
     this.router.navigate(['/edit-info']);
+  }
+   goToLogin() {
+    this.router.navigate(['/auth']); // 跳转到登录页面
+  }
+  goToedit()
+  {
+    this.router.navigate(['/profile-edit']); // 跳转到登录页面
   }
   Settings() {
     this.router.navigate(['/settings']);

+ 1 - 1
src/app/tabs/tabs-routing.module.ts

@@ -19,7 +19,7 @@ const routes: Routes = [
         path: 'tab4',
         loadChildren: () => import('../tab4/tab4.module').then( m => m.Tab4PageModule)
       }, 
-      {
+    {
         path: '',
         redirectTo: '/tabs/tab1',
         pathMatch: 'full'