Pārlūkot izejas kodu

添加界面eco-fashion

s202226701053 5 mēneši atpakaļ
vecāks
revīzija
6a8f9568bd

+ 13 - 4
E-Cover-app/angular.json

@@ -31,7 +31,10 @@
                 "output": "assets"
               }
             ],
-            "styles": ["src/global.scss", "src/theme/variables.scss"],
+            "styles": [
+              "src/global.scss",
+              "src/theme/variables.scss"
+            ],
             "scripts": []
           },
           "configurations": {
@@ -106,7 +109,10 @@
                 "output": "assets"
               }
             ],
-            "styles": ["src/global.scss", "src/theme/variables.scss"],
+            "styles": [
+              "src/global.scss",
+              "src/theme/variables.scss"
+            ],
             "scripts": []
           },
           "configurations": {
@@ -119,7 +125,10 @@
         "lint": {
           "builder": "@angular-eslint/builder:lint",
           "options": {
-            "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
+            "lintFilePatterns": [
+              "src/**/*.ts",
+              "src/**/*.html"
+            ]
           }
         }
       }
@@ -145,4 +154,4 @@
       "setParserOptionsProject": true
     }
   }
-}
+}

+ 309 - 17
E-Cover-app/package-lock.json

@@ -22,9 +22,12 @@
         "@capacitor/keyboard": "6.0.3",
         "@capacitor/status-bar": "6.0.2",
         "@ionic/angular": "^8.0.0",
+        "axios": "^1.7.9",
+        "cheerio": "^1.0.0",
         "fmode-ng": "^0.0.63",
         "ionicons": "^7.2.1",
         "lodash": "^4.17.21",
+        "node-fetch": "^3.3.2",
         "rxjs": "~7.8.0",
         "swiper": "^11.1.15",
         "tslib": "^2.3.0",
@@ -7251,6 +7254,12 @@
         "node": ">=8"
       }
     },
+    "node_modules/asynckit": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmmirror.com/asynckit/-/asynckit-0.4.0.tgz",
+      "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==",
+      "license": "MIT"
+    },
     "node_modules/at-least-node": {
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/at-least-node/-/at-least-node-1.0.0.tgz",
@@ -7316,13 +7325,14 @@
       }
     },
     "node_modules/axios": {
-      "version": "0.26.1",
-      "resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
-      "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
+      "version": "1.7.9",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-1.7.9.tgz",
+      "integrity": "sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==",
       "license": "MIT",
-      "peer": true,
       "dependencies": {
-        "follow-redirects": "^1.14.8"
+        "follow-redirects": "^1.15.6",
+        "form-data": "^4.0.0",
+        "proxy-from-env": "^1.1.0"
       }
     },
     "node_modules/axobject-query": {
@@ -7577,7 +7587,6 @@
       "version": "1.0.0",
       "resolved": "https://registry.npmmirror.com/boolbase/-/boolbase-1.0.0.tgz",
       "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==",
-      "dev": true,
       "license": "ISC"
     },
     "node_modules/bplist-parser": {
@@ -7887,6 +7896,67 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/cheerio": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/cheerio/-/cheerio-1.0.0.tgz",
+      "integrity": "sha512-quS9HgjQpdaXOvsZz82Oz7uxtXiy6UIsIQcpBj7HRw2M63Skasm9qlDocAM7jNuaxdhpPU7c4kJN+gA5MCu4ww==",
+      "license": "MIT",
+      "dependencies": {
+        "cheerio-select": "^2.1.0",
+        "dom-serializer": "^2.0.0",
+        "domhandler": "^5.0.3",
+        "domutils": "^3.1.0",
+        "encoding-sniffer": "^0.2.0",
+        "htmlparser2": "^9.1.0",
+        "parse5": "^7.1.2",
+        "parse5-htmlparser2-tree-adapter": "^7.0.0",
+        "parse5-parser-stream": "^7.1.2",
+        "undici": "^6.19.5",
+        "whatwg-mimetype": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=18.17"
+      },
+      "funding": {
+        "url": "https://github.com/cheeriojs/cheerio?sponsor=1"
+      }
+    },
+    "node_modules/cheerio-select": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmmirror.com/cheerio-select/-/cheerio-select-2.1.0.tgz",
+      "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==",
+      "license": "BSD-2-Clause",
+      "dependencies": {
+        "boolbase": "^1.0.0",
+        "css-select": "^5.1.0",
+        "css-what": "^6.1.0",
+        "domelementtype": "^2.3.0",
+        "domhandler": "^5.0.3",
+        "domutils": "^3.0.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/fb55"
+      }
+    },
+    "node_modules/cheerio/node_modules/htmlparser2": {
+      "version": "9.1.0",
+      "resolved": "https://registry.npmmirror.com/htmlparser2/-/htmlparser2-9.1.0.tgz",
+      "integrity": "sha512-5zfg6mHUoaer/97TxnGpxmbR7zJtPwIYFMZ/H5ucTlPZhKvtum05yiPK3Mgai3a0DyVxv7qYqoweaEd2nrYQzQ==",
+      "funding": [
+        "https://github.com/fb55/htmlparser2?sponsor=1",
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/fb55"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "domelementtype": "^2.3.0",
+        "domhandler": "^5.0.3",
+        "domutils": "^3.1.0",
+        "entities": "^4.5.0"
+      }
+    },
     "node_modules/chokidar": {
       "version": "3.6.0",
       "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.6.0.tgz",
@@ -8149,6 +8219,18 @@
         "node": ">=0.1.90"
       }
     },
