diff --git "a/\350\264\276\347\221\236\345\256\201/client/.DS_Store" "b/\350\264\276\347\221\236\345\256\201/client/.DS_Store"
new file mode 100644
index 0000000000000000000000000000000000000000..ebea8ae44b433f578f40db23a5688f33eaec7cd4
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/.DS_Store" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0dc17b1f5829d8d79f436d5cfccef8c245246685
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=Main.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..be341d247ba4d2ce8c905c7485b3fb48566cb038
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../src/Main.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/Main.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.js"
new file mode 100644
index 0000000000000000000000000000000000000000..d9705c7c4afea1084cbdb6bf84215812ffff5868
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.js"
@@ -0,0 +1,39 @@
+import AJAX from "./business/Ajax.js";
+import DetailsCommand from "./command/DetailsCommand.js";
+import GoodsListCommand from "./command/GoodsListCommand.js";
+import ShoppingListCommand from "./command/ShoppingListCommand.js";
+import UserCommand from "./command/UserCommand.js";
+import MainController from "./controller/MainController.js";
+import DetailsPage from "./router/DetailsPage.js";
+import GoodsPage from "./router/GoodsPage.js";
+import LoginPage from "./router/LoginPage.js";
+import MainRouter from "./router/MainRouter.js";
+import RegisterPage from "./router/RegisterPage.js";
+import ShoppingPage from "./router/ShoppingPage.js";
+import { ROUTERS } from "./vo/AJAXVo.js";
+class Main {
+ constructor() {
+ MainRouter.instance.addRouter("/login", LoginPage);
+ MainRouter.instance.addRouter("/register", RegisterPage);
+ MainRouter.instance.addRouter("/goods", GoodsPage);
+ MainRouter.instance.addRouter("/shopping", ShoppingPage);
+ MainRouter.instance.addRouter("/details", DetailsPage);
+ MainController.instance.addCommand("/user", UserCommand);
+ MainController.instance.addCommand("/goods", GoodsListCommand);
+ MainController.instance.addCommand("/cart", ShoppingListCommand);
+ MainController.instance.addCommand("/details", DetailsCommand);
+ this.auth();
+ MainRouter.instance.go("/login");
+ }
+ auth() {
+ var token = localStorage.token;
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return;
+ }
+ token = JSON.parse(token);
+ AJAX.post(ROUTERS.AUTH, token);
+ }
+}
+new Main();
+//# sourceMappingURL=Main.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/Main.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..dee92aa860fa8814847a01289e56cd3eeefc66b8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/Main.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Main.js","sourceRoot":"","sources":["../src/Main.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,cAAc,MAAM,6BAA6B,CAAC;AACzD,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AACnE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AAEnD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,OAAO,WAAW,MAAM,yBAAyB,CAAC;AAClD,OAAO,SAAS,MAAM,uBAAuB,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CAAC,CAAC;QAClC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAC,KAAmB,CAAC,CAAC;IAChD,CAAC;CACJ;AACD,IAAI,IAAI,EAAE,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..225f4c284f1969d73cfe17efb0f4e882957ac0ce
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts"
@@ -0,0 +1,23 @@
+import { AJAX_Method, ROUTERS } from "../vo/AJAXVo.js";
+export default class AJAX {
+ constructor(method: AJAX_Method, router: ROUTERS, headers?: {
+ [key: string]: string;
+ }, body?: {
+ [key: string]: any;
+ }, params?: {
+ [key: string]: any;
+ });
+ private readstateChangeHandler;
+ static get(router: ROUTERS, params?: {
+ [key: string]: any;
+ }, headers?: {
+ [key: string]: string;
+ }): void;
+ static post(router: ROUTERS, body: {
+ [key: string]: any;
+ }, headers?: {
+ [key: string]: string;
+ }): void;
+ private routerNav;
+}
+//# sourceMappingURL=Ajax.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..52e38c399f15bf815102d1a53fc54abb75ca2912
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Ajax.d.ts","sourceRoot":"","sources":["../../src/business/Ajax.ts"],"names":[],"mappings":"AAKA,OAAO,EAAC,WAAW,EAAQ,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAC3D,MAAM,CAAC,OAAO,OAAO,IAAI;gBAGT,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAM,EAAE,IAAI,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,EAAE,MAAM,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC;IAmBnJ,OAAO,CAAC,sBAAsB;WA8BhB,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,EAAE,OAAO,GAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAM,GAAG,IAAI;WAKhG,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAC,EAAE,OAAO,GAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAM,GAAG,IAAI;IAK5G,OAAO,CAAC,SAAS;CA0CpB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js"
new file mode 100644
index 0000000000000000000000000000000000000000..7977cd8adaa6959cfb721703c8788a9634be806f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js"
@@ -0,0 +1,104 @@
+import MainController from "../controller/MainController.js";
+import MainModel from "../model/MainModel.js";
+import MainRouter from "../router/MainRouter.js";
+import { stringfiy } from "../utils/QueryString.js";
+import { PATH, ROUTERS } from "../vo/AJAXVo.js";
+export default class AJAX {
+ constructor(method, router, headers = {}, body, params) {
+ // 创建XMLHttpRequest对象
+ var xhr = new XMLHttpRequest();
+ // 添加readystatechange事件监听器,用于处理状态变化
+ xhr.addEventListener("readystatechange", e => this.readstateChangeHandler(e));
+ // 根据是否存在params来拼接参数数据
+ var paramsData = params ? "?" + stringfiy(params) : "";
+ // 打开HTTP请求
+ xhr.open(method, PATH + router + paramsData);
+ // 设置请求头
+ for (var key in headers) {
+ xhr.setRequestHeader(key, headers[key]);
+ }
+ // 根据是否存在body发送请求
+ body ? xhr.send(JSON.stringify(body)) : xhr.send();
+ }
+ readstateChangeHandler(e) {
+ // 获取XMLHttpRequest对象
+ var xhr = e.target;
+ // 获取路由字符串
+ var router = xhr.responseURL.replace(PATH, "");
+ if (xhr.readyState === 2 && xhr.status === 200) {
+ // 请求已发送并且已接收到响应头
+ }
+ else if (xhr.readyState === 4 && xhr.status === 200) {
+ // 请求已完成且响应已就绪(状态码为200表示成功)
+ // 解析响应数据
+ var result = JSON.parse(xhr.response);
+ if (result.errno) {
+ // 处理请求发生错误的情况
+ console.log("错误", result.result.message);
+ if (router === ROUTERS.AUTH) {
+ // 跳转到登录页面
+ MainRouter.instance.go("/login");
+ }
+ }
+ else {
+ // 请求成功,根据不同的路由进行导航
+ this.routerNav(router, result);
+ }
+ }
+ else if (xhr.status !== 200 && xhr.readyState === 4) {
+ // 请求发送失败
+ console.log("通信失败");
+ }
+ }
+ static get(router, params, headers = {}) {
+ // 发送GET请求
+ new AJAX("GET", router, headers, undefined, params);
+ }
+ static post(router, body, headers = {}) {
+ // 发送POST请求
+ new AJAX("POST", router, headers, body);
+ }
+ routerNav(router, result) {
+ // 根据不同的路由进行导航
+ switch (router) {
+ case ROUTERS.LOGIN:
+ // 处理登录路由
+ MainModel.instance.loginResult = result.result;
+ MainController.instance.dispatch(router, result.result);
+ break;
+ case ROUTERS.REGISTER:
+ // 处理注册路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.AUTH:
+ // 处理身份验证路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.LIST:
+ // 处理列表路由
+ MainController.instance.dispatch(router, result.result);
+ break;
+ case ROUTERS.ADD:
+ case ROUTERS.CHANGENUM:
+ case ROUTERS.REMOVE:
+ case ROUTERS.CHECKED:
+ // 处理添加、更改数量、移除和选中路由
+ MainModel.instance.shoppingList = result.result;
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.LOGOUT:
+ // 处理登出路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.DETAILS:
+ MainController.instance.dispatch(router, result);
+ break;
+ case ROUTERS.CARTLIST:
+ MainModel.instance.shoppingList = result.result;
+ console.log(result);
+ MainController.instance.dispatch(router, result.result);
+ break;
+ }
+ }
+}
+//# sourceMappingURL=Ajax.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..e8d1ff40d6015dfe5eb9fe1c54958c01ac684930
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/business/Ajax.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Ajax.js","sourceRoot":"","sources":["../../src/business/Ajax.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,MAAM,iCAAiC,CAAC;AAC7D,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAc,IAAI,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC;AAC3D,MAAM,CAAC,OAAO,OAAO,IAAI;IAGrB,YAAY,MAAmB,EAAE,MAAe,EAAE,UAAmC,EAAE,EAAE,IAA2B,EAAE,MAA6B;QAC/I,qBAAqB;QACrB,IAAI,GAAG,GAAmB,IAAI,cAAc,EAAE,CAAC;QAC/C,mCAAmC;QACnC,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAA;QAC7E,sBAAsB;QACtB,IAAI,UAAU,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CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;gBACxD,MAAM;YACV,KAAK,OAAO,CAAC,GAAG,CAAC;YACjB,KAAK,OAAO,CAAC,SAAS,CAAC;YACvB,KAAK,OAAO,CAAC,MAAM,CAAC;YACpB,KAAK,OAAO,CAAC,OAAO;gBAChB,oBAAoB;gBACpB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAG,MAAM,CAAC,MAA8B,CAAC;gBACxE,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;YACV,KAAK,OAAO,CAAC,MAAM;gBACf,SAAS;gBACT,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;YACV,KAAK,OAAO,CAAC,OAAO;gBAChB,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBACjD,MAAM;YACV,KAAK,OAAO,CAAC,QAAQ;gBACjB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAC,MAAM,CAAC,MAA8B,CAAC;gBACtE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;gBACpB,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,EAAC,MAAM,CAAC,MAAM,CAAC,CAAC;gBACvD,MAAM;SACb;IACL,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..09999b101bb722787daff0af6c309d89511d35dd
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts"
@@ -0,0 +1,7 @@
+import ICommand from "../interface/ICommand.js";
+export default class DetailsCommand implements ICommand {
+ constructor();
+ exec(data?: any, router?: string | undefined): void;
+ private details;
+}
+//# sourceMappingURL=DetailsCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..61a2ecd6d4ec4d49874602ae705d1f0444acd73d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsCommand.d.ts","sourceRoot":"","sources":["../../src/command/DetailsCommand.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAMhD,MAAM,CAAC,OAAO,OAAO,cAAe,YAAW,QAAQ;;IAInD,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAUnD,OAAO,CAAC,OAAO;CAQlB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..de6894ec327651a7ee990a44e9bf292c111eb65f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js"
@@ -0,0 +1,21 @@
+import Details from "../component/Details.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+export default class DetailsCommand {
+ constructor() {
+ }
+ exec(data, router) {
+ // 根据路由进行相应操作
+ switch (router) {
+ case ROUTER_CHILD.DETAILS:
+ this.details(data);
+ break;
+ }
+ }
+ details(data) {
+ console.log(data);
+ MainRouter.instance.go("/details", data);
+ new Details(data);
+ }
+}
+//# sourceMappingURL=DetailsCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f2b902916c48b05c394eb2045cfdaa7742dcd9a4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/DetailsCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsCommand.js","sourceRoot":"","sources":["../../src/command/DetailsCommand.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAC;AAG9C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,cAAc;IAC/B;IAEA,CAAC;IACD,IAAI,CAAC,IAAU,EAAE,MAA2B;QACxC,aAAa;QACb,QAAQ,MAAM,EAAE;YACZ,KAAK,YAAY,CAAC,OAAO;gBACrB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;gBACnB,MAAM;SAEb;IACL,CAAC;IAEO,OAAO,CAAC,IAAY;QAExB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAC,IAAI,CAAC,CAAC;QACxC,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;IACrB,CAAC;CAGJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..decdffb52ee7af0aa8460cb95701b00c542201a9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts"
@@ -0,0 +1,8 @@
+import ICommand from "../interface/ICommand.js";
+export default class GoodsListCommand extends Comment implements ICommand {
+ constructor();
+ exec(data?: any, router?: string | undefined): void;
+ private goodsHandler;
+ private clickHandler;
+}
+//# sourceMappingURL=GoodsListCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..8fb61e0f4914e7b4358bdb8fe09729baac712e8d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"GoodsListCommand.d.ts","sourceRoot":"","sources":["../../src/command/GoodsListCommand.ts"],"names":[],"mappings":"AAGA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,OAAQ,YAAW,QAAQ;;IAiB9D,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IA4N1D,OAAO,CAAC,YAAY;IAoBpB,OAAO,CAAC,YAAY;CAoCvB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..6e80ad5dad76fa525e3117336f85779ffaea0ba0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js"
@@ -0,0 +1,288 @@
+import AJAX from "../business/Ajax.js";
+import Carousel from "../component/Carousel.js";
+import Goods from "../component/Goods.js";
+import { DETAILS_EVENT } from "../interface/IEvents.js";
+import ViewModel from "../model/ViewModel.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+export default class GoodsListCommand extends Comment {
+ constructor() {
+ super();
+ var arr = [
+ { id: 1001, img: "./img/banner1.webp" },
+ { id: 1002, img: "./img/banner2.webp" },
+ { id: 1003, img: "./img/banner3.webp" },
+ { id: 1004, img: "./img/banner4.webp" },
+ { id: 1005, img: "./img/banner5.webp" }
+ ];
+ var carousel = new Carousel();
+ carousel.w = 600;
+ carousel.h = 386;
+ carousel.data = arr;
+ carousel.appendTo("body");
+ }
+ // 执行该命令
+ exec(data, router) {
+ // 向 ViewModel 注册添加商品事件(GOOD_EVENT.ADD_GOODS),并指定 goodsHandler 作为事件处理函数
+ ViewModel.instance.addEvent(DETAILS_EVENT.GO_DETAILS, e => this.goodsHandler(e));
+ // 向 ViewModel 注册 click 事件,并指定 clickHandler 作为事件处理函数
+ ViewModel.instance.addEvent("click", (e) => this.clickHandler(e));
+ // 创建文档片段
+ var html = document.createElement('div');
+ html.innerHTML = `
+
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 退出登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
搜 索
+
+
+
+
+
+
+
品类市场
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
为你推荐
+
根据您的浏览,实时为您推荐爆款产品
+
+
+
+
+
+ `;
+ ViewModel.instance.app.appendChild(html);
+ var elem = document.createDocumentFragment();
+ // 创建退出登录按钮
+ // var bn: HTMLButtonElement = document.createElement("button");
+ // bn.id = "logotBn";
+ // bn.textContent = "退出登录";
+ // ViewModel.instance.app.appendChild(bn);
+ // 遍历数据中的每个商品,并将每个商品的视图添加到文档片段中
+ data.forEach((item) => {
+ var goods = new Goods(item);
+ goods.appendTo(elem);
+ });
+ var list = document.querySelector('.list');
+ list === null || list === void 0 ? void 0 : list.appendChild(elem);
+ // ViewModel.instance.app.appendChild(elem);
+ html.innerHTML += `
+
+
+
+
+
+
+ `;
+ // 将文档片段添加到 ViewModel 实例中的 app 元素中
+ ViewModel.instance.app.appendChild(html);
+ var banner = document.querySelector(".banner");
+ var carousel = document.querySelector(".carousel");
+ banner === null || banner === void 0 ? void 0 : banner.appendChild(carousel);
+ // var result = ViewModel.instance.app.querySelector(".list") as HTMLLIElement
+ }
+ // 处理商品事件
+ goodsHandler(e) {
+ // 获取 token
+ var token = localStorage.token;
+ // 如果 token 不存在,跳转到登录页
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return;
+ }
+ // 解析 token
+ token = JSON.parse(String(token));
+ // 发送添加商品请求
+ // AJAX.post(ROUTERS.ADD, { user: token.user, userId: token.userId, token: token.token, id: e.data.pid, itemId: e.id });
+ console.log(e.id);
+ AJAX.post(ROUTERS.DETAILS, { pid: e.id });
+ }
+ // 处理点击事件
+ clickHandler(e) {
+ if (e.target.id === 'img') {
+ var elem = e.target.parentNode;
+ // console.log((e.target as HTMLElement).parentNode);
+ var id = e.target.getAttribute('data-id');
+ var evt = new Event(DETAILS_EVENT.GO_DETAILS, { bubbles: true });
+ evt.id = id;
+ evt.data = this.data;
+ elem.dispatchEvent(evt);
+ return;
+ }
+ if (e.target.id === 'shopping-list') {
+ MainRouter.instance.go("/shopping", this.data);
+ if (localStorage.token) {
+ var token = localStorage.token;
+ token = JSON.parse(String(token));
+ AJAX.post(ROUTERS.CARTLIST, { user: token.user, userId: token.userId, token: token.token });
+ }
+ else {
+ MainRouter.instance.go("/login");
+ }
+ return;
+ }
+ if (e.target.id == "logoutBn") {
+ // 获取 token
+ var token = localStorage.token;
+ // 如果 token 不存在,跳转到登录页
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return;
+ }
+ // 发送注销请求
+ AJAX.post(ROUTERS.LOGOUT, token);
+ }
+ }
+}
+//# sourceMappingURL=GoodsListCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..4dbe7efd03ba6a54577f4fa3ee1f6d8d3ac10a6f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/GoodsListCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Go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,CAAC;YACnB,IAAoB,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YACzC,OAAM;SACT;QAED,IAAK,CAAC,CAAC,MAAsB,CAAC,EAAE,KAAK,eAAe,EAAE;YAClD,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YAC7C,IAAG,YAAY,CAAC,KAAK,EAAC;gBAClB,IAAI,KAAK,GAAwB,YAAY,CAAC,KAAK,CAAC;gBACpD,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;gBAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAC,EAAC,IAAI,EAAC,KAAK,CAAC,IAAI,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,EAAC,KAAK,EAAC,KAAK,CAAC,KAAK,EAAC,CAAC,CAAC;aACvF;iBAAI;gBACD,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAA;aACnC;YACD,OAAM;SACT;QACD,IAAK,CAAC,CAAC,MAAsB,CAAC,EAAE,IAAI,UAAU,EAAE;YAC5C,WAAW;YACX,IAAI,KAAK,GAAwB,YAAY,CAAC,KAAK,CAAC;YACpD,sBAAsB;YACtB,IAAI,CAAC,KAAK,EAAE;gBACR,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;gBACjC,OAAO;aACV;YACD,SAAS;YACT,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,KAAmB,CAAC,CAAC;SAClD;IACL,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..6d44591f3ce55b12e54577882c36d3b04853d4de
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts"
@@ -0,0 +1,11 @@
+import ICommand from "../interface/ICommand.js";
+export default class ShoppingListCommand implements ICommand {
+ constructor();
+ exec(data?: any, router?: string | undefined): void;
+ private stepChangeHandler;
+ private clickHandler;
+ private checkBoxChangeHandler;
+ private getToken;
+ private addClickHandler;
+}
+//# sourceMappingURL=ShoppingListCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..96977ca2a6b15f4c186f482106df81bfef2b58e8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ShoppingListCommand.d.ts","sourceRoot":"","sources":["../../src/command/ShoppingListCommand.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAUhD,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,QAAQ;;IAKxD,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAgBnD,OAAO,CAAC,iBAAiB;IAgBzB,OAAO,CAAC,YAAY;IAgBpB,OAAO,CAAC,qBAAqB;IAY7B,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,eAAe;CAQ1B"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..9e7e3a3563d5f1b6fbda6a1ca29314be4b860df5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js"
@@ -0,0 +1,84 @@
+import AJAX from "../business/Ajax.js";
+import { GOOD_EVENT, STEP_EVENT } from "../interface/IEvents.js";
+import MainModel from "../model/MainModel.js";
+import ViewModel from "../model/ViewModel.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+export default class ShoppingListCommand {
+ constructor() {
+ }
+ exec(data, router) {
+ console.log(data);
+ // console.log(123);
+ //清除视图模型的事件
+ ViewModel.instance.clearEvent();
+ //跳转到购物页面
+ MainRouter.instance.go("/shopping", router);
+ //为步骤更改事件添加事件处理程序
+ ViewModel.instance.addEvent(STEP_EVENT.STEP_CHANGE, e => this.stepChangeHandler(e));
+ ViewModel.instance.addEvent(GOOD_EVENT.ADD_GOODS, e => this.addClickHandler(e));
+ //为点击事件添加事件处理程序
+ ViewModel.instance.addEvent("click", e => this.clickHandler(e));
+ }
+ //处理步骤更改事件
+ stepChangeHandler(e) {
+ console.log(e);
+ var token = localStorage.token;
+ token = JSON.parse(String(token));
+ console.log(e.num);
+ AJAX.post(ROUTERS.ADD, { token: token.token, userId: token.userId, pid: Number(e.id), numValue: e.num });
+ //获取令牌
+ // var token:IReqAuthVo|null=this.getToken();
+ // //如果令牌不存在,则返回
+ // if(!token) return;
+ // //向服务器发送更改数量的请求
+ // AJAX.post(ROUTERS.ADD,{userId:token.userId,user:token.user,token:token.token,goodsId:e.id,num:e.num,total:String(e.total)});
+ }
+ //处理点击事件
+ clickHandler(e) {
+ var elem = e.target;
+ //获取令牌
+ var token = this.getToken();
+ //如果令牌不存在,则返回
+ if (!token)
+ return;
+ if (elem.className === "delete") {
+ //向服务器发送删除请求
+ AJAX.post(ROUTERS.REMOVE, { userId: token.userId, user: token.user, token: token.token, ids: [Number(elem.getAttribute("data"))] });
+ }
+ else if (elem.className === "ck") {
+ //处理复选框改变事件
+ this.checkBoxChangeHandler(token, elem);
+ }
+ }
+ //处理复选框改变事件
+ checkBoxChangeHandler(token, elem) {
+ if (elem.id === "all") {
+ //获取所有购物项的ID,并向服务器发送全选请求
+ AJAX.post(ROUTERS.CHECKED, { userId: token.userId, user: token.user, token: token.token, ids: MainModel.instance.shoppingList.map((item) => item.pid), checked: elem.checked });
+ }
+ else {
+ //获取当前购物项的ID,并向服务器发送单选请求
+ AJAX.post(ROUTERS.CHECKED, { userId: token.userId, user: token.user, token: token.token, ids: [Number(elem.getAttribute("data"))], checked: elem.checked });
+ }
+ }
+ //获取令牌
+ getToken() {
+ var token = localStorage.token;
+ //如果令牌不存在,跳转到登录页面
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return null;
+ }
+ //将令牌解析为对象
+ token = JSON.parse(String(token));
+ return token;
+ }
+ addClickHandler(e) {
+ var token = localStorage.token;
+ token = JSON.parse(String(token));
+ console.log(e);
+ // AJAX.post(ROUTERS.ADD, {token:token.token,userId:token.userId,itemId:Number(elem.id),numValue:e.num})
+ }
+}
+//# sourceMappingURL=ShoppingListCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b66a831408b050c33033814245b9e2e1ee0fa7a1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/ShoppingListCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ShoppingListCommand.js","sourceRoot":"","sources":["../../src/command/ShoppingListCommand.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAe,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACzE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAG9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAG1C,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACpC;IAEA,CAAC;IA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IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,EAAC,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,EAAC,IAAI,EAAC,KAAK,CAAC,IAAI,EAAC,KAAK,EAAC,KAAK,CAAC,KAAK,EAAC,GAAG,EAAC,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,OAAO,EAAC,IAAI,CAAC,OAAO,EAAC,CAAC,CAAA;SAClJ;IACL,CAAC;IAED,MAAM;IACE,QAAQ;QACZ,IAAI,KAAK,GAAmB,YAAY,CAAC,KAAK,CAAC;QAC/C,iBAAiB;QACjB,IAAG,CAAC,KAAK,EAAC;YACN,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC;SACf;QACD,UAAU;QACV,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;QAC9C,OAAO,KAAK,CAAC;IACjB,CAAC;IAEO,eAAe,CAAC,CAAQ;QAC5B,IAAI,KAAK,GAAwB,YAAY,CAAC,KAAK,CAAC;QACpD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAA;QAC/C,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEf,wGAAwG;IAE5G,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d209f1dc05d8af34843f013acb49d31335bf81ab
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts"
@@ -0,0 +1,10 @@
+import ICommand from "../interface/ICommand.js";
+export default class UserCommand implements ICommand {
+ constructor();
+ exec(data?: any, router?: string | undefined): void;
+ private login;
+ private logout;
+ private register;
+ private auth;
+}
+//# sourceMappingURL=UserCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..0dfa83922bf3dce38c71f421602ff7dc3d861618
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"UserCommand.d.ts","sourceRoot":"","sources":["../../src/command/UserCommand.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAahD,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,QAAQ;;IAIhD,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAmBnD,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,MAAM;IAMd,OAAO,CAAC,QAAQ;IAKhB,OAAO,CAAC,IAAI;CAGf"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..18fe66b8e8e1d08051122ecfd29c013e747cd1e3
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js"
@@ -0,0 +1,49 @@
+import MainRouter from "../router/MainRouter.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+// 注释:
+// 1. UserCommand 类表示用户命令,实现了 ICommand 接口。
+// 2. exec 方法用于执行相应的操作,接收数据参数 data 和路由参数 router。
+// 3. Switch 语句根据不同的路由执行相应的操作。
+// 4. login 方法用于执行登录操作,跳转到商品页面。
+// 5. logout 方法用于执行登出操作,删除本地存储中的令牌,并跳转到登录页面。
+// 6. register 方法用于执行注册操作,跳转到登录页面。
+// 7. auth 方法用于执行认证操作,跳转到商品页面。
+export default class UserCommand {
+ constructor() {
+ }
+ exec(data, router) {
+ // 根据路由进行相应操作
+ switch (router) {
+ case ROUTER_CHILD.LOGIN:
+ this.login(data); // 执行登录操作
+ break;
+ case ROUTER_CHILD.REGISTER:
+ this.register(data); // 执行注册操作
+ break;
+ case ROUTER_CHILD.LOGOUT:
+ this.logout(data); // 执行登出操作
+ break;
+ case ROUTER_CHILD.AUTH:
+ this.auth(data); // 执行认证操作
+ break;
+ }
+ }
+ // 登录操作
+ login(data) {
+ MainRouter.instance.go("/goods"); // 跳转到商品页面
+ }
+ // 登出操作
+ logout(data) {
+ delete localStorage.token; // 删除本地存储中的令牌
+ MainRouter.instance.go("/login"); // 跳转到登录页面
+ }
+ // 注册操作
+ register(data) {
+ MainRouter.instance.go("/login"); // 跳转到登录页面
+ }
+ // 认证操作
+ auth(data) {
+ MainRouter.instance.go("/goods"); // 跳转到商品页面
+ }
+}
+//# sourceMappingURL=UserCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..dd24bf708354b8a894666c74fd87243aaee99707
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/command/UserCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"UserCommand.js","sourceRoot":"","sources":["../../src/command/UserCommand.ts"],"names":[],"mappings":"AAEA,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM;AACN,0CAA0C;AAC1C,gDAAgD;AAChD,8BAA8B;AAC9B,+BAA+B;AAC/B,4CAA4C;AAC5C,kCAAkC;AAClC,8BAA8B;AAC9B,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B;IAEA,CAAC;IACD,IAAI,CAAC,IAAU,EAAE,MAA2B;QACxC,aAAa;QACb,QAAQ,MAAM,EAAE;YACZ,KAAK,YAAY,CAAC,KAAK;gBACnB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBAC3B,MAAM;YACV,KAAK,YAAY,CAAC,QAAQ;gBACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBAC9B,MAAM;YACV,KAAK,YAAY,CAAC,MAAM;gBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBAC5B,MAAM;YACV,KAAK,YAAY,CAAC,IAAI;gBAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;gBAC1B,MAAM;SACb;IACL,CAAC;IAED,OAAO;IACC,KAAK,CAAC,IAAsB;QAChC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;IAChD,CAAC;IAED,OAAO;IACC,MAAM,CAAC,IAAkB;QAC7B,OAAO,YAAY,CAAC,KAAK,CAAC,CAAC,aAAa;QACxC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;IAChD,CAAC;IAED,OAAO;IACC,QAAQ,CAAC,IAAoB;QACjC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;IAChD,CAAC;IAED,OAAO;IACC,IAAI,CAAC,IAAgB;QACzB,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,UAAU;IAChD,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5eb937f4b4be20a246b62dfae18117f35fe97873
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts"
@@ -0,0 +1,43 @@
+import Component from "./Component.js";
+import ICarouselData, { IUpdate } from "./ICarouselData.js";
+export default class Carousel extends Component implements IUpdate {
+ private static readonly MAX_TIME;
+ private static readonly SPEED;
+ private _data;
+ private left;
+ private right;
+ private imgCon;
+ private dot;
+ private prev;
+ private targetPos;
+ private currentPos;
+ private x;
+ private _w;
+ private _h;
+ private parent?;
+ private direction;
+ private autoBool;
+ private bool;
+ private ids?;
+ constructor(_data?: Array
);
+ appendTo(parent: string | HTMLElement): HTMLElement;
+ set w(value: number);
+ get w(): number;
+ set h(value: number);
+ get h(): number;
+ private renderWH;
+ private setFontSize;
+ private createBn;
+ set data(_data: Array);
+ get data(): Array;
+ private getImageBlock;
+ private mouseHandler;
+ private dotClickHandler;
+ private bnClickHandler;
+ private nextImage;
+ private changePrev;
+ update(): void;
+ private setPosition;
+ setStyle(): void;
+}
+//# sourceMappingURL=Carousel.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..94dc17fbe14ae14201092eaacce825310d83f10c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/component/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,aAAa,EAAE,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAM5D,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,SAAU,YAAW,OAAO;IAChE,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAgB;IAChD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAc;IAC3C,O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350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js"
new file mode 100644
index 0000000000000000000000000000000000000000..c4f532ea503661d42104865b6e40d813af169746
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js"
@@ -0,0 +1,324 @@
+import Component from "./Component.js";
+import TimeManager from "./TImeManager.js";
+var DIRECTION;
+(function (DIRECTION) {
+ DIRECTION["LEFT"] = "left";
+ DIRECTION["RIGHT"] = "right";
+})(DIRECTION || (DIRECTION = {}));
+class Carousel extends Component {
+ constructor(_data) {
+ super();
+ this._data = [];
+ this.prev = null;
+ this.targetPos = -1;
+ this.currentPos = 0;
+ this.x = 0;
+ this._w = 0;
+ this._h = 0;
+ this.direction = DIRECTION.LEFT;
+ this.autoBool = false;
+ this.bool = false;
+ this.elem.className = "carousel";
+ this.elem.innerHTML = `
+
+ `;
+ this.left = this.createBn(DIRECTION.LEFT);
+ this.right = this.createBn(DIRECTION.RIGHT);
+ this.imgCon = this.elem.querySelector(".img-con");
+ this.dot = this.elem.querySelector(".dot");
+ this.dot.addEventListener("click", (e) => this.dotClickHandler(e));
+ this.elem.addEventListener("mouseenter", (e) => this.mouseHandler(e));
+ this.elem.addEventListener("mouseleave", (e) => this.mouseHandler(e));
+ if (_data)
+ this.data = _data;
+ this.setStyle();
+ }
+ appendTo(parent) {
+ this.parent = super.appendTo(parent);
+ if (!this.parent)
+ return this.parent;
+ if (this.w && this.h)
+ return this.parent;
+ this.elem.style.width = "100%";
+ if (this.parent === document.body) {
+ this.elem.style.height = "33.3vw";
+ }
+ else {
+ this.elem.style.height = "100%";
+ }
+ this.setFontSize(this.parent.getBoundingClientRect().width);
+ return this.parent;
+ }
+ set w(value) {
+ this._w = value;
+ if (this._w && this.h)
+ this.renderWH(value + "px", this.h + "px");
+ }
+ get w() {
+ return this._w;
+ }
+ set h(value) {
+ this._h = value;
+ if (this.w && this._h)
+ this.renderWH(this.w + "px", value + "px");
+ }
+ get h() {
+ return this._h;
+ }
+ renderWH(w = "100%", h = "33.3vw") {
+ Object.assign(this.elem.style, {
+ width: w,
+ height: h,
+ });
+ var w1;
+ if (!/^\d+$/.test(w.toString())) {
+ if (/%$/.test(w.toString()) && this.parent) {
+ w1 = this.parent.getBoundingClientRect().width;
+ }
+ else {
+ w1 = Number(w.toString().replace(/px$/, ""));
+ }
+ }
+ else
+ w1 = Number(w);
+ this.setFontSize(w1);
+ }
+ setFontSize(width) {
+ this.elem.style.fontSize = (width / screen.width) * 100 + "px";
+ }
+ createBn(direction) {
+ var canvas = document.createElement("canvas");
+ canvas.className = direction;
+ canvas.width = 30;
+ canvas.height = 60;
+ var ctx = canvas.getContext("2d");
+ ctx.lineWidth = 5;
+ ctx.strokeStyle = "white";
+ ctx.beginPath();
+ ctx.moveTo(direction === DIRECTION.LEFT ? 25 : 5, 15);
+ ctx.lineTo(direction === DIRECTION.LEFT ? 10 : 20, 30);
+ ctx.lineTo(direction === DIRECTION.LEFT ? 25 : 5, 45);
+ ctx.stroke();
+ canvas.addEventListener("click", (e) => this.bnClickHandler(e));
+ this.elem.appendChild(canvas);
+ return canvas;
+ }
+ set data(_data) {
+ this.targetPos = -1;
+ this.currentPos = 0;
+ this.prev = null;
+ this.bool = false;
+ this.x = 0;
+ this._data = _data;
+ this.imgCon.innerHTML = _data.reduce((v, t) => v + this.getImageBlock(t), "");
+ this.dot.innerHTML = _data.reduce((v) => v + ` `, "");
+ this.changePrev();
+ }
+ get data() {
+ return this._data;
+ }
+ getImageBlock(data) {
+ return `
+
+
+ `;
+ }
+ mouseHandler(e) {
+ this.autoBool = e.type === "mouseleave";
+ if (this.autoBool && !this.ids) {
+ // this.ids=setTimeout(()=>this.autoPlay(),Carousel.MAX_TIME);
+ }
+ else if (!this.autoBool) {
+ clearTimeout(this.ids);
+ this.ids = undefined;
+ }
+ }
+ dotClickHandler(e) {
+ var elem = e.target;
+ if (elem.nodeName !== "LI" || this.bool)
+ return;
+ var index = Array.from(this.dot.children).indexOf(elem);
+ if (index === this.currentPos)
+ return;
+ if (index > this.currentPos) {
+ this.direction = DIRECTION.LEFT;
+ }
+ else {
+ this.direction = DIRECTION.RIGHT;
+ }
+ this.targetPos = index;
+ this.nextImage();
+ }
+ bnClickHandler(e) {
+ if (this.bool)
+ return;
+ if (e.target === this.left) {
+ this.targetPos =
+ this.currentPos - 1 < 0 ? this.data.length - 1 : this.currentPos - 1;
+ this.direction = DIRECTION.RIGHT;
+ }
+ else {
+ this.targetPos =
+ this.currentPos + 1 > this.data.length - 1 ? 0 : this.currentPos + 1;
+ this.direction = DIRECTION.LEFT;
+ }
+ this.nextImage();
+ }
+ nextImage() {
+ var elem = this.imgCon.children[this.targetPos];
+ elem.style.visibility = "visible";
+ this.x =
+ this.direction === DIRECTION.LEFT
+ ? this.elem.offsetWidth
+ : -this.elem.offsetWidth;
+ elem.style.transform = `translate(${this.x}px,0)`;
+ this.bool = true;
+ TimeManager.instance.add(this);
+ this.changePrev(this.targetPos);
+ }
+ changePrev(pos = 0) {
+ if (this.prev) {
+ this.prev.style.backgroundColor = "rgba(255,0,0,0)";
+ }
+ this.prev = this.dot.children[pos];
+ this.prev.style.backgroundColor = "red";
+ }
+ update() {
+ if (!this.bool)
+ return;
+ var x1 = this.setPosition();
+ this.imgCon.children[this.targetPos].style.transform = `translate(${this.x}px,0)`;
+ this.imgCon.children[this.currentPos].style.transform = `translate(${x1}px,0)`;
+ if (!this.bool) {
+ this.currentPos = this.targetPos;
+ this.targetPos = -1;
+ }
+ }
+ setPosition() {
+ this.direction === DIRECTION.LEFT
+ ? (this.x -= Carousel.SPEED)
+ : (this.x += Carousel.SPEED);
+ var x1 = this.direction == DIRECTION.LEFT
+ ? this.x - this.elem.offsetWidth
+ : this.x + this.elem.offsetWidth;
+ if (this.direction == DIRECTION.LEFT ? this.x <= 0 : this.x >= 0) {
+ this.x = 0;
+ x1 = 0;
+ this.imgCon.children[this.currentPos].style.visibility = "hidden";
+ this.bool = false;
+ TimeManager.instance.remove(this);
+ }
+ return x1;
+ }
+ // private autoPlay(): void {
+ // var evt = new MouseEvent("click");
+ // this.right.dispatchEvent(evt);
+ // clearTimeout(this.ids);
+ // this.ids=setTimeout(()=>this.autoPlay(),Carousel.MAX_TIME);
+ // }
+ setStyle() {
+ Carousel.setCss(`
+ .carousel {
+ position: relative;
+ overflow: hidden;
+ font-size:100px;
+ }
+
+ .carousel>.img-con {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+
+ }
+
+ .carousel>.img-con>.item {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ }
+
+ .carousel>.img-con>.item:first-child {
+ visibility: visible;
+ }
+
+ .carousel>.img-con>.item>img {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ }
+
+ .carousel>.img-con>.item>div {
+ position: relative;
+ font-size: 0.2em;
+ font-family: Arial, "Lucida Grande", "Microsoft Yahei", "Hiragino Sans GB", "Hiragino Sans GB W3", SimSun, "PingFang SC", STHeiti;
+ text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
+ color: white;
+ z-index: 1;
+ left: 6em;
+ top: 2em;
+ width: 600px;
+ }
+
+ .carousel>.img-con>.item>div>p {
+ margin-top: 4px;
+ margin-bottom: 4px;
+
+ }
+
+ .carousel>.img-con>.item>div>p>span {
+ font-size: 1.875em
+ }
+
+
+ .carousel>ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ bottom: 0.5em;
+ left: 50%;
+ transform: translate(-50%, 0);
+ font-size:16px;
+ }
+
+ .carousel>ul>li {
+ width: 18px;
+ height: 18px;
+ border-radius: 18px;
+ border: 2px solid red;
+ margin-left: 18px;
+ float: left;
+ }
+
+ .carousel>ul>li:first-child {
+ margin-left: 0;
+ }
+
+ .carousel>.left,
+ .carousel>.right {
+ font-size:16px;
+ position: absolute;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+
+ .carousel>.left {
+ left: 50px;
+ }
+
+ .carousel>.right {
+ right: 50px;
+ }`);
+ }
+}
+Carousel.MAX_TIME = 3000;
+Carousel.SPEED = 50;
+export default Carousel;
+//# sourceMappingURL=Carousel.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..c4fd0c33128e055e893efbfd8a83d7e091560e61
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Carousel.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../src/component/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,IAAK,SAGJ;AAHD,WAAK,SAAS;IACZ,0BAAa,CAAA;IACb,4BAAe,CAAA;AACjB,CAAC,EAHI,SAAS,KAAT,SAAS,QAGb;AACD,MAAqB,QAAS,SAAQ,SAAS;IAmB7C,YAAmB,KAA4B;QAC7C,KAAK,EAAE,CAAC;QAjBF,UAAK,GAAyB,EAAE,CAAC;QAKjC,SAAI,GAAyB,IAAI,CAAC;QAClC,cAAS,GAAW,CAAC,CAAC,CAAC;QACvB,eAAU,GAAW,CAAC,CAAC;QACvB,MAAC,GAAW,CAAC,CAAC;QACd,OAAE,GAAW,CAAC,CAAC;QACf,OAAE,GAAW,CAAC,CAAC;QAEf,cAAS,GAAc,SAAS,CAAC,IAAI,CAAC;QACtC,aAAQ,GAAY,KAAK,CAAC;QAC1B,SAAI,GAAY,KAAK,CAAC;QAI5B,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,UAAU,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;;8BAEI,CAAC;QAC3B,IAAI,CAAC,IAAI,GAAG,IAAI,CAA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GAAG,QAAQ,CAAC;YAC9B,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;YAClB,WAAW,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SACnC;QACD,OAAO,EAAE,CAAC;IACZ,CAAC;IACH,+BAA+B;IAC/B,yCAAyC;IACzC,qCAAqC;IACrC,8BAA8B;IAC9B,kEAAkE;IAClE,MAAM;IACJ,QAAQ;QACN,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkGV,CAAC,CAAC;IACV,CAAC;;AA9TuB,iBAAQ,GAAW,IAAI,AAAf,CAAgB;AACxB,cAAK,GAAW,EAAE,AAAb,CAAc;eAFxB,QAAQ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..6422c0d49ab4b90a33c943b45ac2edd702045d4c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts"
@@ -0,0 +1,8 @@
+export default class Component extends EventTarget {
+ protected elem: HTMLElement;
+ static cssBool: boolean;
+ constructor(type?: string);
+ appendTo(parent: string | HTMLElement | DocumentFragment): HTMLElement;
+ static setCss(str: string): void;
+}
+//# sourceMappingURL=Component.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a14603ed54fc700149190ec31f4f8499cfa5cb1e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../src/component/Component.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,WAAW;IAC9C,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;IAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,CAAS;gBACpB,IAAI,GAAE,MAAc;IAKzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,gBAAgB,GAAG,WAAW;WAQ/D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAQ1C"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js"
new file mode 100644
index 0000000000000000000000000000000000000000..cfb18471c825c6596df6fe86c5ff868e0b34d58e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js"
@@ -0,0 +1,30 @@
+import Utils from "../utils/Utils.js";
+class Component extends EventTarget {
+ constructor(type = "div") {
+ super();
+ // 创建一个指定类型的HTML元素
+ this.elem = document.createElement(type);
+ }
+ appendTo(parent) {
+ // 如果传入的parent是字符串,则将其转换为对应的HTML元素
+ if (typeof parent === "string")
+ parent = document.querySelector(parent);
+ // 将当前元素追加到parent元素中
+ if (parent && (parent instanceof HTMLElement || parent instanceof DocumentFragment))
+ parent.appendChild(this.elem);
+ // 返回当前元素的父元素
+ return this.elem.parentElement;
+ }
+ static setCss(str) {
+ // 如果cssBool已经为true,则不执行后续代码
+ if (this.cssBool)
+ return;
+ // 将cssBool设置为true,表示已经执行过了
+ this.cssBool = true;
+ // 调用Utils工具类的setCss方法,传入CSS字符串作为参数
+ Utils.setCss(str);
+ }
+}
+Component.cssBool = false;
+export default Component;
+//# sourceMappingURL=Component.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..d3a374caca09dcb31bda51e435d353b86499caba
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Component.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Component.js","sourceRoot":"","sources":["../../src/component/Component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAEtC,MAAqB,SAAU,SAAQ,WAAW;IAG9C,YAAY,OAAe,KAAK;QAC5B,KAAK,EAAE,CAAC;QACR,kBAAkB;QAClB,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IACM,QAAQ,CAAC,MAA+C;QAC3D,kCAAkC;QAClC,IAAI,OAAO,MAAM,KAAK,QAAQ;YAAE,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAgB,CAAC;QACvF,oBAAoB;QACpB,IAAI,MAAM,IAAI,CAAC,MAAM,YAAY,WAAW,IAAI,MAAM,YAAY,gBAAgB,CAAC;YAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnH,aAAa;QACb,OAAO,IAAI,CAAC,IAAI,CAAC,aAA4B,CAAC;IAClD,CAAC;IACM,MAAM,CAAC,MAAM,CAAC,GAAW;QAC5B,4BAA4B;QAC5B,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,2BAA2B;QAC3B,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACnB,mCAAmC;QACpC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;;AArBM,iBAAO,GAAY,KAAK,CAAC;eAFf,SAAS"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..607fc3325cce6100ef8125d22a43c376b513581d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts"
@@ -0,0 +1,22 @@
+import Component from "./Component.js";
+export default class Details extends Component {
+ private _data?;
+ private min;
+ private max;
+ private mask;
+ private left;
+ private right;
+ private imgCon;
+ private prev;
+ private MASK_WIDTH;
+ private MAX_WIDTH;
+ private MIN_WIDTH;
+ private add_shoppinglist;
+ private num;
+ constructor(_data?: any);
+ mouseHandler(e: MouseEvent | Event): void;
+ iconMouseHandler(e: MouseEvent): void;
+ bnClickHandler(e: Event): void;
+ private goclickHandler;
+}
+//# sourceMappingURL=Details.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..4d688c1544f7762bdcd448238c02fab199ffacb6
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Details.d.ts","sourceRoot":"","sources":["../../src/component/Details.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AASvC,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAC1C,OAAO,CAAC,KAAK,CAAC,CAAI;IAClB,OAAO,CAAC,GAAG,CAA2B;IACtC,OAAO,CAAC,GAAG,CAA2B;IACtC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,IAAI,CAA2B;IACvC,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,gBAAgB,CAAM;IAC9B,OAAO,CAAC,GAAG,CAAK;gBACJ,KAAK,CAAC,EAAC,GAAG;IAsKtB,YAAY,CAAC,CAAC,EAAE,UAAU,GAAC,KAAK;IAyBhC,gBAAgB,CAAC,CAAC,EAAC,UAAU;IAW7B,cAAc,CAAC,CAAC,EAAC,KAAK;IAkBtB,OAAO,CAAC,cAAc;CAwBzB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js"
new file mode 100644
index 0000000000000000000000000000000000000000..6b70ddc5ff74ab01ee7bcde21b1d3b0c41420256
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js"
@@ -0,0 +1,256 @@
+import { GOOD_EVENT } from "../interface/IEvents.js";
+import ViewModel from "../model/ViewModel.js";
+import Component from "./Component.js";
+import MainRouter from "../router/MainRouter.js";
+import AJAX from "../business/Ajax.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+export default class Details extends Component {
+ constructor(_data) {
+ super();
+ this.MASK_WIDTH = 303.75; //阴影盒子的大小
+ this.MAX_WIDTH = 496; //放大盒子的宽度
+ this.MIN_WIDTH = 496; //标准图片的大小
+ this._data = _data;
+ // console.log(this._data[0].list);
+ // console.log(JSON.parse(this._data[0].list)[0]);
+ this.elem.innerHTML = `
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 消息
+
+
+
+
+
+
+
+
+
+
+
+
${_data[0].title}
+
+
+
+
+
+
+
+
+
0 条评价 | 90天内>10 件成交
+
举报
+
+
+ 批发
+ 代发
+
+
+
+ 价格
+ ¥${_data[0].price + '' + _data[0].price1}
+
+
+ 起批量
+ 2件起批
+
+
+
+
+
+
+
颜色
+
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
+
+
+
尺码
+
+
+ s
+ ${_data[0].price + '' + _data[0].price1}元
+ 45件可售
+
+ -
+ 1
+ +
+
+
+
+
+
加采购车
+
+
+
`;
+ var number = this.elem.querySelector(".center>.details .details-right>.number");
+ // var step_num = this.elem.querySelector('.step-num')
+ // var step= new StepNumber();
+ // step.appendTo(step_num as HTMLElement);
+ // var input = step_num?.querySelector('.input') as HTMLInputElement
+ // this.num = input.value as any
+ (this.min) = this.elem.querySelector(".min"); // 获取最小尺寸的元素
+ this.min.style.backgroundImage = `url(${_data[0].img})`;
+ this.max = this.elem.querySelector(".max"); // 获取最大尺寸的元素
+ this.max.style.background = `url(${_data[0].img})`;
+ this.mask = this.elem.querySelector(".mask"); // 获取遮罩的元素
+ this.left = this.elem.querySelector(".icon-carousel .left"); // 获取左按钮元素
+ this.right = this.elem.querySelector(".icon-carousel .right"); // 获取右按钮元素
+ this.imgCon = this.elem.querySelector(".img-con"); // 获取图片容器元素
+ this.add_shoppinglist = this.elem.querySelector(".add-shoppinglist");
+ this.min.addEventListener("mouseenter", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标进入事件
+ // console.log(this.imgCon);
+ this.imgCon.addEventListener("mouseover", (e) => this.iconMouseHandler(e)); // 监听图片容器元素的鼠标悬停事件
+ this.elem.addEventListener("click", (e) => this.bnClickHandler(e)); // 监听左按钮的点击事件
+ // (this.right as Element).addEventListener("click", (e)=>this.bnClickHandler(e)); // 监听右按钮的点击事件
+ this.add_shoppinglist.addEventListener("click", (e) => this.goclickHandler(e));
+ ViewModel.instance.app.appendChild(this.elem); //把整体插入到页面中
+ }
+ mouseHandler(e) {
+ if (e.type === "mouseenter") {
+ this.min.addEventListener("mouseleave", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标离开事件
+ this.min.addEventListener("mousemove", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标移动事件
+ this.mask.style.visibility = this.max.style.visibility = "visible"; // 显示遮罩和最大尺寸元素
+ }
+ else if (e.type === "mouseleave") {
+ this.min.removeEventListener("mouseleave", (e) => this.mouseHandler(e)); // 移除最小尺寸元素的鼠标离开事件监听
+ this.min.removeEventListener("mousemove", (e) => this.mouseHandler(e)); // 移除最小尺寸元素的鼠标移动事件监听
+ this.mask.style.visibility = this.max.style.visibility = "hidden"; // 隐藏遮罩和最大尺寸元素
+ }
+ else { //鼠标移动
+ var x = e.offsetX - this.MASK_WIDTH / 2; //鼠标当前位置减去遮罩层宽度的一半/2x和y是保存偏移量的变量
+ var y = e.offsetY - this.MASK_WIDTH / 2; //鼠标当前位置减去遮罩层高度的一半
+ if (x < 0)
+ x = 0; // 如果 x 坐标小于 0 则设置 x 为 0
+ else if (x > this.MIN_WIDTH - this.MASK_WIDTH)
+ x = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 x 坐标大于最小尺寸减去遮罩宽度则设置 x 为 最小尺寸减去遮罩宽度
+ if (y < 0)
+ y = 0; // 如果 y 坐标小于 0 则设置 y 为 0
+ else if (y > this.MIN_WIDTH - this.MASK_WIDTH)
+ y = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 y 坐标大于最小尺寸减去遮罩宽度则设置 y 为 最小尺寸减去遮罩宽度
+ this.mask.style.left = x + "px"; // 设置遮罩的 left 属性为 x
+ this.mask.style.top = y + "px"; // 设置遮罩的 top 属性为 y
+ this.max.style.backgroundPositionX =
+ (-x * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 x 坐标计算最大尺寸的背景图的 x 偏移位置
+ this.max.style.backgroundPositionY =
+ (-y * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 y 坐标计算最大尺寸的背景图的 y 偏移位置
+ }
+ }
+ iconMouseHandler(e) {
+ if ((e.target.nodeName) !== "IMG")
+ return; // 如果触发事件的元素不是图片则返回
+ if (this.prev) {
+ this.prev.style.borderColor = "rgba(255,0,0,0)"; // 移除上一个选中图片的边框颜色样式
+ }
+ this.prev = e.target; // 设置当前选中的图片元素
+ this.prev.style.borderColor = "red"; // 设置当前选中的图片元素的边框颜色样式为红色
+ this.max.style.backgroundImage =
+ this.min.style.backgroundImage = `url(${this.prev.src.replace(/-1/, "")})`; // 设置最小尺寸和最大尺寸的背景图片为当前选中的图片
+ }
+ bnClickHandler(e) {
+ var num_sub = document.querySelector('#num-sub');
+ var num_add = document.querySelector('#num-add');
+ var num_value = document.querySelector('#num-value');
+ if (e.target === this.left) {
+ this.imgCon.style.left = "0px";
+ }
+ else if (e.target === this.right) {
+ this.imgCon.style.left = -4 * 78 + "px";
+ }
+ else if (e.target.id === 'shopping-list') {
+ MainRouter.instance.go("/shopping");
+ }
+ else if (e.target.id === 'num-sub') {
+ if (Number(num_value.innerHTML) <= 1)
+ num_sub.disabled = true;
+ else
+ num_value.innerHTML = String(Number(num_value.innerHTML) - 1);
+ }
+ else if (e.target.id === 'num-add') {
+ if (Number(num_value.innerHTML) >= 1)
+ num_sub.disabled = false;
+ num_value.innerHTML = String(Number(num_value.innerHTML) + 1);
+ }
+ }
+ goclickHandler(e) {
+ // console.log('加入购物车');
+ // console.log(this._data);
+ // console.log(this.num);
+ // console.log(e.target);
+ var numValue = document.querySelector("#num-value");
+ var elem = e.target;
+ // console.log(elem.id);
+ var token = localStorage.token;
+ token = JSON.parse(String(token));
+ // 创建并分发带有相关数据的自定义事件
+ var evt = new Event(GOOD_EVENT.ADD_GOODS, { bubbles: true });
+ evt.num = this.num;
+ evt.data = this._data;
+ evt.numValue = numValue.innerHTML;
+ this.elem.dispatchEvent(evt);
+ // console.log(this._data[0]);
+ console.log(elem.id);
+ AJAX.post(ROUTERS.ADD, { token: token.token, userId: token.userId, itemId: Number(elem.id), numValue: numValue.innerHTML });
+ }
+}
+//# sourceMappingURL=Details.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..d1ba5476e0a4d11dda66f5ceccb968ab0dd14335
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Details.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Details.js","sourceRoot":"","sources":["../../src/component/Details.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,UAAU,EAAE,MAAM,yB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AAa,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAgB,CAAC;QAC7E,IAAI,IAAI,GAAe,CAAC,CAAC,MAAqB,CAAC;QAC/C,wBAAwB;QACxB,IAAI,KAAK,GAAwB,YAAY,CAAC,KAAK,CAAC;QACpD,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAA;QAE/C,oBAAoB;QACpB,IAAI,GAAG,GAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAClE,GAAG,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,CAAA;QAClB,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACtB,GAAG,CAAC,QAAQ,GAAC,QAAQ,CAAC,SAAS,CAAA;QAC/B,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC7B,8BAA8B;QAC9B,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAC,KAAK,EAAC,KAAK,CAAC,KAAK,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,EAAC,MAAM,EAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,EAAC,QAAQ,EAAC,QAAQ,CAAC,SAAS,EAAC,CAAC,CAAA;IAEtH,CAAC;CAEJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..ac3d33415938e16233a68f9e5621abbcdab26ad1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts"
@@ -0,0 +1,21 @@
+import Component from "./Component.js";
+export default class Detals extends Component {
+ private _data?;
+ private min;
+ private max;
+ private mask;
+ private left;
+ private right;
+ private imgCon;
+ private prev;
+ private MASK_WIDTH;
+ private MAX_WIDTH;
+ private MIN_WIDTH;
+ private shopping;
+ constructor(_data?: any);
+ mouseHandler(e: MouseEvent | Event): void;
+ iconMouseHandler(e: MouseEvent): void;
+ bnClickHandler(e: Event): void;
+ private goclickHandler;
+}
+//# sourceMappingURL=Detals.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f8f1b6ebf98563522a1635cdbf31f69d198fa6d2
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Detals.d.ts","sourceRoot":"","sources":["../../src/component/Detals.ts"],"names":[],"mappings":"AAGA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAKvC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;IACzC,OAAO,CAAC,KAAK,CAAC,CAAI;IAClB,OAAO,CAAC,GAAG,CAA2B;IACtC,OAAO,CAAC,GAAG,CAA2B;IACtC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,IAAI,CAA0B;IACtC,OAAO,CAAC,KAAK,CAAgB;IAC7B,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,IAAI,CAA2B;IACvC,OAAO,CAAC,UAAU,CAAU;IAC5B,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,SAAS,CAAO;IACxB,OAAO,CAAC,QAAQ,CAAM;gBACV,KAAK,CAAC,EAAC,GAAG;IA0ItB,YAAY,CAAC,CAAC,EAAE,UAAU,GAAC,KAAK;IAyBhC,gBAAgB,CAAC,CAAC,EAAC,UAAU;IAW7B,cAAc,CAAC,CAAC,EAAC,KAAK;IAOxB,OAAO,CAAC,cAAc;CAUvB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js"
new file mode 100644
index 0000000000000000000000000000000000000000..54d2e2593fad8dcfa308e30440825532bd40eac5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js"
@@ -0,0 +1,195 @@
+import { GOOD_EVENT } from "../interface/IEvents.js";
+import ViewModel from "../model/ViewModel.js";
+import Component from "./Component.js";
+import StepNumber from "./StepNumber.js";
+export default class Detals extends Component {
+ constructor(_data) {
+ super();
+ this.MASK_WIDTH = 303.75; //阴影盒子的大小
+ this.MAX_WIDTH = 540; //放大盒子的宽度
+ this.MIN_WIDTH = 450; //标准图片的大小
+ this._data = _data;
+ // console.log(this._data[0].list);
+ console.log(JSON.parse(this._data[0].list)[0]);
+ this.elem.innerHTML = `
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
产品详情
+
+
+
+
+
+ ${this._data[0].info}
+
+
+
价格:¥${this._data[0].price}.00
+
销量:${this._data[0].sales} 评论:${this._data[0].comment}条 收藏:${this._data[0].collect}
+
购买数量:
+
快递:包邮
+
加入购物车
+
产品保证 产品保证 快速发货 假一赔十
+
+
+
+
+
+
+
`;
+ var number = this.elem.querySelector(".center>.details .details-right>.number");
+ // var img_con=this.elem.querySelector(".img-con")
+ // this.imgCon(img_con)
+ var step = new StepNumber();
+ step.appendTo(number);
+ (this.min) = this.elem.querySelector(".min"); // 获取最小尺寸的元素
+ this.min.style.backgroundImage = `url(${JSON.parse(this._data[0].list)[0]})`;
+ this.max = this.elem.querySelector(".max"); // 获取最大尺寸的元素
+ this.max.style.backgroundImage = `url(${JSON.parse(this._data[0].list)[0]})`;
+ this.mask = this.elem.querySelector(".mask"); // 获取遮罩的元素
+ this.left = this.elem.querySelector(".icon-carousel .left"); // 获取左按钮元素
+ this.right = this.elem.querySelector(".icon-carousel .right"); // 获取右按钮元素
+ this.imgCon = this.elem.querySelector(".img-con"); // 获取图片容器元素
+ this.shopping = this.elem.querySelector(".shopping");
+ this.min.addEventListener("mouseenter", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标进入事件
+ // console.log(this.imgCon);
+ this.imgCon.addEventListener("mouseover", (e) => this.iconMouseHandler(e)); // 监听图片容器元素的鼠标悬停事件
+ this.left.addEventListener("click", (e) => this.bnClickHandler(e)); // 监听左按钮的点击事件
+ this.right.addEventListener("click", (e) => this.bnClickHandler(e)); // 监听右按钮的点击事件
+ this.shopping.addEventListener("click", (e) => this.goclickHandler(e));
+ ViewModel.instance.app.appendChild(this.elem); //把整体插入到页面中
+ }
+ mouseHandler(e) {
+ if (e.type === "mouseenter") {
+ this.min.addEventListener("mouseleave", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标离开事件
+ this.min.addEventListener("mousemove", (e) => this.mouseHandler(e)); // 监听最小尺寸元素的鼠标移动事件
+ this.mask.style.visibility = this.max.style.visibility = "visible"; // 显示遮罩和最大尺寸元素
+ }
+ else if (e.type === "mouseleave") {
+ this.min.removeEventListener("mouseleave", (e) => this.mouseHandler(e)); // 移除最小尺寸元素的鼠标离开事件监听
+ this.min.removeEventListener("mousemove", (e) => this.mouseHandler(e)); // 移除最小尺寸元素的鼠标移动事件监听
+ this.mask.style.visibility = this.max.style.visibility = "hidden"; // 隐藏遮罩和最大尺寸元素
+ }
+ else { //鼠标移动
+ var x = e.offsetX - this.MASK_WIDTH / 2; //鼠标当前位置减去遮罩层宽度的一半/2x和y是保存偏移量的变量
+ var y = e.offsetY - this.MASK_WIDTH / 2; //鼠标当前位置减去遮罩层高度的一半
+ if (x < 0)
+ x = 0; // 如果 x 坐标小于 0 则设置 x 为 0
+ else if (x > this.MIN_WIDTH - this.MASK_WIDTH)
+ x = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 x 坐标大于最小尺寸减去遮罩宽度则设置 x 为 最小尺寸减去遮罩宽度
+ if (y < 0)
+ y = 0; // 如果 y 坐标小于 0 则设置 y 为 0
+ else if (y > this.MIN_WIDTH - this.MASK_WIDTH)
+ y = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 y 坐标大于最小尺寸减去遮罩宽度则设置 y 为 最小尺寸减去遮罩宽度
+ this.mask.style.left = x + "px"; // 设置遮罩的 left 属性为 x
+ this.mask.style.top = y + "px"; // 设置遮罩的 top 属性为 y
+ this.max.style.backgroundPositionX =
+ (-x * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 x 坐标计算最大尺寸的背景图的 x 偏移位置
+ this.max.style.backgroundPositionY =
+ (-y * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 y 坐标计算最大尺寸的背景图的 y 偏移位置
+ }
+ }
+ iconMouseHandler(e) {
+ if ((e.target.nodeName) !== "IMG")
+ return; // 如果触发事件的元素不是图片则返回
+ if (this.prev) {
+ this.prev.style.borderColor = "rgba(255,0,0,0)"; // 移除上一个选中图片的边框颜色样式
+ }
+ this.prev = e.target; // 设置当前选中的图片元素
+ this.prev.style.borderColor = "red"; // 设置当前选中的图片元素的边框颜色样式为红色
+ this.max.style.backgroundImage =
+ this.min.style.backgroundImage = `url(${this.prev.src.replace(/-1/, "")})`; // 设置最小尺寸和最大尺寸的背景图片为当前选中的图片
+ }
+ bnClickHandler(e) {
+ if (e.target === this.left) {
+ this.imgCon.style.left = "0px";
+ }
+ else {
+ this.imgCon.style.left = -4 * 78 + "px";
+ }
+ }
+ goclickHandler(e) {
+ // 创建并分发带有相关数据的自定义事件
+ var evt = new Event(GOOD_EVENT.ADD_GOODS, { bubbles: true });
+ evt.data = this._data;
+ this.elem.dispatchEvent(evt);
+ }
+}
+//# sourceMappingURL=Detals.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..2ce305de16505225116398f43867d4f78bf489d1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Detals.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Detals.js","sourceRoot":"","sources":["../../src/component/Detals.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAIzC,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,SAAS;IAazC,YAAY,KAAU;QAClB,KAAK,EAAE,CAAC;QALJ,eAAU,GAAG,MAAM,CAAC,CAAA,SAAS;QAC7B,cAAS,GAAG,GAAG,CAAC,CAAA,SAAS;QACzB,cAAS,GAAG,GAAG,CAAC,CAAA,SAAS;QAK7B,IAAI,CAAC,KAAK,GAAC,KAAK,CAAA;QAChB,mCAAmC;QAEnC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAC5C,CAAC;QACF,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAqEI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gCACjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gCACjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;gCACjC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC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,KAAK;YAAE,OAAO,CAAC,mBAAmB;QACxE,IAAI,IAAI,CAAC,IAAI,EAAE;YACZ,IAAI,CAAC,IAAoB,CAAC,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC,CAAC,mBAAmB;SACtF;QACA,IAAI,CAAC,IAAY,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc;QAC5C,IAAI,CAAC,IAAoB,CAAC,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,CAAC,wBAAwB;QAC7E,IAAI,CAAC,GAAmB,CAAC,KAAK,CAAC,eAAe;YAC9C,IAAI,CAAC,GAAmB,CAAC,KAAK,CAAC,eAAe,GAAG,OAAQ,IAAI,CAAC,IAAY,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,2BAA2B;IACnI,CAAC;IAED,cAAc,CAAC,CAAO;QACpB,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE;YACzB,IAAI,CAAC,MAAsB,CAAC,KAAK,CAAC,IAAI,GAAG,KAAK,CAAC;SACjD;aAAM;YACJ,IAAI,CAAC,MAAsB,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;SAC1D;IACH,CAAC;IACK,cAAc,CAAC,CAAa;QAGlC,oBAAoB;QACpB,IAAI,GAAG,GAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAElE,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC;QACtB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC/B,CAAC;CAEF"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..f64f2254541edafb7528cf66704183a90f6ddce8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts"
@@ -0,0 +1,13 @@
+import Component from "./Component.js";
+import IGoods from "../interface/IGoodsData.js";
+export default class Goods extends Component {
+ private _data?;
+ private prev?;
+ private id?;
+ private item?;
+ constructor(_data?: IGoods);
+ set data(_data: IGoods | undefined);
+ get data(): IGoods | undefined;
+ private setStyle;
+}
+//# sourceMappingURL=Goods.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..19d4ab55dd27c2e507b2bde3ced086a3322a5467
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Goods.d.ts","sourceRoot":"","sources":["../../src/component/Goods.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,MAA4B,MAAM,4BAA4B,CAAC;AAEtE,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAS;IACxC,OAAO,CAAC,KAAK,CAAC,CAAQ;IACtB,OAAO,CAAC,IAAI,CAAC,CAAa;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAQ;IACnB,OAAO,CAAC,IAAI,CAAC,CAAW;gBACZ,KAAK,CAAC,EAAC,MAAM;IAS1B,IAAW,IAAI,CAAC,KAAK,EAAC,MAAM,GAAC,SAAS,EA+BpC;IACF,IAAW,IAAI,IAAG,MAAM,GAAC,SAAS,CAGhC;IA6BF,OAAO,CAAC,QAAQ;CAgZlB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js"
new file mode 100644
index 0000000000000000000000000000000000000000..0fe5a052150a178a6bef6ec94d772a7c83aa7115
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js"
@@ -0,0 +1,474 @@
+import Component from "./Component.js";
+export default class Goods extends Component {
+ constructor(_data) {
+ super('li');
+ this.elem.className = "list-item";
+ // this.elem.addEventListener("mouseover",e=>this.mouseHandler(e));
+ // this.elem.addEventListener("click",e=>this.clickHandler(e));
+ if (_data)
+ this.data = _data;
+ this.setStyle();
+ }
+ // 数据驱动显示
+ set data(_data) {
+ var _a;
+ if (!_data)
+ return;
+ this._data = _data;
+ this.elem.innerHTML = `
+
+
+
+
+
+
${_data.title}
+
+
+ ${_data.keywords}
+ HOT
+
+
+ ¥${_data.price + '' + _data.price1}
+ ${_data.soldcount}
+
+
+
+
+ ${_data.company}
+ ${_data.address}
+
+ `;
+ var evt = new MouseEvent("mouseover", { bubbles: true });
+ (_a = this.elem.querySelector(".icon")) === null || _a === void 0 ? void 0 : _a.dispatchEvent(evt);
+ }
+ get data() {
+ return this._data;
+ }
+ // private mouseHandler(e:MouseEvent):void
+ // {
+ // console.log(1);
+ // if(!(e.target instanceof HTMLElement)) return;
+ // var target:HTMLElement=e.target;
+ // if(target.className!=="icon") return;
+ // if(!this.data) return ;
+ // this.id=e.target.id;
+ // // this.item=this.data.list.find(item=>item.id==target.id);
+ // if(!this.item) return;
+ // (this.elem.querySelector(".show") as HTMLImageElement).src=this.item.img;
+ // (this.elem.querySelector(".priceCon>i") as HTMLElement).textContent=Number(this.item.price).toFixed(2);
+ // if(this.prev){
+ // this.prev.style.borderColor="rgba(255,0,0,0)"
+ // }
+ // this.prev=target;
+ // this.prev.style.borderColor="rgba(255,0,0,1)";
+ // }
+ // private clickHandler(e:MouseEvent):void{
+ // console.log(e.target);
+ // var evt:IEvent=new Event(GOOD_EVENT.ADD_GOODS,{bubbles:true});
+ // evt.id=Number(this.id);
+ // evt.item=this.item;
+ // evt.data=this.data;
+ // this.elem.dispatchEvent(evt);
+ // }
+ setStyle() {
+ Goods.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ body {
+ background-color: #f2f2f2;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .heade {
+ height: 80px;
+ background-color: #fff;
+ }
+ .heade .logo {
+ float: left;
+ width: 213px;
+ height: 40px;
+ margin-top: 20px;
+ }
+ .heade .logo img {
+ width: 213px;
+ height: 40px;
+ }
+ .heade .title {
+ float: left;
+ margin-left: 200px;
+ margin-top: 40px;
+ font-size: 24px;
+ }
+ .heade .title li {
+ float: left;
+ width: 150px;
+ text-align: center;
+ padding-bottom: 6px;
+ }
+ .heade .title li:first-child {
+ border-bottom: 3px solid #ff7300;
+ }
+ .heade .app {
+ float: right;
+ width: 70px;
+ height: 70px;
+ margin-top: 5px;
+ }
+ .heade .app img {
+ width: 100%;
+ height: 100%;
+ }
+ .main .search {
+ position: relative;
+ height: 50px;
+ margin: 20px 0 20px 70px;
+ }
+ .main .search .fdj {
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ cursor: pointer;
+ }
+ .main .search input {
+ float: left;
+ width: 950px;
+ height: 50px;
+ font-size: 20px;
+ font-weight: 300;
+ padding: 0 50px;
+ border: 2px solid #ff4a0d;
+ border-radius: 5px;
+ }
+ .main .search .pz {
+ position: absolute;
+ top: 4px;
+ right: 215px;
+ cursor: pointer;
+ }
+ .main .search button {
+ float: left;
+ width: 132px;
+ height: 50px;
+ margin-left: -30px;
+ border: 0;
+ padding: 0;
+ background-color: #ff5111;
+ border-radius: 0 5px 5px 0;
+ text-align: center;
+ color: #fff;
+ font-size: 20px;
+ cursor: pointer;
+ }
+ .main .content {
+ height: 385px;
+ background: 0;
+ }
+ .main .content .nav {
+ float: left;
+ width: 220px;
+ height: 385px;
+ background-color: #fff;
+ }
+ .main .content .nav div {
+ padding: 20px 0 0 24px;
+ }
+ .main .content .nav li {
+ height: 33px;
+ line-height: 33px;
+ padding: 0 24px;
+ }
+ .main .content .nav li:hover {
+ color: #ff3e19;
+ background-color: #ffedea;
+ }
+ .main .content .nav a:hover {
+ text-decoration: underline;
+ }
+ .main .content .banner {
+ float: left;
+ width: 600px;
+ height: 385px;
+ margin: 0 16px;
+ overflow: hidden;
+ }
+ .main .content .banner .carousel {
+ margin-bottom: 16px;
+ }
+
+ .main .content .article {
+ float: left;
+ width: 348px;
+ height: 385px;
+ background-color: #fff;
+ }
+ .main .content .article .art-top {
+ height: 132px;
+ padding: 18px;
+ background-color: #f0e5da;
+ }
+ .main .content .article .art-top .info {
+ overflow: hidden;
+ }
+ .main .content .article .art-top .info .profile {
+ float: left;
+ width: 54px;
+ height: 54px;
+ border-radius: 30px;
+ overflow: hidden;
+ }
+ .main .content .article .art-top .info .profile img {
+ width: 100%;
+ height: 100%;
+ }
+ .main .content .article .art-top .info .desc {
+ float: left;
+ margin-left: 20px;
+ }
+ .main .content .article .art-top .info .desc p {
+ margin-bottom: 10px;
+ }
+ .main .content .article .art-top .info .desc >span {
+ font-size: 14px;
+ background-color: #ffebe7;
+ }
+ .main .content .article .art-top >span {
+ display: inline-block;
+ width: 152px;
+ height: 32px;
+ line-height: 32px;
+ text-align: center;
+ margin-top: 10px;
+ border-radius: 5px;
+ }
+ .main .content .article .art-top a {
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+ }
+ .main .content .article .art-top .login {
+ background-color: #ff4000;
+ }
+ .main .content .article .art-top .login a {
+ color: #fff;
+ }
+ .main .content .article .art-top .login a:hover {
+ color: #fff;
+ }
+ .main .content .article .art-top .register {
+ border: 1px solid #ff4000;
+ }
+ .main .content .article .art-top .register a {
+ color: #ff4000;
+ }
+ .goodslist {
+ margin-top: 20px;
+ }
+ .goodslist .w {
+ padding-left: 24px;
+ overflow: hidden;
+ background-color: #fff;
+ border-radius: 5px;
+ }
+ .goodslist .w .head {
+ height: 70px;
+ line-height: 70px;
+ }
+ .goodslist .w .head h4 {
+ float: left;
+ font-size: 20px;
+ margin-right: 20px;
+ }
+ .goodslist .w .head p {
+ float: left;
+ font-size: 14px;
+ }
+ .goodslist .w .nav-bar {
+ height: 20px;
+ margin-bottom: 20px;
+ }
+ .goodslist .w .nav-bar >li {
+ float: left;
+ height: 20px;
+ line-height: 20px;
+ }
+ .goodslist .w .nav-bar >li a {
+ margin: 0 10px;
+ }
+ .goodslist .w .nav-bar .current {
+ color: #ff5231;
+ }
+ .goodslist .w .list {
+ overflow: hidden;
+ }
+ .goodslist .w .list .list-item {
+ float: left;
+ width: 216px;
+ height: 354px;
+ border: 1px solid #ccc;
+ margin-right: 18px;
+ margin-bottom: 18px;
+ }
+ .goodslist .w .list .list-item >img {
+ width: 214px;
+ height: 214px;
+ background-color: #ffc0cb;
+ }
+ .goodslist .w .list .list-item .offer-info {
+ width: 214px;
+ height: 99px;
+ padding: 8px 10px;
+ border-bottom: 1px solid #ccc;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title {
+ height: 18px;
+ overflow: hidden;
+ line-height: 1;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title img {
+ float: left;
+ width: 32px;
+ height: 18px;
+ margin-right: 5px;
+ vertical-align: middle;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title span {
+ line-height: 18px;
+ font-size: 14px;
+ vertical-align: middle;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags {
+ height: 20px;
+ margin-top: 10px;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags .tag {
+ font-size: 12px;
+ line-height: 20px;
+ background-color: #fcf1ee;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags .hot {
+ float: right;
+ width: 40px;
+ height: 20px;
+ color: #fff;
+ text-align: center;
+ font-size: 14px;
+ background-color: #f00;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info {
+ margin-top: 10px;
+ height: 30px;
+ line-height: 30px;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info span {
+ font-size: 12px;
+ color: #f00;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info span b {
+ font-size: 20px;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info em {
+ float: right;
+ font-style: normal;
+ font-size: 12px;
+ color: #ccc;
+ }
+ .goodslist .w .list .list-item .region {
+ padding: 8px 10px 0;
+ }
+ .goodslist .w .list .list-item .region span {
+ font-size: 12px;
+ color: #ccc;
+ }
+ .goodslist .w .list .list-item .region .company {
+ display: inline-block;
+ width: 100px;
+ height: 18px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ .goodslist .w .list .list-item .region .province-region {
+ float: right;
+ width: 64px;
+ height: 18px;
+ text-align: right;
+ }
+ .goodslist .w .list .list-item:hover {
+ border-color: #ff2900;
+ }
+ .dl {
+ margin-top: 20px;
+ }
+ .footer {
+ margin-top: 30px;
+ background-color: #ebebeb;
+ }
+ /*# sourceMappingURL=index.css.map */`);
+ }
+}
+//# sourceMappingURL=Goods.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..efbb530a99228c9a49d01ec10806d801c6f55096
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/Goods.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Goods.js","sourceRoot":"","sources":["../../src/component/Goods.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAIvC,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAS;IAKxC,YAAY,KAAa;QACrB,KAAK,CAAC,IAAI,CAAC,CAAC;QACZ,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC,WAAW,CAAC;QAChC,mEAAmE;QACnE,+DAA+D;QAC/D,IAAG,KAAK;YAAE,IAAI,CAAC,IAAI,GAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IACD,SAAS;IACV,IAAW,IAAI,CAAC,KAAsB;;QACjC,IAAG,CAAC,KAAK;YAAE,OAAO;QAClB,IAAI,CAAC,KAAK,GAAC,KAAK,CAAC;QAEjB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG;;iCAEG,KAAK,CAAC,GAAG,8BAA8B,KAAK,CAAC,GAAG;;;;qCAI5C,KAAK,CAAC,KAAK;;;iDAGC,KAAK,CAAC,QAAQ;;;;yCAItB,KAAK,CAAC,KAAK,GAAG,EAAE,GAAG,KAAK,CAAC,MAAM;mCACrC,KAAK,CAAC,SAAS;;;;;iDAKD,KAAK,CAAC,OAAO;yDACL,KAAK,CAAC,OAAO;;KAEjE,CAAA;QACG,IAAI,GAAG,GAAC,IAAI,UAAU,CAAC,WAAW,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,CAAC,CAAC;QAEnD,MAAA,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,0CAAE,aAAa,CAAC,GAAG,CAAC,CAAC;IAEzD,CAAC;IACF,IAAW,IAAI;QAEV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACL,6CAA6C;IAC7C,WAAW;IACX,sBAAsB;IAEtB,qDAAqD;IACrD,8CAA8C;IAC9C,gDAAgD;IAChD,kCAAkC;IAClC,+BAA+B;IAC/B,sEAAsE;IACtE,iCAAiC;IACjC,oFAAoF;IACpF,kHAAkH;IAClH,yBAAyB;IACzB,4DAA4D;IAC5D,YAAY;IACZ,4BAA4B;IAC5B,yDAAyD;IACzD,QAAQ;IAEJ,2CAA2C;IAC3C,6BAA6B;IAC7B,qEAAqE;IACrE,8BAA8B;IAC9B,0BAA0B;IAC1B,0BAA0B;IAC1B,oCAAoC;IACpC,IAAI;IACG,QAAQ;QACX,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gDA6Y2B,CAAC,CAAA;IAC7C,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..9bcae62d0ecff794de4a519aa27adf2c7e596e2b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts"
@@ -0,0 +1,8 @@
+export default interface ICarouselData {
+ id: number;
+ img: string;
+}
+export interface IUpdate {
+ update(): void;
+}
+//# sourceMappingURL=ICarouselData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..727cace7b401b1d6cf782766720da37d1d924295
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICarouselData.d.ts","sourceRoot":"","sources":["../../src/component/ICarouselData.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,aAAa;IAClC,EAAE,EAAC,MAAM,CAAC;IACV,GAAG,EAAC,MAAM,CAAC;CACd;AACD,MAAM,WAAW,OAAO;IACpB,MAAM,IAAG,IAAI,CAAC;CACjB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..9260b18469b70c70d57c55d183dfa53da7a54ce8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ICarouselData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..042ad7cdcf3787fcc90a2ba4e1a4e061d0922653
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/ICarouselData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICarouselData.js","sourceRoot":"","sources":["../../src/component/ICarouselData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4e32845e3d2be9048ddc08cf1e926c3ad06e9d1e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts"
@@ -0,0 +1,14 @@
+import Component from "./Component.js";
+export default class StepNumber extends Component {
+ private input;
+ id?: number;
+ _step: number;
+ constructor();
+ set step(value: number);
+ get step(): number;
+ private inputHandler;
+ private clickHandler;
+ private dispatch;
+ protected setStyle(): void;
+}
+//# sourceMappingURL=StepNumber.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..5f8ef05cada9a9aa127ece9f37c3fd9642051b97
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"StepNumber.d.ts","sourceRoot":"","sources":["../../src/component/StepNumber.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS;IAC7C,OAAO,CAAC,KAAK,CAAkB;IACxB,EAAE,CAAC,EAAC,MAAM,CAAC;IACX,KAAK,SAAG;;IAgBf,IAAW,IAAI,CAAC,KAAK,EAAC,MAAM,EAa3B;IACD,IAAW,IAAI,IAAG,MAAM,CAEvB;IACD,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,QAAQ;IAOhB,SAAS,CAAC,QAAQ;CAgCrB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js"
new file mode 100644
index 0000000000000000000000000000000000000000..754b6a74a62b6a0c7442cb9b7e878c49abb90d99
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js"
@@ -0,0 +1,97 @@
+import { STEP_EVENT } from "../interface/IEvents.js";
+import Component from "./Component.js";
+export default class StepNumber extends Component {
+ constructor() {
+ super();
+ this._step = 1;
+ this.elem.className = "step";
+ this.elem.innerHTML = `
+ -
+
+ +
+ `;
+ this.input = this.elem.querySelector(".input");
+ this.setStyle();
+ this.step = this._step;
+ this.elem.addEventListener("click", e => this.clickHandler(e));
+ this.elem.addEventListener("input", e => this.inputHandler(e));
+ }
+ set step(value) {
+ value = ~~value;
+ if (value < 1)
+ value = 1;
+ else if (value > 99)
+ value = 99;
+ if (value === 1)
+ this.elem.firstElementChild.disabled = true;
+ else if (value === 99)
+ this.elem.lastElementChild.disabled = true;
+ else {
+ this.elem.firstElementChild.disabled = false;
+ this.elem.lastElementChild.disabled = false;
+ }
+ this._step = value;
+ this.input.value = String(this._step);
+ }
+ get step() {
+ return this._step;
+ }
+ inputHandler(e) {
+ if (e.target.nodeName !== "INPUT")
+ return;
+ this.input.value = this.input.value.replace(/\D/g, "");
+ this.step = Number(this.input.value);
+ this.dispatch();
+ }
+ clickHandler(e) {
+ if (e.target.className === "left") {
+ // this.setStep(this._step-1);
+ this.step--;
+ var token = JSON.parse(localStorage.token);
+ }
+ else if (e.target.className === "right") {
+ this.step++;
+ }
+ console.log(1);
+ this.dispatch();
+ }
+ dispatch() {
+ var evt = new Event(STEP_EVENT.STEP_CHANGE, { bubbles: true });
+ evt.num = this.step;
+ evt.id = this.id;
+ this.elem.dispatchEvent(evt);
+ }
+ setStyle() {
+ StepNumber.setCss(`.step{
+ width: 80px;
+ height: 20px;
+ position: relative;
+ }
+ .step>*{
+ float: left;
+ }
+ .step>.left,.step>.right{
+ width: 15px;
+ height: 16px;
+ border: 1px solid #999;
+ text-align: center;
+ line-height: 13px;
+ margin: 0;
+ padding: 0;
+ box-sizing: content-box;
+ cursor: pointer;
+ }
+ .step>.input{
+ width: 46px;
+ height: 18px;
+ border: none;
+ border-top: 1px solid #999;
+ border-bottom: 1px solid #999;
+ outline: none;
+ margin: 0;
+ padding: 0;
+ text-align: center;
+ }`);
+ }
+}
+//# sourceMappingURL=StepNumber.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..6110b3c3ffe5b5f3b4ef9d11dad9bd2351e842d9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/StepNumber.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"StepNumber.js","sourceRoot":"","sources":["../../src/component/StepNumber.ts"],"names":[],"mappings":"AAAA,OAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,SAAS;IAI7C;QACI,KAAK,EAAE,CAAC;QAFL,UAAK,GAAC,CAAC,CAAC;QAGX,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC,MAAM,CAAA;QAC1B,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC;;;;SAInB,CAAA;QACD,IAAI,CAAC,KAAK,GAAC,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAqB,CAAC;QACjE,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChB,IAAI,CAAC,IAAI,GAAC,IAAI,CAAC,KAAK,CAAC;QAErB,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,CAAA,EAAE,CAAA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QACnC,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IACO,YAAY,CAAC,CAAY;QAC7B,IAAI,CAAC,CAAC,MAA4B,CAAC,SAAS,KAAG,MAAM,EAAC;YAClD,8BAA8B;YAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;YACZ,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;SAC7C;aAAK,IAAI,CAAC,CAAC,MAA4B,CAAC,SAAS,KAAG,OAAO,EAAC;YAC1D,IAAI,CAAC,IAAI,EAAE,CAAC;SACd;QACD,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAEf,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IACO,QAAQ;QACZ,IAAI,GAAG,GAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,WAAW,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,CAAC,CAAC;QAChE,GAAG,CAAC,GAAG,GAAC,IAAI,CAAC,IAAI,CAAC;QAClB,GAAG,CAAC,EAAE,GAAC,IAAI,CAAC,EAAE,CAAC;QAEf,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IACS,QAAQ;QACd,UAAU,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA6BhB,CAAC,CAAA;IACP,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..e0bb7f4befbd024f9e3d8e8f1c84fc7b7097680f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts"
@@ -0,0 +1,13 @@
+import { IUpdate } from "./ICarouselData.js";
+export default class TimeManager {
+ private static _instance;
+ private list;
+ private ids?;
+ private constructor();
+ static get instance(): TimeManager;
+ add(item: IUpdate): void;
+ remove(item: IUpdate): void;
+ has(item: IUpdate): boolean;
+ private animation;
+}
+//# sourceMappingURL=TImeManager.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..bdf591a79f408503dd53b7277180b0e3e17e5032
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TImeManager.d.ts","sourceRoot":"","sources":["../../src/component/TImeManager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IAErC,OAAO,CAAC,IAAI,CAAuB;IACnC,OAAO,CAAC,GAAG,CAAC,CAAO;IACnB,OAAO;IAGP,WAAkB,QAAQ,IAAG,WAAW,CAGvC;IAEM,GAAG,CAAC,IAAI,EAAC,OAAO,GAAE,IAAI;IAOtB,MAAM,CAAC,IAAI,EAAC,OAAO,GAAE,IAAI;IAQzB,GAAG,CAAC,IAAI,EAAC,OAAO,GAAE,OAAO;IAIhC,OAAO,CAAC,SAAS;CAKpB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js"
new file mode 100644
index 0000000000000000000000000000000000000000..a2fa86ad70dd7518f07877287b05e7b73c4b4cfa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js"
@@ -0,0 +1,33 @@
+export default class TimeManager {
+ constructor() {
+ // public static readonly instnace:TimeManager=new TimeManager();
+ this.list = new Set();
+ }
+ static get instance() {
+ return TimeManager._instance || (TimeManager._instance = new TimeManager());
+ }
+ add(item) {
+ if (this.list.has(item))
+ return;
+ this.list.add(item);
+ if (this.list.size > 0 && !this.ids)
+ this.animation();
+ }
+ remove(item) {
+ if (!this.list.has(item))
+ return;
+ this.list.delete(item);
+ if (this.list.size === 0 && this.ids) {
+ cancelAnimationFrame(this.ids);
+ this.ids = undefined;
+ }
+ }
+ has(item) {
+ return this.list.has(item);
+ }
+ animation() {
+ this.ids = requestAnimationFrame(() => this.animation());
+ this.list.forEach((item) => item.update());
+ }
+}
+//# sourceMappingURL=TImeManager.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f049997f4fc8adf4b159f6ae4f9a4fb141a351dc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/component/TImeManager.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TImeManager.js","sourceRoot":"","sources":["../../src/component/TImeManager.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,WAAW;IAK5B;QAHA,iEAAiE;QACzD,SAAI,GAAc,IAAI,GAAG,EAAE,CAAA;IAInC,CAAC;IACM,MAAM,KAAK,QAAQ;QAEtB,OAAO,WAAW,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,SAAS,GAAC,IAAI,WAAW,EAAE,CAAC,CAAC;IAC9E,CAAC;IAEM,GAAG,CAAC,IAAY;QAEnB,IAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO;QAC/B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACpB,IAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;YAAE,IAAI,CAAC,SAAS,EAAE,CAAC;IAEvD,CAAC;IACM,MAAM,CAAC,IAAY;QACtB,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,OAAO;QAChC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACvB,IAAG,IAAI,CAAC,IAAI,CAAC,IAAI,KAAG,CAAC,IAAI,IAAI,CAAC,GAAG,EAAC;YAC9B,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC/B,IAAI,CAAC,GAAG,GAAC,SAAS,CAAC;SACtB;IACL,CAAC;IACM,GAAG,CAAC,IAAY;QAEpB,OAAQ,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAC9B,CAAC;IACO,SAAS;QAEb,IAAI,CAAC,GAAG,GAAC,qBAAqB,CAAC,GAAE,EAAE,CAAA,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC;QACrD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAY,EAAC,EAAE,CAAA,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;IACrD,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4e54481c7e890cf87a60d690078edde13fbeb6ef
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts"
@@ -0,0 +1,14 @@
+import ICommand from "../interface/ICommand";
+import { ROUTERS } from "../vo/AJAXVo";
+import { RouterPath } from "../vo/RouterVo";
+export default class MainController {
+ private static _instance;
+ private list;
+ private constructor();
+ static get instance(): MainController;
+ addCommand(router: RouterPath, Command: {
+ new (): ICommand;
+ }): void;
+ dispatch(router: ROUTERS, data?: any): void;
+}
+//# sourceMappingURL=MainController.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..43f1a8faafdfe831ca173ac8b85034a180565de4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainController.d.ts","sourceRoot":"","sources":["../../src/controller/MainController.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,cAAc;IAC/B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAiB;IACzC,OAAO,CAAC,IAAI,CAAoD;IAEhE,OAAO;IAIP,WAAkB,QAAQ,IAAI,cAAc,CAG3C;IAEM,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE;QAAE,QAAQ,QAAQ,CAAA;KAAE,GAAG,IAAI;IASnE,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,GAAG,GAAG,IAAI;CAarD"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js"
new file mode 100644
index 0000000000000000000000000000000000000000..2968bb8e4da517fa5211ebfe11954669aa2ab609
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js"
@@ -0,0 +1,30 @@
+// 路由的解析跳转
+export default class MainController {
+ constructor() {
+ this.list = {};
+ // 主控制器的私有构造函数,确保只能通过静态的instance属性获取MainController的实例
+ }
+ static get instance() {
+ return MainController._instance || (MainController._instance = new MainController());
+ // 通过instance属性获取MainController的实例,如果实例不存在则创建一个新的实例并返回
+ }
+ addCommand(router, Command) {
+ if (!this.list[router])
+ this.list[router] = new Set();
+ // 如果指定路由的Set集合不存在,则创建一个新的Set集合
+ this.list[router].add(Command);
+ // 将命令添加到指定路由的Set集合中
+ }
+ dispatch(router, data) {
+ var firstRouter = router.split(/\/(?=[^/]*$)/)[0];
+ // 将路由字符串分割成数组,获取第一个路由节点
+ if (!this.list[firstRouter])
+ return;
+ // 如果指定的第一个路由节点不存在于集合中,则停止执行
+ this.list[firstRouter].forEach((Command) => {
+ new Command().exec(data, router.replace(firstRouter, ""));
+ // 对于指定路由集合中的每个命令,创建一个新的命令实例并执行exec方法,传入data参数和去除第一个路由节点后的剩余路径
+ });
+ }
+}
+//# sourceMappingURL=MainController.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..7a5a115b4309303d9e1341413077d2c7719bd31b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/controller/MainController.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainController.js","sourceRoot":"","sources":["../../src/controller/MainController.ts"],"names":[],"mappings":"AAGA,UAAU;AACV,MAAM,CAAC,OAAO,OAAO,cAAc;IAI/B;QAFQ,SAAI,GAAiD,EAAE,CAAC;QAG5D,qDAAqD;IACzD,CAAC;IAEM,MAAM,KAAK,QAAQ;QACtB,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,cAAc,CAAC,SAAS,GAAG,IAAI,cAAc,EAAE,CAAC,CAAC;QACrF,sDAAsD;IAC1D,CAAC;IAEM,UAAU,CAAC,MAAkB,EAAE,OAA6B;QAC/D,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,GAAG,EAAE,CAAC;QACtD,+BAA+B;QAG/B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC/B,oBAAoB;IACxB,CAAC;IAEM,QAAQ,CAAC,MAAe,EAAE,IAAU;QAEvC,IAAI,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,wBAAwB;QACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YAAE,OAAO;QACpC,4BAA4B;QAG5B,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,OAA6B,EAAE,EAAE;YAC7D,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,CAAC;YAC1D,8DAA8D;QAClE,CAAC,CAAC,CAAC;IACP,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..49078ed228ec212a44654f2034b4b8f4994eedfb
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts"
@@ -0,0 +1,4 @@
+export default interface ICommand {
+ exec(data?: any, router?: string): void;
+}
+//# sourceMappingURL=ICommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..6a387ce3a4111a437e023c4b600e7ca5ed40043b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICommand.d.ts","sourceRoot":"","sources":["../../src/interface/ICommand.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC7B,IAAI,CAAC,IAAI,CAAC,EAAC,GAAG,EAAC,MAAM,CAAC,EAAC,MAAM,GAAE,IAAI,CAAC;CACvC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..e30e72ddfa04e83f9a5e0db953940da4ce815e4f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ICommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..cc9a226e3d62b5f7ce24fd0eed7fe0de0bfa70bf
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/ICommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../src/interface/ICommand.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..3f3d194b9e10cea5b39050165af5a888efe2bbbe
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts"
@@ -0,0 +1,13 @@
+export default interface IEvent extends Event {
+ [key: string]: any;
+}
+export declare enum GOOD_EVENT {
+ ADD_GOODS = "add_goods"
+}
+export declare enum DETAILS_EVENT {
+ GO_DETAILS = "go_details"
+}
+export declare enum STEP_EVENT {
+ STEP_CHANGE = "step_change"
+}
+//# sourceMappingURL=IEvents.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..36eba01009d5ce5213384e81875cf2697e16e4f8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IEvents.d.ts","sourceRoot":"","sources":["../../src/interface/IEvents.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,MAAO,SAAQ,KAAK;IACzC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;CACnB;AACD,oBAAY,UAAU;IAClB,SAAS,cAAc;CAC1B;AACD,oBAAY,aAAa;IAAC,UAAU,eAAa;CAAC;AAClD,oBAAY,UAAU;IAAC,WAAW,gBAAc;CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js"
new file mode 100644
index 0000000000000000000000000000000000000000..c6c4f20569519f372e4a2de93c40437bb2e5ad91
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js"
@@ -0,0 +1,14 @@
+export var GOOD_EVENT;
+(function (GOOD_EVENT) {
+ GOOD_EVENT["ADD_GOODS"] = "add_goods";
+})(GOOD_EVENT || (GOOD_EVENT = {}));
+;
+export var DETAILS_EVENT;
+(function (DETAILS_EVENT) {
+ DETAILS_EVENT["GO_DETAILS"] = "go_details";
+})(DETAILS_EVENT || (DETAILS_EVENT = {}));
+export var STEP_EVENT;
+(function (STEP_EVENT) {
+ STEP_EVENT["STEP_CHANGE"] = "step_change";
+})(STEP_EVENT || (STEP_EVENT = {}));
+//# sourceMappingURL=IEvents.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..bf3156ca87a4ac097f8494170dd454d6f6193eef
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IEvents.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IEvents.js","sourceRoot":"","sources":["../../src/interface/IEvents.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,UAEX;AAFD,WAAY,UAAU;IAClB,qCAAuB,CAAA;AAC3B,CAAC,EAFW,UAAU,KAAV,UAAU,QAErB;AAAA,CAAC;AACF,MAAM,CAAN,IAAY,aAAsC;AAAlD,WAAY,aAAa;IAAC,0CAAuB,CAAA;AAAA,CAAC,EAAtC,aAAa,KAAb,aAAa,QAAyB;AAClD,MAAM,CAAN,IAAY,UAAqC;AAAjD,WAAY,UAAU;IAAC,yCAAyB,CAAA;AAAA,CAAC,EAArC,UAAU,KAAV,UAAU,QAA2B"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4be965727bbbebe8c64784d327f7104b769932af
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts"
@@ -0,0 +1,23 @@
+export interface IItemInfo {
+ id: number | string;
+ img: string;
+ price: number;
+}
+export interface IIcon {
+ icon1?: Array;
+ icon2?: Array;
+ icon3?: Array;
+ icon4?: Array;
+}
+export default interface IGoods {
+ pid: number;
+ title: string;
+ img: string;
+ keywords: string;
+ price: number;
+ price1?: string;
+ soldcount?: string | null;
+ company: string;
+ address: string;
+}
+//# sourceMappingURL=IGoodsData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a05df758af78cfb607616e0b7a079b65057fb78a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IGoodsData.d.ts","sourceRoot":"","sources":["../../src/interface/IGoodsData.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,SAAS;IACtB,EAAE,EAAC,MAAM,GAAC,MAAM,CAAC;IACjB,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAC,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,KAAK;IAClB,KAAK,CAAC,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,KAAK,CAAC,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,KAAK,CAAC,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACrB,KAAK,CAAC,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CACxB;AAMD,MAAM,CAAC,OAAO,WAAW,MAAM;IAC3B,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAC,MAAM,CAAC;IACb,GAAG,EAAC,MAAM,CAAC;IACX,QAAQ,EAAC,MAAM,CAAC;IAChB,KAAK,EAAC,MAAM,CAAC;IACb,MAAM,CAAC,EAAC,MAAM,CAAC;IACf,SAAS,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;IACvB,OAAO,EAAC,MAAM,CAAC;IACf,OAAO,EAAC,MAAM,CAAC;CAClB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..3ebb0453ec9a58382ebdafce6c330a13679ed637
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=IGoodsData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..1b69f0efe9b784a0d5fded1982797b6f8d44c9a9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IGoodsData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IGoodsData.js","sourceRoot":"","sources":["../../src/interface/IGoodsData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d11389754af3b7b8860334e75454ecb1d00d92ca
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts"
@@ -0,0 +1,8 @@
+export default interface IVerify {
+ [key: string]: {
+ required: boolean;
+ judge: RegExp;
+ message: string;
+ };
+}
+//# sourceMappingURL=IVerify.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..e92040af103ea35c62d18c21b3dc2a168520b1b0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IVerify.d.ts","sourceRoot":"","sources":["../../src/interface/IVerify.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,WAAW,OAAO;IAC5B,CAAC,GAAG,EAAC,MAAM,GAAE;QACT,QAAQ,EAAC,OAAO,CAAC;QACjB,KAAK,EAAC,MAAM,CAAC;QACb,OAAO,EAAC,MAAM,CAAA;KACjB,CAAA;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js"
new file mode 100644
index 0000000000000000000000000000000000000000..306a6bb7385653f99dfe2a5a595120bc8f0d70c0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=IVerify.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..71919d4418257e9e6fb3afaebb2279b283bffbf9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/interface/IVerify.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"IVerify.js","sourceRoot":"","sources":["../../src/interface/IVerify.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..f0afc244c6a61bf4df16cbdd15dd1bf94acc6a72
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts"
@@ -0,0 +1,16 @@
+import { IResLogInMessage, IShoppingItem } from "./ResponseData";
+export default class MainModel {
+ private static _instance;
+ private _loginResult?;
+ private _shoppingList;
+ private _details;
+ private constructor();
+ static get instance(): MainModel;
+ set loginResult(value: IResLogInMessage | undefined);
+ get loginResult(): IResLogInMessage | undefined;
+ set shoppingList(value: Array);
+ get shoppingList(): Array;
+ set details(value: any);
+ get details(): any;
+}
+//# sourceMappingURL=MainModel.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a610f6d0bf347d412eb0040bdc50da238b2bff12
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainModel.d.ts","sourceRoot":"","sources":["../../src/model/MainModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAe,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE9E,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAY;IACpC,OAAO,CAAC,YAAY,CAAC,CAAmB;IACxC,OAAO,CAAC,aAAa,CAA4B;IACjD,OAAO,CAAC,QAAQ,CAAK;IAErB,OAAO;IAEP,WAAkB,QAAQ,IAAI,SAAS,CAEtC;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,EAOzD;IAED,IAAW,WAAW,IAAI,gBAAgB,GAAG,SAAS,CAErD;IAED,IAAW,YAAY,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,EAElD;IAED,IAAW,YAAY,IAAI,KAAK,CAAC,aAAa,CAAC,CAE9C;IAED,IAAW,OAAO,CAAC,KAAK,EAAE,GAAG,EAE5B;IAED,IAAW,OAAO,IAAI,GAAG,CAExB;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js"
new file mode 100644
index 0000000000000000000000000000000000000000..3c51cf5840fec351a0d6202abdce84533ebde53a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js"
@@ -0,0 +1,35 @@
+export default class MainModel {
+ constructor() {
+ this._shoppingList = []; // 购物清单
+ } // 私有构造函数,确保单例模式
+ static get instance() {
+ return MainModel._instance || (MainModel._instance = new MainModel()); // 获取MainModel的唯一实例,如果实例不存在则创建
+ }
+ set loginResult(value) {
+ this._loginResult = value;
+ localStorage.token = JSON.stringify({
+ userId: value === null || value === void 0 ? void 0 : value.userId,
+ token: value === null || value === void 0 ? void 0 : value.token,
+ user: value === null || value === void 0 ? void 0 : value.user
+ });
+ }
+ get loginResult() {
+ return this._loginResult;
+ }
+ set shoppingList(value) {
+ this._shoppingList = value;
+ }
+ get shoppingList() {
+ return this._shoppingList;
+ }
+ set details(value) {
+ this._details = value;
+ }
+ get details() {
+ return this._details;
+ }
+}
+// IResLogInMessage接口: 表示登录结果消息的接口
+// IShoppingItem接口: 表示购物项的接口
+// 注:以上代码为Typescript语言代码,主要实现了一个MainModel类,用于维护登录结果和购物清单。
+//# sourceMappingURL=MainModel.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..0a2000c182e8b9da8c06635a0a36507d4781ea71
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/MainModel.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainModel.js","sourceRoot":"","sources":["../../src/model/MainModel.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,SAAS;IAM1B;QAHQ,kBAAa,GAAyB,EAAE,CAAC,CAAC,OAAO;IAGlC,CAAC,CAAC,gBAAgB;IAElC,MAAM,KAAK,QAAQ;QACtB,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,8BAA8B;IACzG,CAAC;IAED,IAAW,WAAW,CAAC,KAAmC;QACtD,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC;QAC1B,YAAY,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC;YAChC,MAAM,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM;YACrB,KAAK,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK;YACnB,IAAI,EAAE,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI;SACpB,CAAC,CAAC;IACP,CAAC;IAED,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IAED,IAAW,YAAY,CAAC,KAA2B;QAC/C,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;IAC/B,CAAC;IAED,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;IAED,IAAW,OAAO,CAAC,KAAU;QACzB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;CACJ;AAED,kCAAkC;AAClC,4BAA4B;AAE5B,yDAAyD"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..f667a53a62474cbb9e32e784946b120c4ca89dfa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts"
@@ -0,0 +1,34 @@
+export interface IReqLogoutVo {
+ user: string;
+ userId: number;
+}
+export interface IReqLoginVo extends IReqLogoutVo {
+ password: string;
+}
+export interface IReqRegisterVo extends IReqLoginVo {
+ name: string;
+ age: number;
+ sex: string;
+ tel: string;
+ email: string;
+}
+export interface IReqAuthVo extends IReqLogoutVo {
+ token: string;
+}
+export interface IReqShoppingListVo extends IReqAuthVo {
+}
+export interface IReqAddVo extends IReqShoppingListVo {
+ id: number;
+ itemId: number;
+}
+export interface IReqRemoveVo extends IReqShoppingListVo {
+ ids: number[];
+}
+export interface IReqChangeNumVo extends IReqShoppingListVo {
+ id: number;
+ num: number;
+}
+export interface IReqCheckedVo extends IReqRemoveVo {
+ checked: boolean;
+}
+//# sourceMappingURL=RequestData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..38344c4e2641efa609e0a0c2c19fe87b11cf8e88
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RequestData.d.ts","sourceRoot":"","sources":["../../src/model/RequestData.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAC,MAAM,CAAA;IACX,MAAM,EAAC,MAAM,CAAA;CAChB;AACD,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C,QAAQ,EAAC,MAAM,CAAC;CACnB;AACD,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,IAAI,EAAC,MAAM,CAAC;IACZ,GAAG,EAAC,MAAM,CAAC;IACX,GAAG,EAAC,MAAM,CAAC;IACX,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAC,MAAM,CAAA;CACf;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC5C,KAAK,EAAC,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAmB,SAAQ,UAAU;CAErD;AACD,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACjD,EAAE,EAAC,MAAM,CAAC;IACV,MAAM,EAAC,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACpD,GAAG,EAAC,MAAM,EAAE,CAAA;CACf;AACD,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACvD,EAAE,EAAC,MAAM,CAAC;IACV,GAAG,EAAC,MAAM,CAAC;CACd;AACD,MAAM,WAAW,aAAc,SAAQ,YAAY;IAC/C,OAAO,EAAC,OAAO,CAAC;CACnB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..b28e3db86f19cf5259a516b16b455540ff29e258
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=RequestData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b5ef8de5b9aa7b3f5b944b84c7e24ac0aac736ac
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/RequestData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RequestData.js","sourceRoot":"","sources":["../../src/model/RequestData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..6d1baa63013cea0ddb2675a1ecab96d19a6b2885
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts"
@@ -0,0 +1,63 @@
+export interface IResMeassage {
+ message: string;
+}
+export interface IResLogInMessage extends IResMeassage {
+ token: string;
+ user: string;
+ userId: number;
+}
+export interface IResRegisterVo {
+ errno: null | number;
+ result: IResMeassage;
+}
+export interface IResLoginVo {
+ errno: null | number;
+ result: IResLogInMessage | IResMeassage;
+}
+export interface IResLogoutVo extends IResRegisterVo {
+}
+export interface IResAuthVo extends IResLoginVo {
+}
+export interface IItemInfo {
+ id: number;
+ img: string;
+ price: number;
+}
+export interface IIcon {
+ icon1?: Array;
+ icon2?: Array;
+ icon3?: Array;
+ icon4?: Array;
+}
+export interface IGoods {
+ pid: number;
+ title: string;
+ img: string;
+ keywords: string;
+ price: number;
+ price1?: string;
+ soldcount?: string | null;
+ company: string;
+ address: string;
+}
+export interface IResGoodsList {
+ errno: null | number;
+ result: Array | IResMeassage;
+}
+export interface IShoppingItem {
+ [x: string]: any;
+ pid: number;
+ goodsId: number;
+ userId: number;
+ checked: boolean;
+ icon: string;
+ info: string;
+ price: number;
+ num: number;
+ total: number;
+}
+export interface IResShoppingList {
+ errno: null | number;
+ result: Array | IResMeassage;
+}
+//# sourceMappingURL=ResponseData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..e7e4283d02bd5d4a4028746a1d66d4efef97bdf1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ResponseData.d.ts","sourceRoot":"","sources":["../../src/model/ResponseData.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IACzB,OAAO,EAAC,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,gBAAiB,SAAQ,YAAY;IAClD,KAAK,EAAC,MAAM,CAAC;IACb,IAAI,EAAC,MAAM,CAAC;IACZ,MAAM,EAAC,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,cAAc;IAC3B,KAAK,EAAC,IAAI,GAAC,MAAM,CAAC;IAClB,MAAM,EAAC,YAAY,CAAC;CACvB;AACD,MAAM,WAAW,WAAW;IACxB,KAAK,EAAC,IAAI,GAAC,MAAM,CAAC;IAClB,MAAM,EAAC,gBAAgB,GAAC,YAAY,CAAC;CACxC;AACD,MAAM,WAAW,YAAa,SAAQ,cAAc;CAEnD;AACD,MAAM,WAAW,UAAW,SAAQ,WAAW;CAE9C;AACD,MAAM,WAAW,SAAS;IACtB,EAAE,EAAC,MAAM,CAAC;IACV,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAC,MAAM,CAAC;CAChB;AACD,MAAM,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\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..8b8a24cde434811f5657c1292e5c360954697a70
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.js"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=ResponseData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a9c321cd4727454e17a697a44327d22764b3c771
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ResponseData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ResponseData.js","sourceRoot":"","sources":["../../src/model/ResponseData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..309e91efe72f97ef65571b755c9fc716a52d0585
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts"
@@ -0,0 +1,11 @@
+export default class ViewModel {
+ private static _instance;
+ private _app?;
+ private list;
+ private constructor();
+ static get instance(): ViewModel;
+ get app(): HTMLDivElement;
+ addEvent(type: string, handler: (e: Event | MouseEvent) => void): void;
+ clearEvent(): void;
+}
+//# sourceMappingURL=ViewModel.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..8ad0b2fa8e2a0df01dad7679a4172a99c32f4a5e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ViewModel.d.ts","sourceRoot":"","sources":["../../src/model/ViewModel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAY;IACpC,OAAO,CAAC,IAAI,CAAC,CAAiB;IAC9B,OAAO,CAAC,IAAI,CAAgE;IAE5E,OAAO;IAIP,WAAkB,QAAQ,IAAI,SAAS,CAGtC;IAED,IAAW,GAAG,IAAI,cAAc,CAG/B;IAEM,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,GAAG,UAAU,KAAK,IAAI,GAAG,IAAI;IAOtE,UAAU,IAAI,IAAI;CAW5B"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js"
new file mode 100644
index 0000000000000000000000000000000000000000..dc0ca84fcf1a2c2b68aee88f13b029801e4b2012
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js"
@@ -0,0 +1,33 @@
+export default class ViewModel {
+ constructor() {
+ this.list = new Map(); // 存储事件类型和对应的处理程序集合的映射关系
+ // 私有构造函数,确保单例模式
+ }
+ static get instance() {
+ // 获取ViewModel实例的静态方法
+ return ViewModel._instance || (ViewModel._instance = new ViewModel());
+ }
+ get app() {
+ // 获取应用程序的DOM元素
+ return this._app || (this._app = document.querySelector("#app"));
+ }
+ addEvent(type, handler) {
+ var _a;
+ // 添加事件处理程序
+ if (!this.list.get(type))
+ this.list.set(type, new Set());
+ (_a = this.list.get(type)) === null || _a === void 0 ? void 0 : _a.add(handler);
+ this.app.addEventListener(type, handler);
+ }
+ clearEvent() {
+ // 清除所有事件处理程序
+ this.list.forEach((value, key) => {
+ value.forEach((item) => {
+ this.app.removeEventListener(key, item);
+ });
+ value.clear();
+ });
+ this.list.clear();
+ }
+}
+//# sourceMappingURL=ViewModel.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..75ddb2c06f2585a05350cf56c206b4499b7cbd5a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/model/ViewModel.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ViewModel.js","sourceRoot":"","sources":["../../src/model/ViewModel.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,SAAS;IAK1B;QAFQ,SAAI,GAAsD,IAAI,GAAG,EAAE,CAAC,CAAC,wBAAwB;QAGjG,gBAAgB;IACpB,CAAC;IAEM,MAAM,KAAK,QAAQ;QACtB,qBAAqB;QACrB,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC,CAAC;IAC1E,CAAC;IAED,IAAW,GAAG;QACV,eAAe;QACf,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAmB,CAAC,CAAC;IACvF,CAAC;IAEM,QAAQ,CAAC,IAAY,EAAE,OAAwC;;QAClE,WAAW;QACX,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAC,CAAC;QACzD,MAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,CAAC;IAEM,UAAU;QACb,aAAa;QACb,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAA2C,EAAE,GAAW,EAAE,EAAE;YAC3E,KAAK,CAAC,OAAO,CAAC,CAAC,IAAwB,EAAE,EAAE;gBACvC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC5C,CAAC,CAAC,CAAC;YAEH,KAAK,CAAC,KAAK,EAAE,CAAC;QAClB,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..73e32ec83ae99267ce8757f1e5519111079b8e3f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts"
@@ -0,0 +1,7 @@
+import ICommand from "../interface/ICommand.js";
+export default class DetailsPage implements ICommand {
+ constructor();
+ exec(data: any): void;
+ private setStyle;
+}
+//# sourceMappingURL=DetailsPage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3c467cccfdb205f1e79f5bbb5a8606705929f093
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsPage.d.ts","sourceRoot":"","sources":["../../src/router/DetailsPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAMhD,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,QAAQ;;IAIhD,IAAI,CAAC,IAAI,EAAC,GAAG,GAAG,IAAI;IAKpB,OAAO,CAAC,QAAQ;CAuUnB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..cc70fb8325a805909e3330c6185e7ca1fcce4970
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js"
@@ -0,0 +1,339 @@
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+export default class DetailsPage {
+ constructor() {
+ this.setStyle();
+ }
+ exec(data) {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = ``;
+ }
+ setStyle() {
+ Utils.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ body {
+ background: #fff
+ }
+ .current {
+ color: #ff7300;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header {
+ height: 125px;
+ border-bottom: 1px solid #ccc;
+ }
+ .nav {
+ height: 40px;
+ border-bottom: 2px solid #ccc;
+ }
+ .nav li {
+ float: left;
+ }
+ .nav li a {
+ display: inline-block;
+ width: 112px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ }
+ .nav li a:hover {
+ color: #333;
+ }
+ .detail {
+ padding: 20px 0;
+ height: 742px;
+ }
+ .detail .fdj {
+ float: left;
+ width: 496px;
+ height: 702px;
+ }
+ .detail .fdj .zoom-show .zoom {
+ position: relative;
+ }
+ .detail .fdj .zoom-show .zoom .min {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ background: url("./img/a.jpg.avif");
+ background-size: 100% 100%;
+ }
+ .detail .fdj .zoom-show .zoom .min .mask {
+ width: 303px;
+ height: 303px;
+ background-color: rgba(190,160,30,0.4);
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ pointer-events: none;
+ }
+ .detail .fdj .zoom-show .zoom .max {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ position: absolute;
+ left: 496px;
+ top: 0;
+ background-image: url("./img/a.jpg.avif");
+ visibility: hidden;
+ }
+ .detail .fdj .icon-carousel {
+ width: 496px;
+ height: 60px;
+ margin-top: 20px;
+ }
+ .detail .fdj .icon-carousel .left {
+ width: 22px;
+ height: 32px;
+ background-image: url("../../img/left-icon.png");
+ float: left;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+ .detail .fdj .icon-carousel .carousel {
+ width: 424px;
+ height: 60px;
+ float: left;
+ position: relative;
+ margin: 0 14px;
+ overflow: hidden;
+ }
+ .detail .fdj .icon-carousel .carousel .img-con {
+ width: 684px;
+ height: 60px;
+ font-size: 0;
+ position: absolute;
+ transition: all 0.5s;
+ left: 0;
+ }
+ .detail .fdj .icon-carousel .carousel .img-con img {
+ width: 54px;
+ height: 54px;
+ border: 2px solid transparent;
+ margin: 0 9px;
+ }
+ .detail .fdj .icon-carousel .right {
+ width: 22px;
+ height: 32px;
+ background-image: url("../../img/icons.png");
+ background-position: -78px 0;
+ float: right;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+ .detail .info {
+ float: left;
+ width: 704px;
+ height: 702px;
+ padding-left: 28px;
+ }
+ .detail .info .title {
+ font-size: 16px;
+ line-height: 40px;
+ }
+ .detail .info .title-third {
+ font-size: 12px;
+ color: #ccc;
+ margin-bottom: 20px;
+ }
+ .detail .info .title-third .star img {
+ width: 15px;
+ height: 15px;
+ }
+ .detail .info .title-third span:last-child {
+ float: right;
+ }
+ .detail .info .method {
+ margin-bottom: 10px;
+ }
+ .detail .info .method span {
+ display: inline-block;
+ width: 335px;
+ height: 42px;
+ text-align: center;
+ line-height: 42px;
+ }
+ .detail .info .method span:first-child {
+ border-top: 2px solid #ff4000;
+ }
+ .detail .info .method span:last-child {
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .price-num {
+ height: 70px;
+ padding: 12px 16px;
+ background-color: #f9f9fa;
+ }
+ .detail .info .price-num span:first-child {
+ display: inline-block;
+ width: 100px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .more {
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .more img {
+ display: block;
+ }
+ .detail .info .color-contain {
+ height: 70px;
+ line-height: 70px;
+ background-color: #fff;
+ }
+ .detail .info .color-contain span {
+ float: left;
+ margin-left: 20px;
+ margin-right: 40px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .color-contain .prop {
+ float: left;
+ margin-top: 17px;
+ }
+ .detail .info .color-contain .prop .drop-item {
+ float: left;
+ width: 100px;
+ height: 36px;
+ line-height: 36px;
+ padding-left: 45px;
+ border: 1px solid #ccc;
+ margin-right: 10px;
+ cursor: pointer;
+ font-size: 12px;
+ background: url("../../img/prop1.jpg") no-repeat;
+ background-size: 36px 36px;
+ }
+ .detail .info .size-contain {
+ height: 181px;
+ background-color: #fff;
+ border-top: 1px dashed #ccc;
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .size-contain >span {
+ float: left;
+ height: 190px;
+ margin-left: 20px;
+ margin-right: 40px;
+ line-height: 60px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .size-contain .s {
+ float: left;
+ width: 588px;
+ height: 60px;
+ line-height: 60px;
+ font-size: 14px;
+ border-bottom: 1px dashed #ccc;
+ }
+ .detail .info .size-contain .s .size-name {
+ display: inline-block;
+ width: 20px;
+ }
+ .detail .info .size-contain .s .price {
+ width: 50px;
+ margin-left: 150px;
+ margin-right: 70px;
+ }
+ .detail .info .size-contain .s .sale {
+ width: 50px;
+ font-size: 12px;
+ color: #ccc;
+ }
+ .detail .info .size-contain .s .step {
+ display: inline-block;
+ padding-top: 6px;
+ margin-left: 70px;
+ }
+ .detail .info .size-contain .s .step-num .num-sub {
+ width: 20px;
+ height: 20px;
+ text-align: center;
+ }
+ .detail .info .add-shoppinglist {
+ width: 120px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ border: 1px solid #ff4000;
+ border-radius: 5px;
+ cursor: pointer;
+ margin-top: 7px;
+ background-color: #fff;
+ }
+ /*# sourceMappingURL=details.css.map */`);
+ }
+}
+//# sourceMappingURL=DetailsPage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f2afd3416c27a26641263dc6f9b90109c674bf65
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/DetailsPage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsPage.js","sourceRoot":"","sources":["../../src/router/DetailsPage.ts"],"names":[],"mappings":"AAEA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAItC,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B;QACI,IAAI,CAAC,QAAQ,EAAE,CAAA;IACnB,CAAC;IACD,IAAI,CAAC,IAAQ;QACT,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,EAAE,CAAA;IAEzC,CAAC;IACO,QAAQ;QACZ,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kDAoU6B,CAAC,CAAA;IAC/C,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..02e97dd473903b8b4ab204ca352ebe103a5a5e50
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts"
@@ -0,0 +1,6 @@
+import ICommand from "../interface/ICommand.js";
+export default class GoodsPage implements ICommand {
+ constructor();
+ exec(): void;
+}
+//# sourceMappingURL=GoodsPage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..fad41ee4db33775935b0a30008745e3ed51d5f15
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"GoodsPage.d.ts","sourceRoot":"","sources":["../../src/router/GoodsPage.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAIhD,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,QAAQ;;IAI9C,IAAI,IAAI,IAAI;CAOf"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..5cc591d667473ff4fca07d3af5b4f3ef70f6db68
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js"
@@ -0,0 +1,13 @@
+import AJAX from "../business/Ajax.js";
+import ViewModel from "../model/ViewModel.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+export default class GoodsPage {
+ constructor() {
+ }
+ exec() {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = "";
+ AJAX.get(ROUTERS.LIST);
+ }
+}
+//# sourceMappingURL=GoodsPage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..093c52cbb591a895517d148f8572b96c8f6fff80
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/GoodsPage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"GoodsPage.js","sourceRoot":"","sources":["../../src/router/GoodsPage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAGvC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAE1C,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B;IAEA,CAAC;IACD,IAAI;QACA,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAC,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAG3B,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..360eb869850d10b74d2d6827ba7be4c6e17f1b74
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts"
@@ -0,0 +1,12 @@
+import ICommand from "../interface/ICommand.js";
+export default class LoginPage implements ICommand {
+ constructor();
+ exec(): void;
+ protected clickHandler(e: MouseEvent): void;
+ private submitHandler;
+ protected submit(item: {
+ [key: string]: any;
+ }): void;
+ private inputHandler;
+}
+//# sourceMappingURL=LoginPage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..2e38d1320b3c316fb76f209f2d30b02fb707325b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"LoginPage.d.ts","sourceRoot":"","sources":["../../src/router/LoginPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAOhD,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,QAAQ;;IAE9C,IAAI,IAAI,IAAI;IAcZ,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAM3C,OAAO,CAAC,aAAa;IAmBrB,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;IAG7C,OAAO,CAAC,YAAY;CAiBvB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..69d8cd8088bbda37b1dcd9c45daaf89c8d934c99
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js"
@@ -0,0 +1,61 @@
+import AJAX from "../business/Ajax.js";
+import ViewModel from "../model/ViewModel.js";
+import { Verify } from "../utils/Verify.js";
+import LoginView from "../views/LoginView.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import MainRouter from "./MainRouter.js";
+export default class LoginPage {
+ constructor() { }
+ exec() {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = LoginView;
+ ViewModel.instance.addEvent("click", (e) => this.clickHandler(e));
+ ViewModel.instance.addEvent("submit", (e) => this.submitHandler(e));
+ ViewModel.instance.addEvent("input", (e) => this.inputHandler(e));
+ }
+ clickHandler(e) {
+ var elem = e.target;
+ if (elem.id === "registerBn") {
+ MainRouter.instance.go("/register");
+ }
+ }
+ submitHandler(e) {
+ var _a;
+ var elem = e.target;
+ e.preventDefault();
+ var item = {};
+ var fd = new FormData(elem);
+ for (var [key, value] of fd) {
+ if (Verify[key].required && String(value).trim().length === 0)
+ return alert(key + "不能为空!");
+ if (!Verify[key].judge.test(String(value))) {
+ alert(Verify[key].message);
+ (_a = elem.querySelector(`[name=${key}]`)) === null || _a === void 0 ? void 0 : _a.focus();
+ return;
+ }
+ item[key] = value;
+ }
+ console.log(item);
+ this.submit(item);
+ }
+ submit(item) {
+ AJAX.post(ROUTERS.LOGIN, item);
+ }
+ inputHandler(e) {
+ // var elem: HTMLInputElement = e.target as HTMLInputElement;
+ // var parentClassList = (elem.parentElement as HTMLElement).classList;
+ // var iconClassList = (elem.nextElementSibling as HTMLElement).classList;
+ // if (Verify[elem.name].judge.test(elem.value)) {
+ // parentClassList.remove("has-error");
+ // parentClassList.add("has-success");
+ // iconClassList.remove("glyphicon-remove");
+ // iconClassList.add("glyphicon-ok");
+ // } else {
+ // parentClassList.remove("has-success");
+ // parentClassList.add("has-error");
+ // iconClassList.remove("glyphicon-ok");
+ // iconClassList.add("glyphicon-remove");
+ // }
+ }
+}
+//# sourceMappingURL=LoginPage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a5b035cd1fca88712ae51a4c6e39b7c10216bd6d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/LoginPage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"LoginPage.js","sourceRoot":"","sources":["../../src/router/LoginPage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,gBAAe,CAAC;IAChB,IAAI;QAEA,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAG,SAAS,CAAC;QAC7C,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE,CAC9C,IAAI,CAAC,YAAY,CAAC,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ACnE,OAAO;aACV;YACD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;SACrB;QACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAElB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACS,MAAM,CAAC,IAA4B;QACzC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACnC,CAAC;IACO,YAAY,CAAC,CAAQ;QACzB,6DAA6D;QAC7D,uEAAuE;QACvE,0EAA0E;QAE1E,kDAAkD;QAClD,2CAA2C;QAC3C,0CAA0C;QAC1C,gDAAgD;QAChD,yCAAyC;QACzC,WAAW;QACX,6CAA6C;QAC7C,wCAAwC;QACxC,4CAA4C;QAC5C,6CAA6C;QAC7C,IAAI;IACR,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..43207cad0401674ad931f8fb9c1d1cf682485ac5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts"
@@ -0,0 +1,14 @@
+import ICommand from "../interface/ICommand";
+import { RouterType } from "../vo/RouterVo";
+export default class MainRouter {
+ private static _instance;
+ private list;
+ private constructor();
+ static get instance(): MainRouter;
+ go(router: RouterType, data?: any, bool?: boolean): void;
+ addRouter(router: RouterType, command: {
+ new (): ICommand;
+ }): void;
+ private popStateHandler;
+}
+//# sourceMappingURL=MainRouter.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..c00f0b443e517588309268b49341c6950a884880
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainRouter.d.ts","sourceRoot":"","sources":["../../src/router/MainRouter.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,MAAM,CAAC,OAAO,OAAO,UAAU;IAC3B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAY;IACpC,OAAO,CAAC,IAAI,CAAyC;IACrD,OAAO;IAGP,WAAkB,QAAQ,IAAG,UAAU,CAEtC;IACM,EAAE,CAAC,MAAM,EAAC,UAAU,EAAC,IAAI,CAAC,EAAC,GAAG,EAAC,IAAI,GAAC,OAAa,GAAE,IAAI;IASvD,SAAS,CAAC,MAAM,EAAC,UAAU,EAAC,OAAO,EAAC;QAAC,QAAM,QAAQ,CAAA;KAAC,GAAE,IAAI;IAIjE,OAAO,CAAC,eAAe;CAG1B"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js"
new file mode 100644
index 0000000000000000000000000000000000000000..75b70ed528f8837fd7cf918b7f52a02f098db16b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js"
@@ -0,0 +1,28 @@
+export default class MainRouter {
+ constructor() {
+ this.list = {};
+ window.addEventListener("popstate", e => this.popStateHandler(e));
+ }
+ static get instance() {
+ return MainRouter._instance || (MainRouter._instance = new MainRouter());
+ }
+ go(router, data, bool = false) {
+ if (!this.list[router])
+ return;
+ this.list[router].forEach((command) => {
+ new command().exec(data);
+ });
+ if (!bool)
+ history.pushState(router, router, "#" + router);
+ }
+ // 添加路由
+ addRouter(router, command) {
+ if (!this.list[router])
+ this.list[router] = new Set();
+ this.list[router].add(command);
+ }
+ popStateHandler(e) {
+ this.go(history.state, undefined, true);
+ }
+}
+//# sourceMappingURL=MainRouter.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a8c7eefe03ea0224ce3ab9dd73de8c03e7246d7d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/MainRouter.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainRouter.js","sourceRoot":"","sources":["../../src/router/MainRouter.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAO,UAAU;IAG3B;QADQ,SAAI,GAAuC,EAAE,CAAA;QAEjD,MAAM,CAAC,gBAAgB,CAAC,UAAU,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;IACnE,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,OAAO,UAAU,CAAC,SAAS,IAAI,CAAC,UAAU,CAAC,SAAS,GAAC,IAAI,UAAU,EAAE,CAAC,CAAC;IAC3E,CAAC;IACM,EAAE,CAAC,MAAiB,EAAC,IAAS,EAAC,OAAa,KAAK;QACpD,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,OAAO;QAE9B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,OAAwB,EAAC,EAAE;YAClD,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAC,CAAA;QACF,IAAG,CAAC,IAAI;YAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAC,MAAM,EAAC,GAAG,GAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IACD,OAAO;IACA,SAAS,CAAC,MAAiB,EAAC,OAAwB;QACxD,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAC,IAAI,GAAG,EAAE,CAAC;QACnD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAClC,CAAC;IACO,eAAe,CAAC,CAAO;QAC3B,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,EAAC,SAAS,EAAC,IAAI,CAAC,CAAC;IAC1C,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..ef12d28f6f4f5d9a3cf0107376bb626f0ced0e0e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts"
@@ -0,0 +1,13 @@
+import ICommand from "../interface/ICommand.js";
+export default class RegisterPage implements ICommand {
+ constructor();
+ exec(): void;
+ protected clickHandler(e: MouseEvent): void;
+ protected submitHandler(e: Event): void;
+ protected submit(item: {
+ [key: string]: any;
+ }): void;
+ protected inputHandler(e: Event): void;
+ private setStyle;
+}
+//# sourceMappingURL=RegisterPage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f9821b7d67e415c8b239ed0ddf41ddc24e62d34b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RegisterPage.d.ts","sourceRoot":"","sources":["../../src/router/RegisterPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAQhD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAKjD,IAAI,IAAI,IAAI;IAQZ,SAAS,CAAE,YAAY,CAAC,CAAC,EAAC,UAAU,GAAE,IAAI;IAO1C,SAAS,CAAC,aAAa,CAAC,CAAC,EAAC,KAAK,GAAE,IAAI;IAsBrC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC;IAGxC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAC,KAAK;IAiB9B,OAAO,CAAC,QAAQ;CAgNnB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..c0e6f8ee685ff6e6a62ba297d19bdecb428b704f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js"
@@ -0,0 +1,274 @@
+import AJAX from "../business/Ajax.js";
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+import { Verify } from "../utils/Verify.js";
+import RegisterView from "../views/RegisterView.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import MainRouter from "./MainRouter.js";
+export default class RegisterPage {
+ constructor() {
+ }
+ exec() {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = RegisterView;
+ ViewModel.instance.addEvent("click", (e) => this.clickHandler(e));
+ ViewModel.instance.addEvent("submit", (e) => this.submitHandler(e));
+ ViewModel.instance.addEvent("input", (e) => this.inputHandler(e));
+ this.setStyle();
+ }
+ clickHandler(e) {
+ var elem = e.target;
+ if (elem.id === "loginBn") {
+ MainRouter.instance.go("/login");
+ }
+ }
+ submitHandler(e) {
+ var _a;
+ var elem = e.target;
+ e.preventDefault();
+ var item = {};
+ var fd = new FormData(elem);
+ console.log(fd);
+ // if (!fd.keys.) return
+ for (var [key, value] of fd) {
+ if (Verify[key].required && String(value).trim().length === 0)
+ return alert(key + "不能为空!");
+ if (!Verify[key].judge.test(String(value))) {
+ console.log(Verify[key].message);
+ (_a = elem.querySelector(`[name=${key}]`)) === null || _a === void 0 ? void 0 : _a.focus();
+ return;
+ }
+ item[key] = value;
+ console.log(item);
+ }
+ this.submit(item);
+ }
+ submit(item) {
+ AJAX.post(ROUTERS.REGISTER, item);
+ }
+ inputHandler(e) {
+ // var elem:HTMLInputElement=e.target as HTMLInputElement;
+ // var parentClassList=(elem.parentElement as HTMLElement).classList;
+ // var iconClassList=(elem.nextElementSibling as HTMLElement).classList;
+ // if(Verify[elem.name].judge.test(elem.value)){
+ // parentClassList.remove("has-error");
+ // parentClassList.add("has-success");
+ // iconClassList.remove("glyphicon-remove");
+ // iconClassList.add("glyphicon-ok")
+ // }else{
+ // parentClassList.remove("has-success");
+ // parentClassList.add("has-error");
+ // iconClassList.remove("glyphicon-ok");
+ // iconClassList.add("glyphicon-remove")
+ // }
+ }
+ setStyle() {
+ Utils.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '|';
+ display: inline-block;
+ color: #ccc;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header2 {
+ margin-bottom: 10px;
+ }
+ .header2 .logo {
+ width: 960px;
+ height: 92px;
+ margin: 0 auto;
+ padding: 27px 4px;
+ }
+ .header2 .logo a {
+ float: left;
+ border-right: 1px solid #ccc;
+ padding-right: 20px;
+ }
+ .header2 .logo span {
+ float: left;
+ height: 42px;
+ line-height: 42px;
+ font-size: 24px;
+ font-weight: 700;
+ margin-left: 20px;
+ }
+ .header2 .title {
+ height: 46px;
+ text-align: center;
+ border-bottom: 1px solid #ccc;
+ }
+ .header2 .title span {
+ display: inline-block;
+ width: 240px;
+ height: 46px;
+ line-height: 46px;
+ font-size: 20px;
+ font-weight: 500;
+ cursor: pointer;
+ }
+ .header2 .title span:last-child {
+ border-bottom: 1px solid #ff7300;
+ color: #ff7300;
+ }
+ .content {
+ background: 0;
+ }
+ .content >p {
+ font-size: 14px;
+ font-weight: 600;
+ text-align: center;
+ margin-bottom: 20px;
+ }
+ .content .register {
+ position: relative;
+ width: 720px;
+ height: 500px;
+ margin: 0 auto;
+ }
+ .content .register .form-item {
+ width: 720px;
+ height: 44px;
+ margin-bottom: 10px;
+ }
+ .content .register .form-item span {
+ display: inline-block;
+ width: 230px;
+ height: 38px;
+ line-height: 38px;
+ text-align: right;
+ padding-right: 10px;
+ font-size: 12px;
+ color: #333;
+ }
+ .content .register .form-item span::before {
+ content: '*';
+ height: 38px;
+ margin-right: 3px;
+ color: #f00;
+ }
+ .content .register .form-item input {
+ width: 298px;
+ height: 38px;
+ border: 1px solid #ccc;
+ padding: 0 10px;
+ }
+ .content .register .check {
+ font-size: 12px;
+ margin-left: 235px;
+ height: 44px;
+ }
+ .content .register .check input {
+ float: left;
+ width: 16px;
+ height: 16px;
+ margin-right: 5px;
+ }
+ .content .register .check >div {
+ float: left;
+ }
+ .content .register .check >div a {
+ color: #ff7300;
+ }
+ .content .register .submit {
+ margin-left: 235px;
+ }
+ .content .register .submit button {
+ width: 112px;
+ height: 40px;
+ border: 0;
+ background-color: #ff6000;
+ color: #fff;
+ }
+ .content .more {
+ position: absolute;
+ top: 20px;
+ right: -100px;
+ width: 180px;
+ height: 270px;
+ border: 1px solid #ccc;
+ padding: 20px 20px 0;
+ }
+ .content .more ul {
+ font-size: 12px;
+ }
+ .content .more ul li {
+ border-bottom: 1px solid #ccc;
+ line-height: 20px;
+ padding: 5px 0;
+ }
+ .content .more ul li:last-child {
+ border-bottom: 0;
+ }
+ .content .more ul a:hover {
+ color: #000;
+ }
+ .footer {
+ width: 952px;
+ height: 70px;
+ font-size: 12px;
+ text-align: center;
+ margin: 0 auto;
+ border-top: 2px solid #ff6000;
+ }
+ .footer b {
+ color: #ccc;
+ }
+ .footer ul {
+ display: inline;
+ }
+ .footer ul li {
+ display: inline;
+ }
+ .footer .fh {
+ margin: 10px 0;
+ }
+ .footer .fh p {
+ display: inline;
+ color: #ccc;
+ }
+ /*# sourceMappingURL=register.css.map */`);
+ }
+}
+//# sourceMappingURL=RegisterPage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3e44fdc7b288c9327701a2e68cd26abbbbbb18d4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/RegisterPage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RegisterPage.js","sourceRoot":"","sources":["../../src/router/RegisterPage.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,KAAK,MAAM,mBAAmB,CAAC;AACtC,OAAO,EAAC,MAAM,EAAC,MAAM,oBAAoB,CAAC;AAC1C,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,UAAU,MAAM,iBAAiB,CAAC;AAEzC,MAAM,CAAC,OAAO,OAAO,YAAY;IAE7B;IAEA,CAAC;IACD,IAAI;QACA,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,SAAS,GAAC,YAAY,CAAC;QAC9C,SAAS,CA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C,MAAM,CAAC,KAAK,CAAC,CAAC,EAAC;gBACtC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;gBAClC,MAAE,IAAI,CAAC,aAAa,CAAC,SAAS,GAAG,GAAG,CAAsB,0CAAE,KAAK,EAAE,CAAC;gBACnE,OAAO;aACV;YACD,IAAI,CAAC,GAAG,CAAC,GAAE,KAAK,CAAC;YACjB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;SAErB;QACD,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtB,CAAC;IACS,MAAM,CAAC,IAAuB;QACpC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IACS,YAAY,CAAC,CAAO;QAC1B,0DAA0D;QAC1D,qEAAqE;QACrE,wEAAwE;QAE5E,mDAAmD;QACnD,+CAA+C;QAC/C,8CAA8C;QAC9C,oDAAoD;QACpD,4CAA4C;QAC5C,YAAY;QACZ,iDAAiD;QACjD,4CAA4C;QAC5C,gDAAgD;QAChD,gDAAgD;QAChD,OAAO;IACP,CAAC;IACO,QAAQ;QACZ,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDA6M8B,CAAC,CAAA;IAChD,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..facfc3f895341317507f862d139b6eab5f0002d1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts"
@@ -0,0 +1,10 @@
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+export default class ShoppingPage implements ICommand {
+ constructor();
+ exec(router: ROUTER_CHILD): void;
+ private updateTable;
+ private setTdContent;
+ private setStyle;
+}
+//# sourceMappingURL=ShoppingPage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..4d60bbfc1aacb87ccbcd18535ce2dee66fbc51fd
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ShoppingPage.d.ts","sourceRoot":"","sources":["../../src/router/ShoppingPage.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAQhD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAGjD,IAAI,CAAC,MAAM,EAAC,YAAY,GAAG,IAAI;IAM/B,OAAO,CAAC,WAAW;IA+HnB,OAAO,CAAC,YAAY;IA4BpB,OAAO,CAAC,QAAQ;CAkLnB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..768022e7ef9236af43ab82fa0f941358654880dc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js"
@@ -0,0 +1,345 @@
+import StepNumber from "../component/StepNumber.js";
+import MainModel from "../model/MainModel.js";
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+export default class ShoppingPage {
+ constructor() {
+ }
+ exec(router) {
+ ViewModel.instance.app.innerHTML = "";
+ var data = this.updateTable();
+ this.setStyle();
+ }
+ updateTable() {
+ ViewModel.instance.app.innerHTML = `
+
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 退出登录
+
+
+
+
+
+
+
+
+ `;
+ // console.log(MainModel.instance.shoppingList,11111111111);
+ ViewModel.instance.app.querySelector("#all").checked = MainModel.instance.shoppingList.every((item) => item.checked);
+ if (ViewModel.instance.app.querySelector("#all").checked === true) {
+ MainModel.instance.shoppingList.forEach((item) => {
+ item.checked == true;
+ });
+ }
+ var tbody = ViewModel.instance.app.querySelector("tbody");
+ var elem = document.createDocumentFragment();
+ for (var i = 0; i < MainModel.instance.shoppingList.length; i++) {
+ var tr = document.createElement("tr");
+ for (var key in MainModel.instance.shoppingList[i]) {
+ if (key === "pid" || key === 'userId' || key === 'goodsId' || key === 'company')
+ continue;
+ var td = document.createElement("td");
+ this.setTdContent(td, key, MainModel.instance.shoppingList[i]);
+ tr.appendChild(td);
+ }
+ var td = document.createElement("td");
+ td.innerHTML = `删除 `;
+ tr.appendChild(td);
+ elem.appendChild(tr);
+ }
+ tbody.appendChild(elem);
+ }
+ setTdContent(td, key, data) {
+ // console.log(data);
+ switch (key) {
+ case "checked":
+ td.innerHTML = `
+ `;
+ break;
+ case "img":
+ // console.log(data.icon);
+ break;
+ case "price":
+ td.className = "price1";
+ td.innerHTML = Number(data[key]).toFixed(2);
+ break;
+ case "total":
+ td.innerHTML = Number(data[key]).toFixed(2);
+ break;
+ case "num":
+ var step = new StepNumber();
+ step.step = data.num;
+ step.appendTo(td);
+ step.id = data.pid;
+ break;
+ default:
+ td.innerHTML = String(data[key]);
+ }
+ }
+ setStyle() {
+ Utils.setCss(`
+ * {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ .current {
+ color: #ff7300;
+ }
+ body {
+ background-color: #f2f2f2;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header-shop {
+ height: 80px;
+ background-color: #fff;
+ }
+ .header-shop img {
+ width: 240px;
+ height: 80px;
+ }
+ .main .plus {
+ margin: 20px 0;
+ }
+ .main .cart .cart-head {
+ height: 92px;
+ padding: 0 20px;
+ background-color: #f7f7f7;
+ overflow: hidden;
+ }
+ .main .cart .cart-head .cart-tab {
+ height: 24px;
+ line-height: 24px;
+ margin: 20px 0;
+ }
+ .main .cart .cart-head .cart-tab .spots {
+ float: left;
+ font-size: 20px;
+ }
+ .main .cart .cart-head .cart-tab .address {
+ float: right;
+ font-size: 14px;
+ width: 140px;
+ height: 24px;
+ border-radius: 10px;
+ text-align: center;
+ background-color: #fff;
+ }
+ .main .cart .cart-head table thead th {
+ font-weight: 400;
+ text-align: left;
+ }
+ .main .cart .cart-body .item {
+ padding: 20px 20px 0 20px;
+ margin-bottom: 20px;
+ background-color: #fff;
+ }
+ .main .cart .cart-body .item .img {
+ width: 70px;
+ height: 70px;
+ margin-top: 20px;
+ margin-left: 20px;
+ }
+ .main .cart .cart-body .item tbody td:nth-child(1) {
+ width: 150px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(2) {
+ width: 430px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(3) {
+ width: 0px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(4) {
+ width: 230px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(5) {
+ width: 200px
+ }
+ .main .cart .cart-footer {
+ height: 70px;
+ background-color: #fff;
+ padding: 0 20px;
+ line-height: 70px;
+ }
+ .main .cart .cart-footer >div {
+ float: right;
+ }
+ .main .cart .cart-footer .check {
+ margin-right: 50px;
+ }
+ .main .cart .cart-footer .delete-all {
+ margin-right: 500px;
+ cursor: pointer;
+ }
+ .main .cart .cart-footer .subtotal {
+ float: right
+ margin-right: 20px;
+ }
+ .main .cart .cart-footer .subtotal span {
+ padding: 0 10px;
+ }
+ .main .cart .cart-footer .jiesuan {
+ width: 80px;
+ height: 40px;
+ margin-top: 15px;
+ line-height: 40px;
+ color: #fff;
+ text-align: center;
+ border-radius: 20px;
+ background-color: #ff602d;
+ }
+ /*# sourceMappingURL=shoppinglist.css.map */`);
+ }
+}
+//# sourceMappingURL=ShoppingPage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..ac6bc890a1e6f9b34c539e6324c15433f1cb2b83
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/router/ShoppingPage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ShoppingPage.js","sourceRoot":"","sources":["../../src/router/ShoppingPage.ts"],"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O,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;4BACtF,IAAI,CAAC,GAAG,mCAAmC,CAAC;gBACxD,MAAM;YACV,KAAK,KAAK;gBACN,0BAA0B;gBAC1B,MAAM;YACV,KAAK,OAAO;gBACR,EAAE,CAAC,SAAS,GAAC,QAAQ,CAAA;gBACrB,EAAE,CAAC,SAAS,GAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC1C,MAAM;YACV,KAAK,OAAO;gBACR,EAAE,CAAC,SAAS,GAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;gBAC1C,MAAM;YACV,KAAK,KAAK;gBACN,IAAI,IAAI,GAAC,IAAI,UAAU,EAAE,CAAC;gBAC1B,IAAI,CAAC,IAAI,GAAC,IAAI,CAAC,GAAG,CAAC;gBACnB,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;gBAClB,IAAI,CAAC,EAAE,GAAC,IAAI,CAAC,GAAG,CAAC;gBACjB,MAAM;YACV;gBACI,EAAE,CAAC,SAAS,GAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SACtC;IACL,CAAC;IACO,QAAQ;QACZ,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mDA+K8B,CAAC,CAAA;IAChD,CAAC;CACJ"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..a992baefc772d9cc10b5e57013ebe19ab687e750
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts"
@@ -0,0 +1,5 @@
+export declare function parse(qs: any, sep?: any, eq?: any, options?: any): {
+ [key: string]: any;
+};
+export declare function stringfiy(obj: any, sep?: any, eq?: any, name?: any): string;
+//# sourceMappingURL=QueryString.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3ff74cc504ce607b44886fef6c9b59c9bf8014e1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"QueryString.d.ts","sourceRoot":"","sources":["../../src/utils/QueryString.ts"],"names":[],"mappings":"AA8BA,wBAAiB,KAAK,CAAC,EAAE,EAAC,GAAG,EAAE,GAAG,CAAC,EAAC,GAAG,EAAE,EAAE,CAAC,EAAC,GAAG,EAAE,OAAO,CAAC,EAAC,GAAG;;EAiD7D;AAmBD,wBAAgB,SAAS,CAAC,GAAG,EAAC,GAAG,EAAE,GAAG,CAAC,EAAC,GAAG,EAAE,EAAE,CAAC,EAAC,GAAG,EAAE,IAAI,CAAC,EAAC,GAAG,UAwB5D"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js"
new file mode 100644
index 0000000000000000000000000000000000000000..0461677f03d38c50d2fdf14c550f71f301e81896
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js"
@@ -0,0 +1,108 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict';
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj, prop) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+export function parse(qs, sep, eq, options) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj = {};
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
+ var regexp = /\+/g;
+ qs = qs.split(sep);
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'), idx = x.indexOf(eq), kstr, vstr, k, v;
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ }
+ else {
+ kstr = x;
+ vstr = '';
+ }
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ }
+ else if (Array.isArray(obj[k])) {
+ obj[k].push(v);
+ }
+ else {
+ obj[k] = [obj[k], v];
+ }
+ }
+ return obj;
+}
+;
+var stringifyPrimitive = function (v) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+ case 'boolean':
+ return v ? 'true' : 'false';
+ case 'number':
+ return isFinite(v) ? v : '';
+ default:
+ return '';
+ }
+};
+export function stringfiy(obj, sep, eq, name) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+ if (typeof obj === 'object') {
+ return Object.keys(obj).map(function (k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (Array.isArray(obj[k])) {
+ return obj[k].map(function (v) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ }
+ else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).filter(Boolean).join(sep);
+ }
+ if (!name)
+ return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+}
+;
+//# sourceMappingURL=QueryString.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..e15ff4132ce229f8f36ef38c0eddeb5307005f43
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/QueryString.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"QueryString.js","sourceRoot":"","sources":["../../src/utils/QueryString.ts"],"names":[],"mappings":"AAAA,sDAAsD;AACtD,EAAE;AACF,0EAA0E;AAC1E,gEAAgE;AAChE,sEAAsE;AACtE,sEAAsE;AACtE,4EAA4E;AAC5E,qEAAqE;AACrE,wBAAwB;AACxB,EAAE;AACF,0EAA0E;AAC1E,yDAAyD;AACzD,E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AU,SAAS,CAAC,GAAO,EAAE,GAAQ,EAAE,EAAO,EAAE,IAAS;IAC3D,GAAG,GAAG,GAAG,IAAI,GAAG,CAAC;IACjB,EAAE,GAAG,EAAE,IAAI,GAAG,CAAC;IACf,IAAI,GAAG,KAAK,IAAI,EAAE;QAChB,GAAG,GAAG,SAAS,CAAC;KACjB;IAED,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE;QAC3B,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,UAAS,CAAC;YACpC,IAAI,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;YACxD,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;gBACzB,OAAO,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,UAAS,CAAK;oBAC9B,OAAO,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;gBACxD,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aACd;iBAAM;gBACL,OAAO,EAAE,GAAG,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;aAC5D;QACH,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;KAE9B;IAED,IAAI,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IACrB,OAAO,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE;QACjD,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC;AACrD,CAAC;AAAA,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..a489b38ba9d6c6d776c5bc8a7d459501d8ca96b3
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts"
@@ -0,0 +1,5 @@
+export default class Utils {
+ static randomColor(): string;
+ static setCss(str: string): void;
+}
+//# sourceMappingURL=Utils.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..fea5f16eb26763fa6b7ce1d85761e2a624e8d2b6
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../src/utils/Utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,KAAK;WACV,WAAW,IAAI,MAAM;WAMrB,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAgBxC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js"
new file mode 100644
index 0000000000000000000000000000000000000000..a4261f8ce17f56ba9f44cbe1b0883d72e542c7fc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js"
@@ -0,0 +1,21 @@
+export default class Utils {
+ static randomColor() {
+ return Array.from({ length: 6 }).reduce((v) => v + (~~(Math.random() * 16)).toString(16), "#");
+ }
+ static setCss(str) {
+ var _a;
+ if (document.styleSheets.length === 0) {
+ var style = document.createElement("style");
+ style.innerHTML = str;
+ document.head.appendChild(style);
+ return;
+ }
+ var styleSheet = document.styleSheets[document.styleSheets.length - 1];
+ (_a = str
+ .replace(/\n/g, "")
+ .match(/.*?\{.*?\}/g)) === null || _a === void 0 ? void 0 : _a.forEach(function (item) {
+ styleSheet.insertRule(item, styleSheet.cssRules.length);
+ });
+ }
+}
+//# sourceMappingURL=Utils.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..61580d92f254e15c921eb91f4b8780e44d94da4d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Utils.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../src/utils/Utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,KAAK;IACjB,MAAM,CAAC,WAAW;QACvB,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC,MAAM,CACrC,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,EACxD,GAAG,CACJ,CAAC;IACJ,CAAC;IACM,MAAM,CAAC,MAAM,CAAC,GAAW;;QAC9B,IAAI,QAAQ,CAAC,WAAW,CAAC,MAAM,KAAK,CAAC,EAAE;YACrC,IAAI,KAAK,GAAqB,QAAQ,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;YAC9D,KAAK,CAAC,SAAS,GAAG,GAAG,CAAC;YACtB,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;YACjC,OAAO;SACR;QACD,IAAI,UAAU,GACZ,QAAQ,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACxD,MAAA,GAAG;aACA,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;aAClB,KAAK,CAAC,aAAa,CAAC,0CACnB,OAAO,CAAC,UAAU,IAAY;YAC9B,UAAU,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;QAC1D,CAAC,CAAC,CAAC;IACP,CAAC;CACF"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..7d49ec7df2a672b78e6ce18018ea2ccd1040464a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts"
@@ -0,0 +1,3 @@
+import IVerify from "../interface/IVerify.js";
+export declare var Verify: IVerify;
+//# sourceMappingURL=Verify.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..2889be482045bb2f2006f687a3208e3961a67b04
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Verify.d.ts","sourceRoot":"","sources":["../../src/utils/Verify.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,yBAAyB,CAAA;AAE7C,eAAO,IAAI,MAAM,EAAC,OAiBjB,CAAA"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js"
new file mode 100644
index 0000000000000000000000000000000000000000..ba8a784e8be03b85502644fea1b6f96933e42f64
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js"
@@ -0,0 +1,18 @@
+export var Verify = {
+ "user": {
+ required: true,
+ judge: /^\w{8,16}$/,
+ message: "用户名错误"
+ },
+ "password": {
+ required: true,
+ judge: /^(?=\D+\d)(?=.*[a-z])(?=.*[A-Z])\w{8,16}$/,
+ message: "密码错误"
+ },
+ "tel": {
+ required: true,
+ judge: /^1[3-9]\d{9}$/,
+ message: "电话错误"
+ }
+};
+//# sourceMappingURL=Verify.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..8513b21b00ac6c9dcda5b25b301938bb6ba727d2
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/utils/Verify.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Verify.js","sourceRoot":"","sources":["../../src/utils/Verify.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAI,MAAM,GAAS;IACtB,MAAM,EAAC;QACH,QAAQ,EAAC,IAAI;QACb,KAAK,EAAC,YAAY;QAClB,OAAO,EAAC,OAAO;KAClB;IACD,UAAU,EAAC;QACP,QAAQ,EAAC,IAAI;QACb,KAAK,EAAC,2CAA2C;QACjD,OAAO,EAAC,MAAM;KACjB;IACD,KAAK,EAAC;QACF,QAAQ,EAAC,IAAI;QACb,KAAK,EAAC,eAAe;QACrB,OAAO,EAAC,MAAM;KACjB;CAEJ,CAAA"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..211167a45c54f3c71b8252ecf3e040b8a82aa0df
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts"
@@ -0,0 +1,3 @@
+declare const _default: " \n\n \n\n\n\n";
+export default _default;
+//# sourceMappingURL=LoginView.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..fff4b1c884a4cb290e910f5cde2c43d6f5e445b8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"LoginView.d.ts","sourceRoot":"","sources":["../../src/views/LoginView.ts"],"names":[],"mappings":";AAAA,wBA8OO"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js"
new file mode 100644
index 0000000000000000000000000000000000000000..062834532ba685f49d03824d1fcc3d4bdfc2b301
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js"
@@ -0,0 +1,240 @@
+export default `
+
+
+
+
+
+`;
+//# sourceMappingURL=LoginView.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..90b57d08bee1202106a7d112a10ac8bd0ad8c68a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/LoginView.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"LoginView.js","sourceRoot":"","sources":["../../src/views/LoginView.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8OR,CAAA"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5d00b9f6753a3d67bdab0479fabea69afb6e293a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts"
@@ -0,0 +1,3 @@
+declare const _default: "\n\n\n\n
无企业营业执照的个人用户请注册个人账户。权益如下:做个人实名认证;作为买家身份采购;
\n\n
\n
\n\n";
+export default _default;
+//# sourceMappingURL=RegisterView.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b7470db49ca33631a7f4efe9bbe4f7c084933fc1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RegisterView.d.ts","sourceRoot":"","sources":["../../src/views/RegisterView.ts"],"names":[],"mappings":";AAAA,wBA6NO"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js"
new file mode 100644
index 0000000000000000000000000000000000000000..3cf8aee6c6d3162e421bf2327d05e1d0de2ddd2c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js"
@@ -0,0 +1,223 @@
+export default `
+
+
+
+
无企业营业执照的个人用户请注册个人账户。权益如下:做个人实名认证;作为买家身份采购;
+
+
+
+
+`;
+//# sourceMappingURL=RegisterView.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..4dc997bef1aad3659b04479338932a52c090af52
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/views/RegisterView.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RegisterView.js","sourceRoot":"","sources":["../../src/views/RegisterView.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA6NR,CAAA"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..26c29ebc321fc30741f2cfb150c185021d8957ff
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts"
@@ -0,0 +1,22 @@
+export type AJAX_Method = "GET" | "POST";
+export declare const URL: string;
+export declare const PORT: number;
+export declare enum PROTOCOL {
+ HTTP = "http://",
+ HTTPS = "https://"
+}
+export declare const PATH: string;
+export declare enum ROUTERS {
+ REGISTER = "/user/register",
+ LOGIN = "/user/login",
+ LOGOUT = "/user/logout",
+ AUTH = "/user/auth",
+ LIST = "/goods/list",
+ DETAILS = "/details/details",
+ CARTLIST = "/cart/list",
+ ADD = "/cart/add",
+ REMOVE = "/cart/remove",
+ CHANGENUM = "/cart/changenum",
+ CHECKED = "/cart/checked"
+}
+//# sourceMappingURL=AJAXVo.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..924b4c1ab57e2978688b1eb80bace8fa4e0b82ce
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"AJAXVo.d.ts","sourceRoot":"","sources":["../../src/vo/AJAXVo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAC,KAAK,GAAG,MAAM,CAAC;AACvC,eAAO,MAAM,GAAG,EAAC,MAAkB,CAAC;AACpC,eAAO,MAAM,IAAI,EAAC,MAAW,CAAC;AAC9B,oBAAY,QAAQ;IAAC,IAAI,YAAU;IAAC,KAAK,aAAW;CAAC;AACrD,eAAO,MAAM,IAAI,EAAC,MAAiC,CAAC;AACpD,oBAAY,OAAO;IACf,QAAQ,mBAAiB;IACzB,KAAK,gBAAc;IACnB,MAAM,iBAAe;IACrB,IAAI,eAAa;IACjB,IAAI,gBAAc;IAClB,OAAO,qBAAmB;IAC1B,QAAQ,eAAa;IACrB,GAAG,cAAY;IACf,MAAM,iBAAe;IACrB,SAAS,oBAAkB;IAC3B,OAAO,kBAAgB;CAC1B"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js"
new file mode 100644
index 0000000000000000000000000000000000000000..af14d108f552f40cd8acc75956af0e8e06a44d5f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js"
@@ -0,0 +1,24 @@
+export const URL = "localhost";
+export const PORT = 4001;
+export var PROTOCOL;
+(function (PROTOCOL) {
+ PROTOCOL["HTTP"] = "http://";
+ PROTOCOL["HTTPS"] = "https://";
+})(PROTOCOL || (PROTOCOL = {}));
+;
+export const PATH = PROTOCOL.HTTP + URL + ":" + PORT;
+export var ROUTERS;
+(function (ROUTERS) {
+ ROUTERS["REGISTER"] = "/user/register";
+ ROUTERS["LOGIN"] = "/user/login";
+ ROUTERS["LOGOUT"] = "/user/logout";
+ ROUTERS["AUTH"] = "/user/auth";
+ ROUTERS["LIST"] = "/goods/list";
+ ROUTERS["DETAILS"] = "/details/details";
+ ROUTERS["CARTLIST"] = "/cart/list";
+ ROUTERS["ADD"] = "/cart/add";
+ ROUTERS["REMOVE"] = "/cart/remove";
+ ROUTERS["CHANGENUM"] = "/cart/changenum";
+ ROUTERS["CHECKED"] = "/cart/checked";
+})(ROUTERS || (ROUTERS = {}));
+//# sourceMappingURL=AJAXVo.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3a9e0e48241951317a95a831d05f812b1422f25a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/AJAXVo.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"AJAXVo.js","sourceRoot":"","sources":["../../src/vo/AJAXVo.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,GAAG,GAAQ,WAAW,CAAC;AACpC,MAAM,CAAC,MAAM,IAAI,GAAQ,IAAI,CAAC;AAC9B,MAAM,CAAN,IAAY,QAAyC;AAArD,WAAY,QAAQ;IAAC,4BAAc,CAAA;IAAC,8BAAgB,CAAA;AAAA,CAAC,EAAzC,QAAQ,KAAR,QAAQ,QAAiC;AAAA,CAAC;AACtD,MAAM,CAAC,MAAM,IAAI,GAAQ,QAAQ,CAAC,IAAI,GAAC,GAAG,GAAC,GAAG,GAAC,IAAI,CAAC;AACpD,MAAM,CAAN,IAAY,OAYX;AAZD,WAAY,OAAO;IACf,sCAAyB,CAAA;IACzB,gCAAmB,CAAA;IACnB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,+BAAkB,CAAA;IAClB,uCAA0B,CAAA;IAC1B,kCAAqB,CAAA;IACrB,4BAAe,CAAA;IACf,kCAAqB,CAAA;IACrB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;AAC3B,CAAC,EAZW,OAAO,KAAP,OAAO,QAYlB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..b9b09cf7de3e584193a3ae1ff363adb32f7ba8ac
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts"
@@ -0,0 +1,17 @@
+export type RouterType = "/login" | "/register" | "/goods" | "/shopping" | '/details';
+export type RouterPath = "/user" | "/goods" | "/cart" | '/details';
+export declare enum ROUTER_CHILD {
+ MAIN = "/",
+ REGISTER = "/register",
+ LOGIN = "/login",
+ LOGOUT = "/logout",
+ AUTH = "/auth",
+ LIST = "/list",
+ DETAILS = "/details",
+ CARTLIST = "/list",
+ ADD = "/add",
+ REMOVE = "/remove",
+ CHANGENUM = "/changenum",
+ CHECKED = "/checked"
+}
+//# sourceMappingURL=RouterVo.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..191bb86ba3b803633c220ed88a851495c215a433
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterVo.d.ts","sourceRoot":"","sources":["../../src/vo/RouterVo.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAC,QAAQ,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AACpF,MAAM,MAAM,UAAU,GAAC,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;AACjE,oBAAY,YAAY;IACpB,IAAI,MAAI;IACR,QAAQ,cAAY;IACpB,KAAK,WAAS;IACd,MAAM,YAAU;IAChB,IAAI,UAAQ;IACZ,IAAI,UAAQ;IACZ,OAAO,aAAW;IAClB,QAAQ,UAAQ;IAChB,GAAG,SAAO;IACV,MAAM,YAAU;IAChB,SAAS,eAAa;IACtB,OAAO,aAAW;CACrB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js"
new file mode 100644
index 0000000000000000000000000000000000000000..36e9b90c8deaf909c094976a15505abd77dab15b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js"
@@ -0,0 +1,16 @@
+export var ROUTER_CHILD;
+(function (ROUTER_CHILD) {
+ ROUTER_CHILD["MAIN"] = "/";
+ ROUTER_CHILD["REGISTER"] = "/register";
+ ROUTER_CHILD["LOGIN"] = "/login";
+ ROUTER_CHILD["LOGOUT"] = "/logout";
+ ROUTER_CHILD["AUTH"] = "/auth";
+ ROUTER_CHILD["LIST"] = "/list";
+ ROUTER_CHILD["DETAILS"] = "/details";
+ ROUTER_CHILD["CARTLIST"] = "/list";
+ ROUTER_CHILD["ADD"] = "/add";
+ ROUTER_CHILD["REMOVE"] = "/remove";
+ ROUTER_CHILD["CHANGENUM"] = "/changenum";
+ ROUTER_CHILD["CHECKED"] = "/checked";
+})(ROUTER_CHILD || (ROUTER_CHILD = {}));
+//# sourceMappingURL=RouterVo.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js.map" "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..09e8d40657a12ec6ca73424cc99e97268a5d91b1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/dist/vo/RouterVo.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterVo.js","sourceRoot":"","sources":["../../src/vo/RouterVo.ts"],"names":[],"mappings":"AAEA,MAAM,CAAN,IAAY,YAaX;AAbD,WAAY,YAAY;IACpB,0BAAQ,CAAA;IACR,sCAAoB,CAAA;IACpB,gCAAc,CAAA;IACd,kCAAgB,CAAA;IAChB,8BAAY,CAAA;IACZ,8BAAY,CAAA;IACZ,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,4BAAU,CAAA;IACV,kCAAgB,CAAA;IAChB,wCAAsB,CAAA;IACtB,oCAAkB,CAAA;AACtB,CAAC,EAbW,YAAY,KAAZ,YAAY,QAavB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/1.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/1.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..26e7c42010529d923068dcc5f198692695388c55
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/1.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/1688.png" "b/\350\264\276\347\221\236\345\256\201/client/img/1688.png"
new file mode 100644
index 0000000000000000000000000000000000000000..69449f93e1c26aafd7dea5c74a5f33633c12e468
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/1688.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/a.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/a.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..53df1b3d989b3d2f47ce32329fab8f48e446d8dd
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/a.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/app.png" "b/\350\264\276\347\221\236\345\256\201/client/img/app.png"
new file mode 100644
index 0000000000000000000000000000000000000000..3d2f5a0c3bb26ae8468febc75c01c243806b6197
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/app.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/b.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/b.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..f76263425a747f529d3126dcca6d7743373f6adf
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/b.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner-btm.png" "b/\350\264\276\347\221\236\345\256\201/client/img/banner-btm.png"
new file mode 100644
index 0000000000000000000000000000000000000000..40382b762156de2556fb4212df3d56522106fea0
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner-btm.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner.png" "b/\350\264\276\347\221\236\345\256\201/client/img/banner.png"
new file mode 100644
index 0000000000000000000000000000000000000000..c175edc840a91dbf882d02ee74e15a243bf416f5
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..4db7e27f6090d883b0c714030379325a74139cc4
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner1.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner1.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..cc8ca8a99ed031cd7076f4bef057a5444a97c1c2
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner1.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner2.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner2.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..2f0f1ce1610debb01db7ac4e8c08b2cb0597f890
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner2.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner3.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner3.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..e84b8005c8d42337d25bca1110f956ed42772743
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner3.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner4.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner4.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..8f8c059db8249ba13ef075e09b447c96020062fd
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner4.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/banner5.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/banner5.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..fa2c0db1ba51e511c5bffd41fe20283a19175fcd
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/banner5.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/c.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/c.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..8b31769fb9bac4b5842fbe7d7ebe7d39d435380f
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/c.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/d.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/d.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..883f121f5fe2487b26f651faeaf3dc77853a6f41
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/d.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/delete.png" "b/\350\264\276\347\221\236\345\256\201/client/img/delete.png"
new file mode 100644
index 0000000000000000000000000000000000000000..e9790495b520a329858b5ae9a54316987b7175f6
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/delete.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/detail-head.png" "b/\350\264\276\347\221\236\345\256\201/client/img/detail-head.png"
new file mode 100644
index 0000000000000000000000000000000000000000..b421719239d92cbc5db886a1aec091f0da83e79e
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/detail-head.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/detail-more.png" "b/\350\264\276\347\221\236\345\256\201/client/img/detail-more.png"
new file mode 100644
index 0000000000000000000000000000000000000000..be42b601b3d701e12717d4a227307ea91e21f317
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/detail-more.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/dl.png" "b/\350\264\276\347\221\236\345\256\201/client/img/dl.png"
new file mode 100644
index 0000000000000000000000000000000000000000..a0d1a050760273267bf3c90d0f67ae9cc06ae212
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/dl.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/e.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/e.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..be189fd6d6dbbaeb88981af2a99d54f5fd15bd1b
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/e.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/footer.png" "b/\350\264\276\347\221\236\345\256\201/client/img/footer.png"
new file mode 100644
index 0000000000000000000000000000000000000000..903129105ba2c04cc659dfeb1bf6ecbea8857368
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/footer.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/icon.png" "b/\350\264\276\347\221\236\345\256\201/client/img/icon.png"
new file mode 100644
index 0000000000000000000000000000000000000000..1332b1d111467e3fa6f2159fa98552686a011b13
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/icon.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/icons.png" "b/\350\264\276\347\221\236\345\256\201/client/img/icons.png"
new file mode 100644
index 0000000000000000000000000000000000000000..32272da223bf56ecd7296938e5c53da936d85928
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/icons.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/indexLogo.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/indexLogo.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..2381b597ccb7e0c876444a992d914a3e8ffea551
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/img/indexLogo.jpg"
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/info.png" "b/\350\264\276\347\221\236\345\256\201/client/img/info.png"
new file mode 100644
index 0000000000000000000000000000000000000000..577b1c6fa95ec05ace3b139b1822053c0da26d7e
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/info.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/item1.webp" "b/\350\264\276\347\221\236\345\256\201/client/img/item1.webp"
new file mode 100644
index 0000000000000000000000000000000000000000..d5633b7ec2c0dcb34c36614fc6439a8aa0b1886c
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/item1.webp" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/left-icon.png" "b/\350\264\276\347\221\236\345\256\201/client/img/left-icon.png"
new file mode 100644
index 0000000000000000000000000000000000000000..85e79272337e09c504178065fe10ff084f95c7bb
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/left-icon.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/left.png" "b/\350\264\276\347\221\236\345\256\201/client/img/left.png"
new file mode 100644
index 0000000000000000000000000000000000000000..cd7dd574b96b0b0469274c6c9e5662744b890903
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/left.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/logo.png" "b/\350\264\276\347\221\236\345\256\201/client/img/logo.png"
new file mode 100644
index 0000000000000000000000000000000000000000..d891eacb3bf66cfe6e90225ae8984ded554c6ec0
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/logo.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/message.png" "b/\350\264\276\347\221\236\345\256\201/client/img/message.png"
new file mode 100644
index 0000000000000000000000000000000000000000..e1745502ae1c7ffbf10775d27178e19b551774bd
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/message.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/phone.png" "b/\350\264\276\347\221\236\345\256\201/client/img/phone.png"
new file mode 100644
index 0000000000000000000000000000000000000000..794c3e3ac44e74c0192ffc22dc108676f6cb315c
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/phone.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/plus.png" "b/\350\264\276\347\221\236\345\256\201/client/img/plus.png"
new file mode 100644
index 0000000000000000000000000000000000000000..d9516aa1b8364d8c272419979c942dde9dd52137
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/plus.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/prop1.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/prop1.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..cfe241dce50c229b158f110faa0d0c561bad36ff
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/prop1.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/prop2.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/prop2.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..3939a4693234d16916af3b5590bee3d2696393b1
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/prop2.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/prop3.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/prop3.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..78ca7e99ed8dbd5f61522f213230342616c3dac1
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/prop3.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/prop4.jpg" "b/\350\264\276\347\221\236\345\256\201/client/img/prop4.jpg"
new file mode 100644
index 0000000000000000000000000000000000000000..f2d53b04a25b89b8ad152f6ecf7835aaf789edfe
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/prop4.jpg" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/psw.png" "b/\350\264\276\347\221\236\345\256\201/client/img/psw.png"
new file mode 100644
index 0000000000000000000000000000000000000000..5cfb883dff3f1279940c6c1f626e5c763699d8c3
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/psw.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/right.png" "b/\350\264\276\347\221\236\345\256\201/client/img/right.png"
new file mode 100644
index 0000000000000000000000000000000000000000..39ce4e993fad46ea203aea75b0a1a061377a13a5
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/right.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/star.png" "b/\350\264\276\347\221\236\345\256\201/client/img/star.png"
new file mode 100644
index 0000000000000000000000000000000000000000..8cfd1ea4606aa6d3cba8d774ec5622bcde4b54be
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/star.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/user.png" "b/\350\264\276\347\221\236\345\256\201/client/img/user.png"
new file mode 100644
index 0000000000000000000000000000000000000000..9b3b6c21b6f2216eacd89b4f399c6086697b6179
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/user.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/userinfo.png" "b/\350\264\276\347\221\236\345\256\201/client/img/userinfo.png"
new file mode 100644
index 0000000000000000000000000000000000000000..36a1f60673bbd685160e3b116bda5882ce85e7cf
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/userinfo.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/\345\244\264\345\203\217.png" "b/\350\264\276\347\221\236\345\256\201/client/img/\345\244\264\345\203\217.png"
new file mode 100644
index 0000000000000000000000000000000000000000..cbefe7f9e8ca0db8820dea5c1013272318ecd703
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/\345\244\264\345\203\217.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/\346\213\215\347\205\247.png" "b/\350\264\276\347\221\236\345\256\201/client/img/\346\213\215\347\205\247.png"
new file mode 100644
index 0000000000000000000000000000000000000000..a6c688d06d1f30a87390c563012a23a92086eea0
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/\346\213\215\347\205\247.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/\346\224\276\345\244\247\351\225\234.png" "b/\350\264\276\347\221\236\345\256\201/client/img/\346\224\276\345\244\247\351\225\234.png"
new file mode 100644
index 0000000000000000000000000000000000000000..853dc9552f3b3b13db0c4f56b40eca925e6768f6
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/\346\224\276\345\244\247\351\225\234.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/img/\351\207\207\350\264\255\350\275\246.png" "b/\350\264\276\347\221\236\345\256\201/client/img/\351\207\207\350\264\255\350\275\246.png"
new file mode 100644
index 0000000000000000000000000000000000000000..a6f06f85bc5814134392ada4d293773af6d27d15
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/img/\351\207\207\350\264\255\350\275\246.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/index.html" "b/\350\264\276\347\221\236\345\256\201/client/index.html"
new file mode 100644
index 0000000000000000000000000000000000000000..33eb81313442078066357606ca71a528e34802a8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/index.html"
@@ -0,0 +1,16 @@
+
+
+
+
+
+ Document
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/package-lock.json" "b/\350\264\276\347\221\236\345\256\201/client/package-lock.json"
new file mode 100644
index 0000000000000000000000000000000000000000..4fd09d9de9003373efb54db6ff97ab1ca72dbefb
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/package-lock.json"
@@ -0,0 +1,53 @@
+{
+ "name": "client",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "dependencies": {
+ "bootstrap": "^3.4.1",
+ "jquery": "^3.7.1",
+ "querystring": "^0.2.1"
+ }
+ },
+ "node_modules/bootstrap": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-3.4.1.tgz",
+ "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
+ },
+ "node_modules/querystring": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.1.tgz",
+ "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg==",
+ "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.",
+ "engines": {
+ "node": ">=0.4.x"
+ }
+ }
+ },
+ "dependencies": {
+ "bootstrap": {
+ "version": "3.4.1",
+ "resolved": "https://registry.npmmirror.com/bootstrap/-/bootstrap-3.4.1.tgz",
+ "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA=="
+ },
+ "jquery": {
+ "version": "3.7.1",
+ "resolved": "https://registry.npmmirror.com/jquery/-/jquery-3.7.1.tgz",
+ "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
+ },
+ "querystring": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmmirror.com/querystring/-/querystring-0.2.1.tgz",
+ "integrity": "sha512-wkvS7mL/JMugcup3/rMitHmd9ecIGd2lhFhK9N3UUQ450h66d1r3Y9nvXzQAW1Lq+wyx61k/1pfKS5KuKiyEbg=="
+ }
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/package.json" "b/\350\264\276\347\221\236\345\256\201/client/package.json"
new file mode 100644
index 0000000000000000000000000000000000000000..f6148b1d6d8cb3ad4d0006ac9b052e68b62a5fb1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/package.json"
@@ -0,0 +1,7 @@
+{
+ "dependencies": {
+ "bootstrap": "^3.4.1",
+ "jquery": "^3.7.1",
+ "querystring": "^0.2.1"
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/Main.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/Main.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..8369965c7dc2cc61f03ad4a102b8494295562199
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/Main.ts"
@@ -0,0 +1,42 @@
+import AJAX from "./business/Ajax.js";
+import DetailsCommand from "./command/DetailsCommand.js";
+import GoodsListCommand from "./command/GoodsListCommand.js";
+import ShoppingListCommand from "./command/ShoppingListCommand.js";
+import UserCommand from "./command/UserCommand.js";
+import Carousel from "./component/Carousel.js";
+import MainController from "./controller/MainController.js";
+import { IReqAuthVo } from "./model/RequestData.js";
+import DetailsPage from "./router/DetailsPage.js";
+import GoodsPage from "./router/GoodsPage.js";
+import LoginPage from "./router/LoginPage.js";
+import MainRouter from "./router/MainRouter.js";
+import RegisterPage from "./router/RegisterPage.js";
+import ShoppingPage from "./router/ShoppingPage.js";
+import { ROUTERS } from "./vo/AJAXVo.js";
+
+
+class Main{
+ constructor(){
+ MainRouter.instance.addRouter("/login",LoginPage);
+ MainRouter.instance.addRouter("/register",RegisterPage);
+ MainRouter.instance.addRouter("/goods",GoodsPage);
+ MainRouter.instance.addRouter("/shopping",ShoppingPage);
+ MainRouter.instance.addRouter("/details",DetailsPage);
+ MainController.instance.addCommand("/user",UserCommand);
+ MainController.instance.addCommand("/goods",GoodsListCommand);
+ MainController.instance.addCommand("/cart",ShoppingListCommand);
+ MainController.instance.addCommand("/details",DetailsCommand);
+ this.auth();
+ MainRouter.instance.go("/login");
+ }
+ auth(){
+ var token:IReqAuthVo|string|undefined=localStorage.token;
+ if(!token){
+ MainRouter.instance.go("/login");
+ return;
+ }
+ token=JSON.parse(token as string);
+ AJAX.post(ROUTERS.AUTH,token as IReqAuthVo);
+ }
+}
+new Main();
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/business/Ajax.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/business/Ajax.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d4b57e5164893279c93ff0d6953dc2b3e45ea410
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/business/Ajax.ts"
@@ -0,0 +1,111 @@
+import MainController from "../controller/MainController.js";
+import MainModel from "../model/MainModel.js";
+import { IResLogInMessage, IShoppingItem } from "../model/ResponseData.js";
+import MainRouter from "../router/MainRouter.js";
+import { stringfiy } from "../utils/QueryString.js";
+import {AJAX_Method, PATH, ROUTERS} from "../vo/AJAXVo.js";
+export default class AJAX{
+
+
+ constructor(method: AJAX_Method, router: ROUTERS, headers: {[key: string]: string} = {}, body?: {[key: string]: any}, params?: {[key: string]: any}) {
+ // 创建XMLHttpRequest对象
+ var xhr: XMLHttpRequest = new XMLHttpRequest();
+ // 添加readystatechange事件监听器,用于处理状态变化
+ xhr.addEventListener("readystatechange", e => this.readstateChangeHandler(e))
+ // 根据是否存在params来拼接参数数据
+ var paramsData: string = params ? "?" + stringfiy(params) : "";
+ // 打开HTTP请求
+ xhr.open(method, PATH + router + paramsData)
+
+ // 设置请求头
+ for(var key in headers) {
+ xhr.setRequestHeader(key, headers[key]);
+ }
+
+ // 根据是否存在body发送请求
+ body ? xhr.send(JSON.stringify(body)) : xhr.send();
+ }
+
+ private readstateChangeHandler(e: Event) {
+ // 获取XMLHttpRequest对象
+ var xhr: XMLHttpRequest = e.target as XMLHttpRequest;
+ // 获取路由字符串
+ var router: string = xhr.responseURL.replace(PATH, "");
+
+ if(xhr.readyState === 2 && xhr.status === 200) {
+ // 请求已发送并且已接收到响应头
+ } else if(xhr.readyState === 4 && xhr.status === 200) {
+ // 请求已完成且响应已就绪(状态码为200表示成功)
+ // 解析响应数据
+ var result: {errno: null | number, result: {[key: string]: any}} = JSON.parse(xhr.response);
+
+ if(result.errno) {
+ // 处理请求发生错误的情况
+ console.log("错误", result.result.message);
+ if(router === ROUTERS.AUTH) {
+ // 跳转到登录页面
+ MainRouter.instance.go("/login");
+ }
+ } else {
+ // 请求成功,根据不同的路由进行导航
+ this.routerNav(router as ROUTERS, result);
+ }
+ } else if(xhr.status !== 200 && xhr.readyState === 4) {
+ // 请求发送失败
+ console.log("通信失败");
+ }
+ }
+
+ public static get(router: ROUTERS, params?: {[key: string]: any}, headers: {[key: string]: string} = {}): void {
+ // 发送GET请求
+ new AJAX("GET", router, headers, undefined, params);
+ }
+
+ public static post(router: ROUTERS, body: {[key: string]: any}, headers: {[key: string]: string} = {}): void {
+ // 发送POST请求
+ new AJAX("POST", router, headers, body);
+ }
+
+ private routerNav(router: ROUTERS, result: {errno: null | number, result: {[key: string]: any}}): void {
+ // 根据不同的路由进行导航
+ switch(router) {
+ case ROUTERS.LOGIN:
+ // 处理登录路由
+ MainModel.instance.loginResult = result.result as IResLogInMessage;
+ MainController.instance.dispatch(router, result.result);
+ break;
+ case ROUTERS.REGISTER:
+ // 处理注册路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.AUTH:
+ // 处理身份验证路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.LIST:
+ // 处理列表路由
+ MainController.instance.dispatch(router, result.result);
+ break;
+ case ROUTERS.ADD:
+ case ROUTERS.CHANGENUM:
+ case ROUTERS.REMOVE:
+ case ROUTERS.CHECKED:
+ // 处理添加、更改数量、移除和选中路由
+ MainModel.instance.shoppingList = result.result as Array;
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.LOGOUT:
+ // 处理登出路由
+ MainController.instance.dispatch(router);
+ break;
+ case ROUTERS.DETAILS:
+ MainController.instance.dispatch(router, result);
+ break;
+ case ROUTERS.CARTLIST:
+ MainModel.instance.shoppingList=result.result as Array;
+ console.log(result);
+ MainController.instance.dispatch(router,result.result);
+ break;
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/command/DetailsCommand.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/command/DetailsCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..b20a6b50ca7f9a17d761cf4807c3765f4ebc2661
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/command/DetailsCommand.ts"
@@ -0,0 +1,31 @@
+import Details from "../component/Details.js";
+import ICommand from "../interface/ICommand.js";
+import { IGoods, IResAuthVo, IResLogInMessage, IResLoginVo, IResLogoutVo, IResRegisterVo } from "../model/ResponseData.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+
+
+export default class DetailsCommand implements ICommand {
+ constructor() {
+
+ }
+ exec(data?: any, router?: string | undefined): void {
+ // 根据路由进行相应操作
+ switch (router) {
+ case ROUTER_CHILD.DETAILS:
+ this.details(data);
+ break;
+
+ }
+ }
+
+ private details(data: IGoods): void {
+
+ console.log(data);
+ MainRouter.instance.go("/details",data);
+ new Details(data)
+ }
+
+
+}
+
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/command/GoodsListCommand.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/command/GoodsListCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..140f9b7456351a7670783808d135fa8372bb46b8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/command/GoodsListCommand.ts"
@@ -0,0 +1,308 @@
+import AJAX from "../business/Ajax.js";
+import Carousel from "../component/Carousel.js";
+import Goods from "../component/Goods.js";
+import ICommand from "../interface/ICommand.js";
+import IEvent, { DETAILS_EVENT, GOOD_EVENT } from "../interface/IEvents.js";
+import { IReqAuthVo } from "../model/RequestData.js";
+import { IGoods } from "../model/ResponseData.js";
+import ViewModel from "../model/ViewModel.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+
+
+export default class GoodsListCommand extends Comment implements ICommand{
+ constructor(){
+ super()
+ var arr=[
+ {id:1001,img:"./img/banner1.webp"},
+ {id:1002,img:"./img/banner2.webp"},
+ {id:1003,img:"./img/banner3.webp"},
+ {id:1004,img:"./img/banner4.webp"},
+ {id:1005,img:"./img/banner5.webp"}
+ ]
+ var carousel=new Carousel();
+ carousel.w = 600
+ carousel.h = 386
+ carousel.data=arr;
+ carousel.appendTo("body");
+ }
+ // 执行该命令
+ public exec(data?: any, router?: string | undefined): void {
+
+ // 向 ViewModel 注册添加商品事件(GOOD_EVENT.ADD_GOODS),并指定 goodsHandler 作为事件处理函数
+ ViewModel.instance.addEvent(DETAILS_EVENT.GO_DETAILS, e => this.goodsHandler(e));
+
+ // 向 ViewModel 注册 click 事件,并指定 clickHandler 作为事件处理函数
+ ViewModel.instance.addEvent("click", (e: Event) => this.clickHandler(e as MouseEvent));
+
+ // 创建文档片段
+ var html: any = document.createElement('div');
+
+ html.innerHTML = `
+
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 退出登录
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
搜 索
+
+
+
+
+
+
+
品类市场
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
为你推荐
+
根据您的浏览,实时为您推荐爆款产品
+
+
+
+
+
+ `
+
+ ViewModel.instance.app.appendChild(html);
+
+ var elem:DocumentFragment=document.createDocumentFragment();
+ // 创建退出登录按钮
+ // var bn: HTMLButtonElement = document.createElement("button");
+ // bn.id = "logotBn";
+ // bn.textContent = "退出登录";
+ // ViewModel.instance.app.appendChild(bn);
+
+ // 遍历数据中的每个商品,并将每个商品的视图添加到文档片段中
+ data.forEach((item: IGoods) => {
+ var goods: Goods = new Goods(item);
+ goods.appendTo(elem);
+ });
+ var list = document.querySelector('.list')
+ list?.appendChild(elem)
+ // ViewModel.instance.app.appendChild(elem);
+ html.innerHTML += `
+
+
+
+
+
+
+ `
+ // 将文档片段添加到 ViewModel 实例中的 app 元素中
+ ViewModel.instance.app.appendChild(html);
+ var banner:HTMLElement=document.querySelector(".banner") as HTMLElement;
+ var carousel=document.querySelector(".carousel") as HTMLElement;
+ banner?.appendChild(carousel as HTMLElement)
+ // var result = ViewModel.instance.app.querySelector(".list") as HTMLLIElement
+
+ }
+
+ // 处理商品事件
+ private goodsHandler(e: IEvent): void {
+ // 获取 token
+ var token: string | IReqAuthVo = localStorage.token;
+ // 如果 token 不存在,跳转到登录页
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return;
+ }
+ // 解析 token
+ token = JSON.parse(String(token)) as IReqAuthVo;
+ // 发送添加商品请求
+ // AJAX.post(ROUTERS.ADD, { user: token.user, userId: token.userId, token: token.token, id: e.data.pid, itemId: e.id });
+ console.log(e.id);
+
+ AJAX.post(ROUTERS.DETAILS,{pid: e.id});
+
+ }
+
+
+ // 处理点击事件
+ private clickHandler(e: MouseEvent): void {
+ if ((e.target as any).id === 'img') {
+ var elem = (e.target as any).parentNode as HTMLElement
+ // console.log((e.target as HTMLElement).parentNode);
+ var id = (e.target as any).getAttribute('data-id')
+
+ var evt:IEvent=new Event(DETAILS_EVENT.GO_DETAILS,{bubbles:true});
+ evt.id = id
+ evt.data= this.data;
+ (elem as HTMLElement).dispatchEvent(evt);
+ return
+ }
+
+ if ((e.target as HTMLElement).id === 'shopping-list') {
+ MainRouter.instance.go("/shopping",this.data)
+ if(localStorage.token){
+ var token: string | IReqAuthVo = localStorage.token;
+ token=JSON.parse(String(token)) as IReqAuthVo;
+ AJAX.post(ROUTERS.CARTLIST,{user:token.user,userId:token.userId,token:token.token});
+ }else{
+ MainRouter.instance.go("/login")
+ }
+ return
+ }
+ if ((e.target as HTMLElement).id == "logoutBn") {
+ // 获取 token
+ var token: string | IReqAuthVo = localStorage.token;
+ // 如果 token 不存在,跳转到登录页
+ if (!token) {
+ MainRouter.instance.go("/login");
+ return;
+ }
+ // 发送注销请求
+ AJAX.post(ROUTERS.LOGOUT, token as IReqAuthVo);
+ }
+ }
+}
+
+
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/command/ShoppingListCommand.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/command/ShoppingListCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..26231cce834799ed62305d2ef266bc140dd4fafa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/command/ShoppingListCommand.ts"
@@ -0,0 +1,97 @@
+import AJAX from "../business/Ajax.js";
+import ICommand from "../interface/ICommand.js";
+import IEvent, { GOOD_EVENT, STEP_EVENT } from "../interface/IEvents.js";
+import MainModel from "../model/MainModel.js";
+import { IReqAuthVo } from "../model/RequestData.js";
+import { IShoppingItem } from "../model/ResponseData.js";
+import ViewModel from "../model/ViewModel.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+
+export default class ShoppingListCommand implements ICommand{
+ constructor(){
+
+ }
+
+ exec(data?: any, router?: string | undefined): void {
+ console.log(data);
+
+ // console.log(123);
+ //清除视图模型的事件
+ ViewModel.instance.clearEvent();
+ //跳转到购物页面
+ MainRouter.instance.go("/shopping",router);
+ //为步骤更改事件添加事件处理程序
+ ViewModel.instance.addEvent(STEP_EVENT.STEP_CHANGE,e=>this.stepChangeHandler(e))
+ ViewModel.instance.addEvent(GOOD_EVENT.ADD_GOODS,e=>this.addClickHandler(e))
+ //为点击事件添加事件处理程序
+ ViewModel.instance.addEvent("click",e=>this.clickHandler(e as MouseEvent));
+ }
+
+ //处理步骤更改事件
+ private stepChangeHandler(e:IEvent):void{
+ console.log(e);
+ var token: string | IReqAuthVo = localStorage.token;
+ token = JSON.parse(String(token)) as IReqAuthVo
+ console.log(e.num);
+
+ AJAX.post(ROUTERS.ADD, {token:token.token,userId:token.userId,pid:Number(e.id),numValue:e.num})
+ //获取令牌
+ // var token:IReqAuthVo|null=this.getToken();
+ // //如果令牌不存在,则返回
+ // if(!token) return;
+ // //向服务器发送更改数量的请求
+ // AJAX.post(ROUTERS.ADD,{userId:token.userId,user:token.user,token:token.token,goodsId:e.id,num:e.num,total:String(e.total)});
+ }
+
+ //处理点击事件
+ private clickHandler(e:MouseEvent):void{
+ var elem:HTMLElement=e.target as HTMLElement;
+ //获取令牌
+ var token:IReqAuthVo|null=this.getToken();
+ //如果令牌不存在,则返回
+ if(!token) return;
+ if(elem.className==="delete"){
+ //向服务器发送删除请求
+ AJAX.post(ROUTERS.REMOVE,{userId:token.userId,user:token.user,token:token.token,ids:[Number(elem.getAttribute("data"))]})
+ }else if(elem.className==="ck"){
+ //处理复选框改变事件
+ this.checkBoxChangeHandler(token,elem as HTMLInputElement);
+ }
+ }
+
+ //处理复选框改变事件
+ private checkBoxChangeHandler(token:IReqAuthVo,elem:HTMLInputElement):void
+ {
+ if(elem.id==="all"){
+ //获取所有购物项的ID,并向服务器发送全选请求
+ AJAX.post(ROUTERS.CHECKED,{userId:token.userId,user:token.user,token:token.token,ids:MainModel.instance.shoppingList.map((item:IShoppingItem)=>item.pid),checked:elem.checked});
+ }else{
+ //获取当前购物项的ID,并向服务器发送单选请求
+ AJAX.post(ROUTERS.CHECKED,{userId:token.userId,user:token.user,token:token.token,ids:[Number(elem.getAttribute("data"))],checked:elem.checked})
+ }
+ }
+
+ //获取令牌
+ private getToken():IReqAuthVo|null{
+ var token:string|IReqAuthVo=localStorage.token;
+ //如果令牌不存在,跳转到登录页面
+ if(!token){
+ MainRouter.instance.go("/login");
+ return null;
+ }
+ //将令牌解析为对象
+ token=JSON.parse(String(token)) as IReqAuthVo;
+ return token;
+ }
+
+ private addClickHandler(e: Event) {
+ var token: string | IReqAuthVo = localStorage.token;
+ token = JSON.parse(String(token)) as IReqAuthVo
+ console.log(e);
+
+ // AJAX.post(ROUTERS.ADD, {token:token.token,userId:token.userId,itemId:Number(elem.id),numValue:e.num})
+
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/command/UserCommand.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/command/UserCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..8a0a3ad2ac0e61b3ae76e62e20c6da4f8d39d51c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/command/UserCommand.ts"
@@ -0,0 +1,57 @@
+import ICommand from "../interface/ICommand.js";
+import { IResAuthVo, IResLogInMessage, IResLoginVo, IResLogoutVo, IResRegisterVo } from "../model/ResponseData.js";
+import MainRouter from "../router/MainRouter.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+
+// 注释:
+// 1. UserCommand 类表示用户命令,实现了 ICommand 接口。
+// 2. exec 方法用于执行相应的操作,接收数据参数 data 和路由参数 router。
+// 3. Switch 语句根据不同的路由执行相应的操作。
+// 4. login 方法用于执行登录操作,跳转到商品页面。
+// 5. logout 方法用于执行登出操作,删除本地存储中的令牌,并跳转到登录页面。
+// 6. register 方法用于执行注册操作,跳转到登录页面。
+// 7. auth 方法用于执行认证操作,跳转到商品页面。
+export default class UserCommand implements ICommand {
+ constructor() {
+
+ }
+ exec(data?: any, router?: string | undefined): void {
+ // 根据路由进行相应操作
+ switch (router) {
+ case ROUTER_CHILD.LOGIN:
+ this.login(data); // 执行登录操作
+ break;
+ case ROUTER_CHILD.REGISTER:
+ this.register(data); // 执行注册操作
+ break;
+ case ROUTER_CHILD.LOGOUT:
+ this.logout(data); // 执行登出操作
+ break;
+ case ROUTER_CHILD.AUTH:
+ this.auth(data); // 执行认证操作
+ break;
+ }
+ }
+
+ // 登录操作
+ private login(data: IResLogInMessage): void {
+ MainRouter.instance.go("/goods"); // 跳转到商品页面
+ }
+
+ // 登出操作
+ private logout(data: IResLogoutVo): void {
+ delete localStorage.token; // 删除本地存储中的令牌
+ MainRouter.instance.go("/login"); // 跳转到登录页面
+ }
+
+ // 注册操作
+ private register(data: IResRegisterVo): void {
+ MainRouter.instance.go("/login"); // 跳转到登录页面
+ }
+
+ // 认证操作
+ private auth(data: IResAuthVo): void {
+ MainRouter.instance.go("/goods"); // 跳转到商品页面
+ }
+}
+
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/Carousel.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/Carousel.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..af83ed59c30fe5efc7a752bb57139a9b63669d02
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/Carousel.ts"
@@ -0,0 +1,328 @@
+import Component from "./Component.js";
+import ICarouselData, { IUpdate } from "./ICarouselData.js";
+import TimeManager from "./TImeManager.js";
+enum DIRECTION {
+ LEFT = "left",
+ RIGHT = "right",
+}
+export default class Carousel extends Component implements IUpdate {
+ private static readonly MAX_TIME: number = 3000;
+ private static readonly SPEED: number = 50;
+ private _data: Array
= [];
+ private left: HTMLCanvasElement;
+ private right: HTMLCanvasElement;
+ private imgCon: HTMLDivElement;
+ private dot: HTMLUListElement;
+ private prev: HTMLLIElement | null = null;
+ private targetPos: number = -1;
+ private currentPos: number = 0;
+ private x: number = 0;
+ private _w: number = 0;
+ private _h: number = 0;
+ private parent?: HTMLElement;
+ private direction: DIRECTION = DIRECTION.LEFT;
+ private autoBool: boolean = false;
+ private bool: boolean = false;
+ private ids?:number;
+ public constructor(_data?: Array) {
+ super();
+ this.elem.className = "carousel";
+ this.elem.innerHTML = `
+
+ `;
+ this.left = this.createBn(DIRECTION.LEFT);
+ this.right = this.createBn(DIRECTION.RIGHT);
+ this.imgCon = this.elem.querySelector(".img-con") as HTMLDivElement;
+ this.dot = this.elem.querySelector(".dot") as HTMLUListElement;
+ this.dot.addEventListener("click", (e) => this.dotClickHandler(e));
+ this.elem.addEventListener("mouseenter", (e) => this.mouseHandler(e));
+ this.elem.addEventListener("mouseleave", (e) => this.mouseHandler(e));
+ if (_data) this.data = _data;
+ this.setStyle();
+ }
+ public appendTo(parent: string | HTMLElement): HTMLElement {
+ this.parent = super.appendTo(parent);
+ if (!this.parent) return this.parent;
+ if (this.w && this.h) return this.parent;
+ this.elem.style.width = "100%";
+ if (this.parent === document.body) {
+ this.elem.style.height = "33.3vw";
+ } else {
+ this.elem.style.height = "100%";
+ }
+ this.setFontSize(this.parent.getBoundingClientRect().width);
+ return this.parent;
+ }
+ public set w(value: number) {
+ this._w = value;
+ if (this._w && this.h) this.renderWH(value + "px", this.h + "px");
+ }
+ public get w(): number {
+ return this._w;
+ }
+ public set h(value: number) {
+ this._h = value;
+ if (this.w && this._h) this.renderWH(this.w + "px", value + "px");
+ }
+ public get h(): number {
+ return this._h;
+ }
+
+ private renderWH(w: string = "100%", h: string = "33.3vw"): void {
+ Object.assign(this.elem.style, {
+ width: w,
+ height: h,
+ });
+ var w1: number;
+ if (!/^\d+$/.test(w.toString())) {
+ if (/%$/.test(w.toString()) && this.parent) {
+ w1 = this.parent.getBoundingClientRect().width;
+ } else {
+ w1 = Number(w.toString().replace(/px$/, ""));
+ }
+ } else w1 = Number(w);
+ this.setFontSize(w1);
+ }
+
+ private setFontSize(width: number): void {
+ this.elem.style.fontSize = (width / screen.width) * 100 + "px";
+ }
+ private createBn(direction: DIRECTION): HTMLCanvasElement {
+ var canvas = document.createElement("canvas");
+ canvas.className = direction;
+ canvas.width = 30;
+ canvas.height = 60;
+ var ctx: CanvasRenderingContext2D = canvas.getContext(
+ "2d"
+ ) as CanvasRenderingContext2D;
+ ctx.lineWidth = 5;
+ ctx.strokeStyle = "white";
+ ctx.beginPath();
+ ctx.moveTo(direction === DIRECTION.LEFT ? 25 : 5, 15);
+ ctx.lineTo(direction === DIRECTION.LEFT ? 10 : 20, 30);
+ ctx.lineTo(direction === DIRECTION.LEFT ? 25 : 5, 45);
+ ctx.stroke();
+ canvas.addEventListener("click", (e) => this.bnClickHandler(e));
+ this.elem.appendChild(canvas);
+ return canvas;
+ }
+ public set data(_data: Array) {
+ this.targetPos = -1;
+ this.currentPos = 0;
+ this.prev = null;
+ this.bool = false;
+ this.x = 0;
+ this._data = _data;
+ this.imgCon.innerHTML = _data.reduce(
+ (v: string, t: ICarouselData) => v + this.getImageBlock(t),
+ ""
+ );
+ this.dot.innerHTML = _data.reduce((v: string) => v + ` `, "");
+ this.changePrev();
+ }
+ public get data(): Array {
+ return this._data;
+ }
+ private getImageBlock(data: ICarouselData): string {
+ return `
+
+
+ `;
+ }
+ private mouseHandler(e: MouseEvent): void {
+ this.autoBool = e.type === "mouseleave";
+
+ if(this.autoBool && !this.ids){
+ // this.ids=setTimeout(()=>this.autoPlay(),Carousel.MAX_TIME);
+ }else if(!this.autoBool){
+ clearTimeout(this.ids);
+ this.ids=undefined;
+ }
+ }
+ private dotClickHandler(e: MouseEvent): void {
+ var elem: HTMLElement = e.target as HTMLElement;
+ if (elem.nodeName !== "LI" || this.bool) return;
+ var index: number = Array.from(this.dot.children).indexOf(elem);
+ if (index === this.currentPos) return;
+ if (index > this.currentPos) {
+ this.direction = DIRECTION.LEFT;
+ } else {
+ this.direction = DIRECTION.RIGHT;
+ }
+ this.targetPos = index;
+ this.nextImage();
+ }
+ private bnClickHandler(e: MouseEvent): void {
+ if (this.bool) return;
+ if (e.target === this.left) {
+ this.targetPos =
+ this.currentPos - 1 < 0 ? this.data.length - 1 : this.currentPos - 1;
+ this.direction = DIRECTION.RIGHT;
+ } else {
+ this.targetPos =
+ this.currentPos + 1 > this.data.length - 1 ? 0 : this.currentPos + 1;
+ this.direction = DIRECTION.LEFT;
+ }
+ this.nextImage();
+ }
+ private nextImage(): void {
+ var elem: HTMLElement = this.imgCon.children[this.targetPos] as HTMLElement;
+ elem.style.visibility = "visible";
+ this.x =
+ this.direction === DIRECTION.LEFT
+ ? this.elem.offsetWidth
+ : -this.elem.offsetWidth;
+ elem.style.transform = `translate(${this.x}px,0)`;
+ this.bool = true;
+ TimeManager.instance.add(this);
+ this.changePrev(this.targetPos);
+ }
+ private changePrev(pos = 0): void {
+ if (this.prev) {
+ this.prev.style.backgroundColor = "rgba(255,0,0,0)";
+ }
+ this.prev = this.dot.children[pos] as HTMLLIElement;
+ (this.prev as HTMLLIElement).style.backgroundColor = "red";
+ }
+ public update(): void {
+ if (!this.bool) return;
+ var x1 = this.setPosition();
+ (
+ this.imgCon.children[this.targetPos] as HTMLDivElement
+ ).style.transform = `translate(${this.x}px,0)`;
+ (
+ this.imgCon.children[this.currentPos] as HTMLDivElement
+ ).style.transform = `translate(${x1}px,0)`;
+ if (!this.bool) {
+ this.currentPos = this.targetPos;
+ this.targetPos = -1;
+ }
+ }
+
+ private setPosition(): number {
+ this.direction === DIRECTION.LEFT
+ ? (this.x -= Carousel.SPEED)
+ : (this.x += Carousel.SPEED);
+ var x1: number =
+ this.direction == DIRECTION.LEFT
+ ? this.x - this.elem.offsetWidth
+ : this.x + this.elem.offsetWidth;
+ if (this.direction == DIRECTION.LEFT ? this.x <= 0 : this.x >= 0) {
+ this.x = 0;
+ x1 = 0;
+ (
+ this.imgCon.children[this.currentPos] as HTMLDivElement
+ ).style.visibility = "hidden";
+ this.bool = false;
+ TimeManager.instance.remove(this);
+ }
+ return x1;
+ }
+// private autoPlay(): void {
+// var evt = new MouseEvent("click");
+// this.right.dispatchEvent(evt);
+// clearTimeout(this.ids);
+// this.ids=setTimeout(()=>this.autoPlay(),Carousel.MAX_TIME);
+// }
+ setStyle() {
+ Carousel.setCss(`
+ .carousel {
+ position: relative;
+ overflow: hidden;
+ font-size:100px;
+ }
+
+ .carousel>.img-con {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+
+ }
+
+ .carousel>.img-con>.item {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ }
+
+ .carousel>.img-con>.item:first-child {
+ visibility: visible;
+ }
+
+ .carousel>.img-con>.item>img {
+ width: 100%;
+ height: 100%;
+ position: absolute;
+ left: 0;
+ top: 0;
+ }
+
+ .carousel>.img-con>.item>div {
+ position: relative;
+ font-size: 0.2em;
+ font-family: Arial, "Lucida Grande", "Microsoft Yahei", "Hiragino Sans GB", "Hiragino Sans GB W3", SimSun, "PingFang SC", STHeiti;
+ text-shadow: 0 1px 3px rgba(0, 0, 0, .9);
+ color: white;
+ z-index: 1;
+ left: 6em;
+ top: 2em;
+ width: 600px;
+ }
+
+ .carousel>.img-con>.item>div>p {
+ margin-top: 4px;
+ margin-bottom: 4px;
+
+ }
+
+ .carousel>.img-con>.item>div>p>span {
+ font-size: 1.875em
+ }
+
+
+ .carousel>ul {
+ list-style: none;
+ margin: 0;
+ padding: 0;
+ position: absolute;
+ bottom: 0.5em;
+ left: 50%;
+ transform: translate(-50%, 0);
+ font-size:16px;
+ }
+
+ .carousel>ul>li {
+ width: 18px;
+ height: 18px;
+ border-radius: 18px;
+ border: 2px solid red;
+ margin-left: 18px;
+ float: left;
+ }
+
+ .carousel>ul>li:first-child {
+ margin-left: 0;
+ }
+
+ .carousel>.left,
+ .carousel>.right {
+ font-size:16px;
+ position: absolute;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+
+ .carousel>.left {
+ left: 50px;
+ }
+
+ .carousel>.right {
+ right: 50px;
+ }`);
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/Component.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/Component.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..604a28a04304c799f4f390eb08c358c296cfef64
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/Component.ts"
@@ -0,0 +1,27 @@
+import Utils from "../utils/Utils.js";
+
+export default class Component extends EventTarget {
+ protected elem: HTMLElement;
+ static cssBool: boolean = false;
+ constructor(type: string = "div") {
+ super();
+ // 创建一个指定类型的HTML元素
+ this.elem = document.createElement(type);
+ }
+ public appendTo(parent: string | HTMLElement | DocumentFragment): HTMLElement {
+ // 如果传入的parent是字符串,则将其转换为对应的HTML元素
+ if (typeof parent === "string") parent = document.querySelector(parent) as HTMLElement;
+ // 将当前元素追加到parent元素中
+ if (parent && (parent instanceof HTMLElement || parent instanceof DocumentFragment)) parent.appendChild(this.elem);
+ // 返回当前元素的父元素
+ return this.elem.parentElement as HTMLElement;
+ }
+ public static setCss(str: string): void {
+ // 如果cssBool已经为true,则不执行后续代码
+ if (this.cssBool) return;
+ // 将cssBool设置为true,表示已经执行过了
+ this.cssBool = true;
+ // 调用Utils工具类的setCss方法,传入CSS字符串作为参数
+ Utils.setCss(str);
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/Details.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/Details.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..181ce049b03f37a777c62aa4578d52e60b0858e7
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/Details.ts"
@@ -0,0 +1,270 @@
+import { DETAILS_EVENT, GOOD_EVENT } from "../interface/IEvents.js";
+import ViewModel from "../model/ViewModel.js";
+import Component from "./Component.js";
+import StepNumber from "./StepNumber.js";
+import MainRouter from "../router/MainRouter.js";
+import AJAX from "../business/Ajax.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import { IReqAuthVo } from "../model/RequestData.js";
+
+
+
+export default class Details extends Component {
+ private _data?:any
+ private min:Element | null | undefined
+ private max: Element | null|undefined;
+ private mask:Element | null|undefined;
+ private left:Element | null|undefined;
+ private right:Element | null;
+ private imgCon:Element | null;
+ private prev:Element | null | undefined
+ private MASK_WIDTH = 303.75;//阴影盒子的大小
+ private MAX_WIDTH = 496;//放大盒子的宽度
+ private MIN_WIDTH = 496;//标准图片的大小
+ private add_shoppinglist: any;
+ private num: any
+ constructor(_data?:any){
+ super();
+
+ this._data=_data
+ // console.log(this._data[0].list);
+
+ // console.log(JSON.parse(this._data[0].list)[0]);
+ this.elem.innerHTML=`
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 消息
+
+
+
+
+
+
+
+
+
+
+
+
${_data[0].title}
+
+
+
+
+
+
+
+
+
0 条评价 | 90天内>10 件成交
+
举报
+
+
+ 批发
+ 代发
+
+
+
+ 价格
+ ¥${_data[0].price + '' + _data[0].price1}
+
+
+ 起批量
+ 2件起批
+
+
+
+
+
+
+
颜色
+
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
+
+
+
尺码
+
+
+ s
+ ${_data[0].price + '' + _data[0].price1}元
+ 45件可售
+
+ -
+ 1
+ +
+
+
+
+
+
加采购车
+
+
+
`
+ var number:Element|null=this.elem.querySelector(".center>.details .details-right>.number");
+
+ // var step_num = this.elem.querySelector('.step-num')
+
+ // var step= new StepNumber();
+ // step.appendTo(step_num as HTMLElement);
+ // var input = step_num?.querySelector('.input') as HTMLInputElement
+ // this.num = input.value as any
+ (this.min)=this.elem.querySelector(".min") as HTMLElement// 获取最小尺寸的元素
+ (this.min as HTMLElement).style.backgroundImage=`url(${_data[0].img})`
+ this.max=this.elem.querySelector(".max"); // 获取最大尺寸的元素
+ (this.max as HTMLElement).style.background=`url(${_data[0].img})`
+ this.mask= this.elem.querySelector(".mask"); // 获取遮罩的元素
+ this.left= this.elem.querySelector(".icon-carousel .left"); // 获取左按钮元素
+ this.right= this.elem.querySelector(".icon-carousel .right"); // 获取右按钮元素
+ this.imgCon=this.elem.querySelector(".img-con"); // 获取图片容器元素
+ this.add_shoppinglist=this.elem.querySelector(".add-shoppinglist");
+ (this.min as Element).addEventListener("mouseenter", (e)=>this.mouseHandler(e)); // 监听最小尺寸元素的鼠标进入事件
+ // console.log(this.imgCon);
+
+ (this.imgCon as Element).addEventListener("mouseover", (e)=>this.iconMouseHandler(e as any)); // 监听图片容器元素的鼠标悬停事件
+ this.elem.addEventListener("click", (e)=>this.bnClickHandler(e)); // 监听左按钮的点击事件
+ // (this.right as Element).addEventListener("click", (e)=>this.bnClickHandler(e)); // 监听右按钮的点击事件
+ this.add_shoppinglist.addEventListener("click",(e:MouseEvent)=>this.goclickHandler(e))
+ ViewModel.instance.app.appendChild(this.elem)//把整体插入到页面中
+
+ }
+
+
+ mouseHandler(e: MouseEvent|Event) {
+ if (e.type === "mouseenter") {
+ (this.min as Element).addEventListener("mouseleave", (e)=>this.mouseHandler(e)); // 监听最小尺寸元素的鼠标离开事件
+ (this.min as Element).addEventListener("mousemove", (e)=>this.mouseHandler(e)); // 监听最小尺寸元素的鼠标移动事件
+ (this.mask as HTMLElement).style.visibility = (this.max as HTMLElement).style.visibility = "visible"; // 显示遮罩和最大尺寸元素
+ } else if (e.type === "mouseleave") {
+ (this.min as HTMLElement).removeEventListener("mouseleave", (e)=>this.mouseHandler(e)); // 移除最小尺寸元素的鼠标离开事件监听
+ (this.min as HTMLElement).removeEventListener("mousemove", (e)=>this.mouseHandler(e)); // 移除最小尺寸元素的鼠标移动事件监听
+ (this.mask as HTMLElement).style.visibility = (this.max as HTMLElement).style.visibility = "hidden"; // 隐藏遮罩和最大尺寸元素
+ } else {//鼠标移动
+ var x = ( e as MouseEvent).offsetX - this.MASK_WIDTH / 2;//鼠标当前位置减去遮罩层宽度的一半/2x和y是保存偏移量的变量
+ var y = ( e as MouseEvent).offsetY - this.MASK_WIDTH / 2;//鼠标当前位置减去遮罩层高度的一半
+ if (x < 0) x = 0; // 如果 x 坐标小于 0 则设置 x 为 0
+ else if (x > this.MIN_WIDTH - this.MASK_WIDTH) x = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 x 坐标大于最小尺寸减去遮罩宽度则设置 x 为 最小尺寸减去遮罩宽度
+ if (y < 0) y = 0; // 如果 y 坐标小于 0 则设置 y 为 0
+ else if (y > this.MIN_WIDTH - this.MASK_WIDTH) y = this.MIN_WIDTH - this.MASK_WIDTH; // 如果 y 坐标大于最小尺寸减去遮罩宽度则设置 y 为 最小尺寸减去遮罩宽度
+ (this.mask as HTMLElement).style.left = x + "px"; // 设置遮罩的 left 属性为 x
+ (this.mask as HTMLElement).style.top = y + "px"; // 设置遮罩的 top 属性为 y
+ (this.max as HTMLElement).style.backgroundPositionX =
+ (-x * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 x 坐标计算最大尺寸的背景图的 x 偏移位置
+ (this.max as HTMLElement).style.backgroundPositionY =
+ (-y * this.MAX_WIDTH) / this.MASK_WIDTH + "px"; // 根据 y 坐标计算最大尺寸的背景图的 y 偏移位置
+ }
+ }
+
+ iconMouseHandler(e:MouseEvent) {
+ if (((e.target as any ).nodeName) !== "IMG") return; // 如果触发事件的元素不是图片则返回
+ if (this.prev) {
+ (this.prev as HTMLElement).style.borderColor = "rgba(255,0,0,0)"; // 移除上一个选中图片的边框颜色样式
+ }
+ (this.prev as any) = e.target; // 设置当前选中的图片元素
+ (this.prev as HTMLElement).style.borderColor = "red"; // 设置当前选中的图片元素的边框颜色样式为红色
+ (this.max as HTMLElement).style.backgroundImage =
+ (this.min as HTMLElement).style.backgroundImage = `url(${(this.prev as any).src.replace(/-1/, "")})`; // 设置最小尺寸和最大尺寸的背景图片为当前选中的图片
+ }
+
+ bnClickHandler(e:Event) {
+ var num_sub = document.querySelector('#num-sub') as HTMLButtonElement
+ var num_add = document.querySelector('#num-add') as HTMLButtonElement
+ var num_value = document.querySelector('#num-value') as HTMLElement
+ if (e.target === this.left) {
+ (this.imgCon as HTMLElement).style.left = "0px";
+ } else if (e.target === this.right){
+ (this.imgCon as HTMLElement).style.left = -4 * 78 + "px";
+ } else if ((e.target as HTMLElement).id === 'shopping-list') {
+ MainRouter.instance.go("/shopping")
+ } else if ((e.target as HTMLButtonElement).id === 'num-sub') {
+ if (Number(num_value.innerHTML) <= 1) num_sub.disabled = true
+ else num_value.innerHTML = String(Number(num_value.innerHTML)-1)
+ } else if ((e.target as HTMLButtonElement).id === 'num-add') {
+ if (Number(num_value.innerHTML) >= 1) num_sub.disabled = false
+ num_value.innerHTML = String(Number(num_value.innerHTML)+1)
+ }
+ }
+ private goclickHandler(e: MouseEvent): void {
+ // console.log('加入购物车');
+ // console.log(this._data);
+ // console.log(this.num);
+ // console.log(e.target);
+ var numValue:HTMLElement=document.querySelector("#num-value") as HTMLElement;
+ var elem:HTMLElement =e.target as HTMLElement;
+ // console.log(elem.id);
+ var token: string | IReqAuthVo = localStorage.token;
+ token = JSON.parse(String(token)) as IReqAuthVo
+
+ // 创建并分发带有相关数据的自定义事件
+ var evt: any = new Event(GOOD_EVENT.ADD_GOODS, { bubbles: true });
+ evt.num = this.num
+ evt.data = this._data;
+ evt.numValue=numValue.innerHTML
+ this.elem.dispatchEvent(evt);
+ // console.log(this._data[0]);
+ console.log(elem.id);
+
+ AJAX.post(ROUTERS.ADD, {token:token.token,userId:token.userId,itemId:Number(elem.id),numValue:numValue.innerHTML})
+
+ }
+
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/Goods.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/Goods.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..2a132ec036da5d6828ea248960df4667af207f1c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/Goods.ts"
@@ -0,0 +1,483 @@
+import Component from "./Component.js";
+import IEvent, { GOOD_EVENT } from "../interface/IEvents.js"
+import IGoods, { IIcon, IItemInfo } from "../interface/IGoodsData.js";
+import ViewModel from "../model/ViewModel.js";
+export default class Goods extends Component{
+ private _data?:IGoods;
+ private prev?:HTMLElement;
+ private id?:string;
+ private item?:IItemInfo;
+ constructor(_data?:IGoods){
+ super('li');
+ this.elem.className="list-item";
+ // this.elem.addEventListener("mouseover",e=>this.mouseHandler(e));
+ // this.elem.addEventListener("click",e=>this.clickHandler(e));
+ if(_data) this.data=_data;
+ this.setStyle();
+ }
+ // 数据驱动显示
+ public set data(_data:IGoods|undefined){
+ if(!_data) return;
+ this._data=_data;
+
+ this.elem.innerHTML = `
+
+
+
+
+
+
${_data.title}
+
+
+ ${_data.keywords}
+ HOT
+
+
+ ¥${_data.price + '' + _data.price1}
+ ${_data.soldcount}
+
+
+
+
+ ${_data.company}
+ ${_data.address}
+
+ `
+ var evt=new MouseEvent("mouseover",{bubbles:true});
+
+ this.elem.querySelector(".icon")?.dispatchEvent(evt);
+
+ }
+ public get data():IGoods|undefined
+ {
+ return this._data;
+ }
+// private mouseHandler(e:MouseEvent):void
+// {
+// console.log(1);
+
+// if(!(e.target instanceof HTMLElement)) return;
+// var target:HTMLElement=e.target;
+// if(target.className!=="icon") return;
+// if(!this.data) return ;
+// this.id=e.target.id;
+// // this.item=this.data.list.find(item=>item.id==target.id);
+// if(!this.item) return;
+// (this.elem.querySelector(".show") as HTMLImageElement).src=this.item.img;
+// (this.elem.querySelector(".priceCon>i") as HTMLElement).textContent=Number(this.item.price).toFixed(2);
+// if(this.prev){
+// this.prev.style.borderColor="rgba(255,0,0,0)"
+// }
+// this.prev=target;
+// this.prev.style.borderColor="rgba(255,0,0,1)";
+// }
+
+ // private clickHandler(e:MouseEvent):void{
+ // console.log(e.target);
+ // var evt:IEvent=new Event(GOOD_EVENT.ADD_GOODS,{bubbles:true});
+ // evt.id=Number(this.id);
+ // evt.item=this.item;
+ // evt.data=this.data;
+ // this.elem.dispatchEvent(evt);
+ // }
+ private setStyle():void{
+ Goods.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ body {
+ background-color: #f2f2f2;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .heade {
+ height: 80px;
+ background-color: #fff;
+ }
+ .heade .logo {
+ float: left;
+ width: 213px;
+ height: 40px;
+ margin-top: 20px;
+ }
+ .heade .logo img {
+ width: 213px;
+ height: 40px;
+ }
+ .heade .title {
+ float: left;
+ margin-left: 200px;
+ margin-top: 40px;
+ font-size: 24px;
+ }
+ .heade .title li {
+ float: left;
+ width: 150px;
+ text-align: center;
+ padding-bottom: 6px;
+ }
+ .heade .title li:first-child {
+ border-bottom: 3px solid #ff7300;
+ }
+ .heade .app {
+ float: right;
+ width: 70px;
+ height: 70px;
+ margin-top: 5px;
+ }
+ .heade .app img {
+ width: 100%;
+ height: 100%;
+ }
+ .main .search {
+ position: relative;
+ height: 50px;
+ margin: 20px 0 20px 70px;
+ }
+ .main .search .fdj {
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ cursor: pointer;
+ }
+ .main .search input {
+ float: left;
+ width: 950px;
+ height: 50px;
+ font-size: 20px;
+ font-weight: 300;
+ padding: 0 50px;
+ border: 2px solid #ff4a0d;
+ border-radius: 5px;
+ }
+ .main .search .pz {
+ position: absolute;
+ top: 4px;
+ right: 215px;
+ cursor: pointer;
+ }
+ .main .search button {
+ float: left;
+ width: 132px;
+ height: 50px;
+ margin-left: -30px;
+ border: 0;
+ padding: 0;
+ background-color: #ff5111;
+ border-radius: 0 5px 5px 0;
+ text-align: center;
+ color: #fff;
+ font-size: 20px;
+ cursor: pointer;
+ }
+ .main .content {
+ height: 385px;
+ background: 0;
+ }
+ .main .content .nav {
+ float: left;
+ width: 220px;
+ height: 385px;
+ background-color: #fff;
+ }
+ .main .content .nav div {
+ padding: 20px 0 0 24px;
+ }
+ .main .content .nav li {
+ height: 33px;
+ line-height: 33px;
+ padding: 0 24px;
+ }
+ .main .content .nav li:hover {
+ color: #ff3e19;
+ background-color: #ffedea;
+ }
+ .main .content .nav a:hover {
+ text-decoration: underline;
+ }
+ .main .content .banner {
+ float: left;
+ width: 600px;
+ height: 385px;
+ margin: 0 16px;
+ overflow: hidden;
+ }
+ .main .content .banner .carousel {
+ margin-bottom: 16px;
+ }
+
+ .main .content .article {
+ float: left;
+ width: 348px;
+ height: 385px;
+ background-color: #fff;
+ }
+ .main .content .article .art-top {
+ height: 132px;
+ padding: 18px;
+ background-color: #f0e5da;
+ }
+ .main .content .article .art-top .info {
+ overflow: hidden;
+ }
+ .main .content .article .art-top .info .profile {
+ float: left;
+ width: 54px;
+ height: 54px;
+ border-radius: 30px;
+ overflow: hidden;
+ }
+ .main .content .article .art-top .info .profile img {
+ width: 100%;
+ height: 100%;
+ }
+ .main .content .article .art-top .info .desc {
+ float: left;
+ margin-left: 20px;
+ }
+ .main .content .article .art-top .info .desc p {
+ margin-bottom: 10px;
+ }
+ .main .content .article .art-top .info .desc >span {
+ font-size: 14px;
+ background-color: #ffebe7;
+ }
+ .main .content .article .art-top >span {
+ display: inline-block;
+ width: 152px;
+ height: 32px;
+ line-height: 32px;
+ text-align: center;
+ margin-top: 10px;
+ border-radius: 5px;
+ }
+ .main .content .article .art-top a {
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+ }
+ .main .content .article .art-top .login {
+ background-color: #ff4000;
+ }
+ .main .content .article .art-top .login a {
+ color: #fff;
+ }
+ .main .content .article .art-top .login a:hover {
+ color: #fff;
+ }
+ .main .content .article .art-top .register {
+ border: 1px solid #ff4000;
+ }
+ .main .content .article .art-top .register a {
+ color: #ff4000;
+ }
+ .goodslist {
+ margin-top: 20px;
+ }
+ .goodslist .w {
+ padding-left: 24px;
+ overflow: hidden;
+ background-color: #fff;
+ border-radius: 5px;
+ }
+ .goodslist .w .head {
+ height: 70px;
+ line-height: 70px;
+ }
+ .goodslist .w .head h4 {
+ float: left;
+ font-size: 20px;
+ margin-right: 20px;
+ }
+ .goodslist .w .head p {
+ float: left;
+ font-size: 14px;
+ }
+ .goodslist .w .nav-bar {
+ height: 20px;
+ margin-bottom: 20px;
+ }
+ .goodslist .w .nav-bar >li {
+ float: left;
+ height: 20px;
+ line-height: 20px;
+ }
+ .goodslist .w .nav-bar >li a {
+ margin: 0 10px;
+ }
+ .goodslist .w .nav-bar .current {
+ color: #ff5231;
+ }
+ .goodslist .w .list {
+ overflow: hidden;
+ }
+ .goodslist .w .list .list-item {
+ float: left;
+ width: 216px;
+ height: 354px;
+ border: 1px solid #ccc;
+ margin-right: 18px;
+ margin-bottom: 18px;
+ }
+ .goodslist .w .list .list-item >img {
+ width: 214px;
+ height: 214px;
+ background-color: #ffc0cb;
+ }
+ .goodslist .w .list .list-item .offer-info {
+ width: 214px;
+ height: 99px;
+ padding: 8px 10px;
+ border-bottom: 1px solid #ccc;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title {
+ height: 18px;
+ overflow: hidden;
+ line-height: 1;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title img {
+ float: left;
+ width: 32px;
+ height: 18px;
+ margin-right: 5px;
+ vertical-align: middle;
+ }
+ .goodslist .w .list .list-item .offer-info .offer-title span {
+ line-height: 18px;
+ font-size: 14px;
+ vertical-align: middle;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags {
+ height: 20px;
+ margin-top: 10px;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags .tag {
+ font-size: 12px;
+ line-height: 20px;
+ background-color: #fcf1ee;
+ }
+ .goodslist .w .list .list-item .offer-info .benefit-tags .hot {
+ float: right;
+ width: 40px;
+ height: 20px;
+ color: #fff;
+ text-align: center;
+ font-size: 14px;
+ background-color: #f00;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info {
+ margin-top: 10px;
+ height: 30px;
+ line-height: 30px;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info span {
+ font-size: 12px;
+ color: #f00;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info span b {
+ font-size: 20px;
+ }
+ .goodslist .w .list .list-item .offer-info .number-info em {
+ float: right;
+ font-style: normal;
+ font-size: 12px;
+ color: #ccc;
+ }
+ .goodslist .w .list .list-item .region {
+ padding: 8px 10px 0;
+ }
+ .goodslist .w .list .list-item .region span {
+ font-size: 12px;
+ color: #ccc;
+ }
+ .goodslist .w .list .list-item .region .company {
+ display: inline-block;
+ width: 100px;
+ height: 18px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+ }
+ .goodslist .w .list .list-item .region .province-region {
+ float: right;
+ width: 64px;
+ height: 18px;
+ text-align: right;
+ }
+ .goodslist .w .list .list-item:hover {
+ border-color: #ff2900;
+ }
+ .dl {
+ margin-top: 20px;
+ }
+ .footer {
+ margin-top: 30px;
+ background-color: #ebebeb;
+ }
+ /*# sourceMappingURL=index.css.map */`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/ICarouselData.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/ICarouselData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..09c9f4feef8c272a7ca36d623ff3b17e5f175e92
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/ICarouselData.ts"
@@ -0,0 +1,7 @@
+export default interface ICarouselData{
+ id:number;
+ img:string;
+}
+export interface IUpdate{
+ update():void;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/StepNumber.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/StepNumber.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..93b3c1a9952dfb390a92a4d29978046dd7d94350
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/StepNumber.ts"
@@ -0,0 +1,96 @@
+import IEvent, { STEP_EVENT } from "../interface/IEvents.js";
+import Component from "./Component.js";
+export default class StepNumber extends Component{
+ private input:HTMLInputElement;
+ public id?:number;
+ public _step=1;
+ constructor(){
+ super();
+ this.elem.className="step"
+ this.elem.innerHTML=`
+ -
+
+ +
+ `
+ this.input=this.elem.querySelector(".input") as HTMLInputElement;
+ this.setStyle();
+ this.step=this._step;
+
+ this.elem.addEventListener("click",e=>this.clickHandler(e));
+ this.elem.addEventListener("input",e=>this.inputHandler(e));
+ }
+ public set step(value:number){
+ value=~~value;
+
+ if(value<1) value=1;
+ else if(value>99) value=99;
+ if(value===1) (this.elem.firstElementChild as HTMLButtonElement).disabled=true;
+ else if(value===99) (this.elem.lastElementChild as HTMLButtonElement).disabled=true;
+ else {
+ (this.elem.firstElementChild as HTMLButtonElement).disabled=false;
+ (this.elem.lastElementChild as HTMLButtonElement).disabled=false;
+ }
+ this._step=value;
+ this.input.value=String(this._step);
+ }
+ public get step():number{
+ return this._step;
+ }
+ private inputHandler(e:Event){
+ if((e.target as HTMLElement).nodeName!=="INPUT")return;
+ this.input.value=this.input.value.replace(/\D/g,"");
+ this.step=Number(this.input.value);
+ this.dispatch();
+ }
+ private clickHandler(e:MouseEvent){
+ if((e.target as HTMLButtonElement).className==="left"){
+ // this.setStep(this._step-1);
+ this.step--;
+ var token = JSON.parse(localStorage.token)
+ }else if((e.target as HTMLButtonElement).className==="right"){
+ this.step++;
+ }
+ console.log(1);
+
+ this.dispatch();
+ }
+ private dispatch(){
+ var evt:IEvent=new Event(STEP_EVENT.STEP_CHANGE,{bubbles:true});
+ evt.num=this.step;
+ evt.id=this.id;
+
+ this.elem.dispatchEvent(evt);
+ }
+ protected setStyle(){
+ StepNumber.setCss(`.step{
+ width: 80px;
+ height: 20px;
+ position: relative;
+ }
+ .step>*{
+ float: left;
+ }
+ .step>.left,.step>.right{
+ width: 15px;
+ height: 16px;
+ border: 1px solid #999;
+ text-align: center;
+ line-height: 13px;
+ margin: 0;
+ padding: 0;
+ box-sizing: content-box;
+ cursor: pointer;
+ }
+ .step>.input{
+ width: 46px;
+ height: 18px;
+ border: none;
+ border-top: 1px solid #999;
+ border-bottom: 1px solid #999;
+ outline: none;
+ margin: 0;
+ padding: 0;
+ text-align: center;
+ }`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/component/TImeManager.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/component/TImeManager.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..1c21ab354db865f345ca5d43e957e8cce07b8714
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/component/TImeManager.ts"
@@ -0,0 +1,40 @@
+import { IUpdate } from "./ICarouselData.js";
+
+export default class TimeManager{
+ private static _instance:TimeManager;
+ // public static readonly instnace:TimeManager=new TimeManager();
+ private list:Set=new Set()
+ private ids?:number
+ private constructor(){
+
+ }
+ public static get instance():TimeManager
+ {
+ return TimeManager._instance || (TimeManager._instance=new TimeManager());
+ }
+
+ public add(item:IUpdate):void
+ {
+ if(this.list.has(item)) return;
+ this.list.add(item);
+ if(this.list.size>0 && !this.ids) this.animation();
+
+ }
+ public remove(item:IUpdate):void{
+ if(!this.list.has(item)) return;
+ this.list.delete(item);
+ if(this.list.size===0 && this.ids){
+ cancelAnimationFrame(this.ids);
+ this.ids=undefined;
+ }
+ }
+ public has(item:IUpdate):boolean
+ {
+ return this.list.has(item)
+ }
+ private animation():void
+ {
+ this.ids=requestAnimationFrame(()=>this.animation());
+ this.list.forEach((item:IUpdate)=>item.update());
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/controller/MainController.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/controller/MainController.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..b56cbaa70f48c078b4f06b1f5c30cb5f1566bacb
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/controller/MainController.ts"
@@ -0,0 +1,40 @@
+import ICommand from "../interface/ICommand";
+import { ROUTERS } from "../vo/AJAXVo";
+import { RouterPath } from "../vo/RouterVo";
+// 路由的解析跳转
+export default class MainController{
+ private static _instance: MainController;
+ private list: { [key: string]: Set<{ new (): ICommand }> } = {};
+
+ private constructor() {
+ // 主控制器的私有构造函数,确保只能通过静态的instance属性获取MainController的实例
+ }
+
+ public static get instance(): MainController {
+ return MainController._instance || (MainController._instance = new MainController());
+ // 通过instance属性获取MainController的实例,如果实例不存在则创建一个新的实例并返回
+ }
+
+ public addCommand(router: RouterPath, Command: { new (): ICommand }): void {
+ if (!this.list[router]) this.list[router] = new Set();
+ // 如果指定路由的Set集合不存在,则创建一个新的Set集合
+
+
+ this.list[router].add(Command);
+ // 将命令添加到指定路由的Set集合中
+ }
+
+ public dispatch(router: ROUTERS, data?: any): void {
+
+ var firstRouter = router.split(/\/(?=[^/]*$)/)[0];
+ // 将路由字符串分割成数组,获取第一个路由节点
+ if (!this.list[firstRouter]) return;
+ // 如果指定的第一个路由节点不存在于集合中,则停止执行
+
+
+ this.list[firstRouter].forEach((Command: { new (): ICommand }) => {
+ new Command().exec(data, router.replace(firstRouter, ""));
+ // 对于指定路由集合中的每个命令,创建一个新的命令实例并执行exec方法,传入data参数和去除第一个路由节点后的剩余路径
+ });
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/details.css" "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.css"
new file mode 100644
index 0000000000000000000000000000000000000000..21f422c97e0a17baa65c016e257c25819c3a163c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.css"
@@ -0,0 +1,317 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+}
+li {
+ list-style: none;
+}
+a {
+ text-decoration: none;
+ color: #555;
+}
+a:hover {
+ color: #ff7300;
+}
+input {
+ outline: none;
+}
+.w {
+ width: 1200px;
+ margin: 0 auto;
+}
+.current {
+ color: #ff7300;
+}
+.ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+}
+.ali-bar p {
+ float: left;
+}
+.ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+}
+.ali-bar ul {
+ float: right;
+}
+.ali-bar ul li {
+ float: left;
+}
+.ali-bar ul li a {
+ padding: 0 6px;
+}
+.ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+}
+.ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+}
+.ali-bar ul li:last-child::after {
+ display: none;
+}
+.header {
+ height: 125px;
+ border-bottom: 1px solid #ccc;
+}
+.nav {
+ height: 40px;
+ border-bottom: 2px solid #ccc;
+}
+.nav li {
+ float: left;
+}
+.nav li a {
+ display: inline-block;
+ width: 112px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+}
+.nav li a:hover {
+ color: #333;
+}
+.detail {
+ padding: 20px 0;
+ height: 742px;
+}
+.detail .fdj {
+ float: left;
+ width: 496px;
+ height: 702px;
+}
+.detail .fdj .zoom-show .zoom {
+ position: relative;
+}
+.detail .fdj .zoom-show .zoom .min {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ background: url("./img/a.jpg.avif");
+ background-size: 100% 100%;
+}
+.detail .fdj .zoom-show .zoom .min .mask {
+ width: 303px;
+ height: 303px;
+ background-color: rgba(190,160,30,0.4);
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ pointer-events: none;
+}
+.detail .fdj .zoom-show .zoom .max {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ position: absolute;
+ left: 496px;
+ top: 0;
+ background-image: url("./img/a.jpg.avif");
+ visibility: hidden;
+}
+.detail .fdj .icon-carousel {
+ width: 496px;
+ height: 60px;
+ margin-top: 20px;
+}
+.detail .fdj .icon-carousel .left {
+ width: 22px;
+ height: 32px;
+ background-image: url("./img/left-icon.png");
+ float: left;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+}
+.detail .fdj .icon-carousel .carousel {
+ width: 424px;
+ height: 60px;
+ float: left;
+ position: relative;
+ margin: 0 14px;
+ overflow: hidden;
+}
+.detail .fdj .icon-carousel .carousel .img-con {
+ width: 684px;
+ height: 60px;
+ font-size: 0;
+ position: absolute;
+ transition: all 0.5s;
+ left: 0;
+}
+.detail .fdj .icon-carousel .carousel .img-con img {
+ width: 54px;
+ height: 54px;
+ border: 2px solid transparent;
+ margin: 0 9px;
+}
+.detail .fdj .icon-carousel .right {
+ width: 22px;
+ height: 32px;
+ background-image: url("./img/icons.png");
+ background-position: -78px 0;
+ float: right;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+}
+.detail .info {
+ float: left;
+ width: 704px;
+ height: 702px;
+ padding-left: 28px;
+}
+.detail .info .title {
+ font-size: 16px;
+ line-height: 40px;
+}
+.detail .info .title-third {
+ font-size: 12px;
+ color: #ccc;
+ margin-bottom: 20px;
+}
+.detail .info .title-third .star img {
+ width: 15px;
+ height: 15px;
+}
+.detail .info .title-third span:last-child {
+ float: right;
+}
+.detail .info .method {
+ margin-bottom: 10px;
+}
+.detail .info .method span {
+ display: inline-block;
+ width: 335px;
+ height: 42px;
+ text-align: center;
+ line-height: 42px;
+}
+.detail .info .method span:first-child {
+ border-top: 2px solid #ff4000;
+}
+.detail .info .method span:last-child {
+ border-bottom: 1px solid #ccc;
+}
+.detail .info .price-num {
+ height: 70px;
+ padding: 12px 16px;
+ background-color: #f9f9fa;
+}
+.detail .info .price-num span:first-child {
+ display: inline-block;
+ width: 100px;
+ font-size: 14px;
+ color: #ccc;
+}
+.detail .info .more {
+ border-bottom: 1px solid #ccc;
+}
+.detail .info .more img {
+ display: block;
+}
+.detail .info .color-contain {
+ height: 70px;
+ line-height: 70px;
+ background-color: #fff;
+}
+.detail .info .color-contain span {
+ float: left;
+ margin-left: 20px;
+ margin-right: 40px;
+ font-size: 14px;
+ color: #ccc;
+}
+.detail .info .color-contain .prop {
+ float: left;
+ margin-top: 17px;
+}
+.detail .info .color-contain .prop .drop-item {
+ float: left;
+ width: 100px;
+ height: 36px;
+ line-height: 36px;
+ padding-left: 45px;
+ border: 1px solid #ccc;
+ margin-right: 10px;
+ cursor: pointer;
+ font-size: 12px;
+ background: url("../../img/prop1.jpg") no-repeat;
+ background-size: 36px 36px;
+}
+.detail .info .size-contain {
+ height: 181px;
+ background-color: #fff;
+ border-top: 1px dashed #ccc;
+ border-bottom: 1px solid #ccc;
+}
+.detail .info .size-contain >span {
+ float: left;
+ height: 190px;
+ margin-left: 20px;
+ margin-right: 40px;
+ line-height: 60px;
+ font-size: 14px;
+ color: #ccc;
+}
+.detail .info .size-contain .s {
+ float: left;
+ width: 588px;
+ height: 60px;
+ line-height: 60px;
+ font-size: 14px;
+ border-bottom: 1px dashed #ccc;
+}
+.detail .info .size-contain .s .size-name {
+ display: inline-block;
+ width: 20px;
+}
+.detail .info .size-contain .s .price {
+ width: 50px;
+ margin-left: 150px;
+ margin-right: 70px;
+}
+.detail .info .size-contain .s .sale {
+ width: 50px;
+ font-size: 12px;
+ color: #ccc;
+}
+.detail .info .size-contain .s .step {
+ display: inline-block;
+ padding-top: 6px;
+ margin-left: 70px;
+}
+.detail .info .add-shoppinglist {
+ width: 120px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ border: 1px solid #ff4000;
+ border-radius: 5px;
+ cursor: pointer;
+ margin-top: 7px;
+ background-color: #fff;
+}
+/*# sourceMappingURL=details.css.map */
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/details.css.map" "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.css.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b7265f024224daae6d550e1c2dd0f5a01ed490c8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.css.map"
@@ -0,0 +1 @@
+{"version":3,"sources":["details.stylus"],"names":[],"mappings":"AAAA;EACI,SAAS,EAAT;EACA,QAAQ,EAAR;EACA,YAAY,WAAZ;;AAEJ;EACI,YAAY,KAAZ;;AAEJ;EACI,iBAAiB,KAAjB;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,QAAP;;AAEJ;EACI,SAAS,KAAT;;AAEJ;EACI,OAAO,OAAP;EACA,QAAQ,OAAR;;AAEJ;EACI,OAAO,QAAP;;AAGJ;EACI,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,WAAW,KAAX;EACA,SAAS,OAAT;EACA,kBAAkB,KAAlB;EACA,eAAe,eAAf;;AACA;EACI,OAAO,KAAP;;AACA;EACI,gBAAgB,OAAhB;EACA,eAAe,IAAf;;AAGR;EACI,OAAO,MAAP;;AACA;EACI,OAAO,KAAP;;AACA;EACI,SAAS,MAAT;;AAGR;EACI,SAAS,GAAT;EACA,SAAS,aAAT;EACA,OAAO,IAAP;EACA,QAAQ,IAAR;EACA,YAAY,eAAZ;EACA,aAAa,eAAb;EACA,WAAW,gBAAX;EACA,eAAe,IAAf;EACA,OAAO,KAAP;;AAE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EACA,cAAc,KAAd;EACA,QAAQ,QAAR;EACA,WAAW,KAAX;EACA,YAAqC,qCAArC;EACA,iBAAiB,UAAjB;;AAIZ;EACI,QAAQ,MAAR;EACA,kBAAiB,KAAjB;EACA,YAAY,gBAAZ;EACA,eAAe,eAAf;;AACA;EACI,OAAO,KAAP;EACA,QAAQ,MAAR;EACA,aAAa,KAAb;EACA,cAAc,KAAd;EACA,aAAa,KAAb;EACA,WAAW,KAAX;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,KAAP;EACA,OAAO,MAAP;EACA,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,WAAW,KAAX;EACA,eAAe,gBAAf;;AACA;EACI,SAAS,aAAT;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,KAAP;EACA,aAAa,MAAb;EACA,cAAc,KAAd;;AAEJ;EACI,OAAO,KAAP;EACA,WAAW,KAAX;EACA,OAAO,KAAP;;AAEJ;EACI,SAAS,aAAT;EACA,aAAa,IAAb;EACA,aAAa,KAAb;;AAIZ;EACI,OAAO,MAAP;EACA,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,YAAW,OAAX;EACA,QAAQ,kBAAR;EACA,eAAe,IAAf;EACA,QAAQ,QAAR;EACA,YAAY,IAAZ;EACA,kBAAkB,KAAlB","file":"details.css"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/details.stylus" "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.stylus"
new file mode 100644
index 0000000000000000000000000000000000000000..8624cc6ec2661f0d82ec4e51957395cd80202df6
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/details.stylus"
@@ -0,0 +1,324 @@
+* {
+ padding: 0
+ margin: 0
+ box-sizing: border-box
+}
+li {
+ list-style: none
+}
+a {
+ text-decoration: none
+ color: #555
+}
+a:hover {
+ color: rgb(255, 115, 0)
+}
+input {
+ outline: none
+}
+.w {
+ width: 1200px
+ margin: 0 auto
+}
+.current {
+ color: #ff7300
+}
+
+.ali-bar {
+ height: 30px
+ line-height: 30px
+ font-size: 12px
+ padding: 0 20px
+ background-color: #fff
+ border-bottom: 1px solid #ccc
+ p {
+ float: left
+ img {
+ vertical-align: middle
+ margin-bottom: 3px
+ }
+ }
+ ul {
+ float: right
+ li {
+ float: left
+ a {
+ padding: 0 6px
+ }
+ }
+ li::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: rotate(-135deg)
+ margin-bottom: 3px
+ color: #ccc
+ }
+ li:hover::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: translateY(3px) rotate(45deg)
+ border-color: rgb(255, 115, 0)
+ }
+ li:last-child::after {
+ display: none
+ }
+ }
+}
+.header {
+ height: 125px
+ border-bottom: 1px solid #ccc
+}
+.nav {
+ height: 40px
+ border-bottom: 2px solid #ccc
+ li {
+ float: left
+ a {
+ display: inline-block
+ width 112px
+ height 40px
+ line-height 40px
+ text-align center
+ }
+ a:hover {
+ color: #333
+ }
+ }
+}
+.detail {
+ padding: 20px 0
+ height: 742px
+ .fdj {
+ float: left
+ width: 496px
+ height: 702px
+ // background-color: pink
+ .zoom-show {
+ .zoom {
+ position: relative;
+ .min {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ background: url(./img/a.jpg.avif);
+ background-size: 100% 100%;
+ .mask {
+ width: 303px;
+ height: 303px;
+ background-color: rgba(190, 160, 30, 0.4);
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ pointer-events: none;
+ }
+ }
+ .max {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ position: absolute;
+ left: 496px;
+ top: 0;
+ background-image: url(./img/a.jpg.avif);
+ visibility: hidden;
+ }
+ }
+ }
+ .icon-carousel {
+ width: 496px;
+ height: 60px;
+ margin-top: 20px;
+ .left {
+ width: 22px;
+ height: 32px;
+ background-image: url(./img/left-icon.png);
+ float: left;
+ position: relative;
+ top: 50%;
+ transform: translate(0,-50%);
+
+ }
+ .carousel {
+ width: 424px;
+ height: 60px;
+ float: left;
+ position: relative;
+ margin: 0 14px;
+ overflow: hidden;
+ .img-con {
+ width: 684px;
+ height: 60px;
+ font-size: 0;
+ position: absolute;
+ transition: all 0.5s;
+ left: 0;
+ img {
+ width: 54px;
+ height: 54px;
+ border: 2px solid transparent;
+ margin: 0 9px;
+ }
+ }
+ }
+ .right {
+ width: 22px;
+ height: 32px;
+ background-image: url(./img/icons.png);
+ background-position: -78px 0;
+ float: right;
+ position: relative;
+ top: 50%;
+ transform: translate(0,-50%);
+ }
+ }
+ }
+ .info {
+ float: left
+ width: 704px
+ height: 702px
+ padding-left: 28px
+ .title {
+ font-size: 16px
+ line-height: 40px
+ }
+ .title-third {
+ font-size: 12px
+ color: #ccc
+ margin-bottom: 20px
+ .star {
+ img {
+ width: 15px
+ height: 15px
+ }
+ }
+ span:last-child{
+ float: right
+ }
+ }
+ .method {
+ margin-bottom: 10px
+ span {
+ display: inline-block
+ width: 335px
+ height: 42px
+ text-align center
+ line-height: 42px
+ }
+ span:first-child {
+ border-top: 2px solid #ff4000
+ }
+ span:last-child {
+ border-bottom: 1px solid #ccc
+ }
+ }
+ .price-num {
+ height: 70px
+ padding: 12px 16px
+ background-color: #f9f9fa
+ span:first-child {
+ display: inline-block
+ width: 100px
+ font-size: 14px
+ color: #ccc
+ }
+ }
+ .more {
+ border-bottom: 1px solid #ccc
+ img {
+ display: block
+ }
+ }
+ .color-contain {
+ height: 70px
+ line-height: 70px
+ background-color: #fff
+ span {
+ float: left
+ margin-left: 20px
+ margin-right: 40px
+ font-size: 14px
+ color: #ccc
+ }
+ .prop {
+ float: left
+ margin-top: 17px
+
+ .drop-item {
+ float: left
+ width: 100px
+ height: 36px
+ line-height: 36px
+ padding-left: 45px
+ border: 1px solid #ccc
+ margin-right: 10px
+ cursor: pointer
+ font-size: 12px
+ background: url('../../img/prop1.jpg') no-repeat
+ background-size: 36px 36px
+ }
+ }
+ }
+ .size-contain {
+ height: 181px
+ background-color #fff
+ border-top: 1px dashed #ccc
+ border-bottom: 1px solid #ccc
+ >span {
+ float: left
+ height: 190px
+ margin-left: 20px
+ margin-right: 40px
+ line-height: 60px
+ font-size: 14px
+ color: #ccc
+ }
+ .s {
+ float: left
+ width: 588px
+ height: 60px
+ line-height: 60px
+ font-size: 14px
+ border-bottom: 1px dashed #ccc
+ .size-name {
+ display: inline-block
+ width: 20px
+ }
+ .price {
+ width: 50px
+ margin-left: 150px
+ margin-right: 70px
+ }
+ .sale {
+ width: 50px
+ font-size: 12px
+ color: #ccc
+ }
+ .step {
+ display: inline-block
+ padding-top: 6px
+ margin-left: 70px
+ }
+ }
+ }
+ .add-shoppinglist {
+ width: 120px
+ height: 40px
+ line-height: 40px
+ text-align center
+ border: 1px solid #ff4000
+ border-radius: 5px
+ cursor: pointer
+ margin-top: 7px
+ background-color: #fff
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/index.css" "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.css"
new file mode 100644
index 0000000000000000000000000000000000000000..903c95163237279eaa828fe766e78e378ad0d73a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.css"
@@ -0,0 +1,404 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+}
+li {
+ list-style: none;
+}
+a {
+ text-decoration: none;
+ color: #555;
+}
+a:hover {
+ color: #ff7300;
+}
+input {
+ outline: none;
+}
+.w {
+ width: 1200px;
+ margin: 0 auto;
+}
+body {
+ background-color: #f2f2f2;
+}
+.ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+}
+.ali-bar p {
+ float: left;
+}
+.ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+}
+.ali-bar ul {
+ float: right;
+}
+.ali-bar ul li {
+ float: left;
+}
+.ali-bar ul li a {
+ padding: 0 6px;
+}
+.ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+}
+.ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+}
+.ali-bar ul li:last-child::after {
+ display: none;
+}
+.heade {
+ height: 80px;
+ background-color: #fff;
+}
+.heade .logo {
+ float: left;
+ width: 213px;
+ height: 40px;
+ margin-top: 20px;
+}
+.heade .logo img {
+ width: 213px;
+ height: 40px;
+}
+.heade .title {
+ float: left;
+ margin-left: 200px;
+ margin-top: 40px;
+ font-size: 24px;
+}
+.heade .title li {
+ float: left;
+ width: 150px;
+ text-align: center;
+ padding-bottom: 6px;
+}
+.heade .title li:first-child {
+ border-bottom: 3px solid #ff7300;
+}
+.heade .app {
+ float: right;
+ width: 70px;
+ height: 70px;
+ margin-top: 5px;
+}
+.heade .app img {
+ width: 100%;
+ height: 100%;
+}
+.main .search {
+ position: relative;
+ height: 50px;
+ margin: 20px 0 20px 70px;
+}
+.main .search .fdj {
+ position: absolute;
+ top: 2px;
+ left: 4px;
+ cursor: pointer;
+}
+.main .search input {
+ float: left;
+ width: 950px;
+ height: 50px;
+ font-size: 20px;
+ font-weight: 300;
+ padding: 0 50px;
+ border: 2px solid #ff4a0d;
+ border-radius: 5px;
+}
+.main .search .pz {
+ position: absolute;
+ top: 4px;
+ right: 215px;
+ cursor: pointer;
+}
+.main .search button {
+ float: left;
+ width: 132px;
+ height: 50px;
+ margin-left: -30px;
+ border: 0;
+ padding: 0;
+ background-color: #ff5111;
+ border-radius: 0 5px 5px 0;
+ text-align: center;
+ color: #fff;
+ font-size: 20px;
+ cursor: pointer;
+}
+.main .content {
+ height: 385px;
+ background: 0;
+}
+.main .content .nav {
+ float: left;
+ width: 220px;
+ height: 385px;
+ background-color: #fff;
+}
+.main .content .nav div {
+ padding: 20px 0 0 24px;
+}
+.main .content .nav li {
+ height: 33px;
+ line-height: 33px;
+ padding: 0 24px;
+}
+.main .content .nav li:hover {
+ color: #ff3e19;
+ background-color: #ffedea;
+}
+.main .content .nav a:hover {
+ text-decoration: underline;
+}
+.main .content .banner {
+ float: left;
+ width: 600px;
+ height: 385px;
+ margin: 0 16px;
+ overflow: hidden;
+}
+.main .content .banner .banner-top {
+ margin-bottom: 16px;
+}
+.main .content .banner .banner-top img {
+ height: 256px;
+}
+.main .content .banner .banner-btm {
+ height: 112px;
+ background-color: #fff;
+}
+.main .content .article {
+ float: left;
+ width: 348px;
+ height: 385px;
+ background-color: #fff;
+}
+.main .content .article .art-top {
+ height: 132px;
+ padding: 18px;
+ background-color: #f0e5da;
+}
+.main .content .article .art-top .info {
+ overflow: hidden;
+}
+.main .content .article .art-top .info .profile {
+ float: left;
+ width: 54px;
+ height: 54px;
+ border-radius: 30px;
+ overflow: hidden;
+}
+.main .content .article .art-top .info .profile img {
+ width: 100%;
+ height: 100%;
+}
+.main .content .article .art-top .info .desc {
+ float: left;
+ margin-left: 20px;
+}
+.main .content .article .art-top .info .desc p {
+ margin-bottom: 10px;
+}
+.main .content .article .art-top .info .desc >span {
+ font-size: 14px;
+ background-color: #ffebe7;
+}
+.main .content .article .art-top >span {
+ display: inline-block;
+ width: 152px;
+ height: 32px;
+ line-height: 32px;
+ text-align: center;
+ margin-top: 10px;
+ border-radius: 5px;
+}
+.main .content .article .art-top a {
+ display: inline-block;
+ width: 100%;
+ height: 100%;
+}
+.main .content .article .art-top .login {
+ background-color: #ff4000;
+}
+.main .content .article .art-top .login a {
+ color: #fff;
+}
+.main .content .article .art-top .login a:hover {
+ color: #fff;
+}
+.main .content .article .art-top .register {
+ border: 1px solid #ff4000;
+}
+.main .content .article .art-top .register a {
+ color: #ff4000;
+}
+.goodslist {
+ margin-top: 20px;
+}
+.goodslist .w {
+ padding-left: 24px;
+ overflow: hidden;
+ background-color: #fff;
+ border-radius: 5px;
+}
+.goodslist .w .head {
+ height: 70px;
+ line-height: 70px;
+}
+.goodslist .w .head h4 {
+ float: left;
+ font-size: 20px;
+ margin-right: 20px;
+}
+.goodslist .w .head p {
+ float: left;
+ font-size: 14px;
+}
+.goodslist .w .nav-bar {
+ height: 20px;
+ margin-bottom: 20px;
+}
+.goodslist .w .nav-bar >li {
+ float: left;
+ height: 20px;
+ line-height: 20px;
+}
+.goodslist .w .nav-bar >li a {
+ margin: 0 10px;
+}
+.goodslist .w .nav-bar .current {
+ color: #ff5231;
+}
+.goodslist .w .list {
+ overflow: hidden;
+}
+.goodslist .w .list .list-item {
+ float: left;
+ width: 216px;
+ height: 354px;
+ border: 1px solid #ccc;
+ margin-right: 18px;
+ margin-bottom: 18px;
+}
+.goodslist .w .list .list-item >img {
+ width: 214px;
+ height: 214px;
+ background-color: #ffc0cb;
+}
+.goodslist .w .list .list-item .offer-info {
+ width: 214px;
+ height: 99px;
+ padding: 8px 10px;
+ border-bottom: 1px solid #ccc;
+}
+.goodslist .w .list .list-item .offer-info .offer-title {
+ height: 18px;
+ overflow: hidden;
+ line-height: 1;
+}
+.goodslist .w .list .list-item .offer-info .offer-title img {
+ float: left;
+ width: 32px;
+ height: 18px;
+ margin-right: 5px;
+ vertical-align: middle;
+}
+.goodslist .w .list .list-item .offer-info .offer-title span {
+ line-height: 18px;
+ font-size: 14px;
+ vertical-align: middle;
+}
+.goodslist .w .list .list-item .offer-info .benefit-tags {
+ height: 20px;
+ margin-top: 10px;
+}
+.goodslist .w .list .list-item .offer-info .benefit-tags .tag {
+ font-size: 12px;
+ line-height: 20px;
+ background-color: #fcf1ee;
+}
+.goodslist .w .list .list-item .offer-info .benefit-tags .hot {
+ float: right;
+ width: 40px;
+ height: 20px;
+ color: #fff;
+ text-align: center;
+ font-size: 14px;
+ background-color: #f00;
+}
+.goodslist .w .list .list-item .offer-info .number-info {
+ margin-top: 10px;
+ height: 30px;
+ line-height: 30px;
+}
+.goodslist .w .list .list-item .offer-info .number-info span {
+ font-size: 12px;
+ color: #f00;
+}
+.goodslist .w .list .list-item .offer-info .number-info span b {
+ font-size: 20px;
+}
+.goodslist .w .list .list-item .offer-info .number-info em {
+ float: right;
+ font-style: normal;
+ font-size: 12px;
+ color: #ccc;
+}
+.goodslist .w .list .list-item .region {
+ padding: 8px 10px 0;
+}
+.goodslist .w .list .list-item .region span {
+ font-size: 12px;
+ color: #ccc;
+}
+.goodslist .w .list .list-item .region .company {
+ display: inline-block;
+ width: 100px;
+ height: 18px;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ overflow: hidden;
+}
+.goodslist .w .list .list-item .region .province-region {
+ float: right;
+ width: 64px;
+ height: 18px;
+ text-align: right;
+}
+.goodslist .w .list .list-item:hover {
+ border-color: #ff2900;
+}
+.dl {
+ margin-top: 20px;
+}
+.footer {
+ margin-top: 30px;
+ background-color: #ebebeb;
+}
+/*# sourceMappingURL=index.css.map */
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/index.css.map" "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.css.map"
new file mode 100644
index 0000000000000000000000000000000000000000..0fac5f248c0b114f445da7884a0ecf4d32252dd9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.css.map"
@@ -0,0 +1 @@
+{"version":3,"sources":["index.stylus"],"names":[],"mappings":"AAAA;EACI,SAAS,EAAT;EACA,QAAQ,EAAR;EACA,YAAY,WAAZ;;AAEJ;EACI,YAAY,KAAZ;;AAEJ;EACI,iBAAiB,KAAjB;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,QAAP;;AAEJ;EACI,SAAS,KAAT;;AAEJ;EACI,OAAO,OAAP;EACA,QAAQ,OAAR;;AAEJ;EACI,kBAAkB,QAAlB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R;EACI,QAAQ,KAAR;EACA,YAAY,KAAZ;;AACA;EACI,WAAW,KAAX;EACA,aAAa,KAAb;EACA,kBAAiB,QAAjB;;AAEJ;EACI,OAAO,MAAP;EACA,OAAO,KAAP;EACA,QAAQ,KAAR;EACA,OAAO,KAAP;EACA,YAAW,OAAX;EACA,WAAW,KAAX;EACA,kBAAkB,KAAlB;;AAGR;EACI,YAAY,KAAZ;EACA,QAAQ,KAAR;EACA,aAAa,KAAb;;AACA;EACI,WAAW,KAAX;EACA,OAAO,KAAP;;AACA;EACI,WAAW,KAAX;;AAGR;EACI,OAAO,MAAP;EACA,YAAY,OAAZ;EACA,WAAW,KAAX;EACA,OAAO,KAAP;;AAIZ;EACI,SAAS,WAAT;;AACA;EACI,WAAW,KAAX;EACA,OAAO,KAAP;;AAEJ;EACI,SAAS,aAAT;EACA,OAAO,MAAP;EACA,QAAQ,KAAR;EACA,aAAa,OAAb;EACA,eAAe,SAAf;EACA,UAAU,OAAV;;AAEJ;EACI,OAAO,MAAP;EACA,OAAO,KAAP;EACA,QAAQ,KAAR;EACA,YAAY,MAAZ;;AAIZ;EACI,cAAc,QAAd;;AAKhB;EACI,YAAY,KAAZ;;AAEJ;EACI,YAAY,KAAZ;EACA,kBAAkB,QAAlB","file":"index.css"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/index.stylus" "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.stylus"
new file mode 100644
index 0000000000000000000000000000000000000000..a3abb21cdd75cc2a0a73f62aedd28616032ab5a0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/index.stylus"
@@ -0,0 +1,409 @@
+* {
+ padding: 0
+ margin: 0
+ box-sizing: border-box
+}
+li {
+ list-style: none
+}
+a {
+ text-decoration: none
+ color: #555
+}
+a:hover {
+ color: rgb(255, 115, 0)
+}
+input {
+ outline: none
+}
+.w {
+ width: 1200px
+ margin: 0 auto
+}
+body {
+ background-color: #f2f2f2
+}
+.ali-bar {
+ height: 30px
+ line-height: 30px
+ font-size: 12px
+ padding: 0 20px
+ background-color: #fff
+ border-bottom: 1px solid #ccc
+ p {
+ float: left
+ img {
+ vertical-align: middle
+ margin-bottom: 3px
+ }
+ }
+ ul {
+ float: right
+ li {
+ float: left
+ a {
+ padding: 0 6px
+ }
+ }
+ li::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: rotate(-135deg)
+ margin-bottom: 3px
+ color: #ccc
+ }
+ li:hover::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: translateY(3px) rotate(45deg)
+ border-color: rgb(255, 115, 0)
+ }
+ li:last-child::after {
+ display: none
+ }
+ }
+}
+.heade {
+ height: 80px
+ background-color: #fff
+ .logo {
+ float: left
+ width: 213px
+ height: 40px
+ margin-top: 20px
+ img {
+ width: 213px
+ height: 40px
+ }
+ }
+ .title {
+ float: left
+ margin-left: 200px
+ margin-top: 40px
+ font-size: 24px
+ li {
+ float: left
+ width: 150px
+ text-align center
+ padding-bottom: 6px
+
+ }
+ li:first-child{
+ border-bottom: 3px solid rgb(255, 115, 0)
+ }
+ }
+ .app {
+ float: right
+ width: 70px
+ height: 70px
+ margin-top: 5px
+ img {
+ width: 100%
+ height: 100%
+ }
+ }
+}
+.main {
+ .search {
+ position: relative
+ height: 50px
+ margin: 20px 0 20px 70px
+ .fdj {
+ position: absolute
+ top: 2px
+ left: 4px
+ cursor: pointer
+ }
+ input {
+ float: left
+ width: 950px
+ height: 50px
+ font-size: 20px
+ font-weight: 300
+ padding: 0 50px
+ border: 2px solid #ff4a0d
+ border-radius: 5px
+ }
+ .pz {
+ position: absolute
+ top: 4px
+ right: 215px
+ cursor: pointer
+ }
+ button {
+ float: left
+ width: 132px
+ height: 50px
+ margin-left: -30px
+ border: 0
+ padding: 0
+ background-color: #ff5111
+ border-radius: 0 5px 5px 0
+ text-align: center
+ color: #fff
+ font-size: 20px
+ cursor: pointer
+ }
+ }
+ .content {
+ height: 385px
+ background: 0
+ .nav {
+ float: left
+ width: 220px
+ height: 385px
+ background-color: #fff
+ div {
+ padding: 20px 0 0 24px
+ }
+ li {
+ height: 33px
+ line-height: 33px
+ padding: 0 24px
+ }
+ li:hover {
+ color: #ff3e19
+ background-color: #ffedea
+ }
+ a:hover {
+ text-decoration: underline
+ }
+ }
+ .banner {
+ float: left
+ width: 600px
+ height: 385px
+ margin: 0 16px
+ overflow: hidden
+ .banner-top {
+ img {
+ height: 256px
+ }
+ margin-bottom: 16px
+ }
+ .banner-btm {
+ height: 112px
+ background-color: #fff
+ }
+ }
+ .article {
+ float: left
+ width: 348px
+ height: 385px
+ background-color: #fff
+ .art-top {
+ height: 132px
+ padding: 18px
+ background-color: #f0e5da
+ .info {
+ overflow: hidden
+ .profile {
+ float: left
+ width: 54px
+ height: 54px
+ border-radius: 30px
+ overflow: hidden
+ img {
+ width: 100%
+ height: 100%
+ }
+ }
+ .desc {
+ float: left
+ margin-left: 20px
+ p {
+ margin-bottom: 10px
+ }
+ >span {
+ font-size: 14px
+ background-color: #ffebe7
+ }
+ }
+ }
+ >span {
+ display: inline-block
+ width: 152px
+ height: 32px
+ line-height: 32px
+ text-align center
+ margin-top: 10px
+ border-radius: 5px
+ }
+ a {
+ display: inline-block
+ width: 100%
+ height: 100%
+ }
+ .login {
+ background-color: #ff4000
+ a {
+ color: #fff
+ }
+ a:hover {
+ color: #fff
+ }
+ }
+ .register {
+ border: 1px solid #ff4000
+ a {
+ color: #ff4000
+ }
+ }
+ }
+ }
+ }
+}
+.goodslist {
+ margin-top: 20px
+ .w {
+ padding-left: 24px
+ overflow: hidden
+ background-color: #fff
+ border-radius: 5px
+ .head {
+ height: 70px
+ line-height: 70px
+ h4 {
+ float: left
+ font-size: 20px
+ margin-right: 20px
+ }
+ p {
+ float: left
+ font-size: 14px
+ }
+ }
+ .nav-bar {
+ height: 20px
+ margin-bottom: 20px
+ >li {
+ float: left
+ height: 20px
+ line-height: 20px
+ a {
+ margin: 0 10px
+ }
+ }
+ .current {
+ color: #ff5231
+ }
+ }
+ .list {
+ overflow: hidden
+ .list-item {
+ float: left
+ width: 216px
+ height: 354px
+ border: 1px solid #ccc
+ margin-right: 18px
+ margin-bottom: 18px
+ >img {
+ width: 214px
+ height: 214px
+ background-color: pink
+ }
+ .offer-info {
+ width: 214px
+ height: 99px
+ padding: 8px 10px
+ border-bottom: 1px solid #ccc
+ .offer-title {
+ height: 18px
+ overflow: hidden
+ line-height: 1
+ img {
+ float: left
+ width: 32px
+ height: 18px
+ margin-right: 5px
+ vertical-align: middle
+ }
+ span {
+ line-height: 18px
+ font-size: 14px
+ vertical-align: middle
+ }
+ }
+ .benefit-tags {
+ height: 20px
+ margin-top: 10px
+ .tag {
+ font-size: 12px
+ line-height: 20px
+ background-color #fcf1ee
+ }
+ .hot {
+ float: right
+ width: 40px
+ height: 20px
+ color: #fff
+ text-align center
+ font-size: 14px
+ background-color: red
+ }
+ }
+ .number-info {
+ margin-top: 10px
+ height: 30px
+ line-height: 30px
+ span {
+ font-size: 12px
+ color: red
+ b {
+ font-size: 20px
+ }
+ }
+ em {
+ float: right
+ font-style: normal
+ font-size: 12px
+ color: #ccc
+ }
+ }
+ }
+ .region {
+ padding: 8px 10px 0
+ span {
+ font-size: 12px
+ color: #ccc
+ }
+ .company {
+ display: inline-block
+ width: 100px
+ height: 18px
+ white-space: nowrap
+ text-overflow: ellipsis
+ overflow: hidden
+ }
+ .province-region {
+ float: right
+ width: 64px
+ height: 18px
+ text-align: right
+ }
+ }
+ }
+ .list-item:hover {
+ border-color: #ff2900
+ }
+ }
+ }
+}
+.dl {
+ margin-top: 20px
+}
+.footer {
+ margin-top: 30px
+ background-color: #ebebeb
+ img {
+
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/login.css" "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.css"
new file mode 100644
index 0000000000000000000000000000000000000000..27f648e904e38b3c1873c3e98b5487d36519c02e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.css"
@@ -0,0 +1,121 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+}
+.w {
+ width: 1200px;
+ margin: 0 auto;
+}
+.header {
+ height: 80px;
+ padding: 19px;
+}
+.content {
+ height: 600px;
+ background: url("../../img/banner.png") center;
+}
+.content .w {
+ position: relative;
+}
+.content .w .login {
+ width: 325px;
+ height: 325px;
+ background-color: #fff;
+ padding: 25px;
+ position: absolute;
+ top: 120px;
+ right: 60px;
+}
+.content .w .login >div {
+ margin-bottom: 20px;
+}
+.content .w .login .login-method {
+ height: 35px;
+}
+.content .w .login .login-method span {
+ padding: 5px;
+ font-weight: 700;
+}
+.content .w .login .login-method span:first-child {
+ border-bottom: 2px solid #000;
+}
+.content .w .login img {
+ position: absolute;
+ width: 41px;
+ height: 41px;
+}
+.content .w .login input {
+ width: 100%;
+ height: 41px;
+ border: 1px solid #ccc;
+ outline: none;
+ font-size: 14px;
+ padding-left: 50px;
+}
+.content .w .login button {
+ width: 100%;
+ height: 40px;
+ line-height: 40px;
+ background-color: #f52b00;
+ text-align: center;
+ border-radius: 5px;
+ color: #fff;
+ cursor: pointer;
+ outline: none;
+ border: 0;
+}
+.content .w .login ul {
+ list-style-type: none;
+ float: right;
+}
+.content .w .login ul li {
+ float: left;
+ padding: 0 5px;
+}
+.content .w .login ul li a {
+ text-decoration: none;
+ font-size: 12px;
+ color: #ccc;
+}
+.content .w .login ul li a:hover {
+ color: #f52b00;
+}
+.footer {
+ color: #9c9c9c;
+ font-size: 12px;
+}
+.footer a {
+ text-decoration: none;
+ color: #6c6c6c;
+}
+.footer a:hover {
+ color: #f52b00;
+}
+.footer .footer-hd {
+ height: 50px;
+ line-height: 50px;
+ border-top: 1px solid #ccc;
+ border-bottom: 1px solid #ccc;
+ margin-top: 50px;
+ margin-bottom: 10px;
+}
+.footer .footer-hd a {
+ font-size: 14px;
+}
+.footer .footer-hd b {
+ padding: 0 5px;
+}
+.footer .footer-bd a {
+ padding: 5px;
+}
+.footer .footer-bd p {
+ margin-bottom: 8px;
+}
+.footer .footer-bd span {
+ padding: 3px;
+}
+.footer .footer-bd em {
+ font-style: normal;
+}
+/*# sourceMappingURL=login.css.map */
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/login.css.map" "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.css.map"
new file mode 100644
index 0000000000000000000000000000000000000000..73fc344f1653ee7cd3368c40388a52f32347e8d8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.css.map"
@@ -0,0 +1 @@
+{"version":3,"sources":["login.stylus"],"names":[],"mappings":"AAAA;EACI,SAAS,EAAT;EACA,QAAQ,EAAR;EACA,YAAY,WAAZ;;AAEJ;EACI,OAAO,OAAP;EACA,QAAQ,OAAR;;AAEJ;EACI,QAAQ,KAAR;EACA,SAAS,KAAT;;AAEJ;EACI,QAAQ,MAAR;EACA,YAAsC,mCAAtC;;AACA;EACI,UAAU,SAAV;;AACA;EACI,OAAO,MAAP;EACA,QAAQ,MAAR;EACA,kBAAiB,KAAjB;EACA,SAAS,KAAT;EACA,UAAU,SAAV;EACA,KAAK,MAAL;EACA,OAAO,KAAP;;AACA;EACI,eAAe,KAAf;;AAEJ;EACI,QAAQ,KAAR;;AACA;EACI,SAAS,IAAT;EACA,aAAa,IAAb;;AAEJ;EACI,eAAe,eAAf;;AAGR;EACQ,UAAU,SAAV;EACA,OAAO,KAAP;EACA,QAAQ,KAAR;;AAER;EACI,OAAO,KAAP;EACA,QAAQ,KAAR;EACA,QAAQ,eAAR;EACA,SAAS,KAAT;EACA,WAAW,KAAX;EACA,cAAc,KAAd;;AAEJ;EACI,OAAO,KAAP;EACA,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,kBAAkB,QAAlB;EACA,YAAY,OAAZ;EACA,eAAe,IAAf;EACA,OAAO,KAAP;EACA,QAAQ,QAAR;EACA,SAAS,KAAT;EACA,QAAQ,EAAR;;AAEJ;EACI,iBAAiB,KAAjB;EACA,OAAO,MAAP;;AACA;EACI,OAAO,KAAP;EACA,SAAS,MAAT;;AACA;EACI,iBAAiB,KAAjB;EACA,WAAW,KAAX;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,QAAP;;AAOxB;EACI,OAAO,QAAP;EACA,WAAW,KAAX;;AACA;EACI,iBAAiB,KAAjB;EACA,OAAO,QAAP;;AAGJ;EACI,OAAM,QAAN;;AAEJ;EACI,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,YAAY,eAAZ;EACA,eAAe,eAAf;EACA,YAAY,KAAZ;EACA,eAAe,KAAf;;AACA;EACI,WAAW,KAAX;;AAEJ;EACI,SAAS,MAAT;;AAIJ;EACI,SAAS,IAAT;;AAEJ;EACI,eAAe,IAAf;;AAEJ;EACI,SAAS,IAAT;;AAEJ;EACI,YAAY,OAAZ","file":"login.css"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/login.stylus" "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.stylus"
new file mode 100644
index 0000000000000000000000000000000000000000..daec6c5de09f0b47ba2e21cb8abd164e00cc9383
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/login.stylus"
@@ -0,0 +1,123 @@
+* {
+ padding: 0
+ margin: 0
+ box-sizing: border-box
+}
+.w {
+ width: 1200px
+ margin: 0 auto
+}
+.header {
+ height: 80px
+ padding: 19px
+}
+.content {
+ height: 600px
+ background: url('../../img/banner.png') center
+ .w {
+ position: relative
+ .login {
+ width: 325px
+ height: 325px
+ background-color #fff
+ padding: 25px
+ position: absolute
+ top: 120px
+ right: 60px
+ >div {
+ margin-bottom: 20px
+ }
+ .login-method {
+ height: 35px
+ span {
+ padding: 5px
+ font-weight: 700
+ }
+ span:first-child {
+ border-bottom: 2px solid black
+ }
+ }
+ img {
+ position: absolute
+ width: 41px
+ height: 41px
+ }
+ input {
+ width: 100%
+ height: 41px
+ border: 1px solid #ccc
+ outline: none
+ font-size: 14px
+ padding-left: 50px
+ }
+ button {
+ width: 100%
+ height: 40px
+ line-height: 40px
+ background-color: #f52b00
+ text-align: center
+ border-radius: 5px
+ color: #fff
+ cursor: pointer
+ outline: none
+ border: 0
+ }
+ ul {
+ list-style-type: none
+ float: right
+ li {
+ float: left
+ padding: 0 5px
+ a {
+ text-decoration: none
+ font-size: 12px
+ color: #ccc
+ }
+ a:hover {
+ color: #f52b00
+ }
+ }
+ }
+ }
+ }
+}
+.footer {
+ color: #9c9c9c
+ font-size: 12px
+ a {
+ text-decoration: none
+ color: #6c6c6c
+
+ }
+ a:hover {
+ color:#f52b00
+ }
+ .footer-hd {
+ height: 50px
+ line-height: 50px
+ border-top: 1px solid #ccc
+ border-bottom: 1px solid #ccc
+ margin-top: 50px
+ margin-bottom: 10px
+ a {
+ font-size: 14px
+ }
+ b {
+ padding: 0 5px
+ }
+ }
+ .footer-bd {
+ a {
+ padding: 5px
+ }
+ p {
+ margin-bottom: 8px
+ }
+ span {
+ padding: 3px
+ }
+ em {
+ font-style: normal
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/register.css" "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.css"
new file mode 100644
index 0000000000000000000000000000000000000000..325e99ce4b020f7e44cac9fa5b719862b1fd0b07
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.css"
@@ -0,0 +1,203 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+}
+li {
+ list-style: none;
+}
+a {
+ text-decoration: none;
+ color: #555;
+}
+a:hover {
+ color: #ff7300;
+}
+input {
+ outline: none;
+}
+.ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ border-bottom: 1px solid #ccc;
+}
+.ali-bar p {
+ float: left;
+}
+.ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+}
+.ali-bar ul {
+ float: right;
+}
+.ali-bar ul li {
+ float: left;
+}
+.ali-bar ul li a {
+ padding: 0 6px;
+}
+.ali-bar ul li::after {
+ content: '|';
+ display: inline-block;
+ color: #ccc;
+}
+.ali-bar ul li:last-child::after {
+ display: none;
+}
+.header2 {
+ margin-bottom: 10px;
+}
+.header2 .logo {
+ width: 960px;
+ height: 92px;
+ margin: 0 auto;
+ padding: 27px 4px;
+}
+.header2 .logo a {
+ float: left;
+ border-right: 1px solid #ccc;
+ padding-right: 20px;
+}
+.header2 .logo span {
+ float: left;
+ height: 42px;
+ line-height: 42px;
+ font-size: 24px;
+ font-weight: 700;
+ margin-left: 20px;
+}
+.header2 .title {
+ height: 46px;
+ text-align: center;
+ border-bottom: 1px solid #ccc;
+}
+.header2 .title span {
+ display: inline-block;
+ width: 240px;
+ height: 46px;
+ line-height: 46px;
+ font-size: 20px;
+ font-weight: 500;
+ cursor: pointer;
+}
+.header2 .title span:last-child {
+ border-bottom: 1px solid #ff7300;
+ color: #ff7300;
+}
+.content >p {
+ font-size: 14px;
+ font-weight: 600;
+ text-align: center;
+ margin-bottom: 20px;
+}
+.content .register {
+ position: relative;
+ width: 720px;
+ height: 500px;
+ margin: 0 auto;
+}
+.content .register .form-item {
+ width: 720px;
+ height: 44px;
+ margin-bottom: 10px;
+}
+.content .register .form-item span {
+ display: inline-block;
+ width: 230px;
+ height: 38px;
+ line-height: 38px;
+ text-align: right;
+ padding-right: 10px;
+ font-size: 12px;
+ color: #333;
+}
+.content .register .form-item span::before {
+ content: '*';
+ height: 38px;
+ margin-right: 3px;
+ color: #f00;
+}
+.content .register .form-item input {
+ width: 298px;
+ height: 38px;
+ border: 1px solid #ccc;
+ padding: 0 10px;
+}
+.content .register .check {
+ font-size: 12px;
+ margin-left: 235px;
+ height: 44px;
+}
+.content .register .check input {
+ float: left;
+ width: 16px;
+ height: 16px;
+ margin-right: 5px;
+}
+.content .register .check >div {
+ float: left;
+}
+.content .register .check >div a {
+ color: #ff7300;
+}
+.content .register .submit {
+ margin-left: 235px;
+}
+.content .register .submit button {
+ width: 112px;
+ height: 40px;
+ border: 0;
+ background-color: #ff6000;
+ color: #fff;
+}
+.content .more {
+ position: absolute;
+ top: 20px;
+ right: -100px;
+ width: 180px;
+ height: 270px;
+ border: 1px solid #ccc;
+ padding: 20px 20px 0;
+}
+.content .more ul {
+ font-size: 12px;
+}
+.content .more ul li {
+ border-bottom: 1px solid #ccc;
+ line-height: 20px;
+ padding: 5px 0;
+}
+.content .more ul li:last-child {
+ border-bottom: 0;
+}
+.content .more ul a:hover {
+ color: #000;
+}
+.footer {
+ width: 952px;
+ height: 70px;
+ font-size: 12px;
+ text-align: center;
+ margin: 0 auto;
+ border-top: 2px solid #ff6000;
+}
+.footer b {
+ color: #ccc;
+}
+.footer ul {
+ display: inline;
+}
+.footer ul li {
+ display: inline;
+}
+.footer .fh {
+ margin: 10px 0;
+}
+.footer .fh p {
+ display: inline;
+ color: #ccc;
+}
+/*# sourceMappingURL=register.css.map */
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/register.css.map" "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.css.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3248299c66f0d1bc95d3a006682c7529b7126d69
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.css.map"
@@ -0,0 +1 @@
+{"version":3,"sources":["register.stylus"],"names":[],"mappings":"AAAA;EACI,SAAS,EAAT;EACA,QAAQ,EAAR;EACA,YAAY,WAAZ;;AAEJ;EACI,YAAY,KAAZ;;AAEJ;EACI,iBAAiB,KAAjB;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,QAAP;;AAEJ;EACI,SAAS,KAAT;;AAEJ;EACI,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,WAAW,KAAX;EACA,SAAS,OAAT;EACA,eAAe,eAAf;;AACA;EACI,OAAO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AX;EACA,aAAa,MAAb;EACA,QAAQ,KAAR;;AACA;EACI,OAAO,KAAP;EACA,OAAO,KAAP;EACA,QAAQ,KAAR;EACA,cAAc,IAAd;;AAEJ;EACI,OAAO,KAAP;;AACA;EACI,OAAO,QAAP;;AAIZ;EACI,aAAa,MAAb;;AACA;EACI,OAAO,MAAP;EACA,QAAQ,KAAR;EACA,QAAQ,EAAR;EACA,kBAAiB,QAAjB;EACA,OAAO,KAAP;;AAIZ;EACI,UAAU,SAAV;EACA,KAAK,KAAL;EACA,OAAO,OAAP;EACA,OAAO,MAAP;EACA,QAAQ,MAAR;EACA,QAAQ,eAAR;EACA,SAAS,YAAT;;AAIA;EACI,WAAW,KAAX;;AACA;EACI,eAAe,eAAf;EACA,aAAa,KAAb;EACA,SAAS,MAAT;;AAEJ;EACI,eAAe,EAAf;;AAEJ;EACI,OAAO,KAAP;;AAKhB;EACI,OAAO,MAAP;EACA,QAAQ,KAAR;EACA,WAAW,KAAX;EACA,YAAY,OAAZ;EACA,QAAQ,OAAR;EACA,YAAY,kBAAZ;;AACA;EACI,OAAO,KAAP;;AAEJ;EACQ,SAAS,OAAT;;AACA;EACI,SAAS,OAAT;;AAGZ;EACI,QAAQ,OAAR;;AACA;EACI,SAAS,OAAT;EACA,OAAO,KAAP","file":"register.css"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/register.stylus" "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.stylus"
new file mode 100644
index 0000000000000000000000000000000000000000..63f31b1e5697c7d9eda1b17ee4e1ad00c6651c11
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/register.stylus"
@@ -0,0 +1,208 @@
+* {
+ padding: 0
+ margin: 0
+ box-sizing: border-box
+}
+li {
+ list-style: none
+}
+a {
+ text-decoration: none
+ color: #555
+}
+a:hover {
+ color: rgb(255, 115, 0)
+}
+input {
+ outline: none
+}
+.ali-bar {
+ height: 30px
+ line-height: 30px
+ font-size: 12px
+ padding: 0 20px
+ border-bottom: 1px solid #ccc
+ p {
+ float: left
+ img {
+ vertical-align: middle
+ margin-bottom: 3px
+ }
+ }
+ ul {
+ float: right
+ li {
+ float: left
+ a {
+ padding: 0 6px
+ }
+ }
+ li::after {
+ content: '|'
+ display: inline-block
+ color: #ccc
+ }
+ li:last-child::after {
+ display: none
+ }
+ }
+}
+.header2 {
+ margin-bottom: 10px
+ .logo {
+ width: 960px
+ height: 92px
+ margin: 0 auto
+ padding: 27px 4px
+ a {
+ float: left
+ border-right: 1px solid #ccc
+ padding-right: 20px
+ }
+ span {
+ float: left
+ height: 42px
+ line-height: 42px
+ font-size: 24px
+ font-weight: 700
+ margin-left: 20px
+ }
+ }
+ .title {
+ height: 46px
+ text-align: center
+ border-bottom: 1px solid #ccc
+ span {
+ display: inline-block
+ width: 240px
+ height: 46px
+ line-height: 46px
+ font-size: 20px
+ font-weight: 500
+ cursor: pointer
+ }
+ span:last-child {
+ border-bottom: 1px solid #ff7300
+ color: #ff7300
+ }
+ }
+}
+.content {
+
+ >p {
+ font-size: 14px
+ font-weight: 600
+ text-align: center
+ margin-bottom: 20px
+ }
+ .register {
+ position: relative
+ width: 720px
+ height: 500px
+ margin: 0 auto
+ .form-item {
+ width: 720px
+ height: 44px
+ margin-bottom: 10px
+ span {
+ display: inline-block
+ width: 230px
+ height: 38px
+ line-height: 38px
+ text-align: right
+ padding-right: 10px
+ font-size: 12px
+ color: rgb(51, 51, 51)
+ }
+ span::before {
+ content: '*'
+ height: 38px
+ margin-right: 3px
+ color: red
+ }
+ input {
+ width: 298px
+ height: 38px
+ border: 1px solid #ccc
+ padding: 0 10px
+ }
+ }
+ .check {
+ font-size: 12px
+ margin-left: 235px
+ height: 44px
+ input {
+ float: left
+ width: 16px
+ height: 16px
+ margin-right: 5px
+ }
+ >div {
+ float: left
+ a {
+ color: #ff7300
+ }
+ }
+ }
+ .submit {
+ margin-left: 235px
+ button {
+ width: 112px
+ height: 40px
+ border: 0
+ background-color #ff6000
+ color: #fff
+ }
+ }
+ }
+ .more {
+ position: absolute
+ top: 20px
+ right: -100px
+ width: 180px
+ height: 270px
+ border: 1px solid #ccc
+ padding: 20px 20px 0
+ h4 {
+
+ }
+ ul {
+ font-size: 12px
+ li {
+ border-bottom: 1px solid #ccc
+ line-height: 20px
+ padding: 5px 0
+ }
+ li:last-child {
+ border-bottom: 0
+ }
+ a:hover {
+ color: black
+ }
+ }
+ }
+}
+.footer {
+ width: 952px
+ height: 70px
+ font-size: 12px
+ text-align: center
+ margin: 0 auto
+ border-top: 2px solid #ff6000
+ b {
+ color: #ccc
+ }
+ ul {
+ display: inline
+ li {
+ display: inline
+ }
+ }
+ .fh {
+ margin: 10px 0
+ p {
+ display: inline
+ color: #ccc
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css" "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css"
new file mode 100644
index 0000000000000000000000000000000000000000..41c846959d09b1aaf611308fdbf81ed39e1ca7d5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css"
@@ -0,0 +1,168 @@
+* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+}
+li {
+ list-style: none;
+}
+a {
+ text-decoration: none;
+ color: #555;
+}
+a:hover {
+ color: #ff7300;
+}
+input {
+ outline: none;
+}
+.w {
+ width: 1200px;
+ margin: 0 auto;
+}
+.current {
+ color: #ff7300;
+}
+body {
+ background-color: #f2f2f2;
+}
+.ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+}
+.ali-bar p {
+ float: left;
+}
+.ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+}
+.ali-bar ul {
+ float: right;
+}
+.ali-bar ul li {
+ float: left;
+}
+.ali-bar ul li a {
+ padding: 0 6px;
+}
+.ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+}
+.ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+}
+.ali-bar ul li:last-child::after {
+ display: none;
+}
+.header-shop {
+ height: 80px;
+ background-color: #fff;
+}
+.header-shop img {
+ width: 240px;
+ height: 80px;
+}
+.main .plus {
+ margin: 20px 0;
+}
+.main .cart .cart-head {
+ height: 92px;
+ padding: 0 20px;
+ background-color: #f7f7f7;
+ overflow: hidden;
+}
+.main .cart .cart-head .cart-tab {
+ height: 24px;
+ line-height: 24px;
+ margin: 20px 0;
+}
+.main .cart .cart-head .cart-tab .spots {
+ float: left;
+ font-size: 20px;
+}
+.main .cart .cart-head .cart-tab .address {
+ float: right;
+ font-size: 14px;
+ width: 140px;
+ height: 24px;
+ border-radius: 10px;
+ text-align: center;
+ background-color: #fff;
+}
+.main .cart .cart-head table thead th {
+ font-weight: 400;
+ text-align: left;
+}
+.main .cart .cart-body .item {
+ height: 180px;
+ padding: 20px 20px 0 20px;
+ margin-bottom: 20px;
+ background-color: #fff;
+}
+.main .cart .cart-body .item .img {
+ width: 70px;
+ height: 70px;
+ margin-top: 20px;
+ margin-left: 20px;
+}
+.main .cart .cart-body .item .delete {
+ float: right;
+}
+.main .cart .cart-body .item .delete img {
+ width: 18px;
+ height: 18px;
+ cursor: pointer;
+}
+.main .cart .cart-footer {
+ height: 70px;
+ background-color: #fff;
+ padding: 0 20px;
+ line-height: 70px;
+}
+.main .cart .cart-footer >div {
+ float: left;
+}
+.main .cart .cart-footer .check {
+ margin-right: 50px;
+}
+.main .cart .cart-footer .delete-all {
+ margin-right: 500px;
+ cursor: pointer;
+}
+.main .cart .cart-footer .subtotal {
+ margin-right: 20px;
+}
+.main .cart .cart-footer .subtotal span {
+ padding: 0 10px;
+}
+.main .cart .cart-footer .jiesuan {
+ width: 80px;
+ height: 40px;
+ margin-top: 15px;
+ line-height: 40px;
+ color: #fff;
+ text-align: center;
+ border-radius: 20px;
+ background-color: #ff602d;
+}
+/*# sourceMappingURL=shoppinglist.css.map */
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css.map" "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css.map"
new file mode 100644
index 0000000000000000000000000000000000000000..d19aad397535eb61cd91cbf6e006fca186606802
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.css.map"
@@ -0,0 +1 @@
+{"version":3,"sources":["shoppinglist.stylus"],"names":[],"mappings":"AAAA;EACI,SAAS,EAAT;EACA,QAAQ,EAAR;EACA,YAAY,WAAZ;;AAEJ;EACI,YAAY,KAAZ;;AAEJ;EACI,iBAAiB,KAAjB;EACA,OAAO,KAAP;;AAEJ;EACI,OAAO,QAAP;;AAEJ;EACI,SAAS,KAAT;;AAEJ;EACI,OAAO,OAAP;EACA,QAAQ,OAAR;;AAEJ;EACI,OAAO,QAAP;;AAEJ;EACI,kBAAkB,QAAlB;;AAEJ;EACI,QAAQ,KAAR;EACA,aAAa,KAAb;EACA,WAAW,KAAX;EACA,SAAS,OAAT;EACA,kBAAkB,KAAlB;EACA,eAAe,eAAf;;AACA;EACI,OAAO,KAAP;;AACA;EACI,gBAAgB,OAAhB;EACA,eAAe,IAAf;;AAGR;EACI,OAAO,MAAP;;AACA;EACI,OAAO,KAAP;;AACA;EACI,SAAS,MAAT;;AAGR;EACI,SAAS,GAAT;EACA,SAAS,aAAT;EACA,OAAO,IAAP;EACA,QAAQ,IAAR;EACA,YAAY,eAAZ;EACA,aAAa,eAAb;EACA,WAAW,gBAAX;EACA,eAAe,IAAf;EACA,OAAO,KAAP;;AAEJ;EACI,SAAS,GAAT;EACA,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}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.stylus" "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.stylus"
new file mode 100644
index 0000000000000000000000000000000000000000..79c90afe92130bc5908bffff998fa4468eeda344
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/css/shoppinglist.stylus"
@@ -0,0 +1,177 @@
+* {
+ padding: 0
+ margin: 0
+ box-sizing: border-box
+}
+li {
+ list-style: none
+}
+a {
+ text-decoration: none
+ color: #555
+}
+a:hover {
+ color: rgb(255, 115, 0)
+}
+input {
+ outline: none
+}
+.w {
+ width: 1200px
+ margin: 0 auto
+}
+.current {
+ color: #ff7300
+}
+body {
+ background-color: #f2f2f2
+}
+.ali-bar {
+ height: 30px
+ line-height: 30px
+ font-size: 12px
+ padding: 0 20px
+ background-color: #fff
+ border-bottom: 1px solid #ccc
+ p {
+ float: left
+ img {
+ vertical-align: middle
+ margin-bottom: 3px
+ }
+ }
+ ul {
+ float: right
+ li {
+ float: left
+ a {
+ padding: 0 6px
+ }
+ }
+ li::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: rotate(-135deg)
+ margin-bottom: 3px
+ color: #ccc
+ }
+ li:hover::after {
+ content: ''
+ display: inline-block
+ width: 5px
+ height: 5px
+ border-top: 1px solid #ccc
+ border-left: 1px solid #ccc
+ transform: translateY(3px) rotate(45deg)
+ border-color: rgb(255, 115, 0)
+ }
+ li:last-child::after {
+ display: none
+ }
+ }
+}
+.header-shop {
+ height: 80px
+ background-color: #fff
+ img {
+ width: 240px
+ height: 80px
+ }
+}
+.main {
+ .plus {
+ margin: 20px 0
+ }
+ .cart {
+ .cart-head {
+ height: 92px
+ padding: 0 20px
+ background-color: #f7f7f7
+ overflow: hidden
+ .cart-tab {
+ height: 24px
+ line-height: 24px
+ margin: 20px 0
+ .spots {
+ float: left
+ font-size: 20px
+ }
+ .address {
+ float: right
+ font-size: 14px
+ width: 140px
+ height: 24px
+ border-radius: 10px
+ text-align center
+ background-color: #fff
+ }
+ }
+ table {
+ thead {
+ th {
+ font-weight: 400
+ text-align: left
+ }
+ }
+ }
+ }
+ .cart-body {
+ .item {
+ height: 180px
+ padding: 20px 20px 0 20px
+ margin-bottom: 20px
+ background-color #fff
+ .img {
+ width: 70px
+ height: 70px
+ margin-top: 20px
+ margin-left: 20px
+ }
+ .delete {
+ float: right
+ img {
+ width: 18px
+ height: 18px
+ cursor: pointer
+ }
+ }
+ }
+ }
+ .cart-footer {
+ height: 70px
+ background-color #fff
+ padding: 0 20px
+ line-height: 70px
+ >div {
+ float: left
+ }
+ .check {
+ margin-right: 50px
+ }
+ .delete-all {
+ margin-right: 500px
+ cursor: pointer
+ }
+ .subtotal {
+ margin-right: 20px
+ span {
+ padding: 0 10px
+ }
+ }
+ .jiesuan {
+ width: 80px
+ height: 40px
+ margin-top: 15px
+ line-height: 40px
+ color: #fff
+ text-align center
+ border-radius: 20px
+ background-color: #ff602d
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/interface/ICommand.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/interface/ICommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..f141f12b31c930d530389d0ca7e691681b562342
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/interface/ICommand.ts"
@@ -0,0 +1,3 @@
+export default interface ICommand{
+ exec(data?:any,router?:string):void;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/interface/IEvents.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IEvents.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..94602cd92f87bc4d0a8b4cea643e8c77805265a7
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IEvents.ts"
@@ -0,0 +1,8 @@
+export default interface IEvent extends Event{
+ [key:string]:any
+}
+export enum GOOD_EVENT {
+ ADD_GOODS = "add_goods"
+};
+export enum DETAILS_EVENT{GO_DETAILS='go_details'}
+export enum STEP_EVENT{STEP_CHANGE="step_change"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/interface/IGoodsData.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IGoodsData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4bb6312744041e7b60f0435fdc7b9762c8755c16
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IGoodsData.ts"
@@ -0,0 +1,27 @@
+export interface IItemInfo{
+ id:number|string;
+ img:string;
+ price:number;
+}
+export interface IIcon{
+ icon1?:Array;
+ icon2?:Array;
+ icon3?:Array;
+ icon4?:Array;
+}
+interface ISchedule{
+ img?:string|null;
+ info?:string|null;
+}
+
+export default interface IGoods{
+ pid:number;
+ title:string;
+ img:string;
+ keywords:string;
+ price:number;
+ price1?:string;
+ soldcount?:string|null;
+ company:string;
+ address:string;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/interface/IVerify.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IVerify.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..de213ac961d8edb23a900cbfda226c2ef5439068
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/interface/IVerify.ts"
@@ -0,0 +1,7 @@
+export default interface IVerify{
+ [key:string]:{
+ required:boolean,
+ judge:RegExp,
+ message:string
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/model/MainModel.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/model/MainModel.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d0897aa1245eda7db76936a68247df115c5da2cf
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/model/MainModel.ts"
@@ -0,0 +1,48 @@
+import { IResLogInMessage, IResLoginVo, IShoppingItem } from "./ResponseData";
+
+export default class MainModel{
+ private static _instance: MainModel; // 单例模式的静态实例
+ private _loginResult?: IResLogInMessage; // 登录结果
+ private _shoppingList: Array = []; // 购物清单
+ private _details: any
+
+ private constructor() {} // 私有构造函数,确保单例模式
+
+ public static get instance(): MainModel {
+ return MainModel._instance || (MainModel._instance = new MainModel()); // 获取MainModel的唯一实例,如果实例不存在则创建
+ }
+
+ public set loginResult(value: IResLogInMessage | undefined) { // 设置登录结果
+ this._loginResult = value;
+ localStorage.token = JSON.stringify({ // 将登录结果以JSON形式存储在localStorage的token字段中
+ userId: value?.userId,
+ token: value?.token,
+ user: value?.user
+ });
+ }
+
+ public get loginResult(): IResLogInMessage | undefined { // 获取登录结果
+ return this._loginResult;
+ }
+
+ public set shoppingList(value: Array) { // 设置购物清单
+ this._shoppingList = value;
+ }
+
+ public get shoppingList(): Array { // 获取购物清单
+ return this._shoppingList;
+ }
+
+ public set details(value: any) { // 设置购物清单
+ this._details = value;
+ }
+
+ public get details(): any { // 获取购物清单
+ return this._details;
+ }
+}
+
+// IResLogInMessage接口: 表示登录结果消息的接口
+// IShoppingItem接口: 表示购物项的接口
+
+// 注:以上代码为Typescript语言代码,主要实现了一个MainModel类,用于维护登录结果和购物清单。
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/model/RequestData.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/model/RequestData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..70290a41719398d12a2d379b5e91b2a0f6430c18
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/model/RequestData.ts"
@@ -0,0 +1,36 @@
+export interface IReqLogoutVo{
+ user:string
+ userId:number
+}
+export interface IReqLoginVo extends IReqLogoutVo{
+ password:string;
+}
+export interface IReqRegisterVo extends IReqLoginVo{
+ name:string,
+ age:number,
+ sex:string,
+ tel:string,
+ email:string
+}
+
+export interface IReqAuthVo extends IReqLogoutVo{
+ token:string
+}
+
+export interface IReqShoppingListVo extends IReqAuthVo{
+
+}
+export interface IReqAddVo extends IReqShoppingListVo{
+ id:number;
+ itemId:number;
+}
+export interface IReqRemoveVo extends IReqShoppingListVo{
+ ids:number[]
+}
+export interface IReqChangeNumVo extends IReqShoppingListVo{
+ id:number;
+ num:number;
+}
+export interface IReqCheckedVo extends IReqRemoveVo{
+ checked:boolean;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/model/ResponseData.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/model/ResponseData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d70e242794661fefbe519f5b1cb03a9e23feb8b0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/model/ResponseData.ts"
@@ -0,0 +1,68 @@
+export interface IResMeassage{
+ message:string;
+}
+export interface IResLogInMessage extends IResMeassage{
+ token:string,
+ user:string;
+ userId:number;
+}
+export interface IResRegisterVo{
+ errno:null|number;
+ result:IResMeassage;
+}
+export interface IResLoginVo{
+ errno:null|number;
+ result:IResLogInMessage|IResMeassage;
+}
+export interface IResLogoutVo extends IResRegisterVo{
+
+}
+export interface IResAuthVo extends IResLoginVo{
+
+}
+export interface IItemInfo{
+ id:number;
+ img:string;
+ price:number;
+}
+export interface IIcon{
+ icon1?:Array;
+ icon2?:Array;
+ icon3?:Array;
+ icon4?:Array;
+}
+interface ISchedule{
+ img?:string|null;
+ info?:string|null;
+}
+export interface IGoods{
+ pid:number;
+ title:string;
+ img:string;
+ keywords:string;
+ price:number;
+ price1?:string;
+ soldcount?:string|null;
+ company:string;
+ address:string;
+}
+export interface IResGoodsList{
+ errno:null|number;
+ result:Array|IResMeassage;
+}
+export interface IShoppingItem{
+ [x: string]: any;
+ pid:number;
+ goodsId:number;
+ userId:number;
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+}
+export interface IResShoppingList{
+ errno:null|number;
+ result:Array|IResMeassage;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/model/ViewModel.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/model/ViewModel.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..77a86eff18a2739cb1d63d4ba3cdab822263d0e5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/model/ViewModel.ts"
@@ -0,0 +1,38 @@
+export default class ViewModel {
+ private static _instance: ViewModel;
+ private _app?: HTMLDivElement; // 私有属性,表示应用程序的DOM元素
+ private list: Map void>> = new Map(); // 存储事件类型和对应的处理程序集合的映射关系
+
+ private constructor() {
+ // 私有构造函数,确保单例模式
+ }
+
+ public static get instance(): ViewModel {
+ // 获取ViewModel实例的静态方法
+ return ViewModel._instance || (ViewModel._instance = new ViewModel());
+ }
+
+ public get app(): HTMLDivElement {
+ // 获取应用程序的DOM元素
+ return this._app || (this._app = document.querySelector("#app") as HTMLDivElement);
+ }
+
+ public addEvent(type: string, handler: (e: Event | MouseEvent) => void): void {
+ // 添加事件处理程序
+ if (!this.list.get(type)) this.list.set(type, new Set());
+ this.list.get(type)?.add(handler);
+ this.app.addEventListener(type, handler);
+ }
+
+ public clearEvent(): void {
+ // 清除所有事件处理程序
+ this.list.forEach((value: Set<(e: Event | MouseEvent) => void>, key: string) => {
+ value.forEach((item: (e: Event) => void) => {
+ this.app.removeEventListener(key, item);
+ });
+
+ value.clear();
+ });
+ this.list.clear();
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/DetailsPage.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/DetailsPage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..d8ee3e28f5dc62cd4d87c34490d2eb150da2c63f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/DetailsPage.ts"
@@ -0,0 +1,344 @@
+import AJAX from "../business/Ajax.js";
+import ICommand from "../interface/ICommand.js";
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import MainRouter from "./MainRouter.js";
+import Details from "../component/Details.js";
+export default class DetailsPage implements ICommand{
+ constructor(){
+ this.setStyle()
+ }
+ exec(data:any): void {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = ``
+
+ }
+ private setStyle():void{
+ Utils.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ body {
+ background: #fff
+ }
+ .current {
+ color: #ff7300;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header {
+ height: 125px;
+ border-bottom: 1px solid #ccc;
+ }
+ .nav {
+ height: 40px;
+ border-bottom: 2px solid #ccc;
+ }
+ .nav li {
+ float: left;
+ }
+ .nav li a {
+ display: inline-block;
+ width: 112px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ }
+ .nav li a:hover {
+ color: #333;
+ }
+ .detail {
+ padding: 20px 0;
+ height: 742px;
+ }
+ .detail .fdj {
+ float: left;
+ width: 496px;
+ height: 702px;
+ }
+ .detail .fdj .zoom-show .zoom {
+ position: relative;
+ }
+ .detail .fdj .zoom-show .zoom .min {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ background: url("./img/a.jpg.avif");
+ background-size: 100% 100%;
+ }
+ .detail .fdj .zoom-show .zoom .min .mask {
+ width: 303px;
+ height: 303px;
+ background-color: rgba(190,160,30,0.4);
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ pointer-events: none;
+ }
+ .detail .fdj .zoom-show .zoom .max {
+ width: 496px;
+ height: 496px;
+ border: 1px solid #ccc;
+ position: absolute;
+ left: 496px;
+ top: 0;
+ background-image: url("./img/a.jpg.avif");
+ visibility: hidden;
+ }
+ .detail .fdj .icon-carousel {
+ width: 496px;
+ height: 60px;
+ margin-top: 20px;
+ }
+ .detail .fdj .icon-carousel .left {
+ width: 22px;
+ height: 32px;
+ background-image: url("../../img/left-icon.png");
+ float: left;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+ .detail .fdj .icon-carousel .carousel {
+ width: 424px;
+ height: 60px;
+ float: left;
+ position: relative;
+ margin: 0 14px;
+ overflow: hidden;
+ }
+ .detail .fdj .icon-carousel .carousel .img-con {
+ width: 684px;
+ height: 60px;
+ font-size: 0;
+ position: absolute;
+ transition: all 0.5s;
+ left: 0;
+ }
+ .detail .fdj .icon-carousel .carousel .img-con img {
+ width: 54px;
+ height: 54px;
+ border: 2px solid transparent;
+ margin: 0 9px;
+ }
+ .detail .fdj .icon-carousel .right {
+ width: 22px;
+ height: 32px;
+ background-image: url("../../img/icons.png");
+ background-position: -78px 0;
+ float: right;
+ position: relative;
+ top: 50%;
+ transform: translate(0, -50%);
+ }
+ .detail .info {
+ float: left;
+ width: 704px;
+ height: 702px;
+ padding-left: 28px;
+ }
+ .detail .info .title {
+ font-size: 16px;
+ line-height: 40px;
+ }
+ .detail .info .title-third {
+ font-size: 12px;
+ color: #ccc;
+ margin-bottom: 20px;
+ }
+ .detail .info .title-third .star img {
+ width: 15px;
+ height: 15px;
+ }
+ .detail .info .title-third span:last-child {
+ float: right;
+ }
+ .detail .info .method {
+ margin-bottom: 10px;
+ }
+ .detail .info .method span {
+ display: inline-block;
+ width: 335px;
+ height: 42px;
+ text-align: center;
+ line-height: 42px;
+ }
+ .detail .info .method span:first-child {
+ border-top: 2px solid #ff4000;
+ }
+ .detail .info .method span:last-child {
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .price-num {
+ height: 70px;
+ padding: 12px 16px;
+ background-color: #f9f9fa;
+ }
+ .detail .info .price-num span:first-child {
+ display: inline-block;
+ width: 100px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .more {
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .more img {
+ display: block;
+ }
+ .detail .info .color-contain {
+ height: 70px;
+ line-height: 70px;
+ background-color: #fff;
+ }
+ .detail .info .color-contain span {
+ float: left;
+ margin-left: 20px;
+ margin-right: 40px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .color-contain .prop {
+ float: left;
+ margin-top: 17px;
+ }
+ .detail .info .color-contain .prop .drop-item {
+ float: left;
+ width: 100px;
+ height: 36px;
+ line-height: 36px;
+ padding-left: 45px;
+ border: 1px solid #ccc;
+ margin-right: 10px;
+ cursor: pointer;
+ font-size: 12px;
+ background: url("../../img/prop1.jpg") no-repeat;
+ background-size: 36px 36px;
+ }
+ .detail .info .size-contain {
+ height: 181px;
+ background-color: #fff;
+ border-top: 1px dashed #ccc;
+ border-bottom: 1px solid #ccc;
+ }
+ .detail .info .size-contain >span {
+ float: left;
+ height: 190px;
+ margin-left: 20px;
+ margin-right: 40px;
+ line-height: 60px;
+ font-size: 14px;
+ color: #ccc;
+ }
+ .detail .info .size-contain .s {
+ float: left;
+ width: 588px;
+ height: 60px;
+ line-height: 60px;
+ font-size: 14px;
+ border-bottom: 1px dashed #ccc;
+ }
+ .detail .info .size-contain .s .size-name {
+ display: inline-block;
+ width: 20px;
+ }
+ .detail .info .size-contain .s .price {
+ width: 50px;
+ margin-left: 150px;
+ margin-right: 70px;
+ }
+ .detail .info .size-contain .s .sale {
+ width: 50px;
+ font-size: 12px;
+ color: #ccc;
+ }
+ .detail .info .size-contain .s .step {
+ display: inline-block;
+ padding-top: 6px;
+ margin-left: 70px;
+ }
+ .detail .info .size-contain .s .step-num .num-sub {
+ width: 20px;
+ height: 20px;
+ text-align: center;
+ }
+ .detail .info .add-shoppinglist {
+ width: 120px;
+ height: 40px;
+ line-height: 40px;
+ text-align: center;
+ border: 1px solid #ff4000;
+ border-radius: 5px;
+ cursor: pointer;
+ margin-top: 7px;
+ background-color: #fff;
+ }
+ /*# sourceMappingURL=details.css.map */`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/GoodsPage.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/GoodsPage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..588f83ac3d599e4d8f151eccce121c4e51eca567
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/GoodsPage.ts"
@@ -0,0 +1,18 @@
+import AJAX from "../business/Ajax.js";
+import Carousel from "../component/Carousel.js";
+import ICommand from "../interface/ICommand.js";
+import ViewModel from "../model/ViewModel.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+
+export default class GoodsPage implements ICommand{
+ constructor(){
+
+ }
+ exec(): void {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML="";
+ AJAX.get(ROUTERS.LIST);
+
+
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/LoginPage.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/LoginPage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0692a3978c7b719eda5327689a2cf0116fde8721
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/LoginPage.ts"
@@ -0,0 +1,70 @@
+import AJAX from "../business/Ajax.js";
+import ICommand from "../interface/ICommand.js";
+import ViewModel from "../model/ViewModel.js";
+import { Verify } from "../utils/Verify.js";
+import LoginView from "../views/LoginView.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import MainRouter from "./MainRouter.js";
+
+export default class LoginPage implements ICommand {
+ constructor() {}
+ exec(): void {
+
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML = LoginView;
+ ViewModel.instance.addEvent("click", (e: Event) =>
+ this.clickHandler(e as MouseEvent)
+ );
+ ViewModel.instance.addEvent("submit", (e: Event) =>
+ this.submitHandler(e)
+ );
+ ViewModel.instance.addEvent("input", (e: Event) =>
+ this.inputHandler(e)
+ );
+ }
+ protected clickHandler(e: MouseEvent): void {
+ var elem: HTMLElement = e.target as HTMLElement;
+ if (elem.id === "registerBn") {
+ MainRouter.instance.go("/register");
+ }
+ }
+ private submitHandler(e: Event): void {
+ var elem: HTMLFormElement = e.target as HTMLFormElement;
+ e.preventDefault();
+ var item: { [key: string]: any } = {};
+ var fd = new FormData(elem);
+ for (var [key, value] of fd) {
+ if (Verify[key].required && String(value).trim().length === 0)
+ return alert(key + "不能为空!");
+ if (!Verify[key].judge.test(String(value))) {
+ alert(Verify[key].message);
+ (elem.querySelector(`[name=${key}]`) as HTMLInputElement)?.focus();
+ return;
+ }
+ item[key] = value;
+ }
+ console.log(item);
+
+ this.submit(item);
+ }
+ protected submit(item: { [key: string]: any }) {
+ AJAX.post(ROUTERS.LOGIN, item);
+ }
+ private inputHandler(e: Event): void {
+ // var elem: HTMLInputElement = e.target as HTMLInputElement;
+ // var parentClassList = (elem.parentElement as HTMLElement).classList;
+ // var iconClassList = (elem.nextElementSibling as HTMLElement).classList;
+
+ // if (Verify[elem.name].judge.test(elem.value)) {
+ // parentClassList.remove("has-error");
+ // parentClassList.add("has-success");
+ // iconClassList.remove("glyphicon-remove");
+ // iconClassList.add("glyphicon-ok");
+ // } else {
+ // parentClassList.remove("has-success");
+ // parentClassList.add("has-error");
+ // iconClassList.remove("glyphicon-ok");
+ // iconClassList.add("glyphicon-remove");
+ // }
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/MainRouter.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/MainRouter.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4219ad9e71ce14021fbd7ebdd2307a771320480b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/MainRouter.ts"
@@ -0,0 +1,29 @@
+import ICommand from "../interface/ICommand";
+import { RouterType } from "../vo/RouterVo";
+
+export default class MainRouter{
+ private static _instance:MainRouter;
+ private list:{[key:string]:Set<{new ():ICommand}>}={}
+ private constructor(){
+ window.addEventListener("popstate",e=>this.popStateHandler(e));
+ }
+ public static get instance():MainRouter{
+ return MainRouter._instance || (MainRouter._instance=new MainRouter());
+ }
+ public go(router:RouterType,data?:any,bool:boolean=false):void{
+ if(!this.list[router]) return;
+
+ this.list[router].forEach((command:{new():ICommand})=>{
+ new command().exec(data);
+ })
+ if(!bool) history.pushState(router,router,"#"+router);
+ }
+ // 添加路由
+ public addRouter(router:RouterType,command:{new():ICommand}):void{
+ if(!this.list[router]) this.list[router]=new Set();
+ this.list[router].add(command);
+ }
+ private popStateHandler(e:Event):void{
+ this.go(history.state,undefined,true);
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/RegisterPage.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/RegisterPage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..584b14d70a2f1abc14845d3774ca20d9257178ec
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/RegisterPage.ts"
@@ -0,0 +1,280 @@
+import AJAX from "../business/Ajax.js";
+import ICommand from "../interface/ICommand.js";
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+import {Verify} from "../utils/Verify.js";
+import RegisterView from "../views/RegisterView.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import MainRouter from "./MainRouter.js";
+
+export default class RegisterPage implements ICommand{
+
+ constructor(){
+
+ }
+ exec(): void {
+ ViewModel.instance.clearEvent();
+ ViewModel.instance.app.innerHTML=RegisterView;
+ ViewModel.instance.addEvent("click",(e:Event)=>this.clickHandler(e as MouseEvent));
+ ViewModel.instance.addEvent("submit",(e:Event)=>this.submitHandler(e));
+ ViewModel.instance.addEvent("input",(e:Event)=>this.inputHandler(e));
+ this.setStyle()
+ }
+ protected clickHandler(e:MouseEvent):void
+ {
+ var elem:HTMLElement=e.target as HTMLElement;
+ if(elem.id==="loginBn"){
+ MainRouter.instance.go("/login");
+ }
+ }
+ protected submitHandler(e:Event):void{
+
+ var elem:HTMLFormElement=e.target as HTMLFormElement;
+ e.preventDefault();
+ var item:{[key:string]:any}={}
+ var fd=new FormData(elem);
+ console.log(fd);
+
+ // if (!fd.keys.) return
+ for(var [key,value] of fd){
+ if(Verify[key].required && String(value).trim().length===0)return alert(key+"不能为空!");
+ if(!Verify[key].judge.test(String(value))){
+ console.log(Verify[key].message);
+ ( elem.querySelector(`[name=${key}]`) as HTMLInputElement)?.focus();
+ return;
+ }
+ item[key]= value;
+ console.log(item);
+
+ }
+ this.submit(item);
+ }
+ protected submit(item:{[key:string]:any}){
+ AJAX.post(ROUTERS.REGISTER,item);
+ }
+ protected inputHandler(e:Event){
+ // var elem:HTMLInputElement=e.target as HTMLInputElement;
+ // var parentClassList=(elem.parentElement as HTMLElement).classList;
+ // var iconClassList=(elem.nextElementSibling as HTMLElement).classList;
+
+ // if(Verify[elem.name].judge.test(elem.value)){
+ // parentClassList.remove("has-error");
+ // parentClassList.add("has-success");
+ // iconClassList.remove("glyphicon-remove");
+ // iconClassList.add("glyphicon-ok")
+ // }else{
+ // parentClassList.remove("has-success");
+ // parentClassList.add("has-error");
+ // iconClassList.remove("glyphicon-ok");
+ // iconClassList.add("glyphicon-remove")
+ // }
+ }
+ private setStyle():void{
+ Utils.setCss(`* {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '|';
+ display: inline-block;
+ color: #ccc;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header2 {
+ margin-bottom: 10px;
+ }
+ .header2 .logo {
+ width: 960px;
+ height: 92px;
+ margin: 0 auto;
+ padding: 27px 4px;
+ }
+ .header2 .logo a {
+ float: left;
+ border-right: 1px solid #ccc;
+ padding-right: 20px;
+ }
+ .header2 .logo span {
+ float: left;
+ height: 42px;
+ line-height: 42px;
+ font-size: 24px;
+ font-weight: 700;
+ margin-left: 20px;
+ }
+ .header2 .title {
+ height: 46px;
+ text-align: center;
+ border-bottom: 1px solid #ccc;
+ }
+ .header2 .title span {
+ display: inline-block;
+ width: 240px;
+ height: 46px;
+ line-height: 46px;
+ font-size: 20px;
+ font-weight: 500;
+ cursor: pointer;
+ }
+ .header2 .title span:last-child {
+ border-bottom: 1px solid #ff7300;
+ color: #ff7300;
+ }
+ .content {
+ background: 0;
+ }
+ .content >p {
+ font-size: 14px;
+ font-weight: 600;
+ text-align: center;
+ margin-bottom: 20px;
+ }
+ .content .register {
+ position: relative;
+ width: 720px;
+ height: 500px;
+ margin: 0 auto;
+ }
+ .content .register .form-item {
+ width: 720px;
+ height: 44px;
+ margin-bottom: 10px;
+ }
+ .content .register .form-item span {
+ display: inline-block;
+ width: 230px;
+ height: 38px;
+ line-height: 38px;
+ text-align: right;
+ padding-right: 10px;
+ font-size: 12px;
+ color: #333;
+ }
+ .content .register .form-item span::before {
+ content: '*';
+ height: 38px;
+ margin-right: 3px;
+ color: #f00;
+ }
+ .content .register .form-item input {
+ width: 298px;
+ height: 38px;
+ border: 1px solid #ccc;
+ padding: 0 10px;
+ }
+ .content .register .check {
+ font-size: 12px;
+ margin-left: 235px;
+ height: 44px;
+ }
+ .content .register .check input {
+ float: left;
+ width: 16px;
+ height: 16px;
+ margin-right: 5px;
+ }
+ .content .register .check >div {
+ float: left;
+ }
+ .content .register .check >div a {
+ color: #ff7300;
+ }
+ .content .register .submit {
+ margin-left: 235px;
+ }
+ .content .register .submit button {
+ width: 112px;
+ height: 40px;
+ border: 0;
+ background-color: #ff6000;
+ color: #fff;
+ }
+ .content .more {
+ position: absolute;
+ top: 20px;
+ right: -100px;
+ width: 180px;
+ height: 270px;
+ border: 1px solid #ccc;
+ padding: 20px 20px 0;
+ }
+ .content .more ul {
+ font-size: 12px;
+ }
+ .content .more ul li {
+ border-bottom: 1px solid #ccc;
+ line-height: 20px;
+ padding: 5px 0;
+ }
+ .content .more ul li:last-child {
+ border-bottom: 0;
+ }
+ .content .more ul a:hover {
+ color: #000;
+ }
+ .footer {
+ width: 952px;
+ height: 70px;
+ font-size: 12px;
+ text-align: center;
+ margin: 0 auto;
+ border-top: 2px solid #ff6000;
+ }
+ .footer b {
+ color: #ccc;
+ }
+ .footer ul {
+ display: inline;
+ }
+ .footer ul li {
+ display: inline;
+ }
+ .footer .fh {
+ margin: 10px 0;
+ }
+ .footer .fh p {
+ display: inline;
+ color: #ccc;
+ }
+ /*# sourceMappingURL=register.css.map */`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/router/ShoppingPage.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/router/ShoppingPage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..e16b3ad207bae5c0a4987ed24767a1faf0179fda
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/router/ShoppingPage.ts"
@@ -0,0 +1,356 @@
+import AJAX from "../business/Ajax.js";
+import StepNumber from "../component/StepNumber.js";
+import ICommand from "../interface/ICommand.js";
+import IEvent, { STEP_EVENT } from "../interface/IEvents.js";
+import MainModel from "../model/MainModel.js";
+import { IReqAuthVo } from "../model/RequestData.js";
+import { IShoppingItem } from "../model/ResponseData.js";
+import ViewModel from "../model/ViewModel.js";
+import Utils from "../utils/Utils.js";
+import { ROUTERS } from "../vo/AJAXVo.js";
+import { ROUTER_CHILD } from "../vo/RouterVo.js";
+import MainRouter from "./MainRouter.js";
+
+export default class ShoppingPage implements ICommand{
+ constructor(){
+ }
+ exec(router:ROUTER_CHILD): void {
+ ViewModel.instance.app.innerHTML="";
+ var data =
+ this.updateTable();
+ this.setStyle()
+ }
+ private updateTable():void{
+ ViewModel.instance.app.innerHTML=`
+
+
+
+
+ 手机阿里
+ ${JSON.parse(localStorage.token).user}
+ 退出登录
+
+
+
+
+
+
+
+
+ `;
+ // console.log(MainModel.instance.shoppingList,11111111111);
+
+ (ViewModel.instance.app.querySelector("#all") as HTMLInputElement).checked=MainModel.instance.shoppingList.every((item:IShoppingItem)=>item.checked)
+ if((ViewModel.instance.app.querySelector("#all") as HTMLInputElement).checked===true){
+ MainModel.instance.shoppingList.forEach((item)=>{
+ item.checked==true
+ })
+ }
+ var tbody:HTMLTableSectionElement=ViewModel.instance.app.querySelector("tbody") as HTMLTableSectionElement;
+
+ var elem=document.createDocumentFragment();
+ for(var i=0;i删除`;
+ tr.appendChild(td);
+ elem.appendChild(tr);
+ }
+ tbody.appendChild(elem);
+ }
+ private setTdContent(td:HTMLTableCellElement,key:keyof IShoppingItem,data:IShoppingItem){
+ // console.log(data);
+
+ switch(key){
+ case "checked":
+ td.innerHTML=`
+ `;
+ break;
+ case "img":
+ // console.log(data.icon);
+ break;
+ case "price":
+ td.className="price1"
+ td.innerHTML=Number(data[key]).toFixed(2);
+ break;
+ case "total":
+ td.innerHTML=Number(data[key]).toFixed(2);
+ break;
+ case "num":
+ var step=new StepNumber();
+ step.step=data.num;
+ step.appendTo(td);
+ step.id=data.pid;
+ break;
+ default:
+ td.innerHTML=String(data[key]);
+ }
+ }
+ private setStyle():void{
+ Utils.setCss(`
+ * {
+ padding: 0;
+ margin: 0;
+ box-sizing: border-box;
+ }
+ li {
+ list-style: none;
+ }
+ a {
+ text-decoration: none;
+ color: #555;
+ }
+ a:hover {
+ color: #ff7300;
+ }
+ input {
+ outline: none;
+ }
+ .w {
+ width: 1200px;
+ margin: 0 auto;
+ }
+ .current {
+ color: #ff7300;
+ }
+ body {
+ background-color: #f2f2f2;
+ }
+ .ali-bar {
+ height: 30px;
+ line-height: 30px;
+ font-size: 12px;
+ padding: 0 20px;
+ background-color: #fff;
+ border-bottom: 1px solid #ccc;
+ }
+ .ali-bar p {
+ float: left;
+ }
+ .ali-bar p img {
+ vertical-align: middle;
+ margin-bottom: 3px;
+ }
+ .ali-bar ul {
+ float: right;
+ }
+ .ali-bar ul li {
+ float: left;
+ }
+ .ali-bar ul li a {
+ padding: 0 6px;
+ }
+ .ali-bar ul li::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: rotate(-135deg);
+ margin-bottom: 3px;
+ color: #ccc;
+ }
+ .ali-bar ul li:hover::after {
+ content: '';
+ display: inline-block;
+ width: 5px;
+ height: 5px;
+ border-top: 1px solid #ccc;
+ border-left: 1px solid #ccc;
+ transform: translateY(3px) rotate(45deg);
+ border-color: #ff7300;
+ }
+ .ali-bar ul li:last-child::after {
+ display: none;
+ }
+ .header-shop {
+ height: 80px;
+ background-color: #fff;
+ }
+ .header-shop img {
+ width: 240px;
+ height: 80px;
+ }
+ .main .plus {
+ margin: 20px 0;
+ }
+ .main .cart .cart-head {
+ height: 92px;
+ padding: 0 20px;
+ background-color: #f7f7f7;
+ overflow: hidden;
+ }
+ .main .cart .cart-head .cart-tab {
+ height: 24px;
+ line-height: 24px;
+ margin: 20px 0;
+ }
+ .main .cart .cart-head .cart-tab .spots {
+ float: left;
+ font-size: 20px;
+ }
+ .main .cart .cart-head .cart-tab .address {
+ float: right;
+ font-size: 14px;
+ width: 140px;
+ height: 24px;
+ border-radius: 10px;
+ text-align: center;
+ background-color: #fff;
+ }
+ .main .cart .cart-head table thead th {
+ font-weight: 400;
+ text-align: left;
+ }
+ .main .cart .cart-body .item {
+ padding: 20px 20px 0 20px;
+ margin-bottom: 20px;
+ background-color: #fff;
+ }
+ .main .cart .cart-body .item .img {
+ width: 70px;
+ height: 70px;
+ margin-top: 20px;
+ margin-left: 20px;
+ }
+ .main .cart .cart-body .item tbody td:nth-child(1) {
+ width: 150px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(2) {
+ width: 430px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(3) {
+ width: 0px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(4) {
+ width: 230px
+ }
+ .main .cart .cart-body .item tbody td:nth-child(5) {
+ width: 200px
+ }
+ .main .cart .cart-footer {
+ height: 70px;
+ background-color: #fff;
+ padding: 0 20px;
+ line-height: 70px;
+ }
+ .main .cart .cart-footer >div {
+ float: right;
+ }
+ .main .cart .cart-footer .check {
+ margin-right: 50px;
+ }
+ .main .cart .cart-footer .delete-all {
+ margin-right: 500px;
+ cursor: pointer;
+ }
+ .main .cart .cart-footer .subtotal {
+ float: right
+ margin-right: 20px;
+ }
+ .main .cart .cart-footer .subtotal span {
+ padding: 0 10px;
+ }
+ .main .cart .cart-footer .jiesuan {
+ width: 80px;
+ height: 40px;
+ margin-top: 15px;
+ line-height: 40px;
+ color: #fff;
+ text-align: center;
+ border-radius: 20px;
+ background-color: #ff602d;
+ }
+ /*# sourceMappingURL=shoppinglist.css.map */`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/utils/QueryString.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/utils/QueryString.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..ef4e3fdd9a8c576571608fb55f3ccca78efee35c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/utils/QueryString.ts"
@@ -0,0 +1,124 @@
+// Copyright Joyent, Inc. and other Node contributors.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a
+// copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to permit
+// persons to whom the Software is furnished to do so, subject to the
+// following conditions:
+//
+// The above copyright notice and this permission notice shall be included
+// in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
+// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
+// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
+// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
+// USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+'use strict';
+
+// If obj.hasOwnProperty has been overridden, then calling
+// obj.hasOwnProperty(prop) will break.
+// See: https://github.com/joyent/node/issues/1707
+function hasOwnProperty(obj:{[key:string]:any}, prop:string) {
+ return Object.prototype.hasOwnProperty.call(obj, prop);
+}
+
+export function parse(qs:any, sep?:any, eq?:any, options?:any) {
+ sep = sep || '&';
+ eq = eq || '=';
+ var obj:{[key:string]:any} = {};
+
+ if (typeof qs !== 'string' || qs.length === 0) {
+ return obj;
+ }
+
+ var regexp = /\+/g;
+ qs = qs.split(sep);
+
+ var maxKeys = 1000;
+ if (options && typeof options.maxKeys === 'number') {
+ maxKeys = options.maxKeys;
+ }
+
+ var len = qs.length;
+ // maxKeys <= 0 means that we should not limit keys count
+ if (maxKeys > 0 && len > maxKeys) {
+ len = maxKeys;
+ }
+
+ for (var i = 0; i < len; ++i) {
+ var x = qs[i].replace(regexp, '%20'),
+ idx = x.indexOf(eq),
+ kstr, vstr, k, v;
+
+ if (idx >= 0) {
+ kstr = x.substr(0, idx);
+ vstr = x.substr(idx + 1);
+ } else {
+ kstr = x;
+ vstr = '';
+ }
+
+ k = decodeURIComponent(kstr);
+ v = decodeURIComponent(vstr);
+
+ if (!hasOwnProperty(obj, k)) {
+ obj[k] = v;
+ } else if (Array.isArray(obj[k])) {
+ obj[k].push(v);
+ } else {
+ obj[k] = [obj[k], v];
+ }
+ }
+
+ return obj;
+};
+
+
+var stringifyPrimitive = function(v:any) {
+ switch (typeof v) {
+ case 'string':
+ return v;
+
+ case 'boolean':
+ return v ? 'true' : 'false';
+
+ case 'number':
+ return isFinite(v) ? v : '';
+
+ default:
+ return '';
+ }
+ };
+
+export function stringfiy(obj:any, sep?:any, eq?:any, name?:any) {
+ sep = sep || '&';
+ eq = eq || '=';
+ if (obj === null) {
+ obj = undefined;
+ }
+
+ if (typeof obj === 'object') {
+ return Object.keys(obj).map(function(k) {
+ var ks = encodeURIComponent(stringifyPrimitive(k)) + eq;
+ if (Array.isArray(obj[k])) {
+ return obj[k].map(function(v:any) {
+ return ks + encodeURIComponent(stringifyPrimitive(v));
+ }).join(sep);
+ } else {
+ return ks + encodeURIComponent(stringifyPrimitive(obj[k]));
+ }
+ }).filter(Boolean).join(sep);
+
+ }
+
+ if (!name) return '';
+ return encodeURIComponent(stringifyPrimitive(name)) + eq +
+ encodeURIComponent(stringifyPrimitive(obj));
+ };
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/utils/Utils.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/utils/Utils.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..fc86552e445837f50585c128d77ed269150d0eed
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/utils/Utils.ts"
@@ -0,0 +1,24 @@
+export default class Utils {
+ public static randomColor(): string {
+ return Array.from({ length: 6 }).reduce(
+ (v: string) => v + (~~(Math.random() * 16)).toString(16),
+ "#"
+ );
+ }
+ public static setCss(str: string): void {
+ if (document.styleSheets.length === 0) {
+ var style: HTMLStyleElement = document.createElement("style");
+ style.innerHTML = str;
+ document.head.appendChild(style);
+ return;
+ }
+ var styleSheet: CSSStyleSheet =
+ document.styleSheets[document.styleSheets.length - 1];
+ str
+ .replace(/\n/g, "")
+ .match(/.*?\{.*?\}/g)
+ ?.forEach(function (item: string): void {
+ styleSheet.insertRule(item, styleSheet.cssRules.length);
+ });
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/utils/Verify.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/utils/Verify.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0e43a4a43932e7e9982de0ffd42f693f64c8ebe9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/utils/Verify.ts"
@@ -0,0 +1,20 @@
+import IVerify from "../interface/IVerify.js"
+
+export var Verify:IVerify={
+ "user":{
+ required:true,
+ judge:/^\w{8,16}$/,
+ message:"用户名错误"
+ },
+ "password":{
+ required:true,
+ judge:/^(?=\D+\d)(?=.*[a-z])(?=.*[A-Z])\w{8,16}$/,
+ message:"密码错误"
+ },
+ "tel":{
+ required:true,
+ judge:/^1[3-9]\d{9}$/,
+ message:"电话错误"
+ }
+
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/LoginView.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/views/LoginView.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..e129eb1d75e31ccf40f30bd7208bf085cdc439a4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/LoginView.ts"
@@ -0,0 +1,239 @@
+export default `
+
+
+
+
+
+`
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/RegisterView.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/views/RegisterView.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..fb6d276e98134c0cc96b33ccd46033a126800d59
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/RegisterView.ts"
@@ -0,0 +1,222 @@
+export default `
+
+
+
+
无企业营业执照的个人用户请注册个人账户。权益如下:做个人实名认证;作为买家身份采购;
+
+
+
+
+`
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/details.html" "b/\350\264\276\347\221\236\345\256\201/client/src/views/details.html"
new file mode 100644
index 0000000000000000000000000000000000000000..7bb3e9f1ae39e2f903c9ffb85a466df7282d3f41
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/details.html"
@@ -0,0 +1,206 @@
+
+
+
+
+
+ 商品详情页
+
+
+
+
+
+
+
+
+
+
+
oh 温暖常伴 刚需万年款 合体圆领毛衣开衫女秋冬新款打底衫上衣
+
+
+
+
+
+
+
+
+
0 条评价 | 90天内>10 件成交
+
举报
+
+
+ 批发
+ 代发
+
+
+
+ 价格
+ ¥107.00
+
+
+ 起批量
+ 2件起批
+
+
+
+
+
+
+
颜色
+
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
酒渍梅子
+
+
+
+
尺码
+
+
+ s
+ 107.00元
+ 45件可售
+
+
+ m
+ 107.00元
+ 45件可售
+
+
+ l
+ 107.00元
+ 45件可售
+
+
+
+
加采购车
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..ca1d798c3e52fc64f4f1ecf0c2793d38ce39f36d
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..80188a7f3d4f7e20d3bb04b8fc30a39695ffaef1
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/a.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..90834eb1ec516fe8aedd8c7191278a10279e9682
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..f735a19b53980a63a2c49c6339b18592a0832229
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/b.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..027eea9eac325eba6480900e1dc1ecb89e2a51a1
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..a886204ca4af5ed9d866623db45b84344f267072
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/c.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..4f03aed26d625506f5476c4f43a1df4d78ca9ff9
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..10b0cbb8fd401829c148560e3b6ee61c6b598706
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/d.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..dda523ddd31aefc8fc6ba2f5edda6060a1425f4e
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..ba70ef74adebb611cd7e87cc51eb057427dfa3af
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/e.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/f.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/f.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..c425e478a62ba385e09589fcd4338ed7df9870cb
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/f.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..b161a1834362c13d724aa1d43d1d6e20a2cf8c19
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..9a6254560a0bda728895362d8a4bb296d8afa9d8
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/g.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..b6d75d6c289a73ee186db7b98ef8c4daaea44e79
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..67ccfb4ad4c1be2e9351ad3adc4bb7c6327996a6
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/h.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg-1.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg-1.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..9f5a8f7dc9f2a824606e4aaee9673cfa8bb79138
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg-1.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg.avif" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg.avif"
new file mode 100644
index 0000000000000000000000000000000000000000..9a339bcd3cef53c82e21c3e5d7d8840166820814
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/i.jpg.avif" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/icons.png" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/icons.png"
new file mode 100644
index 0000000000000000000000000000000000000000..32272da223bf56ecd7296938e5c53da936d85928
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/icons.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/left-icon.png" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/left-icon.png"
new file mode 100644
index 0000000000000000000000000000000000000000..85e79272337e09c504178065fe10ff084f95c7bb
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/left-icon.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/img/right.png" "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/right.png"
new file mode 100644
index 0000000000000000000000000000000000000000..39ce4e993fad46ea203aea75b0a1a061377a13a5
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/client/src/views/img/right.png" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/index.html" "b/\350\264\276\347\221\236\345\256\201/client/src/views/index.html"
new file mode 100644
index 0000000000000000000000000000000000000000..5304662cd55f67e7c30f17849e7e99c9675aa030
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/index.html"
@@ -0,0 +1,349 @@
+
+
+
+
+
+ 1688首页
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
搜 索
+
+
+
+
+
+
+
品类市场
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
为你推荐
+
根据您的浏览,实时为您推荐爆款产品
+
+
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
黑金沸腾护膝 山地锁温裤 高效防风防水登山锁温加绒加厚休闲保暖
+
+
+ 满200减20|跨店
+ HOT
+
+
+ ¥48
+ 已售600件
+
+
+
+
+ 义乌市百迈商贸有限责任公司
+ 浙江金华
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/js/Component.js" "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Component.js"
new file mode 100644
index 0000000000000000000000000000000000000000..184770fb9fbe6f4d3eaa446a18a4641ace5c2c3b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Component.js"
@@ -0,0 +1,21 @@
+import Utils from "./Utils.js";
+
+export default class Component extends EventTarget{
+ elem;
+ static cssBool=false;
+ constructor(type="div"){
+ super();
+ this.elem=document.createElement(type);
+ }
+ appendTo(parent){
+ if(typeof parent==="string") parent=document.querySelector(parent);
+ if(parent instanceof HTMLElement) parent.appendChild(this.elem);
+ return parent;
+ }
+ static setCss(str){
+ // 如果子类调用静态方法,需要使用this
+ if(this.cssBool) return;
+ this.cssBool=true;
+ Utils.setCss(str);
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/js/Utils.js" "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Utils.js"
new file mode 100644
index 0000000000000000000000000000000000000000..bddbbb7ebafd028df9756792323a5a159a9c93f5
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Utils.js"
@@ -0,0 +1,17 @@
+export default class Utils{
+ static randomColor(){
+ return Array.from({length:6}).reduce(v=>v+(~~(Math.random()*16)).toString(16),"#");
+ }
+ static setCss(str){
+ if(document.styleSheets.length===0){
+ var style=document.createElement("style");
+ style.innerHTML=str;
+ document.head.appendChild(style);
+ return;
+ }
+ var styleSheet=document.styleSheets[document.styleSheets.length-1];
+ str.replace(/\n/g,"").match(/.*?\{.*?\}/g).forEach(function(item){
+ styleSheet.insertRule(item,styleSheet.cssRules.length);
+ })
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/js/Zoom.js" "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Zoom.js"
new file mode 100644
index 0000000000000000000000000000000000000000..192db0543f56763e403d8a569ae960040ad7c40f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/Zoom.js"
@@ -0,0 +1,117 @@
+import Component from "./Component.js";
+export default class Zoom extends Component{
+ static ZOOM_SCALE=0.675;
+ static MIN_MAX_SCALE=1.2;
+ static HEIGHT_CHANGE_EVENT="height_change_event";
+ minW=0;
+ minH=0;
+ maxW=0;
+ maxH=0;
+ maskW=0;
+ maskH=0;
+ min;
+ max;
+ mask;
+ mouseHandlerBind;
+ constructor(){
+ super();
+ this.elem.className="zoom";
+ this.elem.innerHTML=`
+
+
+ `
+ this.min=this.elem.querySelector(".min");
+ this.max=this.elem.querySelector(".max");
+ this.mask=this.elem.querySelector(".mask");
+ this.mouseHandlerBind=e=>this.mouseHandler(e);
+ this.min.addEventListener("mouseenter",this.mouseHandlerBind);
+ this.setStyle();
+ }
+ setImage(src){
+ var img=new Image();
+ img.src=src;
+ img.addEventListener("load",e=>this.loadHandler(e));
+ }
+ loadHandler(e){
+ this.maxW=e.target.width*Zoom.ZOOM_SCALE;
+ this.maxH=e.target.height*Zoom.ZOOM_SCALE;
+ this.minW=this.maxW/Zoom.MIN_MAX_SCALE;
+ this.minH=this.maxH/Zoom.MIN_MAX_SCALE;
+ this.maskW=this.minW*Zoom.ZOOM_SCALE;
+ this.maskH=this.minH*Zoom.ZOOM_SCALE;
+ console.log(this.minW,this.minH)
+ Object.assign(this.min.style,{
+ width:this.minW+"px",
+ height:this.minH+"px",
+ backgroundImage:`url(${e.target.src})`
+ })
+ Object.assign(this.mask.style,{
+ width:this.maskW+"px",
+ height:this.maskH+"px",
+ })
+ Object.assign(this.max.style,{
+ width:this.maxW+"px",
+ height:this.maxH+"px",
+ left:this.minW+2+"px",
+ top:0,
+ backgroundImage:`url(${e.target.src})`
+ })
+ this.dispatch(this.minH);
+ }
+ dispatch(height){
+ var evt=new Event(Zoom.HEIGHT_CHANGE_EVENT);
+ evt.height=height;
+ this.dispatchEvent(evt);
+ }
+ mouseHandler(e){
+ if (e.type === "mouseenter") {
+ this.min.addEventListener("mouseleave",this.mouseHandlerBind);
+ this.min.addEventListener("mousemove", this.mouseHandlerBind);
+ this.mask.style.visibility = this.max.style.visibility = "visible";
+ } else if (e.type === "mouseleave") {
+ this.min.removeEventListener("mouseleave", this.mouseHandlerBind);
+ this.min.removeEventListener("mousemove", this.mouseHandlerBind);
+ this.mask.style.visibility = this.max.style.visibility = "hidden";
+ } else {
+ var x = e.offsetX - this.maskW / 2;
+ var y = e.offsetY - this.maskH / 2;
+ if (x < 0) x = 0;
+ else if (x > this.minW - this.maskW) x = this.minW - this.maskW;
+ if (y < 0) y = 0;
+ else if (y > this.minH - this.maskH) y = this.minH - this.maskH
+ this.mask.style.left = x + "px"
+ this.mask.style.top = y + "px"
+ this.max.style.backgroundPositionX=-x*this.maxW/this.maskW+"px";
+ this.max.style.backgroundPositionY=-y*this.maxH/this.maskH+"px";
+ }
+ }
+ setStyle(){
+ Zoom.setCss(`.zoom {
+ position: absolute;
+ }
+
+ .zoom>.min {
+ border: 1px solid #ccc;
+ position: absolute;
+ background-size: 100% 100%;
+ }
+
+ .zoom>.min>.mask {
+ background-color: rgba(190, 160, 30, 0.4);
+ position: absolute;
+ left: 0;
+ top: 0;
+ visibility: hidden;
+ pointer-events: none;
+ }
+
+ .zoom>.max {
+ border: 1px solid #ccc;
+ position: absolute;
+ top: 0;
+ visibility: hidden;
+ }`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomCarousel.js" "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomCarousel.js"
new file mode 100644
index 0000000000000000000000000000000000000000..7f6e83e2ee53374dee6799006ee0ddcb4ed79fe1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomCarousel.js"
@@ -0,0 +1,120 @@
+import Component from "./Component.js";
+
+export default class ZoomCarousel extends Component{
+ imgCon;
+ left;
+ right;
+ data;
+ prev;
+ pos=0;
+ static ICON_WIDTH=76;
+ static EVENT_ID="event_id";
+ constructor(data){
+ super();
+ this.elem.className='icon-carousel';
+ this.elem.innerHTML=`
+
+
+
+ `
+ this.left=this.elem.querySelector(".left");
+ this.right=this.elem.querySelector(".right");
+ this.imgCon=this.elem.querySelector(".img-con");
+ this.elem.addEventListener("mouseover",e=>this.mouseHandler(e));
+ this.left.addEventListener("click",e=>this.clickHandler(e));
+ this.right.addEventListener("click",e=>this.clickHandler(e));
+ if(data) this.setData(data);
+ this.setStyle();
+ }
+ setData(list){
+ if(!Array.isArray(list) || list.length===0) return;
+ this.data=list;
+ this.imgCon.innerHTML=list.reduce((v,t)=>v+` `,"");
+ this.imgCon.style.width=ZoomCarousel.ICON_WIDTH*list.length;
+ var evt=new MouseEvent("mouseover",{bubbles:true});
+ this.imgCon.firstElementChild.dispatchEvent(evt);
+ }
+ clickHandler(e){
+ if(e.target===this.left){
+ if(this.pos-5>=0)this.pos-=5;
+ else this.pos=0;
+ }else{
+ if(this.pos+9<=this.data.length-1){
+ this.pos+=5;
+ }else{
+ this.pos=this.data.length-5;
+ }
+ }
+ this.imgCon.style.left=this.pos*-ZoomCarousel.ICON_WIDTH+"px";
+ }
+ setTop(y){
+ console.log(y)
+ this.elem.style.top=y+"px";
+ }
+ mouseHandler(e){
+ if(e.target.nodeName!=="IMG") return;
+ if(this.prev){
+ this.prev.style.borderColor="rgba(255,0,0,0)";
+ }
+ this.prev=e.target;
+ this.prev.style.borderColor="red";
+ this.dispatch();
+ }
+ dispatch(){
+ var evt=new Event(ZoomCarousel.EVENT_ID);
+ evt.data=this.data.find(item=>item.id==this.prev.id);
+ this.dispatchEvent(evt);
+ }
+ setStyle(){
+ ZoomCarousel.setCss(`.icon-carousel{
+ position: absolute;
+ width: 452px;
+ height: 58px;
+
+ }
+ .icon-carousel>.left{
+ width: 22px;
+ height: 32px;
+ background-image: url(./img/left-icon.png);
+ float: left;
+ position: relative;
+ top: 50%;
+ transform: translate(0,-50%);
+ }
+ .icon-carousel>.right{
+ width: 22px;
+ height: 32px;
+ background-image: url(./img/icons.png);
+ background-position: -78px 0;
+ float: right;
+ position: relative;
+ top: 50%;
+ transform: translate(0,-50%);
+ }
+ .icon-carousel>.carousel{
+ width: 380px;
+ height: 58px;
+ float: left;
+
+ position: relative;
+ margin: 0 14px;
+ overflow: hidden;
+ }
+ .icon-carousel>.carousel>.img-con{
+ height: 58px;
+ font-size: 0;
+ position: absolute;
+ transition: all 0.5s;
+ left: 0;
+ }
+ .icon-carousel>.carousel>.img-con>img{
+ width: 54px;
+ height: 54px;
+ border: 2px solid transparent;
+ margin: 0 9px;
+ }`)
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomClass.js" "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomClass.js"
new file mode 100644
index 0000000000000000000000000000000000000000..05c13d73adf1af278d77dd0b65d6e910e1c2bb20
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/js/ZoomClass.js"
@@ -0,0 +1,29 @@
+import Component from "./Component.js";
+import Zoom from "./Zoom.js";
+import ZoomCarousel from "./ZoomCarousel.js";
+
+export default class ZoomClass extends Component{
+ zoom;
+ carousel;
+ constructor(data){
+ super();
+ this.elem.style.position="relative";
+ this.zoom=new Zoom();
+ this.carousel=new ZoomCarousel();
+ this.zoom.appendTo(this.elem);
+ this.carousel.appendTo(this.elem);
+ this.carousel.addEventListener(ZoomCarousel.EVENT_ID,e=>this.eventHandler(e));
+ this.zoom.addEventListener(Zoom.HEIGHT_CHANGE_EVENT,e=>this.heightEventHandler(e))
+ if(data) this.setData(data);
+ }
+ setData(data){
+ if(!Array.isArray(data) || data.length===0) return;
+ this.carousel.setData(data);
+ }
+ eventHandler(e){
+ this.zoom.setImage(e.data.max);
+ }
+ heightEventHandler(e){
+ this.carousel.setTop(e.height+10);
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/login.html" "b/\350\264\276\347\221\236\345\256\201/client/src/views/login.html"
new file mode 100644
index 0000000000000000000000000000000000000000..71c24dcf453355a0d0c9d91156e5ea9011e68358
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/login.html"
@@ -0,0 +1,249 @@
+
+
+
+
+
+ 登录
+
+
+
+
+
+
+
+
+
+
+
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/register.html" "b/\350\264\276\347\221\236\345\256\201/client/src/views/register.html"
new file mode 100644
index 0000000000000000000000000000000000000000..ce8194fff69cd66b71c658d2604859e4b4b0c100
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/register.html"
@@ -0,0 +1,235 @@
+
+
+
+
+
+ 注册
+
+
+
+
+
+
+
+
无企业营业执照的个人用户请注册个人账户。权益如下:做个人实名认证;作为买家身份采购;
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/views/shoppinglist.html" "b/\350\264\276\347\221\236\345\256\201/client/src/views/shoppinglist.html"
new file mode 100644
index 0000000000000000000000000000000000000000..5232924995bf67f8e4e5335a6f05e99c065f3de0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/views/shoppinglist.html"
@@ -0,0 +1,129 @@
+
+
+
+
+
+ 购物车
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 汕头市美即化妆品有限公司
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/vo/AJAXVo.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/vo/AJAXVo.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..24ee02743f280218440becf6437708571aaa7aff
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/vo/AJAXVo.ts"
@@ -0,0 +1,18 @@
+export type AJAX_Method="GET" | "POST";
+export const URL:string="localhost";
+export const PORT:number=4001;
+export enum PROTOCOL{HTTP="http://",HTTPS="https://"};
+export const PATH:string=PROTOCOL.HTTP+URL+":"+PORT;
+export enum ROUTERS{
+ REGISTER="/user/register",
+ LOGIN="/user/login",
+ LOGOUT="/user/logout",
+ AUTH="/user/auth",
+ LIST="/goods/list",
+ DETAILS="/details/details",
+ CARTLIST="/cart/list",
+ ADD="/cart/add",
+ REMOVE="/cart/remove",
+ CHANGENUM="/cart/changenum",
+ CHECKED="/cart/checked",
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/src/vo/RouterVo.ts" "b/\350\264\276\347\221\236\345\256\201/client/src/vo/RouterVo.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0ad9a56cd228d77bff9691518499e745b5cf2b2a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/src/vo/RouterVo.ts"
@@ -0,0 +1,16 @@
+export type RouterType="/login" | "/register" | "/goods" | "/shopping" | '/details';
+export type RouterPath="/user" | "/goods" | "/cart" | '/details';
+export enum ROUTER_CHILD{
+ MAIN="/",
+ REGISTER="/register",
+ LOGIN="/login",
+ LOGOUT="/logout",
+ AUTH="/auth",
+ LIST="/list",
+ DETAILS="/details",
+ CARTLIST="/list",
+ ADD="/add",
+ REMOVE="/remove",
+ CHANGENUM="/changenum",
+ CHECKED="/checked"
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/client/tsconfig.json" "b/\350\264\276\347\221\236\345\256\201/client/tsconfig.json"
new file mode 100644
index 0000000000000000000000000000000000000000..1ddfb55186956342fb1fc65199140817ca9b849b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/client/tsconfig.json"
@@ -0,0 +1,109 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig to read more about this file */
+
+ /* Projects */
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
+
+ /* Language and Environment */
+ "target": "ES6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
+
+ /* Modules */
+ "module": "ES6", /* Specify what module code is generated. */
+ "rootDir": "./src", /* Specify the root folder within your source files. */
+ "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
+ "paths": {"querystring":["./node_modules/querystring"]}, /* Specify a set of entries that re-map imports to additional lookup locations. */
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
+ // "resolveJsonModule": true, /* Enable importing .json files. */
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
+ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
+
+ /* JavaScript Support */
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
+
+ /* Emit */
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
+ "outDir": "./dist", /* Specify an output folder for all emitted files. */
+ // "removeComments": true, /* Disable emitting comments. */
+ // "noEmit": true, /* Disable emitting files from a compilation. */
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
+
+ /* Interop Constraints */
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+
+ /* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. */
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
+
+ /* Completeness */
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/.DS_Store" "b/\350\264\276\347\221\236\345\256\201/server/.DS_Store"
new file mode 100644
index 0000000000000000000000000000000000000000..89566bd7af8ebaba38e4b173737d9cada88fcb5e
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/server/.DS_Store" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0dc17b1f5829d8d79f436d5cfccef8c245246685
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts"
@@ -0,0 +1,2 @@
+export {};
+//# sourceMappingURL=Main.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..be341d247ba4d2ce8c905c7485b3fb48566cb038
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Main.d.ts","sourceRoot":"","sources":["../src/Main.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Main.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.js"
new file mode 100644
index 0000000000000000000000000000000000000000..59f273bde9fbd3ed015ec9b9379d760d463b07fa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.js"
@@ -0,0 +1,23 @@
+"use strict";
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_js_1 = require("./po/RouterVo.js");
+const CartCommand_js_1 = __importDefault(require("./router/CartCommand.js"));
+const GoodsCommand_js_1 = __importDefault(require("./router/GoodsCommand.js"));
+const RouterIndex_js_1 = __importDefault(require("./router/RouterIndex.js"));
+const UserCommand_js_1 = __importDefault(require("./router/UserCommand.js"));
+const Servers_js_1 = __importDefault(require("./server/Servers.js"));
+const DetailsCommand_js_1 = __importDefault(require("./router/DetailsCommand.js"));
+class Main {
+ constructor() {
+ RouterIndex_js_1.default.instance.add(RouterVo_js_1.ROUTERS_TYPE.USER, UserCommand_js_1.default);
+ RouterIndex_js_1.default.instance.add(RouterVo_js_1.ROUTERS_TYPE.GOODS, GoodsCommand_js_1.default);
+ RouterIndex_js_1.default.instance.add(RouterVo_js_1.ROUTERS_TYPE.CART, CartCommand_js_1.default);
+ RouterIndex_js_1.default.instance.add(RouterVo_js_1.ROUTERS_TYPE.DETAILS, DetailsCommand_js_1.default);
+ new Servers_js_1.default(Number(process.env.PORT) || 3000);
+ }
+}
+new Main();
+//# sourceMappingURL=Main.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Main.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..2325391e864d8f491ffa6478d57624987b4b2232
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Main.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Main.js","sourceRoot":"","sources":["../src/Main.ts"],"names":[],"mappings":";;;;;AAAA,kDAAgD;AAChD,6EAAkD;AAClD,+EAAoD;AACpD,6EAAkD;AAClD,6EAAkD;AAClD,qEAA0C;AAC1C,mFAAuD;AACvD,MAAM,IAAI;IACN;QACI,wBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAAY,CAAC,IAAI,EAAC,wBAAW,CAAC,CAAC;QACxD,wBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAAY,CAAC,KAAK,EAAC,yBAAY,CAAC,CAAC;QAC1D,wBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAAY,CAAC,IAAI,EAAC,wBAAW,CAAC,CAAC;QACxD,wBAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,0BAAY,CAAC,OAAO,EAAC,2BAAc,CAAC,CAAC;QAC9D,IAAI,oBAAO,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;IAClD,CAAC;CACJ;AACD,IAAI,IAAI,EAAE,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..8778eff3dfa11b217e863d21d58073c720a5dbae
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts"
@@ -0,0 +1,7 @@
+export declare function hex_md5(s: string): string;
+export declare function b64_md5(s: string): string;
+export declare function str_md5(s: string): string;
+export declare function hex_hmac_md5(key: string, data: any): string;
+export declare function b64_hmac_md5(key: string, data: any): string;
+export declare function str_hmac_md5(key: string, data: any): string;
+//# sourceMappingURL=md5.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b37a9cb773dd9628087957c411a91f2340e0b108
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"md5.d.ts","sourceRoot":"","sources":["../../src/Utils/md5.ts"],"names":[],"mappings":"AAqBA,wBAAgB,OAAO,CAAC,CAAC,EAAC,MAAM,UAA6D;AAC7F,wBAAgB,OAAO,CAAC,CAAC,EAAC,MAAM,UAA6D;AAC7F,wBAAgB,OAAO,CAAC,CAAC,EAAC,MAAM,UAA6D;AAC7F,wBAAgB,YAAY,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,UAAgD;AACjG,wBAAgB,YAAY,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,UAAgD;AACjG,wBAAgB,YAAY,CAAC,GAAG,EAAC,MAAM,EAAE,IAAI,EAAC,GAAG,UAAgD"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.js"
new file mode 100644
index 0000000000000000000000000000000000000000..3f5d6abce6fc671c8a780beb16c188fd14a871d9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.js"
@@ -0,0 +1,228 @@
+"use strict";
+/*
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.str_hmac_md5 = exports.b64_hmac_md5 = exports.hex_hmac_md5 = exports.str_md5 = exports.b64_md5 = exports.hex_md5 = void 0;
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+function hex_md5(s) { return binl2hex(core_md5(str2binl(s), s.length * chrsz)); }
+exports.hex_md5 = hex_md5;
+function b64_md5(s) { return binl2b64(core_md5(str2binl(s), s.length * chrsz)); }
+exports.b64_md5 = b64_md5;
+function str_md5(s) { return binl2str(core_md5(str2binl(s), s.length * chrsz)); }
+exports.str_md5 = str_md5;
+function hex_hmac_md5(key, data) { return binl2hex(core_hmac_md5(key, data)); }
+exports.hex_hmac_md5 = hex_hmac_md5;
+function b64_hmac_md5(key, data) { return binl2b64(core_hmac_md5(key, data)); }
+exports.b64_hmac_md5 = b64_hmac_md5;
+function str_hmac_md5(key, data) { return binl2str(core_hmac_md5(key, data)); }
+exports.str_hmac_md5 = str_hmac_md5;
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function md5_vm_test() {
+ return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
+}
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x, len) {
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+ for (var i = 0; i < x.length; i += 16) {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+ a = md5_ff(a, b, c, d, x[i + 0], 7, -680876936);
+ d = md5_ff(d, a, b, c, x[i + 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i + 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i + 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i + 4], 7, -176418897);
+ d = md5_ff(d, a, b, c, x[i + 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i + 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i + 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i + 8], 7, 1770035416);
+ d = md5_ff(d, a, b, c, x[i + 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i + 10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i + 11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i + 12], 7, 1804603682);
+ d = md5_ff(d, a, b, c, x[i + 13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i + 14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i + 15], 22, 1236535329);
+ a = md5_gg(a, b, c, d, x[i + 1], 5, -165796510);
+ d = md5_gg(d, a, b, c, x[i + 6], 9, -1069501632);
+ c = md5_gg(c, d, a, b, x[i + 11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i + 0], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i + 5], 5, -701558691);
+ d = md5_gg(d, a, b, c, x[i + 10], 9, 38016083);
+ c = md5_gg(c, d, a, b, x[i + 15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i + 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i + 9], 5, 568446438);
+ d = md5_gg(d, a, b, c, x[i + 14], 9, -1019803690);
+ c = md5_gg(c, d, a, b, x[i + 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i + 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i + 13], 5, -1444681467);
+ d = md5_gg(d, a, b, c, x[i + 2], 9, -51403784);
+ c = md5_gg(c, d, a, b, x[i + 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i + 12], 20, -1926607734);
+ a = md5_hh(a, b, c, d, x[i + 5], 4, -378558);
+ d = md5_hh(d, a, b, c, x[i + 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i + 11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i + 14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i + 1], 4, -1530992060);
+ d = md5_hh(d, a, b, c, x[i + 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i + 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i + 10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i + 13], 4, 681279174);
+ d = md5_hh(d, a, b, c, x[i + 0], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i + 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i + 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i + 9], 4, -640364487);
+ d = md5_hh(d, a, b, c, x[i + 12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i + 15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i + 2], 23, -995338651);
+ a = md5_ii(a, b, c, d, x[i + 0], 6, -198630844);
+ d = md5_ii(d, a, b, c, x[i + 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i + 14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i + 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i + 12], 6, 1700485571);
+ d = md5_ii(d, a, b, c, x[i + 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i + 10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i + 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i + 8], 6, 1873313359);
+ d = md5_ii(d, a, b, c, x[i + 15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i + 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i + 13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i + 4], 6, -145523070);
+ d = md5_ii(d, a, b, c, x[i + 11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i + 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i + 9], 21, -343485551);
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return Array(a, b, c, d);
+}
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q, a, b, x, s, t) {
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b);
+}
+function md5_ff(a, b, c, d, x, s, t) {
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a, b, c, d, x, s, t) {
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a, b, c, d, x, s, t) {
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a, b, c, d, x, s, t) {
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+/*
+ * Calculate the HMAC-MD5, of a key and some data
+ */
+function core_hmac_md5(key, data) {
+ var bkey = str2binl(key);
+ if (bkey.length > 16)
+ bkey = core_md5(bkey, key.length * chrsz);
+ var ipad = Array(16), opad = Array(16);
+ for (var i = 0; i < 16; i++) {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+ var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
+ return core_md5(opad.concat(hash), 512 + 128);
+}
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x, y) {
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num, cnt) {
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+/*
+ * Convert a string to an array of little-endian words
+ * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
+ */
+function str2binl(str) {
+ var bin = Array();
+ var mask = (1 << chrsz) - 1;
+ for (var i = 0; i < str.length * chrsz; i += chrsz)
+ bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (i % 32);
+ return bin;
+}
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binl2str(bin) {
+ var str = "";
+ var mask = (1 << chrsz) - 1;
+ for (var i = 0; i < bin.length * 32; i += chrsz)
+ str += String.fromCharCode((bin[i >> 5] >>> (i % 32)) & mask);
+ return str;
+}
+/*
+ * Convert an array of little-endian words to a hex string.
+ */
+function binl2hex(binarray) {
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var str = "";
+ for (var i = 0; i < binarray.length * 4; i++) {
+ str += hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8 + 4)) & 0xF) +
+ hex_tab.charAt((binarray[i >> 2] >> ((i % 4) * 8)) & 0xF);
+ }
+ return str;
+}
+/*
+ * Convert an array of little-endian words to a base-64 string
+ */
+function binl2b64(binarray) {
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var str = "";
+ for (var i = 0; i < binarray.length * 4; i += 3) {
+ var triplet = (((binarray[i >> 2] >> 8 * (i % 4)) & 0xFF) << 16)
+ | (((binarray[i + 1 >> 2] >> 8 * ((i + 1) % 4)) & 0xFF) << 8)
+ | ((binarray[i + 2 >> 2] >> 8 * ((i + 2) % 4)) & 0xFF);
+ for (var j = 0; j < 4; j++) {
+ if (i * 8 + j * 6 > binarray.length * 32)
+ str += b64pad;
+ else
+ str += tab.charAt((triplet >> 6 * (3 - j)) & 0x3F);
+ }
+ }
+ return str;
+}
+//# sourceMappingURL=md5.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/Utils/md5.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a86f26a92c622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C,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAE;cACrD,CAAC,CAAC,QAAQ,CAAC,CAAC,GAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,GAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;QAC9D,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EACzB;YACE,IAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,MAAM,GAAG,EAAE;gBAAE,GAAG,IAAI,MAAM,CAAC;;gBAClD,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC,OAAO,IAAI,CAAC,GAAC,CAAC,CAAC,GAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;SACrD;KACF;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..fdab7ed6d12084a8ef69a563fe3f301368d441c4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts"
@@ -0,0 +1,7 @@
+///
+import { ServerResponse } from "http";
+import { ROUTER_CHILD } from "../po/RouterVo";
+export default interface ICommand {
+ exec(router: ROUTER_CHILD, data: any, res: ServerResponse, params?: any): void;
+}
+//# sourceMappingURL=ICommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..15c1fe918b651512f3110c9f8098fe801526b78f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICommand.d.ts","sourceRoot":"","sources":["../../src/interface/ICommand.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,MAAM,CAAC,OAAO,WAAW,QAAQ;IAC7B,IAAI,CAAC,MAAM,EAAC,YAAY,EAAC,IAAI,EAAC,GAAG,EAAC,GAAG,EAAC,cAAc,EAAC,MAAM,CAAC,EAAC,GAAG,GAAE,IAAI,CAAC;CAC1E"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..c28eb14393a4fb2caa2338ddfd4514f98abd8031
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js"
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ICommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..cc9a226e3d62b5f7ce24fd0eed7fe0de0bfa70bf
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/interface/ICommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../src/interface/ICommand.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..03ea7ec7694584b430a2095022fc9acd9b605761
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts"
@@ -0,0 +1 @@
+//# sourceMappingURL=MainModel.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..d054337886a12ad3b0c46aeaee5bcd9b0eddbdb4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainModel.d.ts","sourceRoot":"","sources":["../../src/model/MainModel.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js"
new file mode 100644
index 0000000000000000000000000000000000000000..35cb3e347bbb27ededbd2a3e5fe9c861dba33d64
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js"
@@ -0,0 +1,2 @@
+"use strict";
+//# sourceMappingURL=MainModel.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..75493b47d34ac8324ceeb97386b1f4bfae54945e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/MainModel.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"MainModel.js","sourceRoot":"","sources":["../../src/model/MainModel.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5aa66dbea2c040c6538946bbaf78feb2f7761978
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts"
@@ -0,0 +1,33 @@
+export interface IReqLogoutVo {
+ user: string;
+ userId: number;
+}
+export interface IReqLoginVo extends IReqLogoutVo {
+ password: string;
+}
+export interface IReqRegisterVo extends IReqLoginVo {
+ name: string;
+ tel: string;
+}
+export interface IReqAuthVo extends IReqLogoutVo {
+ token: string;
+}
+export interface IReqShoppingListVo extends IReqAuthVo {
+}
+export interface IReqAddVo extends IReqShoppingListVo {
+ pid: number;
+ id: number;
+ itemId: number;
+ numValue?: any;
+}
+export interface IReqRemoveVo extends IReqShoppingListVo {
+ ids: number[];
+}
+export interface IReqChangeNumVo extends IReqShoppingListVo {
+ id: number;
+ num: number;
+}
+export interface IReqCheckedVo extends IReqRemoveVo {
+ checked: boolean;
+}
+//# sourceMappingURL=RequestData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..6b6424b621bdba8e96ce883fae3996e4d51cea9a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RequestData.d.ts","sourceRoot":"","sources":["../../src/model/RequestData.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAC,MAAM,CAAA;IACX,MAAM,EAAC,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C,QAAQ,EAAC,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,cAAe,SAAQ,WAAW;IAC/C,IAAI,EAAC,MAAM,CAAC;IACZ,GAAG,EAAC,MAAM,CAAA;CACb;AAED,MAAM,WAAW,UAAW,SAAQ,YAAY;IAC5C,KAAK,EAAC,MAAM,CAAA;CACf;AAGD,MAAM,WAAW,kBAAmB,SAAQ,UAAU;CAErD;AAED,MAAM,WAAW,SAAU,SAAQ,kBAAkB;IACjD,GAAG,EAAC,MAAM,CAAA;IACV,EAAE,EAAC,MAAM,CAAC;IACV,MAAM,EAAC,MAAM,CAAC;IACd,QAAQ,CAAC,EAAC,GAAG,CAAA;CAChB;AAED,MAAM,WAAW,YAAa,SAAQ,kBAAkB;IACpD,GAAG,EAAC,MAAM,EAAE,CAAA;CACf;AAED,MAAM,WAAW,eAAgB,SAAQ,kBAAkB;IACvD,EAAE,EAAC,MAAM,CAAC;IACV,GAAG,EAAC,MAAM,CAAC;CACd;AAED,MAAM,WAAW,aAAc,SAAQ,YAAY;IAC/C,OAAO,EAAC,OAAO,CAAC;CACnB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..47b2eff9a085fab2b9b0e8f31828e6ee12ec7fa9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js"
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=RequestData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b5ef8de5b9aa7b3f5b944b84c7e24ac0aac736ac
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/RequestData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RequestData.js","sourceRoot":"","sources":["../../src/model/RequestData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..be395cdfe2038f78a0226b1f8d7ac53709978790
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts"
@@ -0,0 +1,62 @@
+export interface IResMeassage {
+ message: string;
+}
+export interface IResLogInMessage extends IResMeassage {
+ token: string;
+ user: string;
+ userId: number;
+}
+export interface IResRegisterVo {
+ errno: null | number;
+ result: IResMeassage;
+}
+export interface IResLoginVo {
+ errno: null | number;
+ result: IResLogInMessage | IResMeassage;
+}
+export interface IResLogoutVo extends IResRegisterVo {
+}
+export interface IResAuthVo extends IResLoginVo {
+}
+export interface IItemInfo {
+ id: number;
+ img: string;
+ price: number;
+}
+export interface IIcon {
+ icon1?: Array;
+ icon2?: Array;
+ icon3?: Array;
+ icon4?: Array;
+}
+export interface IGoods {
+ pid: number;
+ title: string;
+ img: string;
+ keywords: string;
+ price: number;
+ price1: string;
+ soldconut: string;
+ company: string;
+ address: boolean;
+}
+export interface IResGoodsList {
+ errno: null | number;
+ result: Array | IResMeassage;
+}
+export interface IShoppingItem {
+ pid: number;
+ goodsId: number;
+ userId: number;
+ checked: boolean;
+ icon: string;
+ info: string;
+ price: number;
+ num: number;
+ total: number;
+}
+export interface IResShoppingList {
+ errno: null | number;
+ result: Array | IResMeassage;
+}
+//# sourceMappingURL=ResponseData.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..c54109b9193b05b9a4c18f50ed00451fd6f27cae
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ResponseData.d.ts","sourceRoot":"","sources":["../../src/model/ResponseData.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW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C,MAAM,CAAC,GAAC,YAAY,CAAC;CACrC;AACD,MAAM,WAAW,aAAa;IAC1B,GAAG,EAAC,MAAM,CAAC;IACX,OAAO,EAAC,MAAM,CAAC;IACf,MAAM,EAAC,MAAM,CAAC;IACd,OAAO,EAAC,OAAO,CAAC;IAChB,IAAI,EAAC,MAAM,CAAC;IACZ,IAAI,EAAC,MAAM,CAAC;IACZ,KAAK,EAAC,MAAM,CAAC;IACb,GAAG,EAAC,MAAM,CAAC;IACX,KAAK,EAAC,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAC,IAAI,GAAC,MAAM,CAAC;IAClB,MAAM,EAAC,KAAK,CAAC,aAAa,CAAC,GAAC,YAAY,CAAC;CAC5C"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js"
new file mode 100644
index 0000000000000000000000000000000000000000..8be4e688bb8701caf80af6f630d65a04e91e99d0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js"
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ResponseData.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a9c321cd4727454e17a697a44327d22764b3c771
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/ResponseData.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ResponseData.js","sourceRoot":"","sources":["../../src/model/ResponseData.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..734e244519bcaad61caec5e5efedb2ad2c30a3fb
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts"
@@ -0,0 +1,25 @@
+import { Pool, PoolConnection } from "mysql";
+import { SqlTableType } from "../po/SqlVo";
+export default class Sql {
+ private static _pool;
+ private constructor();
+ static get Pool(): Pool;
+ static getConnection(): Promise;
+ static insert(tabel: SqlTableType, data: Array): Promise;
+ static update(tabel: SqlTableType, data: {
+ [key: string]: any;
+ }, condition?: {
+ [key: string]: any;
+ }): Promise;
+ static updateAll(tabel: SqlTableType, data: {
+ [key: string]: any;
+ }, ids: Array): Promise;
+ static select(tabel: SqlTableType, condition?: {
+ [key: string]: any;
+ }): Promise;
+ static delete(tabel: SqlTableType, condition?: {
+ [key: string]: any;
+ }): Promise;
+ static deleteAll(tabel: SqlTableType, goodsIds: Array): Promise;
+}
+//# sourceMappingURL=Sql.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..04228ca88f1e2304db83253827bcedab68407aa0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Sql.d.ts","sourceRoot":"","sources":["../../src/model/Sql.ts"],"names":[],"mappings":"AAAA,OAAc,EAAc,IAAI,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,MAAM,CAAC,OAAO,OAAO,GAAG;IACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAO;IAC3B,OAAO;IAEP,WAAkB,IAAI,IAAI,IAAI,CAS7B;WAEa,aAAa,IAAI,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;WAe/C,MAAM,CAAC,KAAK,EAAE,YAAY,EAAC,IAAI,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;WAsChF,MAAM,CAAC,KAAK,EAAE,YAAY,EAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAC,SAAS,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO,GAAG,OAAO,CAAC,GAAG,CAAC;WAuC7G,SAAS,CAAC,KAAK,EAAE,YAAY,EAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,EAAC,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;WA6B5F,MAAM,CAAC,KAAK,EAAE,YAAY,EAAC,SAAS,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO,GAAG,OAAO,CAAC,GAAG,CAAC;WA+BhF,MAAM,CAAC,KAAK,EAAE,YAAY,EAAC,SAAS,GAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAO,GAAG,OAAO,CAAC,GAAG,CAAC;WA8BhF,SAAS,CAAC,KAAK,EAAE,YAAY,EAAC,QAAQ,EAAE,KAAK,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,GAAG,CAAC;CAuBrF"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js"
new file mode 100644
index 0000000000000000000000000000000000000000..3d146ad7845a86166883bd42e7d46d949e926bc1
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js"
@@ -0,0 +1,239 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const mysql_1 = __importDefault(require("mysql"));
+class Sql {
+ constructor() { }
+ // 创建Pool实例,连接数据库
+ static get Pool() {
+ return (Sql._pool || (Sql._pool = mysql_1.default.createPool({
+ host: "localhost",
+ port: 3306,
+ user: "root",
+ password: "admin123",
+ database: "1688",
+ })));
+ }
+ // 创建连接池,获取数据库连接
+ static getConnection() {
+ return new Promise((resolve, reject) => {
+ Sql.Pool.getConnection((err, connetion) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ resolve(connetion);
+ }
+ });
+ });
+ }
+ // 插入语句
+ static insert(tabel, data) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ // 数据库连接失败就跳出
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr = "";
+ // 根据表名返回不同的插入语句
+ switch (tabel) {
+ case "user":
+ sqlStr =
+ "INSERT INTO `user`(`user`, `password`, `tel`) VALUES (?,?,?)";
+ break;
+ case "goodslist":
+ sqlStr =
+ "INSERT INTO `goodslist`(`title`, `img`, `keywords`, `price`, `price`, `price1`, `soldcount`, `company`, `address`) VALUES (?,?,?,?,?,?,?,?,?)";
+ break;
+ case "shoppinglist":
+ sqlStr =
+ "INSERT INTO `shoppinglist`(`goodsId`, `userId`, `checked`, `title`,`company`,`img`, `price`, `num`, `total`) VALUES (?,?,?,?,?,?,?,?,?)";
+ break;
+ }
+ // 执行数据库语句操作
+ connect.query(sqlStr, data, (err, result) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+ // 更新 tabel为更新的表名,data是更新的数据,condition是根据什么条件进行筛选
+ static update(tabel, data, condition = {}) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ // 如果连接失败就跳出
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ // 更新语句
+ var sqlStr = "UPDATE `" + tabel + "` SET ";
+ // 遍历要更新的数据
+ for (var key in data) {
+ sqlStr += "`" + key + "`=" + (typeof data[key] === "string" ? '"' + data[key] + '"' : data[key]) + ", ";
+ }
+ sqlStr = sqlStr.slice(0, -2) + " WHERE ";
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ }
+ else {
+ // 添加条件语句
+ for (var key in condition) {
+ sqlStr += "`" + key + "`=" + (typeof condition[key] === "string" ? '"' + condition[key] + '"' : condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ console.log(sqlStr);
+ // 执行数据库语句操作
+ connect.query(sqlStr, data, (err, result) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+ // 根据id更新数据
+ static updateAll(tabel, data, ids) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr = "UPDATE `" + tabel + "` SET ";
+ for (var key in data) {
+ sqlStr += "`" + key + "`=" + (typeof data[key] === "string" ? '"' + data[key] + '"' : data[key]) + ", ";
+ }
+ sqlStr = sqlStr.slice(0, -2) + " WHERE ";
+ for (var i = 0; i < ids.length; i++) {
+ sqlStr += "`pid`=" + ids[i] + " OR ";
+ }
+ sqlStr = sqlStr.slice(0, -3);
+ connect.query(sqlStr, data, (err, result) => {
+ if (err) {
+ console.log(err, "-----------");
+ resolve(null);
+ }
+ else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+ // 查询语句 tabel为表名 condition为查询条件
+ static select(tabel, condition = {}) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr = "SELECT * FROM `" + tabel + "` WHERE ";
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ }
+ else {
+ for (var key in condition) {
+ sqlStr += "`" + key + "`=" + (typeof condition[key] === "string" ? '"' + condition[key] + '"' : condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ connect.query(sqlStr, (err, result) => {
+ if (err) {
+ // console.log("没查到");
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ // console.log(result,"查到");
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+ // 删除
+ static delete(tabel, condition = {}) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr = "DELETE FROM `" + tabel + "` WHERE ";
+ // 如果没有查询条件 就查整个表格
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ }
+ else {
+ for (var key in condition) {
+ sqlStr += "`" + key + "`=" + (typeof condition[key] === "string" ? '"' + condition[key] + '"' : condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ connect.query(sqlStr, (err, result) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+ // 根据id删除多条数据
+ static deleteAll(tabel, goodsIds) {
+ return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
+ var connect = (yield Sql.getConnection());
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr = "DELETE FROM `" + tabel + "` WHERE ";
+ for (var i = 0; i < goodsIds.length; i++) {
+ sqlStr += "`pid`=" + goodsIds[i] + " OR ";
+ }
+ sqlStr = sqlStr.slice(0, -3);
+ connect.query(sqlStr, (err, result) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ }
+ else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ }));
+ }
+}
+exports.default = Sql;
+//# sourceMappingURL=Sql.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a3a1cf09f6f62136125279b0c40bdfad418ec845
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/Sql.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Sql.js","sourceRoot":"","sources":["../../src/model/Sql.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAAgE;AAEhE,MAAqB,GAAG;IAEpB,gBAAuB,CAAC;IACxB,iBAAiB;IACV,MAAM,KAAK,IAAI;QAClB,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,eAAK,CAAC,UAAU,CAAC;YAC3C,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,UAAU;YACpB,QAAQ,EAAE,MAAM;SACnB,CAAC,CAAC,CACN,CAAC;IACN,CAAC;IACD,gBAAgB;IACT,MAAM,CAAC,aAAa;QACvB,OAAO,IAAI,OAAO,CAAC,CAAC,OAA+C,EAAE,MAAM,EAAE,EAAE;YAC3E,GAAG,CAAC,IAAI,CAAC,aAAa,CAClB,CAAC,GAAe,EAAE,SAAyB,EAAE,EAAE;gBAC3C,IAAI,GAAG,EAAE;oBACL,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;oB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AC;iBACjB;qBAAM;oBACH,OAAO,CAAC,MAAM,CAAC,CAAC;iBACnB;gBACD,OAAO,CAAC,OAAO,EAAE,CAAC;YACtB,CAAC,CAAC,CAAC;QACP,CAAC,CAAA,CAAC,CAAC;IACP,CAAC;CACJ;AA5ND,sBA4NC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..481951e50d5ff280d8cd5035d88638792f058962
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts"
@@ -0,0 +1,15 @@
+import { IGoods } from "./ResponseData";
+export default class TempStorage {
+ private static _instance;
+ private _goodsList?;
+ tokenList: {
+ [key: number]: {
+ token: string;
+ user: string;
+ };
+ };
+ private constructor();
+ static get instance(): TempStorage;
+ getGoodsList(): Promise>;
+}
+//# sourceMappingURL=TempStorage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..35c9ed9b44078628352a2b9564530db03481466b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TempStorage.d.ts","sourceRoot":"","sources":["../../src/model/TempStorage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAGxC,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAa;IACrC,OAAO,CAAC,UAAU,CAAC,CAAe;IAC3B,SAAS,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE;YAAC,KAAK,EAAC,MAAM,CAAC;YAAA,IAAI,EAAC,MAAM,CAAA;SAAC,CAAA;KAAC,CAAG;IAE7D,OAAO;IAGP,WAAkB,QAAQ,IAAG,WAAW,CAEvC;IAGY,YAAY,IAAG,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;CAWrD"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..08cca82eba7edfceca1ba330e46462a701dd03ce
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js"
@@ -0,0 +1,40 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const Sql_1 = __importDefault(require("./Sql"));
+class TempStorage {
+ constructor() {
+ this.tokenList = {};
+ }
+ static get instance() {
+ return TempStorage._instance || (TempStorage._instance = new TempStorage());
+ }
+ // 获取商品列表
+ getGoodsList() {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (this._goodsList)
+ return this._goodsList;
+ var result = yield Sql_1.default.select("goodslist");
+ // result.forEach((value:IGoods)=>{
+ // value.list=JSON.parse(String(value.list));
+ // value.icons=JSON.parse(String(value.icons));
+ // value.arguments=JSON.parse(String(value.arguments));
+ // })
+ this._goodsList = result;
+ return result || [];
+ });
+ }
+}
+exports.default = TempStorage;
+//# sourceMappingURL=TempStorage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..0368e82ce78ae3d26821dfc81063043f81c3f1a9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempStorage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TempStorage.js","sourceRoot":"","sources":["../../src/model/TempStorage.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,gDAAwB;AAExB,MAAqB,WAAW;IAK5B;QAFO,cAAS,GAA2C,EAAE,CAAA;IAI7D,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,OAAO,WAAW,CAAC,SAAS,IAAI,CAAC,WAAW,CAAC,SAAS,GAAC,IAAI,WAAW,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED,SAAS;IACI,YAAY;;YACrB,IAAG,IAAI,CAAC,UAAU;gBAAE,OAAO,IAAI,CAAC,UAAU,CAAC;YAC3C,IAAI,MAAM,GAAC,MAAM,aAAG,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACzC,mCAAmC;YACnC,iDAAiD;YACjD,mDAAmD;YACnD,2DAA2D;YAC3D,KAAK;YACL,IAAI,CAAC,UAAU,GAAC,MAAM,CAAC;YACvB,OAAO,MAAM,IAAI,EAAE,CAAC;QACxB,CAAC;KAAA;CACJ;AAxBD,8BAwBC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..939cb5b5ab9afb4092321f58fc1e23c491f3e0fa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts"
@@ -0,0 +1 @@
+//# sourceMappingURL=TempleStorage.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..2227ba2f15c73f0f36abeaf37d1b81a660835c45
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TempleStorage.d.ts","sourceRoot":"","sources":["../../src/model/TempleStorage.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js"
new file mode 100644
index 0000000000000000000000000000000000000000..a7bfafcac8b650891fbd4d0c4c083993c6e4581d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js"
@@ -0,0 +1,2 @@
+"use strict";
+//# sourceMappingURL=TempleStorage.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..a8fc2c60eda09d31a0f170688d2683912de23970
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/model/TempleStorage.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"TempleStorage.js","sourceRoot":"","sources":["../../src/model/TempleStorage.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..cc23fc41d4b9bf7c4c35dffabec7d38eb47c73fc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts"
@@ -0,0 +1,34 @@
+export declare enum ROUTERS {
+ REGISTER = "/user/register",
+ LOGIN = "/user/login",
+ LOGOUT = "/user/logout",
+ AUTH = "/user/auth",
+ LIST = "/goods/list",
+ DETAILS = "/details/details",
+ CARTLIST = "/cart/list",
+ ADD = "/cart/add",
+ REMOVE = "/cart/remove",
+ CHANGENUM = "/cart/changenum",
+ CHECKED = "/cart/checked"
+}
+export declare enum ROUTERS_TYPE {
+ USER = "/user",
+ GOODS = "/goods",
+ CART = "/cart",
+ DETAILS = "/details"
+}
+export declare enum ROUTER_CHILD {
+ MAIN = "/",
+ REGISTER = "/register",
+ LOGIN = "/login",
+ LOGOUT = "/logout",
+ AUTH = "/auth",
+ LIST = "/list",
+ DETAILS = "/details",
+ CARTLIST = "/list",
+ ADD = "/add",
+ REMOVE = "/remove",
+ CHANGENUM = "/changenum",
+ CHECKED = "/checked"
+}
+//# sourceMappingURL=RouterVo.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..5967563e8f91b19d74bd1a51136609ed6e2ec4cc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterVo.d.ts","sourceRoot":"","sources":["../../src/po/RouterVo.ts"],"names":[],"mappings":"AACA,oBAAY,OAAO;IACf,QAAQ,mBAAiB;IACzB,KAAK,gBAAc;IACnB,MAAM,iBAAe;IACrB,IAAI,eAAa;IACjB,IAAI,gBAAc;IAClB,OAAO,qBAAmB;IAC1B,QAAQ,eAAa;IACrB,GAAG,cAAY;IACf,MAAM,iBAAe;IACrB,SAAS,oBAAkB;IAC3B,OAAO,kBAAgB;CAC1B;AAED,oBAAY,YAAY;IACpB,IAAI,UAAQ;IACZ,KAAK,WAAS;IACd,IAAI,UAAQ;IACZ,OAAO,aAAW;CACrB;AAED,oBAAY,YAAY;IACpB,IAAI,MAAI;IACR,QAAQ,cAAY;IACpB,KAAK,WAAS;IACd,MAAM,YAAU;IAChB,IAAI,UAAQ;IACZ,IAAI,UAAQ;IACZ,OAAO,aAAW;IAClB,QAAQ,UAAQ;IAChB,GAAG,SAAO;IACV,MAAM,YAAU;IAChB,SAAS,eAAa;IACtB,OAAO,aAAW;CACrB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js"
new file mode 100644
index 0000000000000000000000000000000000000000..35ca1c83ae6d31b795b196282cddf7b5fae8ac2b
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js"
@@ -0,0 +1,43 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+exports.ROUTER_CHILD = exports.ROUTERS_TYPE = exports.ROUTERS = void 0;
+// 所有路由
+var ROUTERS;
+(function (ROUTERS) {
+ ROUTERS["REGISTER"] = "/user/register";
+ ROUTERS["LOGIN"] = "/user/login";
+ ROUTERS["LOGOUT"] = "/user/logout";
+ ROUTERS["AUTH"] = "/user/auth";
+ ROUTERS["LIST"] = "/goods/list";
+ ROUTERS["DETAILS"] = "/details/details";
+ ROUTERS["CARTLIST"] = "/cart/list";
+ ROUTERS["ADD"] = "/cart/add";
+ ROUTERS["REMOVE"] = "/cart/remove";
+ ROUTERS["CHANGENUM"] = "/cart/changenum";
+ ROUTERS["CHECKED"] = "/cart/checked";
+})(ROUTERS || (exports.ROUTERS = ROUTERS = {}));
+// 一级路由
+var ROUTERS_TYPE;
+(function (ROUTERS_TYPE) {
+ ROUTERS_TYPE["USER"] = "/user";
+ ROUTERS_TYPE["GOODS"] = "/goods";
+ ROUTERS_TYPE["CART"] = "/cart";
+ ROUTERS_TYPE["DETAILS"] = "/details";
+})(ROUTERS_TYPE || (exports.ROUTERS_TYPE = ROUTERS_TYPE = {}));
+// 二级路由
+var ROUTER_CHILD;
+(function (ROUTER_CHILD) {
+ ROUTER_CHILD["MAIN"] = "/";
+ ROUTER_CHILD["REGISTER"] = "/register";
+ ROUTER_CHILD["LOGIN"] = "/login";
+ ROUTER_CHILD["LOGOUT"] = "/logout";
+ ROUTER_CHILD["AUTH"] = "/auth";
+ ROUTER_CHILD["LIST"] = "/list";
+ ROUTER_CHILD["DETAILS"] = "/details";
+ ROUTER_CHILD["CARTLIST"] = "/list";
+ ROUTER_CHILD["ADD"] = "/add";
+ ROUTER_CHILD["REMOVE"] = "/remove";
+ ROUTER_CHILD["CHANGENUM"] = "/changenum";
+ ROUTER_CHILD["CHECKED"] = "/checked";
+})(ROUTER_CHILD || (exports.ROUTER_CHILD = ROUTER_CHILD = {}));
+//# sourceMappingURL=RouterVo.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b5963d4f01f81d4c17d4317bbd83171d8ec26958
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/RouterVo.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterVo.js","sourceRoot":"","sources":["../../src/po/RouterVo.ts"],"names":[],"mappings":";;;AAAA,OAAO;AACP,IAAY,OAYX;AAZD,WAAY,OAAO;IACf,sCAAyB,CAAA;IACzB,gCAAmB,CAAA;IACnB,kCAAqB,CAAA;IACrB,8BAAiB,CAAA;IACjB,+BAAkB,CAAA;IAClB,uCAA0B,CAAA;IAC1B,kCAAqB,CAAA;IACrB,4BAAe,CAAA;IACf,kCAAqB,CAAA;IACrB,wCAA2B,CAAA;IAC3B,oCAAuB,CAAA;AAC3B,CAAC,EAZW,OAAO,uBAAP,OAAO,QAYlB;AACD,OAAO;AACP,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,8BAAY,CAAA;IACZ,gCAAc,CAAA;IACd,8BAAY,CAAA;IACZ,oCAAkB,CAAA;AACtB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AACD,OAAO;AACP,IAAY,YAaX;AAbD,WAAY,YAAY;IACpB,0BAAQ,CAAA;IACR,sCAAoB,CAAA;IACpB,gCAAc,CAAA;IACd,kCAAgB,CAAA;IAChB,8BAAY,CAAA;IACZ,8BAAY,CAAA;IACZ,oCAAkB,CAAA;IAClB,kCAAgB,CAAA;IAChB,4BAAU,CAAA;IACV,kCAAgB,CAAA;IAChB,wCAAsB,CAAA;IACtB,oCAAkB,CAAA;AACtB,CAAC,EAbW,YAAY,4BAAZ,YAAY,QAavB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..e31e7ca01dccc700dd5d0b36d673bb6d7985bdec
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts"
@@ -0,0 +1,4 @@
+export type bodyDataType = string | {
+ [key: string]: any;
+};
+//# sourceMappingURL=ServerVo.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b05872f9928faed136b2c3cf3a5f121ab8670075
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ServerVo.d.ts","sourceRoot":"","sources":["../../src/po/ServerVo.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAC,MAAM,GAAC;IAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;CAAC,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js"
new file mode 100644
index 0000000000000000000000000000000000000000..7895be34c39ca2b4803912ab0f7fe4a35106f473
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js"
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=ServerVo.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..3bf435223b9eb41b317c649ef4deef4e19cb569e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/ServerVo.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"ServerVo.js","sourceRoot":"","sources":["../../src/po/ServerVo.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..7b6653f1b3f8ee03447b05b5e0695424bff61cf2
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts"
@@ -0,0 +1,2 @@
+export type SqlTableType = "user" | "goodslist" | "shoppinglist" | "details/details";
+//# sourceMappingURL=SqlVo.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..e652ea78d4e3ab12a2211b1066df57f3b958faeb
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"SqlVo.d.ts","sourceRoot":"","sources":["../../src/po/SqlVo.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,YAAY,GAAC,MAAM,GAAG,WAAW,GAAG,cAAc,GAAG,iBAAiB,CAAC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js"
new file mode 100644
index 0000000000000000000000000000000000000000..8bb5351072fce74a751e32ece77943c9111b81da
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js"
@@ -0,0 +1,3 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+//# sourceMappingURL=SqlVo.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..f4abe91026c54f308b05f88f1608b05ed5c20d10
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/po/SqlVo.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"SqlVo.js","sourceRoot":"","sources":["../../src/po/SqlVo.ts"],"names":[],"mappings":""}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4c254b471d059b0c18682b0961fdd89354d3597e
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts"
@@ -0,0 +1,18 @@
+///
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+export default class CartCommand implements ICommand {
+ constructor();
+ exec(router: ROUTER_CHILD, data: any, res: ServerResponse): void;
+ private add;
+ private list;
+ private remove;
+ private checked;
+ private changeNum;
+ private getShoppingList;
+ private authBool;
+ private addShopping;
+ private sendShoppingList;
+}
+//# sourceMappingURL=CartCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..34cdddcc9bfa540d670057145dc017da70f9ba32
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"CartCommand.d.ts","sourceRoot":"","sources":["../../src/router/CartCommand.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQjD,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,QAAQ;;IAEzC,IAAI,CAAC,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc,GAAG,IAAI;YAqBzD,GAAG;YAkDH,IAAI;YAWJ,MAAM;YAWN,OAAO;YAeP,SAAS;YAeT,eAAe;IAU7B,OAAO,CAAC,QAAQ;YAIF,WAAW;YAsCX,gBAAgB;CAajC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..7754c4b8c113d56e19f8c4632d909b2bb7a5c87a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js"
@@ -0,0 +1,179 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_js_1 = require("../po/RouterVo.js");
+const TempStorage_js_1 = __importDefault(require("../model/TempStorage.js"));
+const Sql_js_1 = __importDefault(require("../model/Sql.js"));
+const process_1 = require("process");
+class CartCommand {
+ constructor() { }
+ exec(router, data, res) {
+ // 根据不同的二级路由调用不用的方法
+ switch (router) {
+ case RouterVo_js_1.ROUTER_CHILD.ADD:
+ this.add(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.REMOVE:
+ this.remove(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.LIST:
+ this.list(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.CHECKED:
+ this.checked(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.CHANGENUM:
+ this.changeNum(data, res);
+ break;
+ }
+ }
+ // 加入购物车
+ add(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // console.log(data,"_____________________________");
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误操作" } }));
+ return;
+ }
+ // console.log(data.pid,"-=-=-=-=-=-");
+ var list = yield this.getShoppingList(data.userId, data.itemId, data.pid);
+ console.log(list, "=----------------------------");
+ if (list && list.length > 0) {
+ var n = list[0].num + 1;
+ if (data.numValue) {
+ // var result=await Sql.insert("shoppinglist",[
+ // data.goodsId,
+ // data.userId,
+ // false,
+ // data.img,
+ // data.title,
+ // data.price1,
+ // data.num,
+ // data.total
+ // ])
+ // }else{
+ var result = yield Sql_js_1.default.update("shoppinglist", { num: n, total: list[0].price * n }, { goodsId: list[0].goodsId, userId: list[0].userId });
+ // console.log(result,"====================");
+ }
+ this.sendShoppingList("更新失败", result, res, data);
+ // this.addShopping(data, res);
+ // console.log("zouzhelilma");
+ return;
+ }
+ else {
+ this.addShopping(data, res);
+ }
+ });
+ }
+ // 获取购物车列表
+ list(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误操作" } }));
+ return;
+ }
+ var result = yield this.getShoppingList(data.userId);
+ res.end(JSON.stringify({ errno: null, result: result }));
+ });
+ }
+ // 删除商品
+ remove(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误操作" } }));
+ return;
+ }
+ var result = yield Sql_js_1.default.deleteAll("shoppinglist", data.ids);
+ this.sendShoppingList("删除失败", result, res, data);
+ });
+ }
+ // 修改商品选中状态
+ checked(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误操作" } }));
+ return;
+ }
+ var result = yield Sql_js_1.default.updateAll("shoppinglist", { checked: data.checked }, data.ids);
+ this.sendShoppingList("修改失败", result, res, data);
+ });
+ }
+ // 修改商品数量
+ changeNum(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误操作" } }));
+ return;
+ }
+ var result = yield Sql_js_1.default.update("shoppinglist", { num: data.num }, { pid: data.id });
+ this.sendShoppingList("修改失败", result, res, data);
+ });
+ }
+ // 获取购物车列表
+ getShoppingList(userId, goodsId, data) {
+ return __awaiter(this, void 0, void 0, function* () {
+ // console.log("zouzhelil");
+ console.log(data);
+ return yield Sql_js_1.default.select("shoppinglist", goodsId ? { goodsId, userId } : data ? { pid: process_1.pid, userId } : { userId });
+ });
+ }
+ authBool(userId, token) {
+ return TempStorage_js_1.default.instance.tokenList[userId].token === token;
+ }
+ addShopping(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ console.log("不能走这里吧");
+ var goodsList = yield TempStorage_js_1.default.instance.getGoodsList();
+ var item = goodsList.find((item) => item.pid == data.itemId);
+ if (!item) {
+ res.end(JSON.stringify({ errno: 1, result: { message: "错误id" } }));
+ return;
+ }
+ console.log("go");
+ console.log(item);
+ // var itemInfo: IItemInfo | undefined = item.list.find(
+ // (item: IItemInfo) => item.id === data.itemId
+ // );
+ // if (!itemInfo) {
+ // res.end(
+ // JSON.stringify({ errno: 1, result: { message: "错误itemid" } })
+ // );
+ // return;
+ // }
+ var result = yield Sql_js_1.default.insert("shoppinglist", [
+ data.itemId,
+ data.userId,
+ false,
+ item.title,
+ item.company,
+ item.img,
+ item.price + "" + item.price1,
+ 1,
+ item.price + "" + item.price1,
+ ]);
+ this.sendShoppingList("插入失败", result, res, data);
+ });
+ }
+ sendShoppingList(message, result, res, data) {
+ return __awaiter(this, void 0, void 0, function* () {
+ if (!result) {
+ console.log(message);
+ }
+ var resultData = yield this.getShoppingList(data.userId);
+ res.end(JSON.stringify({ errno: null, result: resultData }));
+ });
+ }
+}
+exports.default = CartCommand;
+//# sourceMappingURL=CartCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..01884dc780821ad27a2b369486ff8f88003629b0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/CartCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"CartCommand.js","sourceRoot":"","sources":["../../src/router/CartCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,mDAAiD;AAGjD,6EAAkD;AAClD,6DAAkC;AAElC,qCAA8B;AAE9B,MAAqB,WAAW;IAC5B,gBAAe,CAAC;IACT,IA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IAAI,CAAC,MAAM,CACd,CAAC;YACF,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;QACjE,CAAC;KAAA;CACJ;AA9LD,8BA8LC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..fae75a668a5795e2d4c22cfaef7e7faa12daedea
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts"
@@ -0,0 +1,10 @@
+///
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+export default class GoodsCommand implements ICommand {
+ constructor();
+ exec(router: ROUTER_CHILD, data: any, res: ServerResponse): void;
+ private details;
+}
+//# sourceMappingURL=DetailsCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..5afcb931860fd72de13788431c31938412d099c8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsCommand.d.ts","sourceRoot":"","sources":["../../src/router/DetailsCommand.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAI1C,IAAI,CAAC,MAAM,EAAC,YAAY,EAAC,IAAI,EAAC,GAAG,EAAC,GAAG,EAAC,cAAc,GAAG,IAAI;YAStD,OAAO;CAOtB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..7063bfe71b1cf1d90d83c8ea73b7e58c7e407e9c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js"
@@ -0,0 +1,38 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_js_1 = require("../po/RouterVo.js");
+const Sql_js_1 = __importDefault(require("../model/Sql.js"));
+class GoodsCommand {
+ constructor() {
+ }
+ exec(router, data, res) {
+ switch (router) {
+ case RouterVo_js_1.ROUTER_CHILD.DETAILS:
+ this.details(data, res);
+ break;
+ }
+ }
+ // 获取商品列表
+ // 商品详情页
+ details(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ var resData = yield Sql_js_1.default.select('goodslist', data);
+ // console.log(resData,"-------");
+ res.end(JSON.stringify(resData));
+ });
+ }
+}
+exports.default = GoodsCommand;
+//# sourceMappingURL=DetailsCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..61f7288f7ef968c4b5825e7fa3a290080b763b9f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/DetailsCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"DetailsCommand.js","sourceRoot":"","sources":["../../src/router/DetailsCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,mDAAiD;AACjD,6DAAkC;AAKlC,MAAqB,YAAY;IAC7B;IAEA,CAAC;IACM,IAAI,CAAC,MAAmB,EAAC,IAAQ,EAAC,GAAkB;QACvD,QAAO,MAAM,EAAC;YACV,KAAK,0BAAY,CAAC,OAAO;gBACrB,IAAI,CAAC,OAAO,CAAC,IAAI,EAAC,GAAG,CAAC,CAAC;gBACvB,MAAM;SACb;IACL,CAAC;IACD,SAAS;IACX,QAAQ;IACM,OAAO,CAAC,IAAQ,EAAC,GAAkB;;YAC/C,IAAI,OAAO,GAAC,MAAM,gBAAG,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC;YAChD,kCAAkC;YAElC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;QACpC,CAAC;KAAA;CAEA;AApBD,+BAoBC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..dc1fc7f48837d52ed409bff9ace5fa02edf0bff9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts"
@@ -0,0 +1,10 @@
+///
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+export default class GoodsCommand implements ICommand {
+ constructor();
+ exec(router: ROUTER_CHILD, data: any, res: ServerResponse): void;
+ private list;
+}
+//# sourceMappingURL=GoodsCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..46690227b4b952da35b29b6547e0da31c0fdc8be
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"GoodsCommand.d.ts","sourceRoot":"","sources":["../../src/router/GoodsCommand.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAMjD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAI1C,IAAI,CAAC,MAAM,EAAC,YAAY,EAAC,IAAI,EAAC,GAAG,EAAC,GAAG,EAAC,cAAc,GAAG,IAAI;YASpD,IAAI;CAWrB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..1d824ac474b9bb5c591d2f7ca291415696a21330
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js"
@@ -0,0 +1,43 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_js_1 = require("../po/RouterVo.js");
+const TempStorage_js_1 = __importDefault(require("../model/TempStorage.js"));
+class GoodsCommand {
+ constructor() {
+ }
+ exec(router, data, res) {
+ switch (router) {
+ case RouterVo_js_1.ROUTER_CHILD.LIST:
+ this.list(data, res);
+ break;
+ }
+ }
+ // 获取商品列表
+ list(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ var result = yield TempStorage_js_1.default.instance.getGoodsList();
+ var resData;
+ if (result && result.length > 0) {
+ resData = { errno: null, result };
+ }
+ else {
+ resData = { errno: 1, result: { message: "没有找到数据" } };
+ }
+ res.end(JSON.stringify(resData));
+ });
+ }
+}
+exports.default = GoodsCommand;
+//# sourceMappingURL=GoodsCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..ab30cefe63cf787e9e8c03cf725a9fa66abdb0d4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/GoodsCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"GoodsCommand.js","sourceRoot":"","sources":["../../src/router/GoodsCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,mDAAiD;AAGjD,6EAAkD;AAGlD,MAAqB,YAAY;IAC7B;IAEA,CAAC;IACM,IAAI,CAAC,MAAmB,EAAC,IAAQ,EAAC,GAAkB;QACvD,QAAO,MAAM,EAAC;YACV,KAAK,0BAAY,CAAC,IAAI;gBAClB,IAAI,CAAC,IAAI,CAAC,IAAI,EAAC,GAAG,CAAC,CAAC;gBACpB,MAAM;SAEb;IACL,CAAC;IACD,SAAS;IACK,IAAI,CAAC,IAAQ,EAAC,GAAkB;;YAC1C,IAAI,MAAM,GAAC,MAAM,wBAAW,CAAC,QAAQ,CAAC,YAAY,EAAE,CAAC;YACrD,IAAI,OAAqB,CAAC;YAC1B,IAAG,MAAM,IAAI,MAAM,CAAC,MAAM,GAAC,CAAC,EAAC;gBACzB,OAAO,GAAC,EAAC,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,CAAC;aAC/B;iBAAI;gBACD,OAAO,GAAC,EAAC,KAAK,EAAC,CAAC,EAAC,MAAM,EAAC,EAAC,OAAO,EAAC,QAAQ,EAAC,EAAC,CAAC;aAC/C;YACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;QACrC,CAAC;KAAA;CAEJ;AAxBD,+BAwBC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..1389f023c5824966d7b0e31c732d546d258c5cfa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts"
@@ -0,0 +1,15 @@
+///
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand";
+import { ROUTERS, ROUTERS_TYPE } from "../po/RouterVo";
+export default class RouterIndex {
+ private static _instance;
+ private list;
+ private constructor();
+ static get instance(): RouterIndex;
+ add(rotuer: ROUTERS_TYPE, command: {
+ new (): ICommand;
+ }): void;
+ dispatch(router: ROUTERS, data: any, params: any, res: ServerResponse): void;
+}
+//# sourceMappingURL=RouterIndex.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..0723742a68ae43825dc97ed29a6e8fdaf346a1d8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterIndex.d.ts","sourceRoot":"","sources":["../../src/router/RouterIndex.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAgB,MAAM,gBAAgB,CAAC;AAErE,MAAM,CAAC,OAAO,OAAO,WAAW;IAC5B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAc;IAEtC,OAAO,CAAC,IAAI,CAAoD;IAChE,OAAO;IACP,WAAkB,QAAQ,IAAI,WAAW,CAIxC;IAEM,GAAG,CAAC,MAAM,EAAE,YAAY,EAAE,OAAO,EAAE;QAAE,QAAQ,QAAQ,CAAA;KAAE;IAIvD,QAAQ,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,cAAc;CA6B/E"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js"
new file mode 100644
index 0000000000000000000000000000000000000000..2d6cd767e50bf139311605dd690119d78d471d77
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js"
@@ -0,0 +1,50 @@
+"use strict";
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_1 = require("../po/RouterVo");
+// 总路由
+class RouterIndex {
+ constructor() {
+ // list为一级路由列表
+ this.list = {};
+ }
+ static get instance() {
+ return (RouterIndex._instance || (RouterIndex._instance = new RouterIndex()));
+ }
+ // 添加一级路由
+ add(rotuer, command) {
+ if (!this.list[rotuer])
+ this.list[rotuer] = new Set();
+ this.list[rotuer].add(command);
+ }
+ dispatch(router, data, params, res) {
+ var commands = new Set();
+ // 二级路由
+ var routerChild = RouterVo_1.ROUTER_CHILD.MAIN;
+ switch (true) {
+ case new RegExp(RouterVo_1.ROUTERS_TYPE.USER).test(router):
+ // 一级路由列表
+ commands = this.list[RouterVo_1.ROUTERS_TYPE.USER];
+ // 获取二级路由
+ routerChild = router.replace(RouterVo_1.ROUTERS_TYPE.USER, "");
+ break;
+ case new RegExp(RouterVo_1.ROUTERS_TYPE.GOODS).test(router):
+ commands = this.list[RouterVo_1.ROUTERS_TYPE.GOODS];
+ routerChild = router.replace(RouterVo_1.ROUTERS_TYPE.GOODS, "");
+ break;
+ case new RegExp(RouterVo_1.ROUTERS_TYPE.CART).test(router):
+ commands = this.list[RouterVo_1.ROUTERS_TYPE.CART];
+ routerChild = router.replace(RouterVo_1.ROUTERS_TYPE.CART, "");
+ break;
+ case new RegExp(RouterVo_1.ROUTERS_TYPE.DETAILS).test(router):
+ commands = this.list[RouterVo_1.ROUTERS_TYPE.DETAILS];
+ routerChild = router.replace(RouterVo_1.ROUTERS_TYPE.DETAILS, "");
+ break;
+ }
+ console.log(commands);
+ commands.forEach((className) => {
+ new className().exec(routerChild, data, res, params);
+ });
+ }
+}
+exports.default = RouterIndex;
+//# sourceMappingURL=RouterIndex.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..b0844f72133cdbbd9d21fbd68763d7314badccfe
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/RouterIndex.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"RouterIndex.js","sourceRoot":"","sources":["../../src/router/RouterIndex.ts"],"names":[],"mappings":";;AAEA,6CAAqE;AACrE,MAAM;AACN,MAAqB,WAAW;IAI5B;QAFA,cAAc;QACN,SAAI,GAAiD,EAAE,CAAC;IACzC,CAAC;I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,CAAC;gBAC3C,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAY,CAAC,IAAI,CAAC,CAAC;gBACxC,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAY,CAAC,IAAI,EAAE,EAAE,CAAiB,CAAC;gBACpE,MAAM;YACV,KAAK,IAAI,MAAM,CAAC,uBAAY,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;gBAC9C,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,uBAAY,CAAC,OAAO,CAAC,CAAC;gBAC3C,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC,uBAAY,CAAC,OAAO,EAAE,EAAE,CAAiB,CAAC;gBACvE,MAAM;SACb;QACD,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACtB,QAAQ,CAAC,OAAO,CAAC,CAAC,SAA+B,EAAE,EAAE;YACjD,IAAI,SAAS,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,CAAC,CAAC;QACzD,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AA5CD,8BA4CC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..503ab489f2cffd17b269c8231512b8e3d28e961d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts"
@@ -0,0 +1,13 @@
+///
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+export default class UserCommand implements ICommand {
+ constructor();
+ exec(router: ROUTER_CHILD, data: any, res: ServerResponse, params: any): void;
+ private register;
+ private login;
+ private logout;
+ private auth;
+}
+//# sourceMappingURL=UserCommand.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..47edd16fd67447ab071f0d78fd99a12126c641d8
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"UserCommand.d.ts","sourceRoot":"","sources":["../../src/router/UserCommand.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AACtC,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAQjD,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,QAAQ;;IAIzC,IAAI,CAAC,MAAM,EAAC,YAAY,EAAC,IAAI,EAAC,GAAG,EAAC,GAAG,EAAC,cAAc,EAAC,MAAM,EAAC,GAAG,GAAG,IAAI;YAmB/D,QAAQ;YAYR,KAAK;YAuBL,MAAM;YAMN,IAAI;CASrB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js"
new file mode 100644
index 0000000000000000000000000000000000000000..b4e9dd903af5f6303e6c64f017267a6aa7984993
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js"
@@ -0,0 +1,104 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const RouterVo_js_1 = require("../po/RouterVo.js");
+const Sql_js_1 = __importDefault(require("../model/Sql.js"));
+const md5_js_1 = require("../Utils/md5.js");
+const TempStorage_js_1 = __importDefault(require("../model/TempStorage.js"));
+class UserCommand {
+ constructor() {
+ }
+ exec(router, data, res, params) {
+ console.log(router);
+ // 根据不同的二级路由调用不用的方法
+ switch (router) {
+ case RouterVo_js_1.ROUTER_CHILD.REGISTER:
+ this.register(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.LOGIN:
+ this.login(data, res);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.LOGOUT:
+ this.logout(data, res, params);
+ break;
+ case RouterVo_js_1.ROUTER_CHILD.AUTH:
+ this.auth(data, res);
+ break;
+ }
+ }
+ // 注册
+ register(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ console.log(data, 123);
+ var result = yield Sql_js_1.default.insert("user", Object.values(data));
+ var resData;
+ if (result) {
+ resData = { errno: null, result: { message: "注册成功" } };
+ }
+ else {
+ resData = { errno: 1, result: { message: "注册失败" } };
+ }
+ res.end(JSON.stringify(resData));
+ });
+ }
+ // 登录
+ login(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ var result = yield Sql_js_1.default.select("user", data);
+ var resData;
+ if (result && result.length > 0) {
+ var token = (0, md5_js_1.hex_md5)(data.user + data.password + Date.now());
+ TempStorage_js_1.default.instance.tokenList[result[0].pid] = { token, user: data.user };
+ resData = {
+ errno: null,
+ result: {
+ user: data.user, token, userId: result[0].pid, message: "登录成功"
+ }
+ };
+ }
+ else {
+ resData = {
+ errno: 1,
+ result: {
+ message: "登录失败"
+ }
+ };
+ }
+ res.end(JSON.stringify(resData));
+ });
+ }
+ // 退出登录
+ logout(data, res, params) {
+ return __awaiter(this, void 0, void 0, function* () {
+ delete TempStorage_js_1.default.instance.tokenList[params.userId];
+ var resData = { errno: null, result: { message: "退出登录成功" } };
+ res.end(JSON.stringify(resData));
+ });
+ }
+ // 自动登录
+ auth(data, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ var resData;
+ if (TempStorage_js_1.default.instance.tokenList[data.userId] && data.token === TempStorage_js_1.default.instance.tokenList[data.userId].token) {
+ resData = { errno: null, result: { message: "自动登录成功", userId: data.userId, user: data.user, token: data.token } };
+ }
+ else {
+ resData = { errno: 1, result: { message: "自动登录失败" } };
+ }
+ res.end(JSON.stringify(resData));
+ });
+ }
+}
+exports.default = UserCommand;
+//# sourceMappingURL=UserCommand.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..ebd511e1b2106d853c1928d413b74d1ce1fcad52
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/router/UserCommand.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"UserCommand.js","sourceRoot":"","sources":["../../src/router/UserCommand.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAEA,mDAAiD;AAEjD,6DAAkC;AAElC,4CAAuC;AACvC,6EAAkD;AAGlD,MAAqB,WAAW;IAC5B;IAEA,CAAC;IACM,IAAI,CAAC,MAAmB,EAAC,IAAQ,EAAC,GAAkB,EAAC,MAAU;QAClE,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAA;QACnB,mBAAmB;QACnB,QAAO,MAAM,EAAC;YACV,KAAK,0BAAY,CAAC,QAAQ;gBACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAC,GAAG,CAAC,CAAA;gBACvB,MAAM;YACV,KAAK,0BAAY,CAAC,KAAK;gBACnB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAC,GAAG,CAAC,CAAC;gBACrB,MAAM;YACV,KAAK,0BAAY,CAAC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AAI,CAAC,MAAM,EAAC,IAAI,EAAC,IAAI,CAAC,IAAI,EAAC,KAAK,EAAC,IAAI,CAAC,KAAK,EAAC,EAAC,CAAA;aACpG;iBAAI;gBACD,OAAO,GAAC,EAAC,KAAK,EAAC,CAAC,EAAC,MAAM,EAAC,EAAC,OAAO,EAAC,QAAQ,EAAC,EAAC,CAAC;aAC/C;YACD,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAA;QACpC,CAAC;KAAA;CACJ;AAzED,8BAyEC"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts" "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..550331d8c783820b4df032c2dafeac329a45a242
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts"
@@ -0,0 +1,15 @@
+export default class Servers {
+ port?: number | undefined;
+ private server;
+ private rotuer?;
+ private params;
+ private body;
+ constructor(port?: number | undefined);
+ private requestHandler;
+ listen(port: number): void;
+ private getHeader;
+ private getRouter;
+ private getParams;
+ private getBody;
+}
+//# sourceMappingURL=Servers.d.ts.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts.map"
new file mode 100644
index 0000000000000000000000000000000000000000..151a1073156a8916d87bc75ff05891db0847618a
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.d.ts.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Servers.d.ts","sourceRoot":"","sources":["../../src/server/Servers.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,OAAO;IAKL,IAAI,CAAC;IAJxB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,MAAM,CAAC,CAAS;IACxB,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,IAAI,CAAiB;gBACV,IAAI,CAAC,oBAAO;YAIjB,cAAc;IAgBrB,MAAM,CAAC,IAAI,EAAC,MAAM,GAAE,IAAI;IAI/B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,OAAO;CAiBlB"}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js" "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js"
new file mode 100644
index 0000000000000000000000000000000000000000..5dbdb9e93c4ea03c12ecc66a33f7fce5d6611cba
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js"
@@ -0,0 +1,84 @@
+"use strict";
+var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
+ return new (P || (P = Promise))(function (resolve, reject) {
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
+ });
+};
+var __importDefault = (this && this.__importDefault) || function (mod) {
+ return (mod && mod.__esModule) ? mod : { "default": mod };
+};
+Object.defineProperty(exports, "__esModule", { value: true });
+const http_1 = __importDefault(require("http"));
+const querystring_1 = __importDefault(require("querystring"));
+const RouterIndex_1 = __importDefault(require("../router/RouterIndex"));
+class Servers {
+ constructor(port) {
+ this.port = port;
+ this.params = {};
+ this.body = "";
+ this.server = http_1.default.createServer((req, res) => this.requestHandler(req, res));
+ if (port)
+ this.listen(port);
+ }
+ requestHandler(req, res) {
+ return __awaiter(this, void 0, void 0, function* () {
+ res.setHeader("Access-Control-Allow-Origin", "*");
+ res.setHeader("Access-Control-Allow-Headers", "*");
+ if (/options/i.test(req.method || "")) {
+ res.end();
+ return;
+ }
+ this.rotuer = this.getRouter(req);
+ this.params = this.getParams(req);
+ this.body = yield this.getBody(req);
+ res.writeHead(200, {
+ "Content-Type": "application/json;charset=utf-8"
+ });
+ console.log(this.rotuer, this.params, this.body);
+ RouterIndex_1.default.instance.dispatch(this.rotuer, this.body, this.params, res);
+ });
+ }
+ listen(port) {
+ this.server.listen(port, () => console.log("开启服务"));
+ }
+ getHeader(req) {
+ }
+ // 获取路由
+ getRouter(req) {
+ var _a;
+ return (_a = req.url) === null || _a === void 0 ? void 0 : _a.split("?")[0];
+ }
+ // 获取params
+ getParams(req) {
+ var _a;
+ var params = ((_a = req.url) === null || _a === void 0 ? void 0 : _a.split("?")[1]) || "";
+ if (params.trim().length === 0)
+ return {};
+ return querystring_1.default.parse(params);
+ }
+ // 获取数据
+ getBody(req) {
+ return new Promise((resolve, reject) => {
+ var data = "";
+ req.on("data", (_chunk) => data += _chunk);
+ req.on("end", () => {
+ try {
+ data = JSON.parse(data);
+ }
+ catch (err) {
+ try {
+ data = querystring_1.default.parse(data);
+ }
+ catch (err) { }
+ }
+ resolve(data);
+ });
+ });
+ }
+}
+exports.default = Servers;
+//# sourceMappingURL=Servers.js.map
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js.map" "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js.map"
new file mode 100644
index 0000000000000000000000000000000000000000..9219b633ba20131060fc4bc72347ed3291ae96a0
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/dist/server/Servers.js.map"
@@ -0,0 +1 @@
+{"version":3,"file":"Servers.js","sourceRoot":"","sources":["../../src/server/Servers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,gDAAqE;AACrE,8DAAsC;AAGtC,wEAAgD;AAChD,MAAqB,OAAO;IAKxB,YAAmB,IAAY;QAAZ,SAAI,GAAJ,IAAI,CAAQ;QAFvB,WAAM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221\236\345\256\201/server/package-lock.json" "b/\350\264\276\347\221\236\345\256\201/server/package-lock.json"
new file mode 100644
index 0000000000000000000000000000000000000000..5f05648dea3955898556b851556175f7e88adeae
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/package-lock.json"
@@ -0,0 +1,991 @@
+{
+ "name": "server",
+ "version": "1.0.0",
+ "lockfileVersion": 2,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "server",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "@types/mysql": "^2.15.21",
+ "@types/node": "^20.5.8",
+ "mysql": "^2.18.1"
+ },
+ "devDependencies": {
+ "cross-env": "^7.0.3",
+ "nodemon": "^3.0.1"
+ }
+ },
+ "node_modules/@types/mysql": {
+ "version": "2.15.21",
+ "resolved": "https://registry.npmmirror.com/@types/mysql/-/mysql-2.15.21.tgz",
+ "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==",
+ "dependencies": {
+ "@types/node": "*"
+ }
+ },
+ "node_modules/@types/node": {
+ "version": "20.5.8",
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.5.8.tgz",
+ "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw=="
+ },
+ "node_modules/abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
+ },
+ "node_modules/anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "node_modules/bignumber.js": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz",
+ "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A==",
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "dependencies": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "node_modules/braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "dependencies": {
+ "fill-range": "^7.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "dependencies": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ },
+ "engines": {
+ "node": ">= 8.10.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
+ },
+ "node_modules/cross-env": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz",
+ "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.1"
+ },
+ "bin": {
+ "cross-env": "src/bin/cross-env.js",
+ "cross-env-shell": "src/bin/cross-env-shell.js"
+ },
+ "engines": {
+ "node": ">=10.14",
+ "npm": ">=6",
+ "yarn": ">=1"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "dependencies": {
+ "to-regex-range": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "hasInstallScript": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": "^8.16.0 || ^10.6.0 || >=11.0.0"
+ }
+ },
+ "node_modules/glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.1"
+ },
+ "engines": {
+ "node": ">= 6"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
+ "dev": true
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "dependencies": {
+ "binary-extensions": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.12.0"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "node_modules/mysql": {
+ "version": "2.18.1",
+ "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz",
+ "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
+ "dependencies": {
+ "bignumber.js": "9.0.0",
+ "readable-stream": "2.3.7",
+ "safe-buffer": "5.1.2",
+ "sqlstring": "2.3.1"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/nodemon": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.0.1.tgz",
+ "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",
+ "dev": true,
+ "dependencies": {
+ "chokidar": "^3.5.2",
+ "debug": "^3.2.7",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.1.2",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ },
+ "bin": {
+ "nodemon": "bin/nodemon.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/nopt": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmmirror.com/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
+ "dev": true,
+ "dependencies": {
+ "abbrev": "1"
+ },
+ "bin": {
+ "nopt": "bin/nopt.js"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ }
+ },
+ "node_modules/process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ },
+ "node_modules/pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
+ "dev": true
+ },
+ "node_modules/readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "dependencies": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "node_modules/readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "dependencies": {
+ "picomatch": "^2.2.1"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
+ "node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dev": true,
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sqlstring": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz",
+ "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ==",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "dependencies": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "node_modules/supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "dependencies": {
+ "has-flag": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "dependencies": {
+ "is-number": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=8.0"
+ }
+ },
+ "node_modules/touch": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.0.tgz",
+ "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+ "dev": true,
+ "dependencies": {
+ "nopt": "~1.0.10"
+ },
+ "bin": {
+ "nodetouch": "bin/nodetouch.js"
+ }
+ },
+ "node_modules/undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
+ "dev": true
+ },
+ "node_modules/util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ },
+ "dependencies": {
+ "@types/mysql": {
+ "version": "2.15.21",
+ "resolved": "https://registry.npmmirror.com/@types/mysql/-/mysql-2.15.21.tgz",
+ "integrity": "sha512-NPotx5CVful7yB+qZbWtXL2fA4e7aEHkihHLjklc6ID8aq7bhguHgeIoC1EmSNTAuCgI6ZXrjt2ZSaXnYX0EUg==",
+ "requires": {
+ "@types/node": "*"
+ }
+ },
+ "@types/node": {
+ "version": "20.5.8",
+ "resolved": "https://registry.npmmirror.com/@types/node/-/node-20.5.8.tgz",
+ "integrity": "sha512-eajsR9aeljqNhK028VG0Wuw+OaY5LLxYmxeoXynIoE6jannr9/Ucd1LL0hSSoafk5LTYG+FfqsyGt81Q6Zkybw=="
+ },
+ "abbrev": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/abbrev/-/abbrev-1.1.1.tgz",
+ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
+ "dev": true
+ },
+ "anymatch": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmmirror.com/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "requires": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/balanced-match/-/balanced-match-1.0.2.tgz",
+ "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
+ "dev": true
+ },
+ "bignumber.js": {
+ "version": "9.0.0",
+ "resolved": "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.0.0.tgz",
+ "integrity": "sha512-t/OYhhJ2SD+YGBQcjY8GzzDHEk9f3nerxjtfa6tlMXfe7frs/WozhvCNoGvpM0P3bNf3Gq5ZRMlGr5f3r4/N8A=="
+ },
+ "binary-extensions": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmmirror.com/binary-extensions/-/binary-extensions-2.2.0.tgz",
+ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmmirror.com/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "braces": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmmirror.com/braces/-/braces-3.0.2.tgz",
+ "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
+ "dev": true,
+ "requires": {
+ "fill-range": "^7.0.1"
+ }
+ },
+ "chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmmirror.com/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "requires": {
+ "anymatch": "~3.1.2",
+ "braces": "~3.0.2",
+ "fsevents": "~2.3.2",
+ "glob-parent": "~5.1.2",
+ "is-binary-path": "~2.1.0",
+ "is-glob": "~4.0.1",
+ "normalize-path": "~3.0.0",
+ "readdirp": "~3.6.0"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmmirror.com/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "core-util-is": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmmirror.com/core-util-is/-/core-util-is-1.0.3.tgz",
+ "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ=="
+ },
+ "cross-env": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmmirror.com/cross-env/-/cross-env-7.0.3.tgz",
+ "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==",
+ "dev": true,
+ "requires": {
+ "cross-spawn": "^7.0.1"
+ }
+ },
+ "cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmmirror.com/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "requires": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ }
+ },
+ "debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmmirror.com/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "requires": {
+ "ms": "^2.1.1"
+ }
+ },
+ "fill-range": {
+ "version": "7.0.1",
+ "resolved": "https://registry.npmmirror.com/fill-range/-/fill-range-7.0.1.tgz",
+ "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
+ "dev": true,
+ "requires": {
+ "to-regex-range": "^5.0.1"
+ }
+ },
+ "fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "dev": true,
+ "optional": true
+ },
+ "glob-parent": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/glob-parent/-/glob-parent-5.1.2.tgz",
+ "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
+ "dev": true,
+ "requires": {
+ "is-glob": "^4.0.1"
+ }
+ },
+ "has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true
+ },
+ "ignore-by-default": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmmirror.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz",
+ "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==",
+ "dev": true
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmmirror.com/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "is-binary-path": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmmirror.com/is-binary-path/-/is-binary-path-2.1.0.tgz",
+ "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
+ "dev": true,
+ "requires": {
+ "binary-extensions": "^2.0.0"
+ }
+ },
+ "is-extglob": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmmirror.com/is-extglob/-/is-extglob-2.1.1.tgz",
+ "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true
+ },
+ "is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmmirror.com/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "requires": {
+ "is-extglob": "^2.1.1"
+ }
+ },
+ "is-number": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmmirror.com/is-number/-/is-number-7.0.0.tgz",
+ "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
+ "dev": true
+ },
+ "isarray": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmmirror.com/isarray/-/isarray-1.0.0.tgz",
+ "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ=="
+ },
+ "isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmmirror.com/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "requires": {
+ "yallist": "^4.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmmirror.com/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "ms": {
+ "version": "2.1.3",
+ "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.3.tgz",
+ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==",
+ "dev": true
+ },
+ "mysql": {
+ "version": "2.18.1",
+ "resolved": "https://registry.npmmirror.com/mysql/-/mysql-2.18.1.tgz",
+ "integrity": "sha512-Bca+gk2YWmqp2Uf6k5NFEurwY/0td0cpebAucFpY/3jhrwrVGuxU2uQFCHjU19SJfje0yQvi+rVWdq78hR5lig==",
+ "requires": {
+ "bignumber.js": "9.0.0",
+ "readable-stream": "2.3.7",
+ "safe-buffer": "5.1.2",
+ "sqlstring": "2.3.1"
+ }
+ },
+ "nodemon": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmmirror.com/nodemon/-/nodemon-3.0.1.tgz",
+ "integrity": "sha512-g9AZ7HmkhQkqXkRc20w+ZfQ73cHLbE8hnPbtaFbFtCumZsjyMhKk9LajQ07U5Ux28lvFjZ5X7HvWR1xzU8jHVw==",
+ "dev": true,
+ "requires": {
+ "chokidar": "^3.5.2",
+ "debug": "^3.2.7",
+ "ignore-by-default": "^1.0.1",
+ "minimatch": "^3.1.2",
+ "pstree.remy": "^1.1.8",
+ "semver": "^7.5.3",
+ "simple-update-notifier": "^2.0.0",
+ "supports-color": "^5.5.0",
+ "touch": "^3.1.0",
+ "undefsafe": "^2.0.5"
+ }
+ },
+ "nopt": {
+ "version": "1.0.10",
+ "resolved": "https://registry.npmmirror.com/nopt/-/nopt-1.0.10.tgz",
+ "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==",
+ "dev": true,
+ "requires": {
+ "abbrev": "1"
+ }
+ },
+ "normalize-path": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/normalize-path/-/normalize-path-3.0.0.tgz",
+ "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+ "dev": true
+ },
+ "path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmmirror.com/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true
+ },
+ "picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true
+ },
+ "process-nextick-args": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmmirror.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+ },
+ "pstree.remy": {
+ "version": "1.1.8",
+ "resolved": "https://registry.npmmirror.com/pstree.remy/-/pstree.remy-1.1.8.tgz",
+ "integrity": "sha512-77DZwxQmxKnu3aR542U+X8FypNzbfJ+C5XQDk3uWjWxn6151aIMGthWYRXTqT1E5oJvg+ljaa2OJi+VfvCOQ8w==",
+ "dev": true
+ },
+ "readable-stream": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.7.tgz",
+ "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+ "requires": {
+ "core-util-is": "~1.0.0",
+ "inherits": "~2.0.3",
+ "isarray": "~1.0.0",
+ "process-nextick-args": "~2.0.0",
+ "safe-buffer": "~5.1.1",
+ "string_decoder": "~1.1.1",
+ "util-deprecate": "~1.0.1"
+ }
+ },
+ "readdirp": {
+ "version": "3.6.0",
+ "resolved": "https://registry.npmmirror.com/readdirp/-/readdirp-3.6.0.tgz",
+ "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
+ "dev": true,
+ "requires": {
+ "picomatch": "^2.2.1"
+ }
+ },
+ "safe-buffer": {
+ "version": "5.1.2",
+ "resolved": "https://registry.npmmirror.com/safe-buffer/-/safe-buffer-5.1.2.tgz",
+ "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+ },
+ "semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmmirror.com/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "requires": {
+ "lru-cache": "^6.0.0"
+ }
+ },
+ "shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "requires": {
+ "shebang-regex": "^3.0.0"
+ }
+ },
+ "shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmmirror.com/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true
+ },
+ "simple-update-notifier": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmmirror.com/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz",
+ "integrity": "sha512-a2B9Y0KlNXl9u/vsW6sTIu9vGEpfKu2wRV6l1H3XEas/0gUIzGzBoP/IouTcUQbm9JWZLH3COxyn03TYlFax6w==",
+ "dev": true,
+ "requires": {
+ "semver": "^7.5.3"
+ }
+ },
+ "sqlstring": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmmirror.com/sqlstring/-/sqlstring-2.3.1.tgz",
+ "integrity": "sha512-ooAzh/7dxIG5+uDik1z/Rd1vli0+38izZhGzSa34FwR7IbelPWCCKSNIl8jlL/F7ERvy8CB2jNeM1E9i9mXMAQ=="
+ },
+ "string_decoder": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmmirror.com/string_decoder/-/string_decoder-1.1.1.tgz",
+ "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+ "requires": {
+ "safe-buffer": "~5.1.0"
+ }
+ },
+ "supports-color": {
+ "version": "5.5.0",
+ "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-5.5.0.tgz",
+ "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+ "dev": true,
+ "requires": {
+ "has-flag": "^3.0.0"
+ }
+ },
+ "to-regex-range": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmmirror.com/to-regex-range/-/to-regex-range-5.0.1.tgz",
+ "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
+ "dev": true,
+ "requires": {
+ "is-number": "^7.0.0"
+ }
+ },
+ "touch": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmmirror.com/touch/-/touch-3.1.0.tgz",
+ "integrity": "sha512-WBx8Uy5TLtOSRtIq+M03/sKDrXCLHxwDcquSP2c43Le03/9serjQBIztjRz6FkJez9D/hleyAXTBGLwwZUw9lA==",
+ "dev": true,
+ "requires": {
+ "nopt": "~1.0.10"
+ }
+ },
+ "undefsafe": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmmirror.com/undefsafe/-/undefsafe-2.0.5.tgz",
+ "integrity": "sha512-WxONCrssBM8TSPRqN5EmsjVrsv4A8X12J4ArBiiayv3DyyG3ZlIg6yysuuSYdZsVz3TKcTg2fd//Ujd4CHV1iA==",
+ "dev": true
+ },
+ "util-deprecate": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmmirror.com/util-deprecate/-/util-deprecate-1.0.2.tgz",
+ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="
+ },
+ "which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmmirror.com/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "requires": {
+ "isexe": "^2.0.0"
+ }
+ },
+ "yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmmirror.com/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ }
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/package.json" "b/\350\264\276\347\221\236\345\256\201/server/package.json"
new file mode 100644
index 0000000000000000000000000000000000000000..cc541e6466d9c306458c32560ed44bec04384399
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/package.json"
@@ -0,0 +1,21 @@
+{
+ "name": "server",
+ "version": "1.0.0",
+ "description": "",
+ "main": "./dist/Main.js",
+ "scripts": {
+ "start":"cross-env PORT=4001 nodemon"
+ },
+ "dependencies": {
+ "@types/node":"^20.5.8",
+ "mysql":"^2.18.1",
+ "@types/mysql":"^2.15.21"
+ },
+ "devDependencies": {
+ "nodemon":"^3.0.1",
+ "cross-env":"^7.0.3"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC"
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/.DS_Store" "b/\350\264\276\347\221\236\345\256\201/server/src/.DS_Store"
new file mode 100644
index 0000000000000000000000000000000000000000..6b93ccdc5fefc4f0a6d91bfc03c2ae5deefc1f69
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/server/src/.DS_Store" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/Main.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/Main.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..bedbce8db3389b734299c4a293c72558151234a4
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/Main.ts"
@@ -0,0 +1,17 @@
+import { ROUTERS_TYPE } from "./po/RouterVo.js";
+import CartCommand from "./router/CartCommand.js";
+import GoodsCommand from "./router/GoodsCommand.js";
+import RouterIndex from "./router/RouterIndex.js";
+import UserCommand from "./router/UserCommand.js";
+import Servers from "./server/Servers.js";
+import DetailsCommand from './router/DetailsCommand.js'
+class Main{
+ constructor(){
+ RouterIndex.instance.add(ROUTERS_TYPE.USER,UserCommand);
+ RouterIndex.instance.add(ROUTERS_TYPE.GOODS,GoodsCommand);
+ RouterIndex.instance.add(ROUTERS_TYPE.CART,CartCommand);
+ RouterIndex.instance.add(ROUTERS_TYPE.DETAILS,DetailsCommand);
+ new Servers(Number(process.env.PORT) || 3000);
+ }
+}
+new Main();
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/Utils/.DS_Store" "b/\350\264\276\347\221\236\345\256\201/server/src/Utils/.DS_Store"
new file mode 100644
index 0000000000000000000000000000000000000000..001a8e4c56a7591a5d6d64cb026422db68af708c
Binary files /dev/null and "b/\350\264\276\347\221\236\345\256\201/server/src/Utils/.DS_Store" differ
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/Utils/md5.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/Utils/md5.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..086e189abd268caca345a57ea5d79d92b56ce90f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/Utils/md5.ts"
@@ -0,0 +1,256 @@
+/*
+ * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
+ * Digest Algorithm, as defined in RFC 1321.
+ * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002.
+ * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
+ * Distributed under the BSD License
+ * See http://pajhome.org.uk/crypt/md5 for more info.
+ */
+
+/*
+ * Configurable variables. You may need to tweak these to be compatible with
+ * the server-side, but the defaults work in most cases.
+ */
+var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */
+var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */
+var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */
+
+/*
+ * These are the functions you'll usually want to call
+ * They take string arguments and return either hex or base-64 encoded strings
+ */
+export function hex_md5(s:string){ return binl2hex(core_md5(str2binl(s), s.length * chrsz));}
+export function b64_md5(s:string){ return binl2b64(core_md5(str2binl(s), s.length * chrsz));}
+export function str_md5(s:string){ return binl2str(core_md5(str2binl(s), s.length * chrsz));}
+export function hex_hmac_md5(key:string, data:any) { return binl2hex(core_hmac_md5(key, data)); }
+export function b64_hmac_md5(key:string, data:any) { return binl2b64(core_hmac_md5(key, data)); }
+export function str_hmac_md5(key:string, data:any) { return binl2str(core_hmac_md5(key, data)); }
+
+/*
+ * Perform a simple self-test to see if the VM is working
+ */
+function md5_vm_test()
+{
+ return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72";
+}
+
+/*
+ * Calculate the MD5 of an array of little-endian words, and a bit length
+ */
+function core_md5(x:any, len:any)
+{
+ /* append padding */
+ x[len >> 5] |= 0x80 << ((len) % 32);
+ x[(((len + 64) >>> 9) << 4) + 14] = len;
+
+ var a = 1732584193;
+ var b = -271733879;
+ var c = -1732584194;
+ var d = 271733878;
+
+ for(var i = 0; i < x.length; i += 16)
+ {
+ var olda = a;
+ var oldb = b;
+ var oldc = c;
+ var oldd = d;
+
+ a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936);
+ d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586);
+ c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819);
+ b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330);
+ a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897);
+ d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426);
+ c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341);
+ b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983);
+ a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416);
+ d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417);
+ c = md5_ff(c, d, a, b, x[i+10], 17, -42063);
+ b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162);
+ a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682);
+ d = md5_ff(d, a, b, c, x[i+13], 12, -40341101);
+ c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290);
+ b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329);
+
+ a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510);
+ d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632);
+ c = md5_gg(c, d, a, b, x[i+11], 14, 643717713);
+ b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302);
+ a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691);
+ d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083);
+ c = md5_gg(c, d, a, b, x[i+15], 14, -660478335);
+ b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848);
+ a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438);
+ d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690);
+ c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961);
+ b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501);
+ a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467);
+ d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784);
+ c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473);
+ b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734);
+
+ a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558);
+ d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463);
+ c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562);
+ b = md5_hh(b, c, d, a, x[i+14], 23, -35309556);
+ a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060);
+ d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353);
+ c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632);
+ b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640);
+ a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174);
+ d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222);
+ c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979);
+ b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189);
+ a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487);
+ d = md5_hh(d, a, b, c, x[i+12], 11, -421815835);
+ c = md5_hh(c, d, a, b, x[i+15], 16, 530742520);
+ b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651);
+
+ a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844);
+ d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415);
+ c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905);
+ b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055);
+ a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571);
+ d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606);
+ c = md5_ii(c, d, a, b, x[i+10], 15, -1051523);
+ b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799);
+ a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359);
+ d = md5_ii(d, a, b, c, x[i+15], 10, -30611744);
+ c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380);
+ b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649);
+ a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070);
+ d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379);
+ c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259);
+ b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551);
+
+ a = safe_add(a, olda);
+ b = safe_add(b, oldb);
+ c = safe_add(c, oldc);
+ d = safe_add(d, oldd);
+ }
+ return Array(a, b, c, d);
+
+}
+
+/*
+ * These functions implement the four basic operations the algorithm uses.
+ */
+function md5_cmn(q:any, a:any, b:any, x:any, s:any, t:any)
+{
+ return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b);
+}
+function md5_ff(a:any, b:any, c:any, d:any, x:any, s:any, t:any)
+{
+ return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t);
+}
+function md5_gg(a:any, b:any, c:any, d:any, x:any, s:any, t:any)
+{
+ return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t);
+}
+function md5_hh(a:any, b:any, c:any, d:any, x:any, s:any, t:any)
+{
+ return md5_cmn(b ^ c ^ d, a, b, x, s, t);
+}
+function md5_ii(a:any, b:any, c:any, d:any, x:any, s:any, t:any)
+{
+ return md5_cmn(c ^ (b | (~d)), a, b, x, s, t);
+}
+
+/*
+ * Calculate the HMAC-MD5, of a key and some data
+ */
+function core_hmac_md5(key:any, data:any)
+{
+ var bkey = str2binl(key);
+ if(bkey.length > 16) bkey = core_md5(bkey, key.length * chrsz);
+
+ var ipad = Array(16), opad = Array(16);
+ for(var i = 0; i < 16; i++)
+ {
+ ipad[i] = bkey[i] ^ 0x36363636;
+ opad[i] = bkey[i] ^ 0x5C5C5C5C;
+ }
+
+ var hash = core_md5(ipad.concat(str2binl(data)), 512 + data.length * chrsz);
+ return core_md5(opad.concat(hash), 512 + 128);
+}
+
+/*
+ * Add integers, wrapping at 2^32. This uses 16-bit operations internally
+ * to work around bugs in some JS interpreters.
+ */
+function safe_add(x:any, y:any)
+{
+ var lsw = (x & 0xFFFF) + (y & 0xFFFF);
+ var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
+ return (msw << 16) | (lsw & 0xFFFF);
+}
+
+/*
+ * Bitwise rotate a 32-bit number to the left.
+ */
+function bit_rol(num:any, cnt:any)
+{
+ return (num << cnt) | (num >>> (32 - cnt));
+}
+
+/*
+ * Convert a string to an array of little-endian words
+ * If chrsz is ASCII, characters >255 have their hi-byte silently ignored.
+ */
+function str2binl(str:any)
+{
+ var bin = Array();
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < str.length * chrsz; i += chrsz)
+ bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (i%32);
+ return bin;
+}
+
+/*
+ * Convert an array of little-endian words to a string
+ */
+function binl2str(bin:any)
+{
+ var str = "";
+ var mask = (1 << chrsz) - 1;
+ for(var i = 0; i < bin.length * 32; i += chrsz)
+ str += String.fromCharCode((bin[i>>5] >>> (i % 32)) & mask);
+ return str;
+}
+
+/*
+ * Convert an array of little-endian words to a hex string.
+ */
+function binl2hex(binarray:any)
+{
+ var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i++)
+ {
+ str += hex_tab.charAt((binarray[i>>2] >> ((i%4)*8+4)) & 0xF) +
+ hex_tab.charAt((binarray[i>>2] >> ((i%4)*8 )) & 0xF);
+ }
+ return str;
+}
+
+/*
+ * Convert an array of little-endian words to a base-64 string
+ */
+function binl2b64(binarray:any)
+{
+ var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var str = "";
+ for(var i = 0; i < binarray.length * 4; i += 3)
+ {
+ var triplet = (((binarray[i >> 2] >> 8 * ( i %4)) & 0xFF) << 16)
+ | (((binarray[i+1 >> 2] >> 8 * ((i+1)%4)) & 0xFF) << 8 )
+ | ((binarray[i+2 >> 2] >> 8 * ((i+2)%4)) & 0xFF);
+ for(var j = 0; j < 4; j++)
+ {
+ if(i * 8 + j * 6 > binarray.length * 32) str += b64pad;
+ else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F);
+ }
+ }
+ return str;
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/interface/ICommand.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/interface/ICommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..7367b479628fa3cfbafaccdbbd28b3df6c154c0c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/interface/ICommand.ts"
@@ -0,0 +1,7 @@
+import { ServerResponse } from "http";
+import { ROUTER_CHILD } from "../po/RouterVo";
+
+// ICommand接口
+export default interface ICommand{
+ exec(router:ROUTER_CHILD,data:any,res:ServerResponse,params?:any):void;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/model/RequestData.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/model/RequestData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..264405a21a5b82b0b0d6e5742303895331b4c7e3
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/model/RequestData.ts"
@@ -0,0 +1,43 @@
+// 退出登录
+export interface IReqLogoutVo{
+ user:string
+ userId:number
+}
+// 登录
+export interface IReqLoginVo extends IReqLogoutVo{
+ password:string;
+}
+// 注册
+export interface IReqRegisterVo extends IReqLoginVo{
+ name:string,
+ tel:string
+}
+// 自动登录
+export interface IReqAuthVo extends IReqLogoutVo{
+ token:string
+}
+
+// 购物车列表
+export interface IReqShoppingListVo extends IReqAuthVo{
+
+}
+// 添加商品
+export interface IReqAddVo extends IReqShoppingListVo{
+ pid:number
+ id:number;
+ itemId:number;
+ numValue?:any
+}
+// 删除商品
+export interface IReqRemoveVo extends IReqShoppingListVo{
+ ids:number[]
+}
+// 改变商品数量
+export interface IReqChangeNumVo extends IReqShoppingListVo{
+ id:number;
+ num:number;
+}
+// 商品选中状态
+export interface IReqCheckedVo extends IReqRemoveVo{
+ checked:boolean;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/model/ResponseData.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/model/ResponseData.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..b84ec0db0f0c71885812f06b0f0ed78707d9186c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/model/ResponseData.ts"
@@ -0,0 +1,67 @@
+export interface IResMeassage{
+ message:string;
+}
+export interface IResLogInMessage extends IResMeassage{
+ token:string,
+ user:string;
+ userId:number;
+}
+export interface IResRegisterVo{
+ errno:null|number;
+ result:IResMeassage;
+}
+export interface IResLoginVo{
+ errno:null|number;
+ result:IResLogInMessage|IResMeassage;
+}
+export interface IResLogoutVo extends IResRegisterVo{
+
+}
+export interface IResAuthVo extends IResLoginVo{
+
+}
+export interface IItemInfo{
+ id:number;
+ img:string;
+ price:number;
+}
+export interface IIcon{
+ icon1?:Array;
+ icon2?:Array;
+ icon3?:Array;
+ icon4?:Array;
+}
+interface ISchedule{
+ img?:string|null;
+ info?:string|null;
+}
+export interface IGoods{
+ pid:number;
+ title:string;
+ img:string;
+ keywords:string;
+ price:number;
+ price1:string;
+ soldconut:string;
+ company:string;
+ address:boolean;
+}
+export interface IResGoodsList{
+ errno:null|number;
+ result:Array|IResMeassage;
+}
+export interface IShoppingItem{
+ pid:number;
+ goodsId:number;
+ userId:number;
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+}
+export interface IResShoppingList{
+ errno:null|number;
+ result:Array|IResMeassage;
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/model/Sql.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/model/Sql.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5590e578ed120ddea8f6d370ad158686c97ccd76
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/model/Sql.ts"
@@ -0,0 +1,223 @@
+import Mysql, { MysqlError, Pool, PoolConnection } from "mysql";
+import { SqlTableType } from "../po/SqlVo";
+export default class Sql {
+ private static _pool: Pool;
+ private constructor() {}
+ // 创建Pool实例,连接数据库
+ public static get Pool(): Pool {
+ return (Sql._pool || (Sql._pool = Mysql.createPool({
+ host: "localhost",
+ port: 3306,
+ user: "root",
+ password: "admin123",
+ database: "1688",
+ }))
+ );
+ }
+ // 创建连接池,获取数据库连接
+ public static getConnection(): Promise {
+ return new Promise((resolve: (value: PoolConnection | null) => void, reject) => {
+ Sql.Pool.getConnection(
+ (err: MysqlError, connetion: PoolConnection) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ } else {
+ resolve(connetion);
+ }
+ }
+ );}
+ );
+ }
+ // 插入语句
+ public static insert(tabel: SqlTableType,data: Array): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection = (await Sql.getConnection()) as PoolConnection;
+ // 数据库连接失败就跳出
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr: string = "";
+ // 根据表名返回不同的插入语句
+ switch (tabel) {
+ case "user":
+ sqlStr =
+ "INSERT INTO `user`(`user`, `password`, `tel`) VALUES (?,?,?)";
+ break;
+ case "goodslist":
+ sqlStr =
+ "INSERT INTO `goodslist`(`title`, `img`, `keywords`, `price`, `price`, `price1`, `soldcount`, `company`, `address`) VALUES (?,?,?,?,?,?,?,?,?)";
+ break;
+ case "shoppinglist":
+ sqlStr =
+ "INSERT INTO `shoppinglist`(`goodsId`, `userId`, `checked`, `title`,`company`,`img`, `price`, `num`, `total`) VALUES (?,?,?,?,?,?,?,?,?)";
+ break;
+ }
+ // 执行数据库语句操作
+ connect.query(sqlStr,data,(err: MysqlError | null, result: any) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ } else {
+ resolve(result);
+ }
+ connect.destroy();
+ }
+ );
+ });
+ }
+ // 更新 tabel为更新的表名,data是更新的数据,condition是根据什么条件进行筛选
+ public static update(tabel: SqlTableType,data: { [key: string]: any },condition: { [key: string]: any } = {}): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection = (await Sql.getConnection()) as PoolConnection;
+ // 如果连接失败就跳出
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ // 更新语句
+ var sqlStr: string = "UPDATE `" + tabel + "` SET ";
+ // 遍历要更新的数据
+ for (var key in data) {
+ sqlStr += "`" +key + "`=" + (typeof data[key] === "string" ? '"' + data[key] + '"' : data[key]) + ", ";
+ }
+ sqlStr = sqlStr.slice(0, -2) + " WHERE ";
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ } else {
+ // 添加条件语句
+ for (var key in condition) {
+ sqlStr +="`" + key +"`=" + (typeof condition[key] === "string"? '"' + condition[key] + '"': condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ console.log(sqlStr);
+ // 执行数据库语句操作
+ connect.query(sqlStr,data,(err: MysqlError | null, result: any) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ } else {
+ resolve(result);
+ }
+ connect.destroy();
+ }
+ );
+ });
+ }
+ // 根据id更新数据
+ public static updateAll(tabel: SqlTableType,data: { [key: string]: any },ids: Array): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection =
+ (await Sql.getConnection()) as PoolConnection;
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr: string = "UPDATE `" + tabel + "` SET ";
+ for (var key in data) {
+ sqlStr += "`" + key + "`=" + (typeof data[key] === "string" ? '"' + data[key] + '"' : data[key]) + ", ";
+ }
+ sqlStr = sqlStr.slice(0, -2) + " WHERE ";
+ for (var i = 0; i < ids.length; i++) {
+ sqlStr += "`pid`=" + ids[i] + " OR ";
+ }
+ sqlStr = sqlStr.slice(0, -3);
+ connect.query(sqlStr,data,(err: MysqlError | null, result: any) => {
+ if (err) {
+ console.log(err,"-----------");
+ resolve(null);
+ } else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ });
+ }
+ // 查询语句 tabel为表名 condition为查询条件
+ public static select(tabel: SqlTableType,condition: { [key: string]: any } = {}): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection = (await Sql.getConnection()) as PoolConnection;
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr: string = "SELECT * FROM `" + tabel + "` WHERE ";
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ } else {
+ for (var key in condition) {
+ sqlStr += "`" + key + "`=" + (typeof condition[key] === "string" ? '"' + condition[key] + '"' : condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ connect.query(sqlStr, (err: MysqlError | null, result: any) => {
+ if (err) {
+ // console.log("没查到");
+
+ console.log(err);
+ resolve(null);
+ } else {
+ // console.log(result,"查到");
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ });
+ }
+ // 删除
+ public static delete(tabel: SqlTableType,condition: { [key: string]: any } = {}): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection =
+ (await Sql.getConnection()) as PoolConnection;
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr: string = "DELETE FROM `" + tabel + "` WHERE ";
+ // 如果没有查询条件 就查整个表格
+ if (Object.keys(condition).length === 0) {
+ sqlStr += "1";
+ } else {
+ for (var key in condition) {
+ sqlStr += "`" + key + "`=" + (typeof condition[key] === "string" ? '"' + condition[key] + '"' : condition[key]) + " AND ";
+ }
+ sqlStr = sqlStr.slice(0, -4);
+ }
+ connect.query(sqlStr, (err: MysqlError | null, result: any) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ } else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ });
+ }
+ // 根据id删除多条数据
+ public static deleteAll(tabel: SqlTableType,goodsIds: Array): Promise {
+ return new Promise(async (resolve, reject) => {
+ var connect: PoolConnection =(await Sql.getConnection()) as PoolConnection;
+ if (!connect) {
+ resolve(null);
+ return;
+ }
+ var sqlStr: string = "DELETE FROM `" + tabel + "` WHERE ";
+ for (var i = 0; i < goodsIds.length; i++) {
+ sqlStr += "`pid`=" + goodsIds[i] + " OR ";
+ }
+ sqlStr = sqlStr.slice(0, -3);
+ connect.query(sqlStr, (err: MysqlError | null, result: any) => {
+ if (err) {
+ console.log(err);
+ resolve(null);
+ } else {
+ resolve(result);
+ }
+ connect.destroy();
+ });
+ });
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/model/TempStorage.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/model/TempStorage.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..f7cc94ba84159b0a07b66d7a91c3ea3a223fd8ad
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/model/TempStorage.ts"
@@ -0,0 +1,28 @@
+import { IGoods } from "./ResponseData";
+import Sql from "./Sql";
+
+export default class TempStorage{
+ private static _instance:TempStorage;
+ private _goodsList?:Array;
+ public tokenList:{[key:number]:{token:string,user:string}}={}
+
+ private constructor(){
+
+ }
+ public static get instance():TempStorage{
+ return TempStorage._instance || (TempStorage._instance=new TempStorage());
+ }
+
+ // 获取商品列表
+ public async getGoodsList():Promise>{
+ if(this._goodsList) return this._goodsList;
+ var result=await Sql.select("goodslist");
+ // result.forEach((value:IGoods)=>{
+ // value.list=JSON.parse(String(value.list));
+ // value.icons=JSON.parse(String(value.icons));
+ // value.arguments=JSON.parse(String(value.arguments));
+ // })
+ this._goodsList=result;
+ return result || [];
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/po/RouterVo.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/po/RouterVo.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..b6520f02685593492113f679737411dac1de4244
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/po/RouterVo.ts"
@@ -0,0 +1,36 @@
+// 所有路由
+export enum ROUTERS{
+ REGISTER="/user/register",
+ LOGIN="/user/login",
+ LOGOUT="/user/logout",
+ AUTH="/user/auth",
+ LIST="/goods/list",
+ DETAILS="/details/details",
+ CARTLIST="/cart/list",
+ ADD="/cart/add",
+ REMOVE="/cart/remove",
+ CHANGENUM="/cart/changenum",
+ CHECKED="/cart/checked",
+}
+// 一级路由
+export enum ROUTERS_TYPE{
+ USER="/user",
+ GOODS="/goods",
+ CART="/cart",
+ DETAILS='/details'
+}
+// 二级路由
+export enum ROUTER_CHILD{
+ MAIN="/",
+ REGISTER="/register",
+ LOGIN="/login",
+ LOGOUT="/logout",
+ AUTH="/auth",
+ LIST="/list",
+ DETAILS="/details",
+ CARTLIST="/list",
+ ADD="/add",
+ REMOVE="/remove",
+ CHANGENUM="/changenum",
+ CHECKED="/checked"
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/po/ServerVo.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/po/ServerVo.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..8dfdf2d2535a86d8027b8d630c9be90024f2fbfa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/po/ServerVo.ts"
@@ -0,0 +1,2 @@
+// body数据类型
+export type bodyDataType=string|{[key:string]:any};
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/po/SqlVo.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/po/SqlVo.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0c4b0ef5ab71da990ad4e14b734e27738d05eabc
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/po/SqlVo.ts"
@@ -0,0 +1,2 @@
+// 表名
+export type SqlTableType="user" | "goodslist" | "shoppinglist" | "details/details";
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/router/CartCommand.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/router/CartCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5ce4013358ff360df2d666c10a34b46ce4e5558d
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/router/CartCommand.ts"
@@ -0,0 +1,201 @@
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+import { IReqAddVo, IReqChangeNumVo, IReqCheckedVo, IReqRemoveVo, IReqShoppingListVo } from "../model/RequestData.js";
+import { IGoods, IItemInfo, IShoppingItem } from "../model/ResponseData.js";
+import TempStorage from "../model/TempStorage.js";
+import Sql from "../model/Sql.js";
+import { log } from "console";
+import { pid } from "process";
+
+export default class CartCommand implements ICommand {
+ constructor() {}
+ public exec(router: ROUTER_CHILD, data: any, res: ServerResponse): void {
+ // 根据不同的二级路由调用不用的方法
+ switch (router) {
+ case ROUTER_CHILD.ADD:
+ this.add(data, res);
+ break;
+ case ROUTER_CHILD.REMOVE:
+ this.remove(data, res);
+ break;
+ case ROUTER_CHILD.LIST:
+ this.list(data, res);
+ break;
+ case ROUTER_CHILD.CHECKED:
+ this.checked(data, res);
+ break;
+ case ROUTER_CHILD.CHANGENUM:
+ this.changeNum(data, res);
+ break;
+ }
+ }
+ // 加入购物车
+ private async add(data: IReqAddVo, res: ServerResponse): Promise {
+ // console.log(data,"_____________________________");
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误操作" } })
+ );
+ return;
+ }
+
+ // console.log(data.pid,"-=-=-=-=-=-");
+
+ var list: Array = await this.getShoppingList(data.userId, data.itemId,data.pid);
+ console.log(list,"=----------------------------");
+
+ if (list && list.length > 0) {
+ var n: number = list[0].num + 1;
+
+
+ if(data.numValue){
+ // var result=await Sql.insert("shoppinglist",[
+ // data.goodsId,
+ // data.userId,
+ // false,
+ // data.img,
+ // data.title,
+ // data.price1,
+ // data.num,
+ // data.total
+ // ])
+ // }else{
+ var result = await Sql.update(
+ "shoppinglist",
+ { num: n, total: list[0].price * n },
+ { goodsId: list[0].goodsId, userId: list[0].userId }
+ );
+ // console.log(result,"====================");
+
+ }
+
+ this.sendShoppingList("更新失败", result, res, data);
+ // this.addShopping(data, res);
+ // console.log("zouzhelilma");
+ return;
+ }
+ else{
+
+ this.addShopping(data, res);}
+
+ }
+ // 获取购物车列表
+ private async list(data: IReqShoppingListVo, res: ServerResponse): Promise {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误操作" } })
+ );
+ return;
+ }
+ var result = await this.getShoppingList(data.userId);
+ res.end(JSON.stringify({ errno: null, result: result }));
+ }
+ // 删除商品
+ private async remove(data: IReqRemoveVo, res: ServerResponse): Promise {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误操作" } })
+ );
+ return;
+ }
+ var result = await Sql.deleteAll("shoppinglist", data.ids);
+ this.sendShoppingList("删除失败", result, res, data);
+ }
+ // 修改商品选中状态
+ private async checked(data: IReqCheckedVo, res: ServerResponse): Promise {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误操作" } })
+ );
+ return;
+ }
+ var result = await Sql.updateAll(
+ "shoppinglist",
+ { checked: data.checked },
+ data.ids
+ );
+ this.sendShoppingList("修改失败", result, res, data);
+ }
+ // 修改商品数量
+ private async changeNum(data: IReqChangeNumVo, res: ServerResponse): Promise {
+ if (!this.authBool(data.userId, data.token)) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误操作" } })
+ );
+ return;
+ }
+ var result = await Sql.update(
+ "shoppinglist",
+ { num: data.num },
+ { pid: data.id }
+ );
+ this.sendShoppingList("修改失败", result, res, data);
+ }
+ // 获取购物车列表
+ private async getShoppingList(userId: number, goodsId?: number,data?:number): Promise> {
+ // console.log("zouzhelil");
+ console.log(data);
+
+ return await Sql.select(
+ "shoppinglist",
+ goodsId ? { goodsId, userId } : data?{ pid,userId }:{userId}
+ );
+ }
+
+ private authBool(userId: number, token: string): boolean {
+ return TempStorage.instance.tokenList[userId].token === token;
+ }
+
+ private async addShopping( data: IReqAddVo, res: ServerResponse): Promise {
+ console.log("不能走这里吧");
+ var goodsList: Array =
+ await TempStorage.instance.getGoodsList();
+ var item: IGoods | undefined = goodsList.find(
+ (item: IGoods) => item.pid == data.itemId
+ );
+ if (!item) {
+ res.end(
+ JSON.stringify({ errno: 1, result: { message: "错误id" } })
+ );
+ return;
+ }
+ console.log("go");
+ console.log(item);
+ // var itemInfo: IItemInfo | undefined = item.list.find(
+ // (item: IItemInfo) => item.id === data.itemId
+ // );
+ // if (!itemInfo) {
+ // res.end(
+ // JSON.stringify({ errno: 1, result: { message: "错误itemid" } })
+ // );
+ // return;
+ // }
+ var result = await Sql.insert("shoppinglist", [
+ data.itemId,
+ data.userId,
+ false,
+ item.title,
+ item.company,
+ item.img,
+ item.price + "" + item.price1,
+ 1,
+ item.price + "" + item.price1,
+ ]);
+ this.sendShoppingList("插入失败", result, res, data);
+ }
+
+ private async sendShoppingList(
+ message: string,
+ result: any,
+ res: ServerResponse,
+ data: IReqAddVo | IReqChangeNumVo | IReqCheckedVo | IReqRemoveVo | IReqShoppingListVo) {
+ if (!result) {
+ console.log(message);
+ }
+ var resultData: Array = await this.getShoppingList(
+ data.userId
+ );
+ res.end(JSON.stringify({ errno: null, result: resultData }));
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/router/DetailsCommand.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/router/DetailsCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..4dc05247d2e6e014705135ddaec2cb9043058b3f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/router/DetailsCommand.ts"
@@ -0,0 +1,29 @@
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+import Sql from "../model/Sql.js";
+import { IGoods, IResGoodsList } from "../model/ResponseData.js";
+import TempStorage from "../model/TempStorage.js";
+import { log } from "console";
+
+export default class GoodsCommand implements ICommand{
+ constructor(){
+
+ }
+ public exec(router:ROUTER_CHILD,data:any,res:ServerResponse): void {
+ switch(router){
+ case ROUTER_CHILD.DETAILS:
+ this.details(data,res);
+ break;
+ }
+ }
+ // 获取商品列表
+ // 商品详情页
+ private async details(data:any,res:ServerResponse):Promise{
+ var resData=await Sql.select('goodslist', data);
+ // console.log(resData,"-------");
+
+ res.end(JSON.stringify(resData))
+}
+
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/router/GoodsCommand.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/router/GoodsCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..06107e90897975ae321ab29bb8f97a2932ef158f
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/router/GoodsCommand.ts"
@@ -0,0 +1,33 @@
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+import Sql from "../model/Sql.js";
+import { IGoods, IResGoodsList } from "../model/ResponseData.js";
+import TempStorage from "../model/TempStorage.js";
+import { log } from "console";
+
+export default class GoodsCommand implements ICommand{
+ constructor(){
+
+ }
+ public exec(router:ROUTER_CHILD,data:any,res:ServerResponse): void {
+ switch(router){
+ case ROUTER_CHILD.LIST:
+ this.list(data,res);
+ break;
+
+ }
+ }
+ // 获取商品列表
+ private async list(data:any,res:ServerResponse):Promise{
+ var result=await TempStorage.instance.getGoodsList();
+ var resData:IResGoodsList;
+ if(result && result.length>0){
+ resData={errno:null,result};
+ }else{
+ resData={errno:1,result:{message:"没有找到数据"}};
+ }
+ res.end(JSON.stringify(resData));
+ }
+
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/router/RouterIndex.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/router/RouterIndex.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..6b5cef3658fdf3a6fb8ec4911b830653f56beee3
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/router/RouterIndex.ts"
@@ -0,0 +1,49 @@
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand";
+import { ROUTERS, ROUTERS_TYPE, ROUTER_CHILD } from "../po/RouterVo";
+// 总路由
+export default class RouterIndex {
+ private static _instance: RouterIndex;
+ // list为一级路由列表
+ private list: { [key: string]: Set<{ new (): ICommand }> } = {};
+ private constructor() {}
+ public static get instance(): RouterIndex {
+ return (
+ RouterIndex._instance || (RouterIndex._instance = new RouterIndex())
+ );
+ }
+ // 添加一级路由
+ public add(rotuer: ROUTERS_TYPE, command: { new (): ICommand }) {
+ if (!this.list[rotuer]) this.list[rotuer] = new Set();
+ this.list[rotuer].add(command);
+ }
+ public dispatch(router: ROUTERS, data: any, params: any, res: ServerResponse) {
+ var commands: Set<{ new (): ICommand }> = new Set();
+ // 二级路由
+ var routerChild: ROUTER_CHILD = ROUTER_CHILD.MAIN;
+ switch (true) {
+ case new RegExp(ROUTERS_TYPE.USER).test(router):
+ // 一级路由列表
+ commands = this.list[ROUTERS_TYPE.USER];
+ // 获取二级路由
+ routerChild = router.replace(ROUTERS_TYPE.USER, "") as ROUTER_CHILD;
+ break;
+ case new RegExp(ROUTERS_TYPE.GOODS).test(router):
+ commands = this.list[ROUTERS_TYPE.GOODS];
+ routerChild = router.replace(ROUTERS_TYPE.GOODS, "") as ROUTER_CHILD;
+ break;
+ case new RegExp(ROUTERS_TYPE.CART).test(router):
+ commands = this.list[ROUTERS_TYPE.CART];
+ routerChild = router.replace(ROUTERS_TYPE.CART, "") as ROUTER_CHILD;
+ break;
+ case new RegExp(ROUTERS_TYPE.DETAILS).test(router):
+ commands = this.list[ROUTERS_TYPE.DETAILS];
+ routerChild = router.replace(ROUTERS_TYPE.DETAILS, "") as ROUTER_CHILD;
+ break;
+ }
+ console.log(commands);
+ commands.forEach((className: { new (): ICommand }) => {
+ new className().exec(routerChild, data, res, params);
+ });
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/router/UserCommand.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/router/UserCommand.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..0fb3ed41e8118b3955c1761d8079906f8edf45fa
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/router/UserCommand.ts"
@@ -0,0 +1,84 @@
+import { ServerResponse } from "http";
+import ICommand from "../interface/ICommand.js";
+import { ROUTER_CHILD } from "../po/RouterVo.js";
+import { IReqAuthVo, IReqLoginVo, IReqLogoutVo, IReqRegisterVo } from "../model/RequestData.js";
+import Sql from "../model/Sql.js";
+import { IResAuthVo, IResLoginVo, IResLogoutVo, IResRegisterVo } from "../model/ResponseData.js";
+import {hex_md5} from "../Utils/md5.js"
+import TempStorage from "../model/TempStorage.js";
+
+
+export default class UserCommand implements ICommand{
+ constructor(){
+
+ }
+ public exec(router:ROUTER_CHILD,data:any,res:ServerResponse,params:any): void {
+ console.log(router)
+ // 根据不同的二级路由调用不用的方法
+ switch(router){
+ case ROUTER_CHILD.REGISTER:
+ this.register(data,res)
+ break;
+ case ROUTER_CHILD.LOGIN:
+ this.login(data,res);
+ break;
+ case ROUTER_CHILD.LOGOUT:
+ this.logout(data,res,params);
+ break;
+ case ROUTER_CHILD.AUTH:
+ this.auth(data,res);
+ break;
+ }
+ }
+ // 注册
+ private async register(data:IReqRegisterVo,res:ServerResponse):Promise{
+ console.log(data,123);
+ var result=await Sql.insert("user",Object.values(data));
+ var resData:IResRegisterVo;
+ if(result){
+ resData={errno:null,result:{message:"注册成功"}};
+ }else{
+ resData={errno:1,result:{message:"注册失败"}};
+ }
+ res.end(JSON.stringify(resData))
+ }
+ // 登录
+ private async login(data:IReqLoginVo,res:ServerResponse):Promise{
+ var result=await Sql.select("user",data);
+ var resData:IResLoginVo;
+ if(result && result.length>0){
+ var token=hex_md5(data.user+data.password+Date.now());
+ TempStorage.instance.tokenList[result[0].pid]={token,user:data.user};
+ resData={
+ errno:null,
+ result:{
+ user:data.user,token,userId:result[0].pid,message:"登录成功"
+ }
+ }
+ }else{
+ resData={
+ errno:1,
+ result:{
+ message:"登录失败"
+ }
+ }
+ }
+ res.end(JSON.stringify(resData))
+ }
+ // 退出登录
+ private async logout(data:IReqLogoutVo,res:ServerResponse,params:IReqLogoutVo):Promise{
+ delete TempStorage.instance.tokenList[params.userId];
+ var resData:IResLogoutVo={errno:null,result:{message:"退出登录成功"}};
+ res.end(JSON.stringify(resData))
+ }
+ // 自动登录
+ private async auth(data:IReqAuthVo,res:ServerResponse):Promise{
+ var resData:IResAuthVo;
+ if(TempStorage.instance.tokenList[data.userId] && data.token===TempStorage.instance.tokenList[data.userId].token){
+ resData={errno:null,result:{message:"自动登录成功",userId:data.userId,user:data.user,token:data.token}}
+ }else{
+ resData={errno:1,result:{message:"自动登录失败"}};
+ }
+ res.end(JSON.stringify(resData))
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/src/server/Servers.ts" "b/\350\264\276\347\221\236\345\256\201/server/src/server/Servers.ts"
new file mode 100644
index 0000000000000000000000000000000000000000..5dd9d7671620f9933f41b3ff2995a42f115e18b9
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/src/server/Servers.ts"
@@ -0,0 +1,66 @@
+import http, { IncomingMessage, Server, ServerResponse } from "http";
+import querystring from "querystring";
+import { bodyDataType } from "../po/ServerVo";
+import { ROUTERS } from "../po/RouterVo";
+import RouterIndex from "../router/RouterIndex";
+export default class Servers{
+ private server:Server;
+ private rotuer?:ROUTERS;
+ private params:{[key:string]:any}={};
+ private body:bodyDataType="";
+ constructor(public port?:number){
+ this.server=http.createServer((req:IncomingMessage,res:ServerResponse)=>this.requestHandler(req,res));
+ if(port) this.listen(port);
+ }
+ private async requestHandler(req:IncomingMessage,res:ServerResponse):Promise{
+ res.setHeader("Access-Control-Allow-Origin","*");
+ res.setHeader("Access-Control-Allow-Headers","*");
+ if(/options/i.test(req.method || "")){
+ res.end();
+ return;
+ }
+ this.rotuer=this.getRouter(req);
+ this.params=this.getParams(req);
+ this.body=await this.getBody(req);
+ res.writeHead(200,{
+ "Content-Type":"application/json;charset=utf-8"
+ })
+ console.log(this.rotuer,this.params,this.body);
+ RouterIndex.instance.dispatch(this.rotuer,this.body,this.params,res);
+ }
+ public listen(port:number):void{
+ this.server.listen(port,()=>console.log("开启服务"))
+ }
+
+ private getHeader(req:IncomingMessage){
+
+ }
+ // 获取路由
+ private getRouter(req:IncomingMessage):ROUTERS{
+ return req.url?.split("?")[0] as ROUTERS;
+ }
+ // 获取params
+ private getParams(req:IncomingMessage):{[key:string]:any}{
+ var params:string=req.url?.split("?")[1] || "";
+ if(params.trim().length===0) return {};
+ return querystring.parse(params);
+ }
+ // 获取数据
+ private getBody(req:IncomingMessage):Promise
+ {
+ return new Promise((resolve:(value:bodyDataType)=>void,reject)=>{
+ var data:bodyDataType=""
+ req.on("data",(_chunk:any)=>data+=_chunk);
+ req.on("end",()=>{
+ try{
+ data=JSON.parse(data as string);
+ }catch(err){
+ try{
+ data=querystring.parse(data as string);
+ }catch(err){}
+ }
+ resolve(data);
+ })
+ })
+ }
+}
\ No newline at end of file
diff --git "a/\350\264\276\347\221\236\345\256\201/server/tsconfig.json" "b/\350\264\276\347\221\236\345\256\201/server/tsconfig.json"
new file mode 100644
index 0000000000000000000000000000000000000000..7f29ff790e8fed56f21effc54a2f401971d2c16c
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/tsconfig.json"
@@ -0,0 +1,109 @@
+{
+ "compilerOptions": {
+ /* Visit https://aka.ms/tsconfig to read more about this file */
+
+ /* Projects */
+ // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */
+ // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
+ // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */
+ // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */
+ // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
+ // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
+
+ /* Language and Environment */
+ "target": "ES6", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
+ // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
+ // "jsx": "preserve", /* Specify what JSX code is generated. */
+ // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
+ // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
+ // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */
+ // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
+ // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */
+ // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */
+ // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
+ // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
+ // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
+
+ /* Modules */
+ "module": "commonjs", /* Specify what module code is generated. */
+ "rootDir": "./src", /* Specify the root folder within your source files. */
+ // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
+ // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
+ // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
+ // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
+ // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */
+ // "types": [], /* Specify type package names to be included without being referenced in a source file. */
+ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
+ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */
+ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */
+ // "resolvePackageJsonExports": true, /* Use the package.json 'exports' field when resolving package imports. */
+ // "resolvePackageJsonImports": true, /* Use the package.json 'imports' field when resolving imports. */
+ // "customConditions": [], /* Conditions to set in addition to the resolver-specific defaults when resolving imports. */
+ // "resolveJsonModule": true, /* Enable importing .json files. */
+ // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
+ // "noResolve": true, /* Disallow 'import's, 'require's or ''s from expanding the number of files TypeScript should add to a project. */
+
+ /* JavaScript Support */
+ // "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
+ // "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
+ // "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
+
+ /* Emit */
+ "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
+ "declarationMap": true, /* Create sourcemaps for d.ts files. */
+ // "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
+ "sourceMap": true, /* Create source map files for emitted JavaScript files. */
+ // "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
+ // "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If 'declaration' is true, also designates a file that bundles all .d.ts output. */
+ "outDir": "./dist", /* Specify an output folder for all emitted files. */
+ // "removeComments": true, /* Disable emitting comments. */
+ // "noEmit": true, /* Disable emitting files from a compilation. */
+ // "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
+ // "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types. */
+ // "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
+ // "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
+ // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
+ // "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
+ // "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
+ // "newLine": "crlf", /* Set the newline character for emitting files. */
+ // "stripInternal": true, /* Disable emitting declarations that have '@internal' in their JSDoc comments. */
+ // "noEmitHelpers": true, /* Disable generating custom helper functions like '__extends' in compiled output. */
+ // "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
+ // "preserveConstEnums": true, /* Disable erasing 'const enum' declarations in generated code. */
+ // "declarationDir": "./", /* Specify the output directory for generated declaration files. */
+ // "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
+
+ /* Interop Constraints */
+ // "isolatedModules": true, /* Ensure that each file can be safely transpiled without relying on other imports. */
+ // "verbatimModuleSyntax": true, /* Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting. */
+ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
+ "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
+ // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
+ "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
+
+ /* Type Checking */
+ "strict": true, /* Enable all strict type-checking options. */
+ // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */
+ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */
+ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
+ // "strictBindCallApply": true, /* Check that the arguments for 'bind', 'call', and 'apply' methods match the original function. */
+ // "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
+ // "noImplicitThis": true, /* Enable error reporting when 'this' is given the type 'any'. */
+ // "useUnknownInCatchVariables": true, /* Default catch clause variables as 'unknown' instead of 'any'. */
+ // "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
+ // "noUnusedLocals": true, /* Enable error reporting when local variables aren't read. */
+ // "noUnusedParameters": true, /* Raise an error when a function parameter isn't read. */
+ // "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
+ // "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
+ // "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
+ // "noUncheckedIndexedAccess": true, /* Add 'undefined' to a type when accessed using an index. */
+ // "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
+ // "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type. */
+ // "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
+ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
+
+ /* Completeness */
+ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
+ "skipLibCheck": true /* Skip type checking all .d.ts files. */
+ }
+}
diff --git "a/\350\264\276\347\221\236\345\256\201/server/\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/\350\264\276\347\221\236\345\256\201/server/\346\216\245\345\217\243\346\226\207\346\241\243.md"
new file mode 100644
index 0000000000000000000000000000000000000000..8ccfaf0a36086e2f3750b3e04c6c945e76eb2601
--- /dev/null
+++ "b/\350\264\276\347\221\236\345\256\201/server/\346\216\245\345\217\243\346\226\207\346\241\243.md"
@@ -0,0 +1,263 @@
+url:http://localhost:4001
+数据格式:JSON
+
+1、用户注册
+router: /user/register
+method:POST
+req body:
+{
+ user:string,
+ password:string,
+ tel:string
+}
+
+res:
+{
+ errno:null,
+ result:{
+ message:"注册成功"|"注册失败"
+ }
+}
+
+2、用户登录
+router: /user/login
+method:POST
+req body:
+{
+ user:string,
+ password:string
+}
+
+res:
+成功
+{
+ errno:null,
+ result:{
+ message:"登录成功",
+ token:string,
+ user:string,
+ userId:number
+ }
+}
+失败
+{
+ errno:1,
+ result:{
+ message:"登录失败",
+ }
+}
+
+3、用户退出
+router: /user/logout
+method:GET
+req params :
+{
+ user:string,
+ userId:number
+}
+res:
+{
+ errno:null,
+ result:{
+ message:"退出成功",
+ }
+}
+
+4、自动登录
+router: /user/auth
+method:POST
+req body:
+{
+ user:string,
+ userId:number;
+ token:string
+}
+res :
+成功
+{
+ errno:null,
+ result:{
+ message:"登录成功",
+ token:string,
+ user:string
+ }
+}
+
+失败
+{
+ errno:1,
+ result:{
+ message:"登录失败",
+ }
+}
+
+5、获取商品列表
+router: /goods/list
+method:GET
+req : null
+res: {
+ errno:null,
+ result: [
+ {
+ id:number;
+ list:Array;
+ info:string;
+ arguments:Array;
+ judge:number|string;
+ shop:string;
+ icons:IIcon|null;
+ titleIcon?:string;
+ double11?:boolean;
+ schedule?:ISchedule|null
+ },...
+ ]
+}
+
+6、获取商品详情页
+router: /goods/details
+method:GET
+req : null
+res: {
+ errno:null,
+ result: [
+ {
+ id:number;
+ list:Array;
+ info:string;
+ arguments:Array;
+ judge:number|string;
+ shop:string;
+ icons:IIcon|null;
+ titleIcon?:string;
+ double11?:boolean;
+ schedule?:ISchedule|null
+ },...
+ ]
+}
+
+7、获取购物车列表
+router: /cart/list
+method:POST
+req body:
+{
+ user:string,
+ userId:number;
+ token:string,
+}
+res:{
+ errno:null,
+ result:[
+ {
+ id:number,
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+ },...
+ ]
+}
+
+8、加入购物车
+router: /cart/add
+method:POST
+req body:
+{
+ user:string,
+ userId:number;
+ token:string,
+ id:number,
+ itemId:number
+}
+res:{
+ errno:null,
+ result:[
+ {
+ id:number,
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+ },...
+ ]
+}
+
+9、删除商品
+router: /cart/remove
+method:POST
+req body:
+{
+ user:string,
+ userId:number;
+ token:string,
+ ids:number[]
+}
+res:{
+ errno:null,
+ result:[
+ {
+ id:number,
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+ },...
+ ]
+}
+
+10、修改商品数量
+router: /cart/changenum
+method:POST
+req body:
+{
+ user:string,
+ userId:number;
+ token:string,
+ id:number,
+ num:number
+}
+res:{
+ errno:null,
+ result:[
+ {
+ id:number,
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+ },...
+ ]
+}
+
+
+11、修改商品选中状态
+router: /cart/checked
+method:POST
+req body:
+{
+ user:string,
+ token:string,
+ ids:number[],
+ checked:boolean
+}
+res:{
+ errno:null,
+ result:[
+ {
+ id:number,
+ checked:boolean,
+ icon:string,
+ info:string,
+ price:number,
+ num:number,
+ total:number,
+ },...
+ ]
+}
\ No newline at end of file