+    "node_modules/combined-stream": {
+      "version": "1.0.8",
+      "resolved": "https://registry.npmmirror.com/combined-stream/-/combined-stream-1.0.8.tgz",
+      "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==",
+      "license": "MIT",
+      "dependencies": {
+        "delayed-stream": "~1.0.0"
+      },
+      "engines": {
+        "node": ">= 0.8"
+      }
+    },
     "node_modules/commander": {
       "version": "2.20.3",
       "resolved": "https://registry.npmmirror.com/commander/-/commander-2.20.3.tgz",
@@ -8576,7 +8658,6 @@
       "version": "5.1.0",
       "resolved": "https://registry.npmmirror.com/css-select/-/css-select-5.1.0.tgz",
       "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==",
-      "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
         "boolbase": "^1.0.0",
@@ -8593,7 +8674,6 @@
       "version": "6.1.0",
       "resolved": "https://registry.npmmirror.com/css-what/-/css-what-6.1.0.tgz",
       "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==",
-      "dev": true,
       "license": "BSD-2-Clause",
       "engines": {
         "node": ">= 6"
@@ -8622,6 +8702,15 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/data-uri-to-buffer": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz",
+      "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 12"
+      }
+    },
     "node_modules/data-view-buffer": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/data-view-buffer/-/data-view-buffer-1.0.1.tgz",
@@ -8842,6 +8931,15 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/delayed-stream": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/delayed-stream/-/delayed-stream-1.0.0.tgz",
+      "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
     "node_modules/depd": {
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/depd/-/depd-2.0.0.tgz",
@@ -8950,7 +9048,6 @@
       "version": "2.0.0",
       "resolved": "https://registry.npmmirror.com/dom-serializer/-/dom-serializer-2.0.0.tgz",
       "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
         "domelementtype": "^2.3.0",
@@ -8965,7 +9062,6 @@
       "version": "2.3.0",
       "resolved": "https://registry.npmmirror.com/domelementtype/-/domelementtype-2.3.0.tgz",
       "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==",
-      "dev": true,
       "funding": [
         {
           "type": "github",
@@ -8978,7 +9074,6 @@
       "version": "5.0.3",
       "resolved": "https://registry.npmmirror.com/domhandler/-/domhandler-5.0.3.tgz",
       "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==",
-      "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
         "domelementtype": "^2.3.0"
@@ -8994,7 +9089,6 @@
       "version": "3.1.0",
       "resolved": "https://registry.npmmirror.com/domutils/-/domutils-3.1.0.tgz",
       "integrity": "sha512-H78uMmQtI2AhgDJjWeQmHwJJ2bLPD3GMmO7Zja/ZZh84wkm+4ut+IUnUdRa8uCGX88DiVx1j6FRe1XfxEgjEZA==",
-      "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
         "dom-serializer": "^2.0.0",
@@ -9084,6 +9178,31 @@
         "iconv-lite": "^0.6.2"
       }
     },
+    "node_modules/encoding-sniffer": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmmirror.com/encoding-sniffer/-/encoding-sniffer-0.2.0.tgz",
+      "integrity": "sha512-ju7Wq1kg04I3HtiYIOrUrdfdDvkyO9s5XM8QAj/bN61Yo/Vb4vgJxy5vi4Yxk01gWHbrofpPtpxM8bKger9jhg==",
+      "license": "MIT",
+      "dependencies": {
+        "iconv-lite": "^0.6.3",
+        "whatwg-encoding": "^3.1.1"
+      },
+      "funding": {
+        "url": "https://github.com/fb55/encoding-sniffer?sponsor=1"
+      }
+    },
+    "node_modules/encoding-sniffer/node_modules/iconv-lite": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
+      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+      "license": "MIT",
+      "dependencies": {
+        "safer-buffer": ">= 2.1.2 < 3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
     "node_modules/encoding/node_modules/iconv-lite": {
       "version": "0.6.3",
       "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
@@ -9471,6 +9590,16 @@
         "node": ">=0.12.7"
       }
     },
+    "node_modules/esdk-obs-browserjs/node_modules/axios": {
+      "version": "0.26.1",
+      "resolved": "https://registry.npmmirror.com/axios/-/axios-0.26.1.tgz",
+      "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==",
+      "license": "MIT",
+      "peer": true,
+      "dependencies": {
+        "follow-redirects": "^1.14.8"
+      }
+    },
     "node_modules/eslint": {
       "version": "8.57.1",
       "resolved": "https://registry.npmmirror.com/eslint/-/eslint-8.57.1.tgz",
@@ -10246,6 +10375,29 @@
         "pend": "~1.2.0"
       }
     },
+    "node_modules/fetch-blob": {
+      "version": "3.2.0",
+      "resolved": "https://registry.npmmirror.com/fetch-blob/-/fetch-blob-3.2.0.tgz",
+      "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "paypal",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "dependencies": {
+        "node-domexception": "^1.0.0",
+        "web-streams-polyfill": "^3.0.3"
+      },
+      "engines": {
+        "node": "^12.20 || >= 14.13"
+      }
+    },
     "node_modules/file-entry-cache": {
       "version": "6.0.1",
       "resolved": "https://registry.npmmirror.com/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
@@ -10484,6 +10636,32 @@
         "url": "https://github.com/sponsors/isaacs"
       }
     },
+    "node_modules/form-data": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmmirror.com/form-data/-/form-data-4.0.1.tgz",
+      "integrity": "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw==",
+      "license": "MIT",
+      "dependencies": {
+        "asynckit": "^0.4.0",
+        "combined-stream": "^1.0.8",
+        "mime-types": "^2.1.12"
+      },
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/formdata-polyfill": {
+      "version": "4.0.10",
+      "resolved": "https://registry.npmmirror.com/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz",
+      "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==",
+      "license": "MIT",
+      "dependencies": {
+        "fetch-blob": "^3.1.2"
+      },
+      "engines": {
+        "node": ">=12.20.0"
+      }
+    },
     "node_modules/forwarded": {
       "version": "0.2.0",
       "resolved": "https://registry.npmmirror.com/forwarded/-/forwarded-0.2.0.tgz",
@@ -13585,7 +13763,6 @@
       "version": "1.52.0",
       "resolved": "https://registry.npmmirror.com/mime-db/-/mime-db-1.52.0.tgz",
       "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==",
-      "dev": true,
       "license": "MIT",
       "engines": {
         "node": ">= 0.6"
@@ -13595,7 +13772,6 @@
       "version": "2.1.35",
       "resolved": "https://registry.npmmirror.com/mime-types/-/mime-types-2.1.35.tgz",
       "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==",
-      "dev": true,
       "license": "MIT",
       "dependencies": {
         "mime-db": "1.52.0"
@@ -14126,6 +14302,43 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/node-domexception": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmmirror.com/node-domexception/-/node-domexception-1.0.0.tgz",
+      "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==",
+      "funding": [
+        {
+          "type": "github",
+          "url": "https://github.com/sponsors/jimmywarting"
+        },
+        {
+          "type": "github",
+          "url": "https://paypal.me/jimmywarting"
+        }
+      ],
+      "license": "MIT",
+      "engines": {
+        "node": ">=10.5.0"
+      }
+    },
+    "node_modules/node-fetch": {
+      "version": "3.3.2",
+      "resolved": "https://registry.npmmirror.com/node-fetch/-/node-fetch-3.3.2.tgz",
+      "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==",
+      "license": "MIT",
+      "dependencies": {
+        "data-uri-to-buffer": "^4.0.0",
+        "fetch-blob": "^3.1.4",
+        "formdata-polyfill": "^4.0.10"
+      },
+      "engines": {
+        "node": "^12.20.0 || ^14.13.1 || >=16.0.0"
+      },
+      "funding": {
+        "type": "opencollective",
+        "url": "https://opencollective.com/node-fetch"
+      }
+    },
     "node_modules/node-forge": {
       "version": "1.3.1",
       "resolved": "https://registry.npmmirror.com/node-forge/-/node-forge-1.3.1.tgz",
@@ -14428,7 +14641,6 @@
       "version": "2.1.1",
       "resolved": "https://registry.npmmirror.com/nth-check/-/nth-check-2.1.1.tgz",
       "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==",
-      "dev": true,
       "license": "BSD-2-Clause",
       "dependencies": {
         "boolbase": "^1.0.0"
@@ -14992,7 +15204,6 @@
       "version": "7.2.1",
       "resolved": "https://registry.npmmirror.com/parse5/-/parse5-7.2.1.tgz",
       "integrity": "sha512-BuBYQYlv1ckiPdQi/ohiivi9Sagc9JG+Ozs0r7b/0iK3sKmrb0b9FdWdBbOdx6hBCM/F9Ir82ofnBhtZOjCRPQ==",
-      "devOptional": true,
       "license": "MIT",
       "dependencies": {
         "entities": "^4.5.0"
@@ -15016,6 +15227,31 @@
         "url": "https://github.com/inikulin/parse5?sponsor=1"
       }
     },
+    "node_modules/parse5-htmlparser2-tree-adapter": {
+      "version": "7.1.0",
+      "resolved": "https://registry.npmmirror.com/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.1.0.tgz",
+      "integrity": "sha512-ruw5xyKs6lrpo9x9rCZqZZnIUntICjQAd0Wsmp396Ul9lN/h+ifgVV1x1gZHi8euej6wTfpqX8j+BFQxF0NS/g==",
+      "license": "MIT",
+      "dependencies": {
+        "domhandler": "^5.0.3",
+        "parse5": "^7.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/inikulin/parse5?sponsor=1"
+      }
+    },
+    "node_modules/parse5-parser-stream": {
+      "version": "7.1.2",
+      "resolved": "https://registry.npmmirror.com/parse5-parser-stream/-/parse5-parser-stream-7.1.2.tgz",
+      "integrity": "sha512-JyeQc9iwFLn5TbvvqACIF/VXG6abODeB3Fwmv/TGdLk2LfbWkaySGY72at4+Ty7EkPZj854u4CrICqNk2qIbow==",
+      "license": "MIT",
+      "dependencies": {
+        "parse5": "^7.0.0"
+      },
+      "funding": {
+        "url": "https://github.com/inikulin/parse5?sponsor=1"
+      }
+    },
     "node_modules/parse5-sax-parser": {
       "version": "7.0.0",
       "resolved": "https://registry.npmmirror.com/parse5-sax-parser/-/parse5-sax-parser-7.0.0.tgz",
@@ -15558,6 +15794,12 @@
         "node": ">= 0.10"
       }
     },
+    "node_modules/proxy-from-env": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
+      "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==",
+      "license": "MIT"
+    },
     "node_modules/prr": {
       "version": "1.0.1",
       "resolved": "https://registry.npmmirror.com/prr/-/prr-1.0.1.tgz",
@@ -16367,7 +16609,6 @@
       "version": "2.1.2",
       "resolved": "https://registry.npmmirror.com/safer-buffer/-/safer-buffer-2.1.2.tgz",
       "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
-      "dev": true,
       "license": "MIT"
     },
     "node_modules/sass": {
@@ -18036,6 +18277,15 @@
         "url": "https://github.com/sponsors/ljharb"
       }
     },
+    "node_modules/undici": {
+      "version": "6.21.0",
+      "resolved": "https://registry.npmmirror.com/undici/-/undici-6.21.0.tgz",
+      "integrity": "sha512-BUgJXc752Kou3oOIuU1i+yZZypyZRqNPW0vqoMPl8VaoalSfeR0D8/t4iAS3yirs79SSMTxTag+ZC86uswv+Cw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=18.17"
+      }
+    },
     "node_modules/undici-types": {
       "version": "6.20.0",
       "resolved": "https://registry.npmmirror.com/undici-types/-/undici-types-6.20.0.tgz",
@@ -18852,6 +19102,15 @@
       "dev": true,
       "license": "MIT"
     },
+    "node_modules/web-streams-polyfill": {
+      "version": "3.3.3",
+      "resolved": "https://registry.npmmirror.com/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz",
+      "integrity": "sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==",
+      "license": "MIT",
+      "engines": {
+        "node": ">= 8"
+      }
+    },
     "node_modules/webpack": {
       "version": "5.94.0",
       "resolved": "https://registry.npmmirror.com/webpack/-/webpack-5.94.0.tgz",
@@ -19223,6 +19482,39 @@
         "node": ">=0.8.0"
       }
     },
+    "node_modules/whatwg-encoding": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmmirror.com/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz",
+      "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==",
+      "license": "MIT",
+      "dependencies": {
+        "iconv-lite": "0.6.3"
+      },
+      "engines": {
+        "node": ">=18"
+      }
+    },
+    "node_modules/whatwg-encoding/node_modules/iconv-lite": {
+      "version": "0.6.3",
+      "resolved": "https://registry.npmmirror.com/iconv-lite/-/iconv-lite-0.6.3.tgz",
+      "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==",
+      "license": "MIT",
+      "dependencies": {
+        "safer-buffer": ">= 2.1.2 < 3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/whatwg-mimetype": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmmirror.com/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz",
+      "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==",
+      "license": "MIT",
+      "engines": {
+        "node": ">=18"
+      }
+    },
     "node_modules/which": {
       "version": "2.0.2",
       "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",

+ 3 - 0
E-Cover-app/package.json

@@ -27,9 +27,12 @@
     "@capacitor/keyboard": "6.0.3",
     "@capacitor/status-bar": "6.0.2",
     "@ionic/angular": "^8.0.0",
+    "axios": "^1.7.9",
+    "cheerio": "^1.0.0",
     "fmode-ng": "^0.0.63",
     "ionicons": "^7.2.1",
     "lodash": "^4.17.21",
+    "node-fetch": "^3.3.2",
     "rxjs": "~7.8.0",
     "swiper": "^11.1.15",
     "tslib": "^2.3.0",

+ 5 - 0
E-Cover-app/src/app/app.routes.ts

@@ -56,4 +56,9 @@ export const routes: Routes = [
     loadComponent:()=>
       import('./chat-content/chat-content.component').then((m)=>m.ChatContentComponent),
   },
+  {
+    path:'ecoFashion',
+    loadComponent:()=>
+      import('./eco-fashion/eco-fashion.component').then((m)=>m.EcoFashionComponent),
+  },
 ];

+ 16 - 0
E-Cover-app/src/app/eco-fashion/eco-fashion.component.html

@@ -0,0 +1,16 @@
+<app-custom-header [param]="['绿色时尚','   ']"></app-custom-header>
+<ion-content>
+  <ion-card>
+    <img id="map-image" alt="Map" style="width: 100%; height: auto;" />
+    <ion-card-title>处理旧衣物?看看这!</ion-card-title>
+    <div id="content-container">
+      <div class="item" *ngFor="let loca of location?.pois" (click)="clickLocation(loca.location)">
+        <img src="https://s1.imagehub.cc/images/2025/01/08/ac6b60330f659f615cd7cc3d7a128eb2.png" />
+        <div class="text-container">
+          <p class="name">{{ loca?.name }}</p>
+          <p class="address">{{ loca?.address }}</p>
+        </div>
+      </div>
+    </div>
+  </ion-card>
+</ion-content>

+ 50 - 0
E-Cover-app/src/app/eco-fashion/eco-fashion.component.scss

@@ -0,0 +1,50 @@
+ion-content {
+    --background: linear-gradient(to bottom, #f8f8f8 50%, #abffb9 100%);
+
+    ion-card {
+        border-radius: 20px;
+
+        ion-card-title {
+            margin: 10px;
+
+            @font-face {
+                font-family: 'title';
+                src: url(/assets/fonts/qingchunti.TTF);
+            }
+
+            font-family: 'title';
+            font-weight: bolder;
+        }
+
+        #content-container {
+            height: 20vh;
+            overflow-y: auto;
+
+            .item {
+                display: flex;
+                align-items: center;
+                height: 70px;
+
+                img {
+                    height: 50px;
+                    width: 50px;
+                    margin-right: 10px;
+                }
+
+                .text-container {
+                    display: flex;
+                    flex-direction: column;
+                }
+
+                p {
+                    margin: 2px;
+                }
+
+                .name {
+                    font-weight: bold;
+                    color: #000;
+                }
+            }
+        }
+    }
+}

+ 22 - 0
E-Cover-app/src/app/eco-fashion/eco-fashion.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { EcoFashionComponent } from './eco-fashion.component';
+
+describe('EcoFashionComponent', () => {
+  let component: EcoFashionComponent;
+  let fixture: ComponentFixture<EcoFashionComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [EcoFashionComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(EcoFashionComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 114 - 0
E-Cover-app/src/app/eco-fashion/eco-fashion.component.ts

@@ -0,0 +1,114 @@
+import { Component, OnInit } from '@angular/core';
+import { CustomHeaderComponent } from 'src/lib/component/custom-header/custom-header.component';
+import { IonButton, IonCard, IonCardTitle, IonContent, IonInput, IonItem, IonLabel, IonList } from '@ionic/angular/standalone';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { HttpClient } from '@angular/common/http';
+
+@Component({
+  selector: 'app-eco-fashion',
+  templateUrl: './eco-fashion.component.html',
+  styleUrls: ['./eco-fashion.component.scss'],
+  standalone: true,
+  imports: [CustomHeaderComponent, IonContent, IonItem, IonLabel, IonInput, IonButton, IonList, CommonModule,
+    FormsModule, IonCard, IonCardTitle
+  ]
+})
+export class EcoFashionComponent implements OnInit {
+  constructor(private http: HttpClient) { }
+  async ngOnInit() {
+    // await this.getLocation();
+    // await this.handleLocation();
+    // await this.getMap();
+    await this.search('旧衣改造');
+  }
+  /**
+   * @内置函数逻辑
+   */
+  /*获取位置信息*/
+  location: any | undefined;
+  async getLocation() {
+    const proxyUrl = 'http://localhost:3000/proxy';
+    const targetUrl = 'https://restapi.amap.com/v5/place/text?keywords=衣物回收&region=南昌市&key=35b3a049194864d0b80bd7c258c33608';
+    const response = await fetch(`${proxyUrl}?url=${encodeURIComponent(targetUrl)}`, {
+      headers: {
+        "accept": "application/json",
+      },
+      "method": "GET",
+      "mode": "cors",
+      "credentials": "omit"
+    });
+
+    //检查响应状态并解析JSON数据
+    if (!response.ok) {
+      throw new Error(`HTTP error! status: ${response.status}`);
+    }
+    const data = await response.json(); // 解析JSON响应
+    console.log(data); // 输出解析后的数据
+    this.location = data; // 将数据赋值给location变量
+  }
+  /*处理位置信息,获取经纬度坐标*/
+  latAndLong: Array<any> = [];
+  async handleLocation() {
+    for (let i = 0; i < this.location.pois.length; i++) {
+      console.log("正在获取经纬度信息(" + (i + 1) + "/" + this.location.count + ")");
+      const location = this.location.pois[i].location;
+      //location直接加入latAndLong数组中
+      this.latAndLong[i] = location;
+      console.log(location);
+    }
+  }
+  //请求地图
+  map: any;
+  async getMap(latAndLong?: string) {
+    let markers = "mid,0xFF0000,A:";
+    if (latAndLong) {
+      markers += latAndLong;
+    }
+    else {
+      for (let i = 0; i < this.latAndLong.length; i++) {
+        markers += `${this.latAndLong[i]};`;
+      }
+      markers = markers.slice(0, -1);
+    }
+    console.log("markers: " + markers);
+    const url = `https://restapi.amap.com/v3/staticmap?size=750*400&markers=${markers}&key=35b3a049194864d0b80bd7c258c33608`
+    const response = await fetch(url, {
+      headers: {
+      },
+      "method": "GET",
+      "mode": "cors",
+      "credentials": "omit"
+    });
+
+    if (!response.ok) {
+      throw new Error(`HTTP error! Status: ${response.status}`);
+    }
+    // 获取二进制响应数据
+    console.log(response);
+    const blob = await response.blob();
+    // 创建一个ObjectURL,它可以作为<img>标签的src属性
+    const objectURL = URL.createObjectURL(blob);
+    // 假设您有一个<img>标签用于显示地图
+    const imgElement = document.getElementById('map-image') as HTMLImageElement;
+    imgElement.src = objectURL;
+  }
+
+  /**
+   * @用户操作函数逻辑
+  */
+  /*用户点击位置*/
+  clickLocation(latAndLong: string) {
+    this.getMap(latAndLong);
+  }
+  /*搜索*/
+  posts: any;
+  async search(keyword: string) {
+    this.http.get<any[]>(`http://localhost:3000/scrape?keyword=${keyword}`)
+      .subscribe(data => {
+        this.posts = data;
+      }, error => {
+        console.error('Error fetching posts', error);
+      });
+  }
+}

+ 69 - 0
E-Cover-app/src/app/eco-fashion/server.mjs

@@ -0,0 +1,69 @@
+import express from 'express';
+import fetch from 'node-fetch';
+import axios from 'axios';
+import * as cheerio from 'cheerio';
+const app = express();
+const port = 3000;
+
+app.use((req, res, next) => {
+  res.header('Access-Control-Allow-Origin', '*');
+  res.header('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE');
+  res.header('Access-Control-Allow-Headers', 'Content-Type, Authorization');
+  next();
+});
+
+// 通用代理路由
+app.get('/proxy', async (req, res) => {
+  const targetUrl = req.query.url; // 从查询参数中获取URL
+  if (!targetUrl) {
+    return res.status(400).json({ error: 'Missing URL parameter' });
+  }
+  try {
+    console.log(`Fetching URL: ${targetUrl}`); // 打印日志信息
+    const response = await fetch(targetUrl, {
+      method: 'GET',
+      headers: {
+        // 您可能需要转发一些特定的请求头
+        'User-Agent': req.headers['User-Agent'], // 例如,转发User-Agent头
+        'Referer': req.headers['Referer'], // 例如,转发Referer头
+      },
+    });
+
+    const text = await response.text(); // 获取文本内容
+    console.log(text); // 输出文本内容以便调试(可选)
+
+    res.status(response.status).json(await response.json());
+  } catch (error) {
+    console.error('Error fetching target URL:', error); // 打印错误信息
+    res.status(500).json({ error: 'Failed to fetch target URL', details: error.message });
+  }
+});
+
+//小红书代理路由
+app.get('/scrape', async (req, res) => {
+  const keyword = req.query.keyword;
+  const url = `https://www.xiaohongshu.com/search_result?keyword=${keyword}`;
+
+  try {
+    const response = await axios.get(url);
+    console.log(response.data);
+    const $ = cheerio.load(response.data);
+    const posts = [];
+
+    $('div.post-class').each((index, element) => {
+      const title = $(element).find('h2').text();
+      const link = $(element).find('a').attr('href');
+      posts.push({ title, link });
+      console.log(title, link);
+    });
+
+    res.json(posts);
+  } catch (error) {
+    res.status(500).send('Error occurred while scraping');
+  }
+});
+
+
+app.listen(port, () => {
+  console.log(`Proxy server is running on http://localhost:${port}`);
+});

+ 1 - 1
E-Cover-app/src/app/tab1/tab1.page.html

@@ -36,7 +36,7 @@
                 <ion-img src="https://s1.imagehub.cc/images/2024/12/23/4b30d81d915b24113540c7585809c689.png" />
                 <p>搭配贴士</p>
             </div>
-            <div class="main-button">
+            <div class="main-button" (click)="goEcoFashion()">
                 <ion-img src="https://s1.imagehub.cc/images/2024/12/24/027b63214e367d15647408d3c9322177.png" />
                 <p>绿色时尚</p>
             </div>

+ 6 - 0
E-Cover-app/src/app/tab1/tab1.page.ts

@@ -54,6 +54,9 @@ export class Tab1Page {
         element.style.color = "white";
     }
   }
+  /**
+   * @界面跳转函数
+   */
   //转到GenerateOption页面
   goGenerateOption() {
     this.router.navigate(['generateOption']);
@@ -61,6 +64,9 @@ export class Tab1Page {
   goAiChat(){
     this.router.navigate(['aiChat']);
   }
+  goEcoFashion(){
+    this.router.navigate(['ecoFashion']);
+  }
   /**
    * @读取热门item
    */

BIN
E-Cover-app/src/assets/fonts/qingchunti.TTF


+ 0 - 16
E-Cover-app/src/lib/component/post-detail/post.service.ts

@@ -1,16 +0,0 @@
-import { Injectable } from '@angular/core';
-import { HttpClient } from '@angular/common/http';
-import { Observable } from 'rxjs';
-
-@Injectable({
-  providedIn: 'root',
-})
-export class PostService {
-  private apiUrl = 'https://localhost:8100/posts'; // 替换为你的API地址
-
-  constructor(private http: HttpClient) {}
-
-  getPostById(id: string): Observable<any> {
-    return this.http.get(`${this.apiUrl}/${id}`);
-  }
-}