diff --git "a/\347\216\213\351\221\253/yijia/.vscode/settings.json" "b/\347\216\213\351\221\253/yijia/.vscode/settings.json" new file mode 100644 index 0000000000000000000000000000000000000000..6f3a2913e199cebe9ace75cf7e5a2818da27fbd3 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/.vscode/settings.json" @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/Main.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/Main.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..0dc17b1f5829d8d79f436d5cfccef8c245246685 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/Main.d.ts" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=Main.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/Main.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/Main.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..be341d247ba4d2ce8c905c7485b3fb48566cb038 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/Main.js" "b/\347\216\213\351\221\253/yijia/client/dist/Main.js" new file mode 100644 index 0000000000000000000000000000000000000000..3b3373142acfd6598ef41b49ad75653a639d4ce8 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/Main.js" @@ -0,0 +1,36 @@ +import AJAX from "./business/Ajax.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 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"; +import IndexPage from "./router/IndexPage.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("/index", IndexPage); + MainController.instance.addCommand("/user", UserCommand); + MainController.instance.addCommand("/goods", GoodsListCommand); + MainController.instance.addCommand("/cart", ShoppingListCommand); + 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/\347\216\213\351\221\253/yijia/client/dist/Main.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/Main.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..ee00c1143f38038aaf98896b482806dc3b06d68a --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,mBAAmB,MAAM,kCAAkC,CAAC;AACnE,OAAO,WAAW,MAAM,0BAA0B,CAAC;AACnD,OAAO,cAAc,MAAM,gCAAgC,CAAC;AAE5D,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAC9C,OAAO,UAAU,MAAM,wBAAwB,CAAC;AAChD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,YAAY,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,SAAS,MAAM,uBAAuB,CAAA;AAE7C,MAAM,IAAI;IACN;QACI,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAC,SAAS,CAAC,CAAC;QAClD,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAC,YAAY,CAAC,CAAC;QACxD,qDAAqD;QACrD,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAC,YAAY,CAAC,CAAC;QACxD,UAAU,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAC,SAAS,CAAC,CAAC;QAClD,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAC,WAAW,CAAC,CAAC;QACxD,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,EAAC,gBAAgB,CAAC,CAAC;QAC9D,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,OAAO,EAAC,mBAAmB,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,EAAE,CAAC;QACZ,oCAAoC;IACxC,CAAC;IACD,IAAI;QACA,IAAI,KAAK,GAA6B,YAAY,CAAC,KAAK,CAAC;QACzD,IAAG,CAAC,KAAK,EAAC;YACN,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;YACjC,OAAO;SACV;QACD,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,KAAe,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/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..225f4c284f1969d73cfe17efb0f4e882957ac0ce --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..a84cc4561939e44d8073914a548f595301c3656f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;gBAET,MAAM,EAAC,WAAW,EAAC,MAAM,EAAC,OAAO,EAAC,OAAO,GAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,MAAM,CAAA;KAAI,EAAC,IAAI,CAAC,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,EAAC,MAAM,CAAC,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC;IAUlI,OAAO,CAAC,sBAAsB;WAoBhB,GAAG,CAAC,MAAM,EAAC,OAAO,EAAC,MAAM,CAAC,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,EAAC,OAAO,GAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,MAAM,CAAA;KAAI,GAAE,IAAI;WAGpF,IAAI,CAAC,MAAM,EAAC,OAAO,EAAC,IAAI,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC,EAAC,OAAO,GAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,MAAM,CAAA;KAAI,GAAE,IAAI;IAGhG,OAAO,CAAC,SAAS;CA+BpB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.js" "b/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.js" new file mode 100644 index 0000000000000000000000000000000000000000..7d31153c516e86d0f6014a4057145849f4100c2e --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.js" @@ -0,0 +1,76 @@ +import MainController from "../controller/MainController.js"; +import MainModel from "../model/MainModel.js"; +import MainRouter from "../router/MainRouter.js"; +import { stringfiy } from "../views/QueryString.js"; +import { PATH, ROUTERS } from "../vo/AJAXVo.js"; +export default class AJAX { + constructor(method, router, headers = {}, body, params) { + var xhr = new XMLHttpRequest(); + xhr.addEventListener("readystatechange", e => this.readstateChangeHandler(e)); + var paramsData = params ? "?" + stringfiy(params) : ""; + xhr.open(method, PATH + router + paramsData); + for (var key in headers) { + xhr.setRequestHeader(key, headers[key]); + } + body ? xhr.send(JSON.stringify(body)) : xhr.send(); + } + readstateChangeHandler(e) { + 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) { + 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 = {}) { + new AJAX("GET", router, headers, undefined, params); + } + static post(router, body, headers = {}) { + new AJAX("POST", router, headers, body); + } + routerNav(router, result) { + console.log(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: + case ROUTERS.FILTER: + case ROUTERS.SELECT: + MainController.instance.dispatch(router, result.result); + break; + case ROUTERS.ADD: + case ROUTERS.CARTLIST: + 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; + } + } +} +//# sourceMappingURL=Ajax.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/business/Ajax.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..ea9e9a2c18b518759b495321482048bbf18323da --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAErB,YAAY,MAAkB,EAAC,MAAc,EAAC,UAA8B,EAAE,EAAC,IAAwB,EAAC,MAA0B;QAC9H,IAAI,GAAG,GAAgB,IAAI,cAAc,EAAE,CAAC;QAC5C,GAAG,CAAC,gBAAgB,CAAC,kBAAkB,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAA;QAC1E,IAAI,UAAU,GAA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YACjB,KAAK,OAAO,CAAC,QAAQ,CAAC;YACtB,KAAK,OAAO,CAAC,SAAS,CAAC;YACvB,KAAK,OAAO,CAAC,MAAM,CAAC;YACpB,KAAK,OAAO,CAAC,OAAO;gBAChB,SAAS,CAAC,QAAQ,CAAC,YAAY,GAAC,MAAM,CAAC,MAA8B,CAAC;gBACtE,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;YACV,KAAK,OAAO,CAAC,MAAM;gBACf,cAAc,CAAC,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;gBACzC,MAAM;SACZ;IACN,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..7440ad16654afceada13a54d76d3b3af56695dc5 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts" @@ -0,0 +1,44 @@ +import Component from "../component/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; + protected autoBool: boolean; + 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; + private autoPlay; + setStyle(): void; +} +//# sourceMappingURL=Carousel.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..9ef1c5881d540a1b48240b624c95842ee2ac2e40 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"Carousel.d.ts","sourceRoot":"","sources":["../../src/carousel/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAClD,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,OAAO,CAAC,KAAK,CAA4B;IACzC,OAAO,CAAC,IAAI,CAAoB;IAChC,OAAO,CAAC,KAAK,CAAoB;IACjC,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,IAAI,CAA8B;IAC1C,OAAO,CAAC,SAAS,CAAc;IAC/B,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,CAAC,CAAa;IACtB,OAAO,CAAC,EAAE,CAAa;IACvB,OAAO,CAAC,EAAE,CAAa;IACvB,OAAO,CAAC,MAAM,CAAC,CAAc;IAC7B,OAAO,CAAC,SAAS,CAA6B;IAC9C,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAS;IACpC,OAAO,CAAC,IAAI,CAAkB;IAC9B,OAAO,CAAC,GAAG,CAAC,CAAQ;gBACD,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAiBxC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAG,WAAW;IAa1D,IAAW,CAAC,CAAC,KAAK,EAAE,MAAM,EAGzB;IACD,IAAW,CAAC,IAAI,MAAM,CAErB;IACD,IAAW,CAAC,CAAC,KAAK,EAAE,MAAM,EAGzB;IACD,IAAW,CAAC,IAAI,MAAM,CAErB;IAED,OAAO,CAAC,QAAQ;IAgBhB,OAAO,CAAC,WAAW;IAGnB,OAAO,CAAC,QAAQ;IAmBhB,IAAW,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,EAa1C;IACD,IAAW,IAAI,IAAI,KAAK,CAAC,aAAa,CAAC,CAEtC;IACD,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,SAAS;IAYjB,OAAO,CAAC,UAAU;IAOX,MAAM,IAAI,IAAI;IAgBrB,OAAO,CAAC,WAAW;IAmBnB,OAAO,CAAC,QAAQ;IAMhB,QAAQ;CAiHT"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js" new file mode 100644 index 0000000000000000000000000000000000000000..c0a1ffe02e88f01a3a8bbd06ebf3e92fbd8fd6a2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js" @@ -0,0 +1,339 @@ +import Component from "../component/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.appendTo(".main-con"); + 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 = "") { + 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 = "rgb(0,0,0)"; + } + this.prev = this.dot.children[pos]; + this.prev.style.backgroundColor = "white"; + } + update() { + if (!document.querySelector(".carousel")) + this.bool = false; + 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; + } + autoPlay() { + 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: 10px; + height: 10px; + border-radius: 10px; + background-color:black; + margin-left: 18px; + float: left; + } + + .carousel>ul>li:first-child { + margin-left: 0; + } + + .carousel>.left, + .carousel>.right { + width: 40px; + height: 40px; + font-size:12px; + position: absolute; + top: 50%; + transform: translate(0, -50%); + display:none; + background-color:black; + border-radius:50% + } + + .carousel>.left { + left: 50px; + + } + .carousel:hover .left{ + display: block + } + + .carousel>.right { + right: 50px; + } + .carousel:hover .right{ + display: block + }`); + } +} +Carousel.MAX_TIME = 3000; +Carousel.SPEED = 50; +export default Carousel; +//# sourceMappingURL=Carousel.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..e6a7259a6414b99c2c68f331ad6549c18ba4aaf0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Carousel.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"Carousel.js","sourceRoot":"","sources":["../../src/carousel/Carousel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,2BAA2B,CAAC;AAElD,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;QACpC,aAAQ,GAAY,KAAK,CAAC;QAC5B,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,CAAC,QA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,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;YAChE,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC;YACX,EAAE,GAAG,CAAC,CAAC;YAEL,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CACrC,CAAC,KAAK,CAAC,UAAU,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;IACO,QAAQ;QACd,IAAI,GAAG,GAAG,IAAI,UAAU,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;QAC9B,YAAY,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACvB,IAAI,CAAC,GAAG,GAAC,UAAU,CAAC,GAAE,EAAE,CAAA,IAAI,CAAC,QAAQ,EAAE,EAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC7D,CAAC;IACD,QAAQ;QACN,QAAQ,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8GV,CAAC,CAAC;IACV,CAAC;;AA5UuB,iBAAQ,GAAW,IAAI,AAAf,CAAgB;AACxB,cAAK,GAAW,EAAE,AAAb,CAAc;eAFxB,QAAQ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..c043c24cd19cc6eeb2b599f4588b81171dbfb932 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts" @@ -0,0 +1,9 @@ +export default abstract class Component extends EventTarget { + protected elem: HTMLElement; + private static cssBool; + constructor(type?: string); + appendTo(parent: string | HTMLElement): HTMLElement; + static setCss(str: string): void; + protected abstract setStyle(): void; +} +//# sourceMappingURL=Component.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..67ac57a5bec5adb3d09f5bf8ac327471c3c989b1 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../src/carousel/Component.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAU,SAAQ,WAAW;IACvD,SAAS,CAAC,IAAI,EAAC,WAAW,CAAC;IAC3B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAe;gBACzB,IAAI,SAAM;IAIf,QAAQ,CAAC,MAAM,EAAC,MAAM,GAAC,WAAW,GAAE,WAAW;WAMxC,MAAM,CAAC,GAAG,EAAC,MAAM,GAAE,IAAI;IAMrC,SAAS,CAAC,QAAQ,CAAC,QAAQ,IAAG,IAAI;CACrC"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js" new file mode 100644 index 0000000000000000000000000000000000000000..e395593c575d6231de229179c2dabdcdae7ecf97 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js" @@ -0,0 +1,24 @@ +import Utils from "../views/Utils.js"; +class Component extends EventTarget { + 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); + } +} +Component.cssBool = false; +export default Component; +//# sourceMappingURL=Component.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..2ff95a552c1647904d02f709bdbc6cb274fab5dd --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Component.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"Component.js","sourceRoot":"","sources":["../../src/carousel/Component.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,mBAAmB,CAAC;AAEtC,MAA8B,SAAU,SAAQ,WAAW;IAGvD,YAAY,IAAI,GAAC,KAAK;QAClB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAC,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACM,QAAQ,CAAC,MAAyB;QAErC,IAAG,OAAO,MAAM,KAAG,QAAQ;YAAE,MAAM,GAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAgB,CAAC;QAClF,IAAG,MAAM,YAAY,WAAW;YAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChE,OAAO,MAAM,CAAC;IAClB,CAAC;IACM,MAAM,CAAC,MAAM,CAAC,GAAU;QAC3B,sBAAsB;QACtB,IAAG,IAAI,CAAC,OAAO;YAAE,OAAO;QACxB,IAAI,CAAC,OAAO,GAAC,IAAI,CAAC;QAClB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACtB,CAAC;;AAhBc,iBAAO,GAAS,KAAK,CAAC;eAFX,SAAS"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..9bcae62d0ecff794de4a519aa27adf2c7e596e2b --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..3bd12e72dd60467fd9d8785c9c341f85ed9d5c17 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"ICarouselData.d.ts","sourceRoot":"","sources":["../../src/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js" new file mode 100644 index 0000000000000000000000000000000000000000..9260b18469b70c70d57c55d183dfa53da7a54ce8 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ICarouselData.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..3cf6bcdadc0a11f67be6d25a3011f6d4ad92b4b4 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/ICarouselData.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"ICarouselData.js","sourceRoot":"","sources":["../../src/carousel/ICarouselData.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..e0bb7f4befbd024f9e3d8e8f1c84fc7b7097680f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..f8be2ae0e5c4b39b237afcf60b0186bb46448334 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"TImeManager.d.ts","sourceRoot":"","sources":["../../src/carousel/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;IACrC,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/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js" new file mode 100644 index 0000000000000000000000000000000000000000..8e5533b691d2441a0b1c2ee96031ffe4bf10d832 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js" @@ -0,0 +1,32 @@ +export default class TimeManager { + constructor() { + 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/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..92fe204145222162874f1cfd732162b4a6b15af9 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/TImeManager.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"TImeManager.js","sourceRoot":"","sources":["../../src/carousel/TImeManager.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,WAAW;IAI5B;QAFQ,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/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..a489b38ba9d6c6d776c5bc8a7d459501d8ca96b3 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..412d09bdc7ac23bf4bb6987569205f77acf019c2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"Utils.d.ts","sourceRoot":"","sources":["../../src/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.js" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.js" new file mode 100644 index 0000000000000000000000000000000000000000..a4261f8ce17f56ba9f44cbe1b0883d72e542c7fc --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/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/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..4b3cc140cdf4f2dd9e3c3ee6eee203a18a28e4aa --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/carousel/Utils.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"Utils.js","sourceRoot":"","sources":["../../src/carousel/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,IAAI;YACtB,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/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..2c398f17fd2d166bd85fe5ffd12638431685b435 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts" @@ -0,0 +1,7 @@ +import ICommand from "../interface/ICommand.js"; +export default class GoodsListCommand implements ICommand { + constructor(); + exec(data?: any, router?: string | undefined): void; + private goodsHandler; +} +//# sourceMappingURL=GoodsListCommand.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..5ae6d6f4934f04e2cfe8e85e9643c58803dc8ba9 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsListCommand.d.ts","sourceRoot":"","sources":["../../src/command/GoodsListCommand.ts"],"names":[],"mappings":"AAIA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,gBAAiB,YAAW,QAAQ;;IAI/C,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAsBzD,OAAO,CAAC,YAAY;CAcvB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..22232019eef92c60d93665dd7a9d6735cfe9e49b --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js" @@ -0,0 +1,52 @@ +import AJAX from "../business/Ajax.js"; +import Goods from "../component/Goods.js"; +import GoodsItem from "../component/GoodsItem.js"; +import NavEventCommand from "../component/NavEventCommand.js"; +import { GOOD_EVENT } from "../interface/IEvents.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 GoodsListCommand { + constructor() { + } + exec(data, router) { + ViewModel.instance.clearEvent(); + new NavEventCommand(); + ViewModel.instance.addEvent(GOOD_EVENT.ADD_GOODS, e => this.goodsHandler(e)); + ViewModel.instance.addEvent(GOOD_EVENT.SELECT_GOODS, e => this.goodsHandler(e)); + var elem = document.createDocumentFragment(); + ViewModel.instance.mainCon.innerHTML = ""; + var goodListAll = document.createElement('div'); + goodListAll.className = "goodListAll"; + ViewModel.instance.mainCon.appendChild(goodListAll); + if (router == ROUTER_CHILD.SELECT) { + if (data.length === 1) + data = data[0]; + var goodsItem = new GoodsItem(data); + goodsItem.appendTo(goodListAll); + } + else { + data.forEach((item) => { + var goods = new Goods(item); + goods.appendTo(goodListAll); + }); + } + ViewModel.instance.mainCon.appendChild(elem); + } + goodsHandler(e) { + var token = localStorage.token; + if (!token) { + MainRouter.instance.go("/login"); + return; + } + token = JSON.parse(String(token)); + if (e.type == GOOD_EVENT.ADD_GOODS) { + AJAX.post(ROUTERS.ADD, { user: token.user, userId: token.userId, token: token.token, id: e.data.pid, goodsId: Number(e.id) }); + } + else { + AJAX.post(ROUTERS.SELECT, { goodsId: Number(e.id) }); + } + } +} +//# sourceMappingURL=GoodsListCommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..896a0ed36b87d606259196b39e8a02a34d4a4cfe --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/GoodsListCommand.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsListCommand.js","sourceRoot":"","sources":["../../src/command/GoodsListCommand.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D;IAEL,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..901dd0fe3f6c7e0fe9db09c1dfcfdfee631c1395 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts" @@ -0,0 +1,7 @@ +import ICommand from "../interface/ICommand.js"; +export default class NavEventCommand implements ICommand { + constructor(); + exec(): void; + protected clickHandler(e: MouseEvent): void; +} +//# sourceMappingURL=NavEventCommand.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..99249cc148d562979b6c521c3d62dd350028ef73 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"NavEventCommand.d.ts","sourceRoot":"","sources":["../../src/command/NavEventCommand.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,eAAgB,YAAW,QAAQ;;IAIpD,IAAI,IAAG,IAAI;IAIX,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CA6B9C"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..797300b6876f71d0b1afb6aaabf737560fd1edbb --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js" @@ -0,0 +1,42 @@ +import AJAX from "../business/Ajax.js"; +import ViewModel from "../model/ViewModel.js"; +import { ROUTERS } from "../vo/AJAXVo.js"; +import MainRouter from "../router/MainRouter.js"; +import Carousel from "../carousel/Carousel.js"; +import CarouselData from "../vo/CarouselData.js"; +export default class NavEventCommand { + constructor() { + } + exec() { + ViewModel.instance.clearEvent(); + ViewModel.instance.addEvent("click", (e) => this.clickHandler(e)); + } + clickHandler(e) { + var elem = e.target; + var token = localStorage.token; + switch (elem.className) { + case "nav-index": + ViewModel.instance.mainCon.innerHTML = ""; + new Carousel(CarouselData); + break; + case "nav-all": + AJAX.get(ROUTERS.LIST); + break; + case "nav-item": + AJAX.post(ROUTERS.FILTER, { goodstype: `${elem.textContent}` }); + break; + case "logout": + if (!token) { + MainRouter.instance.go("/login"); + return; + } + AJAX.post(ROUTERS.LOGOUT, token); + break; + case "cart": + token = JSON.parse(String(token)); + AJAX.post(ROUTERS.CARTLIST, token); + break; + } + } +} +//# sourceMappingURL=NavEventCommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..366251e8fbb98916beb03bd77e3a205086b71785 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/NavEventCommand.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"NavEventCommand.js","sourceRoot":"","sources":["../../src/command/NavEventCommand.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,qBAAqB,CAAC;AAEvC,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,UAAU,MAAM,yBAAyB,CAAC;AACjD,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,YAAY,MAAM,uBAAuB,CAAC;AAGjD,MAAM,CAAC,OAAO,OAAO,eAAe;IAChC;IAEA,CAAC;IACD,IAAI;QACA,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAC,CAAC,CAAO,EAAC,EAAE,CAAA,IAAI,CAAC,YAAY,CAAC,CAAe,CAAC,CAAC,CAAA;IACtF,CAAC;IACS,YAAY,CAAC,CAAa;QAChC,IAAI,IAAI,GAAgB,CAAC,CAAC,MAAqB,CAAC;QAChD,IAAI,KAAK,GAAmB,YAAY,CAAC,KAAK,CAAC;QAC/C,QAAO,IAAI,CAAC,SAAS,EAAC;YAClB,KAAK,WAAW;gBACZ,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAC,EAAE,CAAA;gBACvC,IAAI,QAAQ,CAAC,YAAY,CAAC,CAAC;gBAC3B,MAAM;YACV,KAAK,SAAS;gBACV,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;gBACtB,MAAM;YACV,KAAK,UAAU;gBACX,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,EAAC,SAAS,EAAC,GAAG,IAAI,CAAC,WAAW,EAAE,EAAC,CAAC,CAAA;gBAC3D,MAAM;YACV,KAAK,QAAQ;gBACT,IAAG,CAAC,KAAK,EAAC;oBACN,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;oBACjC,OAAO;iBACV;gBACD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,KAAmB,CAAC,CAAC;gBAC9C,MAAM;YACV,KAAK,MAAM;gBACP,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;gBAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAC,KAAmB,CAAC,CAAA;gBAC/C,MAAM;SACb;IAED,CAAC;CAER"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..fb5753bc4f9493133fce8330ff1ebd24432e9912 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts" @@ -0,0 +1,10 @@ +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; +} +//# sourceMappingURL=ShoppingListCommand.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..4267f2ffc9de1db1a1b1d32bd6dcb919b94dc8b2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"ShoppingListCommand.d.ts","sourceRoot":"","sources":["../../src/command/ShoppingListCommand.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,QAAQ;;IAIxD,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAOnD,OAAO,CAAC,iBAAiB;IAKzB,OAAO,CAAC,YAAY;IAYpB,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,QAAQ;CAUnB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..0941a51f547c3b1c61cec7852810ac2deca39275 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.js" @@ -0,0 +1,57 @@ +import AJAX from "../business/Ajax.js"; +import NavEventCommand from "../component/NavEventCommand.js"; +import { 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) { + ViewModel.instance.clearEvent(); + new NavEventCommand(); + MainRouter.instance.go("/shopping", router); + ViewModel.instance.addEvent(STEP_EVENT.STEP_CHANGE, e => this.stepChangeHandler(e)); + ViewModel.instance.addEvent("click", e => this.clickHandler(e)); + } + stepChangeHandler(e) { + var token = this.getToken(); + if (!token) + return; + AJAX.post(ROUTERS.CHANGENUM, { userId: token.userId, user: token.user, token: token.token, id: e.id, num: e.num }); + } + 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); + } + else if (elem.className === "cart-pay") { + ViewModel.instance.mainCon.querySelector(".code").style.display = "block"; + } + } + checkBoxChangeHandler(token, elem) { + if (elem.id === "all") { + 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 { + 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; + } +} +//# sourceMappingURL=ShoppingListCommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/ShoppingListCommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..84dc4747faea66a70f17d2eaade659434902720d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AACvC,OAAO,eAAe,MAAM,iCAAiC,CAAC;AAE9D,OAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAC7D,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;AAE1C,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACpC;IAEA,CAAC;IACD,IAAI,CAAC,IAAU,EAAE,MAA2B;QACxC,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,IAAI,eAAe,EAAE,CAAC;QACtB,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,EAAC,MAAM,CAAC,CAAC;QAC3C,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,CAAC,WAAW,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAA;QAChF,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,YAAY,CAAC,CAAe,CAAC,CAAC,CAAC;IAC/E,CAAC;IACO,iBAAiB,CAAC,CAAQ;QAC9B,IAAI,KAAK,GAAiB,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC1C,IAAG,CAAC,KAAK;YAAE,OAAO;QACnB,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAC,EAAC,MAAM,EAAC,KAAK,CAAC,MAAM,EAAC,IAAI,EAAC,KAA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C,YAAY,CAAC,GAAG,CAAC,CAAC,IAAkB,EAAC,EAAE,CAAA,IAAI,CAAC,GAAG,CAAC,EAAC,OAAO,EAAC,IAAI,CAAC,OAAO,EAAC,CAAC,CAAC;SACnL;aAAI;YACD,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;IAEO,QAAQ;QACZ,IAAI,KAAK,GAAmB,YAAY,CAAC,KAAK,CAAC;QAC/C,IAAG,CAAC,KAAK,EAAC;YACN,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;YACjC,OAAO,IAAI,CAAC;SACf;QACD,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;QAC9C,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..d209f1dc05d8af34843f013acb49d31335bf81ab --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..f7afacd31a2e3d7d7b85e224030c0f791e4a9a48 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAKhD,MAAM,CAAC,OAAO,OAAO,WAAY,YAAW,QAAQ;;IAIhD,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI;IAgBnD,OAAO,CAAC,KAAK;IAIb,OAAO,CAAC,MAAM;IAId,OAAO,CAAC,QAAQ;IAGhB,OAAO,CAAC,IAAI;CAGf"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..6d197b49c6a3174cf88a09efd6547d80d56334ee --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.js" @@ -0,0 +1,36 @@ +import MainRouter from "../router/MainRouter.js"; +import { ROUTER_CHILD } from "../vo/RouterVo.js"; +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("/index"); + } + logout(data) { + delete localStorage.token; + MainRouter.instance.go("/login"); + } + register(data) { + MainRouter.instance.go("/login"); + } + auth(data) { + MainRouter.instance.go("/index"); + } +} +//# sourceMappingURL=UserCommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/command/UserCommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..4aa27cb900554648f348d7e64d40131842d4e8aa --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,CAAC,OAAO,OAAO,WAAW;IAC5B;IAEA,CAAC;IACD,IAAI,CAAC,IAAU,EAAE,MAA2B;QACxC,QAAO,MAAM,EAAC;YACV,KAAK,YAAY,CAAC,KAAK;gBACnB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBACjB,MAAM;YACV,KAAK,YAAY,CAAC,QAAQ;gBACtB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;gBACpB,MAAM;YACV,KAAK,YAAY,CAAC,MAAM;gBACpB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBAClB,MAAM;YACV,KAAK,YAAY,CAAC,IAAI;gBAClB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;gBAChB,MAAM;SACb;IACL,CAAC;IACO,KAAK,CAAC,IAAqB;QAE/B,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACO,MAAM,CAAC,IAAiB;QAC5B,OAAO,YAAY,CAAC,KAAK,CAAC;QAC1B,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACO,QAAQ,CAAC,IAAmB;QAChC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;IACO,IAAI,CAAC,IAAe;QACxB,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;IACrC,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Component.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/component/Component.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..6422c0d49ab4b90a33c943b45ac2edd702045d4c --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/component/Component.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/Component.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..7ee57343a16fd4b538f2cf0590e1309c97ddf661 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAChD,SAAS,CAAC,IAAI,EAAE,WAAW,CAAC;IAC5B,MAAM,CAAC,OAAO,EAAE,OAAO,CAAS;gBACpB,IAAI,GAAE,MAAc;IAIzB,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,WAAW,GAAC,gBAAgB,GAAG,WAAW;WAM7D,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;CAMxC"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Component.js" "b/\347\216\213\351\221\253/yijia/client/dist/component/Component.js" new file mode 100644 index 0000000000000000000000000000000000000000..442502ee2e6cfcb9138ab4a5d5901425915ace93 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/Component.js" @@ -0,0 +1,24 @@ +import Utils from "../views/Utils.js"; +class Component extends EventTarget { + constructor(type = "div") { + super(); + this.elem = document.createElement(type); + } + appendTo(parent) { + if (typeof parent === "string") + parent = document.querySelector(parent); + if (parent && (parent instanceof HTMLElement || parent instanceof DocumentFragment)) + parent.appendChild(this.elem); + return this.elem.parentElement; + } + static setCss(str) { + // 如果子类调用静态方法,需要使用this + if (this.cssBool) + return; + this.cssBool = true; + Utils.setCss(str); + } +} +Component.cssBool = false; +export default Component; +//# sourceMappingURL=Component.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Component.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/Component.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..6679b9c12a6a5a20de354f2206cdb4bab7682a63 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAGhD,YAAY,OAAe,KAAK;QAC9B,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAC3C,CAAC;IACM,QAAQ,CAAC,MAA6C;QAC3D,IAAI,OAAO,MAAM,KAAK,QAAQ;YAC5B,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAgB,CAAC;QACzD,IAAI,MAAM,IAAI,CAAC,MAAM,YAAY,WAAW,IAAI,MAAM,YAAY,gBAAgB,CAAC;YAAE,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnH,OAAO,IAAI,CAAC,IAAI,CAAC,aAA4B,CAAC;IAChD,CAAC;IACM,MAAM,CAAC,MAAM,CAAC,GAAW;QAC9B,sBAAsB;QACtB,IAAI,IAAI,CAAC,OAAO;YAAE,OAAO;QACzB,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;QACpB,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACpB,CAAC;;AAhBM,iBAAO,GAAY,KAAK,CAAC;eAFb,SAAS"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Goods.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..3b3d7577384b902f340c16d610620b48746bd061 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.d.ts" @@ -0,0 +1,14 @@ +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 clickHandler; + private setStyle; +} +//# sourceMappingURL=Goods.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Goods.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..385ad51fadaf74bf0cf7d16654f4ccc3d1b355c2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,MAAsB,MAAM,4BAA4B,CAAC;AAChE,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;IAW1B,IAAW,IAAI,CAAC,KAAK,EAAC,MAAM,GAAC,SAAS,EAapC;IACF,IAAW,IAAI,IAAG,MAAM,GAAC,SAAS,CAGhC;IACF,OAAO,CAAE,YAAY;IAOrB,OAAO,CAAC,QAAQ;CAiElB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Goods.js" "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.js" new file mode 100644 index 0000000000000000000000000000000000000000..f34a67d3b11d1337486bd38795570da1daa55a75 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.js" @@ -0,0 +1,106 @@ +import Component from "./Component.js"; +import { GOOD_EVENT } from "../interface/IEvents.js"; +export default class Goods extends Component { + constructor(_data) { + super(); + this.elem.className = "goods"; + this.elem.addEventListener("click", e => this.clickHandler(e)); + if (_data) { + this.data = _data; + this.elem.setAttribute("id", String(_data.goodsId)); + } + this.setStyle(); + } + // 数据驱动显示 + set data(_data) { + if (!_data) + return; + this._data = _data; + this.elem.innerHTML = ` +
    + +
    +
    ${_data.name}
    +

    ${_data.productType}

    +

    ${_data.measureText}

    +
    ¥:${_data.price.toFixed(2)}
    + + `; + } + get data() { + return this._data; + } + clickHandler(e) { + var item = e.target; + var evt = new Event(GOOD_EVENT.SELECT_GOODS, { bubbles: true }); + evt.id = item.id; + evt.data = this.data; + this.elem.dispatchEvent(evt); + } + setStyle() { + Goods.setCss(` + .goodListAll{ + width:1300px; + margin:0 auto; + } + .goods { + width: 240px; + height: 400px; + padding: 12px 9px; + font: 12px/150% tahoma, arial, Microsoft YaHei, Hiragino Sans GB, "\u5b8b\u4f53", sans-serif; + color: #666; + position: relative; + float: left; + } + + .goods:hover { + box-shadow: 0px 0px 4px #999; + } + + .goods>.iconImg { + text-decoration: none; + width: 100%; + height: 220px; + text-align: center; + display: block; + position: relative; + pointer-events: none; + } + + .goods>.iconImg>img { + width: 220px; + height: 220px; + } + .goods>div:nth-child(2){ + font-size:20px; + font-weight:bold; + text-decoration: underline; + margin-top:10px; + color:#000 + pointer-events: none; + } + .goods>div:last-child{ + font-size:18px; + font-weight:bold; + margin-top:10px; + color:#000 + pointer-events: none; + } + .goods>div:last-child>span{ + font-size:22px; + color:red; + pointer-events: none; + } + + .clear::after { + content: ""; + display: block; + height: 0; + overflow: hidden; + clear: both; + visibility: hidden; + } +`); + } +} +//# sourceMappingURL=Goods.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/Goods.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/Goods.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..827f8e6a5fd613a707955db31b60d8aa19d9e0fa --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AACvC,OAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,CAAC,OAAO,OAAO,KAAM,SAAQ,SAAS;IAKxC,YAAY,KAAa;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC,OAAO,CAAC;QAC5B,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,IAAG,KAAK,EAAE;YACN,IAAI,CAAC,IAAI,GAAC,KAAK,CAAC;YAChB,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,EAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAA;SACrD;QACD,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;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC;;uBAEL,KAAK,CAAC,GAAG;;mBAEb,KAAK,CAAC,IAAI;iBACZ,KAAK,CAAC,WAAW;iBACjB,KAAK,CAAC,WAAW;2BACP,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC;;SAExC,CAAA;IACL,CAAC;IACF,IAAW,IAAI;QAEV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACO,YAAY,CAAC,CAAY;QAC7B,IAAI,IAAI,GAAC,CAAC,CAAC,MAAqB,CAAC;QACjC,IAAI,GAAG,GAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,YAAY,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,CAAC,CAAC;QACjE,GAAG,CAAC,EAAE,GAAC,IAAI,CAAC,EAAE,CAAC;QACf,GAAG,CAAC,IAAI,GAAC,IAAI,CAAC,IAAI,CAAC;QACpB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IACM,QAAQ;QACX,KAAK,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DpB,CAAC,CAAA;IACE,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..3b0d5a2b4547ae42f7bdd8378daa09419e52ddcf --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts" @@ -0,0 +1,14 @@ +import Component from "./Component.js"; +import IGoods from "../interface/IGoodsData.js"; +export default class GoodsItem extends Component { + private _data?; + private prev?; + private id?; + private item?; + constructor(_data?: IGoods); + set data(_data: IGoods | undefined); + get data(): IGoods | undefined; + private clickHandler; + private setStyle; +} +//# sourceMappingURL=GoodsItem.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..768a1b71168b915edf32da1396d5167102d4d7bf --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsItem.d.ts","sourceRoot":"","sources":["../../src/component/GoodsItem.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAEvC,OAAO,MAAqB,MAAM,4BAA4B,CAAC;AAC/D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;IAC5C,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;IAQ1B,IAAW,IAAI,CAAC,KAAK,EAAC,MAAM,GAAC,SAAS,EAyBpC;IACF,IAAW,IAAI,IAAG,MAAM,GAAC,SAAS,CAGhC;IACD,OAAO,CAAE,YAAY;IASrB,OAAO,CAAC,QAAQ;CA6Ef"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js" "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js" new file mode 100644 index 0000000000000000000000000000000000000000..ea429dff3c2b8f49e7188bf3c14fd94a0c7e7be5 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js" @@ -0,0 +1,130 @@ +import Component from "./Component.js"; +import { GOOD_EVENT } from "../interface/IEvents.js"; +export default class GoodsItem extends Component { + constructor(_data) { + super(); + this.elem.className = "goods-item"; + this.elem.addEventListener("click", e => this.clickHandler(e)); + if (_data) + this.data = _data; + this.setStyle(); + } + // 数据驱动显示 + set data(_data) { + if (!_data) + return; + this._data = _data; + this.elem.innerHTML = ` +
    + +
    +
    +
    ${_data.name}
    +
    + ${_data.productType} + ${_data.designText} + ${_data.measureText} +
    +
    ¥: + ${(_data.price).toFixed(2)} +
    +
    +

    如何提货

    +
    配送到家
    +
    自提服务
    +
    +
    加入购物车
    +
    + `; + } + get data() { + return this._data; + } + clickHandler(e) { + var item = e.target; + if (item.className == "shopping-add") { + var evt = new Event(GOOD_EVENT.ADD_GOODS, { bubbles: true }); + evt.id = item.id; + evt.data = this.data; + this.elem.dispatchEvent(evt); + } + } + setStyle() { + GoodsItem.setCss(` + .goodListAll{ + width:1300px; + margin:0 auto; + } + .goodListAll img{ + display: block; + } + .goods-item { + display: flex; + + } + .goods-item>.itemImg-left{ + width:50% + height:300px; + border:solid 1px black; + } + .goods-item>.itemInfo-right{ + flex: 1; + height:300px; + padding: 30px; + } + .itemInfo-right>div:first-child{ + color:black; + font-weight:bold; + font-size:20px; + height:30px; + line-height:30px; + } + .itemInfo-right>div:nth-of-type(2){ + height:25px; + margin:10px 0; + } + .itemInfo-right>div:nth-of-type(3){ + color:black; + font-weight:bold; + height:40px; + line-height:40px; + margin-bottom:35px; + } + .itemInfo-right>div:nth-of-type(3)>span{ + color:red; + font-family: "Times New Roman", Times, serif; + font-size:24px; + } + .itemInfo-right>div:nth-of-type(4){ + width:50% + background-color:#eee; + } + .itemInfo-right>div:nth-of-type(4) div{ + width:25%; + border:1px solid black; + border-radius:10px; + background-color:skyblue; + text-align:center; + height:40px; + line-height:40px; + font-size:18px; + } + .itemInfo-right>div:nth-of-type(4) div:first-child{ + border-top:none; + } + .itemInfo-right>div:nth-of-type(5){ + margin-top:40px; + margin-bottom:10px; + width:50%; + border:2px solid blue; + color:blue; + font-weight:bold; + text-align:center; + height:40px; + line-height:40px; + border-radius:20px; + } + `); + } +} +//# sourceMappingURL=GoodsItem.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..608498b85d8605031ddee9f6254c34556e31d2a0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/GoodsItem.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsItem.js","sourceRoot":"","sources":["../../src/component/GoodsItem.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAe,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAE5D,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,SAAS;IAK5C,YAAY,KAAa;QACrB,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC,YAAY,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAC,CAAC,CAAA,EAAE,CAAA,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,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;QACjB,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC;;+BAEG,KAAK,CAAC,GAAG;;;2BAGb,KAAK,CAAC,IAAI;;gCAEL,KAAK,CAAC,WAAW;gCACjB,KAAK,CAAC,UAAU;gCAChB,KAAK,CAAC,WAAW;;;gCAGjB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;;;;oDAOJ,KAAK,CAAC,OAAO;;SAExD,CAAA;IACL,CAAC;IACF,IAAW,IAAI;QAEV,OAAO,IAAI,CAAC,KAAK,CAAC;IACtB,CAAC;IACQ,YAAY,CAAC,CAAY;QAC7B,IAAI,IAAI,GAAC,CAAC,CAAC,MAAqB,CAAC;QACjC,IAAG,IAAI,CAAC,SAAS,IAAE,cAAc,EAAE;YAChC,IAAI,GAAG,GAAQ,IAAI,KAAK,CAAC,UAAU,CAAC,SAAS,EAAC,EAAC,OAAO,EAAC,IAAI,EAAC,CAAC,CAAC;YAC9D,GAAG,CAAC,EAAE,GAAC,IAAI,CAAC,EAAE,CAAC;YACf,GAAG,CAAC,IAAI,GAAC,IAAI,CAAC,IAAI,CAAC;YACpB,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;SAC9B;IACL,CAAC;IACM,QAAQ;QACX,SAAS,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA0EhB,CAAC,CAAA;IACH,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..2c2907a90ab547b7f795575ba9bc28c58e612101 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts" @@ -0,0 +1,5 @@ +export default class NavEventCommand { + constructor(); + protected clickHandler(e: MouseEvent): void; +} +//# sourceMappingURL=NavEventCommand.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..4882bfa82acdab6aca8b5be9dafe9008789c2f29 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"NavEventCommand.d.ts","sourceRoot":"","sources":["../../src/component/NavEventCommand.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,OAAO,OAAO,eAAe;;IAKhC,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CA6B9C"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..7bf2069e5ad52d4347a77f308057838407304d3a --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js" @@ -0,0 +1,40 @@ +import AJAX from "../business/Ajax.js"; +import ViewModel from "../model/ViewModel.js"; +import { ROUTERS } from "../vo/AJAXVo.js"; +import MainRouter from "../router/MainRouter.js"; +import Carousel from "../carousel/Carousel.js"; +import CarouselData from "../vo/CarouselData.js"; +export default class NavEventCommand { + constructor() { + ViewModel.instance.clearEvent(); + ViewModel.instance.addEvent("click", (e) => this.clickHandler(e)); + } + clickHandler(e) { + var elem = e.target; + var token = localStorage.token; + switch (elem.className) { + case "nav-index": + ViewModel.instance.mainCon.innerHTML = ""; + new Carousel(CarouselData); + break; + case "nav-all": + AJAX.get(ROUTERS.LIST); + break; + case "nav-item": + AJAX.post(ROUTERS.FILTER, { goodstype: `${elem.textContent}` }); + break; + case "logout": + if (!token) { + MainRouter.instance.go("/login"); + return; + } + AJAX.post(ROUTERS.LOGOUT, token); + break; + case "cart": + token = JSON.parse(String(token)); + AJAX.post(ROUTERS.CARTLIST, token); + break; + } + } +} +//# sourceMappingURL=NavEventCommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..821e558e335fde6121b2262b1d3359efeb3e2262 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/NavEventCommand.js.map" @@ -0,0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jC,OAAO;iBACV;gBACD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,KAAmB,CAAC,CAAC;gBAC9C,MAAM;YACV,KAAK,MAAM;gBACP,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;gBAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAC,KAAmB,CAAC,CAAA;gBAC/C,MAAM;SACb;IAED,CAAC;CAER"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..c4d75a901c226ed37103eeabf258074f818e51b8 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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; + private _step; + 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/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..15393883d530abcaf6450b0bdf9b52b6125f6b50 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAC9C,OAAO,CAAC,KAAK,CAAkB;IACxB,EAAE,CAAC,EAAC,MAAM,CAAC;IAClB,OAAO,CAAC,KAAK,CAAG;;IAgBf,IAAW,IAAI,CAAC,KAAK,EAAC,MAAM,EAa3B;IACD,IAAW,IAAI,IAAG,MAAM,CAEvB;IACD,OAAO,CAAC,YAAY;IAMrB,OAAO,CAAC,YAAY;IASpB,OAAO,CAAE,QAAQ;IAMjB,SAAS,CAAC,QAAQ;CAiCpB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.js" "b/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.js" new file mode 100644 index 0000000000000000000000000000000000000000..d55e3fc9ae09d4b1db3414edacaa046b7000227d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.js" @@ -0,0 +1,96 @@ +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--; + } + else if (e.target.className === "right") { + this.step++; + } + 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; + margin:0 auto; + } + .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: 16px; + 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/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/component/StepNumber.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..73685b6957851a5aa45e02b809196c21288a187f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAC,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AC,SAAS,KAAG,MAAM,EAAC;YAClD,8BAA8B;YAC9B,IAAI,CAAC,IAAI,EAAE,CAAC;SACf;aAAK,IAAI,CAAC,CAAC,MAA4B,CAAC,SAAS,KAAG,OAAO,EAAC;YAC1D,IAAI,CAAC,IAAI,EAAE,CAAC;SACd;QACD,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;QACf,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IACjC,CAAC;IACQ,QAAQ;QACb,UAAU,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BhB,CAAC,CAAA;IACP,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..4e54481c7e890cf87a60d690078edde13fbeb6ef --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..4bb746c3e6f66b203d22c978c1b994e01945366c --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,CAAgB;IACxC,OAAO,CAAC,IAAI,CAA0C;IACtD,OAAO;IAGP,WAAkB,QAAQ,IAAG,cAAc,CAE1C;IACM,UAAU,CAAC,MAAM,EAAC,UAAU,EAAC,OAAO,EAAC;QAAC,QAAM,QAAQ,CAAA;KAAC,GAAE,IAAI;IAK3D,QAAQ,CAAC,MAAM,EAAC,OAAO,EAAC,IAAI,CAAC,EAAC,GAAG,GAAE,IAAI;CAOjD"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js" "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js" new file mode 100644 index 0000000000000000000000000000000000000000..d81215240e808f1b8b50e90908333aff6ce01aba --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js" @@ -0,0 +1,22 @@ +export default class MainController { + constructor() { + this.list = {}; + } + static get instance() { + return MainController._instance || (MainController._instance = new MainController()); + } + addCommand(router, Command) { + if (!this.list[router]) + this.list[router] = new Set(); + this.list[router].add(Command); + } + 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, "")); + }); + } +} +//# sourceMappingURL=MainController.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..e5b7a9c2357921b962789f807f447a330137aeea --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/controller/MainController.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"MainController.js","sourceRoot":"","sources":["../../src/controller/MainController.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,cAAc;IAG/B;QADQ,SAAI,GAAuC,EAAE,CAAC;IAGtD,CAAC;IACM,MAAM,KAAK,QAAQ;QACtB,OAAO,cAAc,CAAC,SAAS,IAAI,CAAC,cAAc,CAAC,SAAS,GAAC,IAAI,cAAc,EAAE,CAAC,CAAC;IACvF,CAAC;IACM,UAAU,CAAC,MAAiB,EAAC,OAAwB;QAExD,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;YAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,GAAC,IAAI,GAAG,EAAE,CAAC;QAClD,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;IACM,QAAQ,CAAC,MAAc,EAAC,IAAS;QACpC,IAAI,WAAW,GAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;QACjD,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC;YAAE,OAAO;QACnC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,OAAwB,EAAC,EAAE;YACtD,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,EAAC,MAAM,CAAC,OAAO,CAAC,WAAW,EAAC,EAAE,CAAC,CAAC,CAAA;QAC5D,CAAC,CAAC,CAAA;IACL,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..49078ed228ec212a44654f2034b4b8f4994eedfb --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..6a387ce3a4111a437e023c4b600e7ca5ed40043b --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..e30e72ddfa04e83f9a5e0db953940da4ce815e4f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ICommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/ICommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..cc9a226e3d62b5f7ce24fd0eed7fe0de0bfa70bf --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..8bd35bd21952e91c7624b9ba26043621cbdc31b1 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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 GOOD_EVENT { + SELECT_GOODS = "select_goods" +} +export declare enum STEP_EVENT { + STEP_CHANGE = "step_change" +} +//# sourceMappingURL=IEvents.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..4e236061e0f9d132a5a972a9178c9549171b38db --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAAC,SAAS,cAAY;CAAC;AAC7C,oBAAY,UAAU;IAAC,YAAY,iBAAe;CAAC;AACnD,oBAAY,UAAU;IAAC,WAAW,gBAAc;CAAC"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.js" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.js" new file mode 100644 index 0000000000000000000000000000000000000000..12fb0c4dfbbb5d0fc2093fc55fb63dc3336ed6cb --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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 = {})); +; +(function (GOOD_EVENT) { + GOOD_EVENT["SELECT_GOODS"] = "select_goods"; +})(GOOD_EVENT || (GOOD_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/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IEvents.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..74f3732daaeff5415072eeae8880814d365248a7 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,UAAiC;AAA7C,WAAY,UAAU;IAAC,qCAAqB,CAAA;AAAA,CAAC,EAAjC,UAAU,KAAV,UAAU,QAAuB;AAAA,CAAC;AAC9C,WAAY,UAAU;IAAC,2CAA2B,CAAA;AAAA,CAAC,EAAvC,UAAU,KAAV,UAAU,QAA6B;AAAA,CAAC;AACpD,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/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..351ae649fc50b902a0e09a81e71126c49585ef84 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.d.ts" @@ -0,0 +1,18 @@ +export interface IItemInfo { + id: number | string; + img: string; + price: number; +} +export default interface IGoods { + pid: number; + goodsId: number; + goodstype: string; + name: string; + productType: string; + designText: string; + measureText: string; + price: number; + img: string; + imgList: string; +} +//# sourceMappingURL=IGoodsData.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..78ccf8481ae63e43f9065614ea429c59b523cb60 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAGD,MAAM,CAAC,OAAO,WAAW,MAAM;IAC3B,GAAG,EAAC,MAAM,CAAC;IACX,OAAO,EAAC,MAAM,CAAC;IACf,SAAS,EAAC,MAAM,CAAC;IACjB,IAAI,EAAC,MAAM,CAAC;IACZ,WAAW,EAAC,MAAM,CAAC;IACnB,UAAU,EAAC,MAAM,CAAC;IAClB,WAAW,EAAC,MAAM,CAAC;IACnB,KAAK,EAAC,MAAM,CAAC;IACb,GAAG,EAAC,MAAM,CAAC;IACX,OAAO,EAAC,MAAM,CAAC;CAClB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.js" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.js" new file mode 100644 index 0000000000000000000000000000000000000000..3ebb0453ec9a58382ebdafce6c330a13679ed637 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IGoodsData.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IGoodsData.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..1b69f0efe9b784a0d5fded1982797b6f8d44c9a9 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..d11389754af3b7b8860334e75454ecb1d00d92ca --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..e92040af103ea35c62d18c21b3dc2a168520b1b0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.js" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.js" new file mode 100644 index 0000000000000000000000000000000000000000..306a6bb7385653f99dfe2a5a595120bc8f0d70c0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IVerify.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/interface/IVerify.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..71919d4418257e9e6fb3afaebb2279b283bffbf9 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..754e1f5a6f4bcf6c9c89324600deebe1f913b394 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.d.ts" @@ -0,0 +1,13 @@ +import { IResLogInMessage, IShoppingItem } from "./ResponseData"; +export default class MainModel { + private static _instance; + private _loginResult?; + private _shoppingList; + private constructor(); + static get instance(): MainModel; + set loginResult(value: IResLogInMessage | undefined); + get loginResult(): IResLogInMessage | undefined; + set shoppingList(value: Array); + get shoppingList(): Array; +} +//# sourceMappingURL=MainModel.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..b30f2a11151ac7c06aa677168584351c4f5f1a94 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAEjE,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,OAAO,CAAC,MAAM,CAAC,SAAS,CAAW;IACnC,OAAO,CAAC,YAAY,CAAC,CAAkB;IACvC,OAAO,CAAC,aAAa,CAAyB;IAC9C,OAAO;IAGP,WAAkB,QAAQ,IAAG,SAAS,CAGrC;IAED,IAAW,WAAW,CAAC,KAAK,EAAC,gBAAgB,GAAC,SAAS,EAGtD;IACD,IAAW,WAAW,IAAG,gBAAgB,GAAC,SAAS,CAElD;IACD,IAAW,YAAY,CAAC,KAAK,EAAC,KAAK,CAAC,aAAa,CAAC,EAEjD;IACD,IAAW,YAAY,IAAG,KAAK,CAAC,aAAa,CAAC,CAE7C;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.js" new file mode 100644 index 0000000000000000000000000000000000000000..d7cac39cb6d81a6a8a98aad4f0d918e4dee01496 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.js" @@ -0,0 +1,22 @@ +export default class MainModel { + constructor() { + this._shoppingList = []; + } + static get instance() { + return MainModel._instance || (MainModel._instance = new 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; + } +} +//# sourceMappingURL=MainModel.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/MainModel.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..fab589f3c6536fe426e77b0512da14954394f435 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAI1B;QADQ,kBAAa,GAAsB,EAAE,CAAC;IAG9C,CAAC;IACM,MAAM,KAAK,QAAQ;QAEtB,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAC,IAAI,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,IAAW,WAAW,CAAC,KAAgC;QACnD,IAAI,CAAC,YAAY,GAAC,KAAK,CAAC;QACxB,YAAY,CAAC,KAAK,GAAC,IAAI,CAAC,SAAS,CAAC,EAAC,MAAM,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,MAAM,EAAC,KAAK,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,KAAK,EAAC,IAAI,EAAC,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,EAAC,CAAC,CAAC;IAClG,CAAC;IACD,IAAW,WAAW;QAClB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;IACD,IAAW,YAAY,CAAC,KAA0B;QAC9C,IAAI,CAAC,aAAa,GAAC,KAAK,CAAC;IAC7B,CAAC;IACD,IAAW,YAAY;QACnB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC9B,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..f667a53a62474cbb9e32e784946b120c4ca89dfa --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..38344c4e2641efa609e0a0c2c19fe87b11cf8e88 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.js" new file mode 100644 index 0000000000000000000000000000000000000000..b28e3db86f19cf5259a516b16b455540ff29e258 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=RequestData.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/RequestData.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..b5ef8de5b9aa7b3f5b944b84c7e24ac0aac736ac --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..f1ab65ffa1658bd6e8a6488b292015d29144877d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.d.ts" @@ -0,0 +1,57 @@ +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 IGoods { + pid: number; + goodsId: number; + goodstype: string; + name: string; + productType: string; + designText: string; + measureText: string; + price: number; + img: string; + imgList: string; +} +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/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..3522baaa9817c2376aff66458bb730e5ee5642f1 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAGD,MAAM,WAAW,MAAM;IACnB,GAAG,EAAC,MAAM,CAAC;IACX,OAAO,EAAC,MAAM,CAAC;IACf,SAAS,EAAC,MAAM,CAAC;IACjB,IAAI,EAAC,MAAM,CAAC;IACZ,WAAW,EAAC,MAAM,CAAC;IACnB,UAAU,EAAC,MAAM,CAAC;IAClB,WAAW,EAAC,MAAM,CAAC;IACnB,KAAK,EAAC,MAAM,CAAC;IACb,GAAG,EAAC,MAAM,CAAC;IACX,OAAO,EAAC,MAAM,CAAC;CAClB;AACD,MAAM,WAAW,aAAa;IAC1B,KAAK,EAAC,IAAI,GAAC,MAAM,CAAC;IAClB,MAAM,EAAC,KAAK,CAAC,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/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.js" new file mode 100644 index 0000000000000000000000000000000000000000..8b8a24cde434811f5657c1292e5c360954697a70 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ResponseData.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/ResponseData.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..a9c321cd4727454e17a697a44327d22764b3c771 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..3b8b6a1ec3b73f9a6b1302c07c40b3d6bc4ae1a3 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.d.ts" @@ -0,0 +1,15 @@ +export default class ViewModel { + private static _instance; + private _app?; + private _indexCon?; + private _mainCon?; + private list; + private constructor(); + static get instance(): ViewModel; + get app(): HTMLDivElement; + get indexCon(): HTMLDivElement; + get mainCon(): HTMLDivElement; + addEvent(type: string, hanlder: (e: Event | MouseEvent) => void): void; + clearEvent(): void; +} +//# sourceMappingURL=ViewModel.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..5fe889d3898818812b645715804254cc12c9b1d8 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,CAAW;IACnC,OAAO,CAAC,IAAI,CAAC,CAAgB;IAC7B,OAAO,CAAC,SAAS,CAAC,CAAgB;IAClC,OAAO,CAAC,QAAQ,CAAC,CAAgB;IACjC,OAAO,CAAC,IAAI,CAAuD;IACnE,OAAO;IAGP,WAAkB,QAAQ,IAAG,SAAS,CAGrC;IAED,IAAW,GAAG,IAAG,cAAc,CAE9B;IACD,IAAW,QAAQ,IAAG,cAAc,CAEnC;IACD,IAAW,OAAO,IAAG,cAAc,CAElC;IACM,QAAQ,CAAC,IAAI,EAAC,MAAM,EAAC,OAAO,EAAC,CAAC,CAAC,EAAC,KAAK,GAAC,UAAU,KAAG,IAAI,GAAE,IAAI;IAM7D,UAAU,IAAG,IAAI;CAS3B"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.js" new file mode 100644 index 0000000000000000000000000000000000000000..5cc9b4edb06d37862af1b48ed9a01c75449a59df --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.js" @@ -0,0 +1,34 @@ +export default class ViewModel { + constructor() { + this.list = new Map(); + } + static get instance() { + return ViewModel._instance || (ViewModel._instance = new ViewModel()); + } + get app() { + return this._app || (this._app = document.querySelector("#app")); + } + get indexCon() { + return this._indexCon || (this._indexCon = document.querySelector(".index-con")); + } + get mainCon() { + return this._mainCon || (this._mainCon = document.querySelector(".main-con")); + } + addEvent(type, hanlder) { + 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(hanlder); + this.app.addEventListener(type, hanlder); + } + 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/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/ViewModel.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..27c5d8ea51ac90dea1a0a61e85b3a9af93dab008 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAM1B;QADQ,SAAI,GAA6C,IAAI,GAAG,EAAE,CAAC;IAGnE,CAAC;IACM,MAAM,KAAK,QAAQ;QAEtB,OAAO,SAAS,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,GAAC,IAAI,SAAS,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,IAAW,GAAG;QACV,OAAO,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,GAAC,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAmB,CAAC,CAAC;IACrF,CAAC;IACD,IAAW,QAAQ;QACf,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,GAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAmB,CAAC,CAAC;IACrG,CAAC;IACD,IAAW,OAAO;QACd,OAAO,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,QAAQ,GAAC,QAAQ,CAAC,aAAa,CAAC,WAAW,CAAmB,CAAC,CAAC;IAClG,CAAC;IACM,QAAQ,CAAC,IAAW,EAAC,OAAkC;;QAE1D,IAAG,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAC,IAAI,GAAG,EAAE,CAAC,CAAC;QACvD,MAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,0CAAE,GAAG,CAAC,OAAO,CAAC,CAAC;QAClC,IAAI,CAAC,GAAG,CAAC,gBAAgB,CAAC,IAAI,EAAC,OAAO,CAAC,CAAA;IAC3C,CAAC;IACM,UAAU;QACb,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,KAAqC,EAAC,GAAU,EAAC,EAAE;YAClE,KAAK,CAAC,OAAO,CAAC,CAAC,IAAoB,EAAC,EAAE;gBAClC,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,GAAG,EAAC,IAAI,CAAC,CAAC;YAC3C,CAAC,CAAC,CAAA;YACF,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/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..49078ed228ec212a44654f2034b4b8f4994eedfb --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/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/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..6bd5ea043cadbe76e12a1d88eda24eaf5b187b35 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"ICommand.d.ts","sourceRoot":"","sources":["../../../src/model/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/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js" new file mode 100644 index 0000000000000000000000000000000000000000..e30e72ddfa04e83f9a5e0db953940da4ce815e4f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ICommand.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..b35070427df7bad2c7dae0cfc46de19595d3eaaa --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/ICommand.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"ICommand.js","sourceRoot":"","sources":["../../../src/model/interface/ICommand.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..6aafb131ca83f2ac92b6c6cac1c4c90ccf578e21 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts" @@ -0,0 +1,10 @@ +export default interface IEvent extends Event { + [key: string]: any; +} +export declare enum GOOD_EVENT { + ADD_GOODS = "add_goods" +} +export declare enum STEP_EVENT { + STEP_CHANGE = "step_change" +} +//# sourceMappingURL=IEvents.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..35ae7c2d56cb62b932f931849eddfad738ebbf5f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"IEvents.d.ts","sourceRoot":"","sources":["../../../src/model/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;IAAC,SAAS,cAAY;CAAC;AAC7C,oBAAY,UAAU;IAAC,WAAW,gBAAc;CAAC"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js" new file mode 100644 index 0000000000000000000000000000000000000000..b6bd09d5545e0a188739610b21ba4d3038d7be9d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js" @@ -0,0 +1,10 @@ +export var GOOD_EVENT; +(function (GOOD_EVENT) { + GOOD_EVENT["ADD_GOODS"] = "add_goods"; +})(GOOD_EVENT || (GOOD_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/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..40224335a989feda012d3cb04fbabc5a70b8b874 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IEvents.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"IEvents.js","sourceRoot":"","sources":["../../../src/model/interface/IEvents.ts"],"names":[],"mappings":"AAGA,MAAM,CAAN,IAAY,UAAiC;AAA7C,WAAY,UAAU;IAAC,qCAAqB,CAAA;AAAA,CAAC,EAAjC,UAAU,KAAV,UAAU,QAAuB;AAAA,CAAC;AAC9C,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/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..e88432c72473f6d42c911278741faa3d69151e0c --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts" @@ -0,0 +1,29 @@ +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 { + id: number; + list: Array; + info: string; + arguments: Array; + judge: number | string; + shop: string; + icons: IIcon | null; + titleIcon?: string; + double11?: boolean; + schedule?: ISchedule | null; +} +export {}; +//# sourceMappingURL=IGoodsData.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..7f855f75f72f3edff869fc84c45480f7f9c1c4eb --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"IGoodsData.d.ts","sourceRoot":"","sources":["../../../src/model/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;AACD,UAAU,SAAS;IACf,GAAG,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;IACjB,IAAI,CAAC,EAAC,MAAM,GAAC,IAAI,CAAC;CACrB;AAED,MAAM,CAAC,OAAO,WAAW,MAAM;IAC3B,EAAE,EAAC,MAAM,CAAC;IACV,IAAI,EAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IACtB,IAAI,EAAC,MAAM,CAAC;IACZ,SAAS,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACxB,KAAK,EAAC,MAAM,GAAC,MAAM,CAAC;IACpB,IAAI,EAAC,MAAM,CAAC;IACZ,KAAK,EAAC,KAAK,GAAC,IAAI,CAAC;IACjB,SAAS,CAAC,EAAC,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAC,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAC,SAAS,GAAC,IAAI,CAAC;CAC5B"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js" new file mode 100644 index 0000000000000000000000000000000000000000..3ebb0453ec9a58382ebdafce6c330a13679ed637 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IGoodsData.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..0964ea27eb3ed4372c7a0d8d300206e879c7a5b2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IGoodsData.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"IGoodsData.js","sourceRoot":"","sources":["../../../src/model/interface/IGoodsData.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..d11389754af3b7b8860334e75454ecb1d00d92ca --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/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/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..04a87b071b6ea3ac9615155ad396fe980ad0e2dd --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"IVerify.d.ts","sourceRoot":"","sources":["../../../src/model/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/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js" new file mode 100644 index 0000000000000000000000000000000000000000..306a6bb7385653f99dfe2a5a595120bc8f0d70c0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js" @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=IVerify.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..219e430f7fb7115635644946f003430f2b7f8735 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/model/interface/IVerify.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"IVerify.js","sourceRoot":"","sources":["../../../src/model/interface/IVerify.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..02e97dd473903b8b4ab204ca352ebe103a5a5e50 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..c7e355f55997735f9a786eaf5934ec1584da7b63 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsPage.d.ts","sourceRoot":"","sources":["../../src/router/GoodsPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAIhD,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,QAAQ;;IAI9C,IAAI,IAAI,IAAI;CAIf"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..16ced95ee2ada02b11789f0f11a7f7ee7995acff --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.js" @@ -0,0 +1,12 @@ +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.app.innerHTML = ""; + AJAX.get(ROUTERS.LIST); + } +} +//# sourceMappingURL=GoodsPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..754d44a1cf64bb0d4752e3c0e14f1e93c873b758 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAEvC,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,GAAG,CAAC,SAAS,GAAC,EAAE,CAAC;QACpC,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..d2035bacb80a8702c33b7ff78305a46b133f89ef --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts" @@ -0,0 +1,6 @@ +import ICommand from "../interface/ICommand.js"; +export default class GoodsSelectPagePage implements ICommand { + constructor(); + exec(): void; +} +//# sourceMappingURL=GoodsSelectPage.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..7a3b125ec7e844e6fa3a848a8a8da1d98db3340d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsSelectPage.d.ts","sourceRoot":"","sources":["../../src/router/GoodsSelectPage.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAIhD,MAAM,CAAC,OAAO,OAAO,mBAAoB,YAAW,QAAQ;;IAIxD,IAAI,IAAI,IAAI;CAKf"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..d47fba843b0c708d2201b41b15ceaa3bf976aa66 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js" @@ -0,0 +1,11 @@ +import ViewModel from "../model/ViewModel.js"; +export default class GoodsSelectPagePage { + constructor() { + } + exec() { + ViewModel.instance.clearEvent(); + ViewModel.instance.mainCon.innerHTML = ""; + // AJAX.get(ROUTERS.LIST); + } +} +//# sourceMappingURL=GoodsSelectPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..48a2c18581da0ef73db13f9be578c2928afd6c31 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/GoodsSelectPage.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"GoodsSelectPage.js","sourceRoot":"","sources":["../../src/router/GoodsSelectPage.ts"],"names":[],"mappings":"AACA,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,mBAAmB;IACpC;IAEA,CAAC;IACD,IAAI;QACA,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC;QAChC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAC,EAAE,CAAC;QACxC,0BAA0B;IAC9B,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..0cab8f95761f463af0de3792087c38ea26f70238 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts" @@ -0,0 +1,8 @@ +import ICommand from "../interface/ICommand.js"; +export default class IndexPage implements ICommand { + private carousel; + constructor(); + exec(): void; + protected clickHandler(e: MouseEvent): void; +} +//# sourceMappingURL=IndexPage.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..4f333de8f27e53940569dcd4c2f831f9cc9cd4f4 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"IndexPage.d.ts","sourceRoot":"","sources":["../../src/router/IndexPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,SAAU,YAAW,QAAQ;IAC9C,OAAO,CAAC,QAAQ,CAAK;;IAIrB,IAAI,IAAG,IAAI;IAMX,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;CA8B9C"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..a0fdb4143c2c8494e6df9ef8f824bb51c6bd4341 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js" @@ -0,0 +1,46 @@ +import AJAX from "../business/Ajax.js"; +import ViewModel from "../model/ViewModel.js"; +import IndexView from "../views/IndexView.js"; +import { ROUTERS } from "../vo/AJAXVo.js"; +import MainRouter from "./MainRouter.js"; +import Carousel from "../carousel/Carousel.js"; +import CarouselData from "../vo/CarouselData.js"; +export default class IndexPage { + constructor() { + } + exec() { + ViewModel.instance.clearEvent(); + ViewModel.instance.app.innerHTML = IndexView; + this.carousel = new Carousel(CarouselData); + ViewModel.instance.addEvent("click", (e) => this.clickHandler(e)); + } + clickHandler(e) { + var elem = e.target; + var token = localStorage.token; + this.carousel.autoBool = false; + switch (elem.className) { + case "nav-index": + ViewModel.instance.mainCon.innerHTML = ""; + new Carousel(CarouselData); + break; + case "nav-all": + AJAX.get(ROUTERS.LIST); + break; + case "nav-item": + AJAX.post(ROUTERS.FILTER, { goodstype: `${elem.textContent}` }); + break; + case "logout": + if (!token) { + MainRouter.instance.go("/login"); + return; + } + AJAX.post(ROUTERS.LOGOUT, token); + break; + case "cart": + token = JSON.parse(String(token)); + AJAX.post(ROUTERS.CARTLIST, token); + break; + } + } +} +//# sourceMappingURL=IndexPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..8344928578571a405328bf15f321890c7d7676cd --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/IndexPage.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"IndexPage.js","sourceRoot":"","sources":["../../src/router/IndexPage.ts"],"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AAS,EAAC,GAAG,IAAI,CAAC,WAAW,EAAE,EAAC,CAAC,CAAA;gBAC3D,MAAM;YACV,KAAK,QAAQ;gBACT,IAAG,CAAC,KAAK,EAAC;oBACN,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;oBACjC,OAAO;iBACV;gBACD,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,EAAC,KAAmB,CAAC,CAAC;gBAC9C,MAAM;YACV,KAAK,MAAM;gBACP,KAAK,GAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAe,CAAC;gBAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAC,KAAmB,CAAC,CAAA;gBAC/C,MAAM;SACb;IAED,CAAC;CAER"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..360eb869850d10b74d2d6827ba7be4c6e17f1b74 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..87fcf7d7d2c36192230d11ac9224ecea86f7ab2f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;;IAEhD,IAAI,IAAI,IAAI;IASZ,SAAS,CAAC,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,IAAI;IAM3C,OAAO,CAAC,aAAa;IAgBrB,SAAS,CAAC,MAAM,CAAC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE;IAG7C,OAAO,CAAC,YAAY;CAIrB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..7e25dcf6315fd87eaf831715ca05219f5cd5c710 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.js" @@ -0,0 +1,48 @@ +import AJAX from "../business/Ajax.js"; +import ViewModel from "../model/ViewModel.js"; +import { Verify } from "../views/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.className === "enter-register") { + 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))) { + (_a = elem.querySelector(`[name=${key}]`)) === null || _a === void 0 ? void 0 : _a.focus(); + return; + } + item[key] = value; + } + ; + this.submit(item); + } + submit(item) { + AJAX.post(ROUTERS.LOGIN, item); + } + inputHandler(e) { + var elem = e.target; + //还缺少针对于验证输入规范的样式变化 + } +} +//# sourceMappingURL=LoginPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/LoginPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..f99f87ffc4ba2e6799cec97d4dbf63238e6bb7a5 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAC5B,gBAAe,CAAC;IAChB,IAAI;QACF,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,CAChD,IAAI,CAAC,YAAY,CAAC,CAAe,CAAC,CACnC,CAAC;QACF,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE,C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,CAAC,MAA0B,CAAC;QAC1D,mBAAmB;IACrB,CAAC;CACF"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..43207cad0401674ad931f8fb9c1d1cf682485ac5 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..5c7d418a4bc63726ecf758b779dd702b2750b165 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;IAOvD,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/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.js" new file mode 100644 index 0000000000000000000000000000000000000000..f767c0bce8ed4c7da38c473e8d987ed1fa74f12b --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.js" @@ -0,0 +1,27 @@ +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/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/MainRouter.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..c9d3bc48e0b87ff05c1a13fb58dce099c7db9420 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;QAC9B,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,OAAwB,EAAC,EAAE;YACjD,IAAI,OAAO,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC9B,CAAC,CAAC,CAAA;QACF,IAAG,CAAC,IAAI;YAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAC,MAAM,EAAC,GAAG,GAAC,MAAM,CAAC,CAAC;IAC1D,CAAC;IACM,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/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..51d9f2188e0229422d5a578f9817d06cd8a9315f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.d.ts" @@ -0,0 +1,11 @@ +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; +} +//# sourceMappingURL=RegisterPage.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..1ab62f3b66dd5d82a8155cacca3621d71ea23a38 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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;AAOhD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAKjD,IAAI,IAAI,IAAI;IAMb,SAAS,CAAE,YAAY,CAAC,CAAC,EAAC,UAAU,GAAE,IAAI;IAOzC,SAAS,CAAC,aAAa,CAAC,CAAC,EAAC,KAAK,GAAE,IAAI;IAerC,SAAS,CAAC,MAAM,CAAC,IAAI,EAAC;QAAC,CAAC,GAAG,EAAC,MAAM,GAAE,GAAG,CAAA;KAAC;CAG3C"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..1020eb804f4637f96b24800512885f9df12e6c6d --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.js" @@ -0,0 +1,43 @@ +import AJAX from "../business/Ajax.js"; +import ViewModel from "../model/ViewModel.js"; +import { Verify } from "../views/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)); + } + clickHandler(e) { + var elem = e.target; + if (elem.className === "back-login") { + MainRouter.instance.go("/login"); + } + } + 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))) { + (_a = elem.querySelector(`[name=${key}]`)) === null || _a === void 0 ? void 0 : _a.focus(); + return; + } + item[key] = key === "age" ? ~~value : value; + } + this.submit(item); + } + submit(item) { + AJAX.post(ROUTERS.REGISTER, item); + } +} +//# sourceMappingURL=RegisterPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/RegisterPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..b40e36de70d82053aca39e01e4f773c832f15052 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,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,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,E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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;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..935d201eea50539a4eced8eb47489e2f5f824155 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts" @@ -0,0 +1,9 @@ +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; +} +//# sourceMappingURL=ShoppingPage.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..188fc07679e01b8c6f2153aebe0a023043490d69 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"ShoppingPage.d.ts","sourceRoot":"","sources":["../../src/router/ShoppingPage.ts"],"names":[],"mappings":"AACA,OAAO,QAAQ,MAAM,0BAA0B,CAAC;AAIhD,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,OAAO,OAAO,YAAa,YAAW,QAAQ;;IAIjD,IAAI,CAAC,MAAM,EAAC,YAAY,GAAG,IAAI;IAK/B,OAAO,CAAC,WAAW;IA6CnB,OAAO,CAAC,YAAY;CAwBvB"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js" "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js" new file mode 100644 index 0000000000000000000000000000000000000000..438795a307828280c9d05ec08dde4e4ffa1fef5a --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js" @@ -0,0 +1,82 @@ +import StepNumber from "../component/StepNumber.js"; +import MainModel from "../model/MainModel.js"; +import ViewModel from "../model/ViewModel.js"; +export default class ShoppingPage { + constructor() { + } + exec(router) { + ViewModel.instance.mainCon.innerHTML = ""; + this.updateTable(); + } + updateTable() { + var list = MainModel.instance.shoppingList; + ViewModel.instance.mainCon.innerHTML = ` +
    购物袋
    +
    + + + + + + + + +
    全选 +
    +
    +
    商品小计¥${list.filter(t => t.checked).reduce((v, t) => v + t.price * t.num, 0).toFixed(2)}
    +
    促销优惠-¥ 0.00
    +
    优惠总计(包含优惠券)-¥ 0.00
    +
    +
    购物袋合计¥${list.filter(t => t.checked).reduce((v, t) => v + t.price * t.num, 0).toFixed(2)}
    +

    不含配送费

    +
    立即结算(${list.filter(t => t.checked).length})
    +
    +
    +
    + `; + ViewModel.instance.mainCon.querySelector("#all").checked = MainModel.instance.shoppingList.every((item) => item.checked); + var tbody = ViewModel.instance.mainCon.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 == "goodsId" || key == "userId") + 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) { + switch (key) { + case "checked": + td.innerHTML = ``; + break; + case "icon": + td.innerHTML = ``; + break; + case "price": + td.innerHTML = Number(data[key]).toFixed(2); + break; + case "total": + td.innerHTML = Number(data.price * data.num).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]); + } + } +} +//# sourceMappingURL=ShoppingPage.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..36cfdf4d8494998ff0a6505922447502ba40ae2f --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/router/ShoppingPage.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"ShoppingPage.js","sourceRoot":"","sources":["../../src/router/ShoppingPage.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,4BAA4B,CAAC;AAEpD,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAE9C,OAAO,SAAS,MAAM,uBAAuB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,YAAY;IAC7B;IAEA,CAAC;IACD,IAAI,CAAC,MAAmB;QACpB,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAC,EAAE,CAAC;QAExC,IAAI,CAAC,WAAW,EAAE,CAAC;IACvB,CAAC;IACO,WAAW;QACf,IAAI,IAAI,GAAC,SAAS,CAAC,QAAQ,CAAC,YAAY,CAAC;QACzC,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,GAAC;;;;;;;;;;;;;;+CAcE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAC,CAAC,EAAC,EAAE,CAAA,CAAC,GAAC,CAAC,CAAC,KAAK,GAAC,CAAC,CAAC,GAAG,EAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;;;;mEAIjD,IAAI,CAAC,MAAM,CAAC,CAAC,CAAA,EAAE,CAAA,CAAC,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,CA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AC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;SACnC;IACR,CAAC;CACJ"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..03db8e3cb4a16faf7764139d2d8b2e6c8d3e4f25 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts" @@ -0,0 +1,3 @@ +declare const _default: "\n
    \n
    \n
    \n  EN中文 |退出登录  \n
    \n
    \n
    \n \n
      \n
    • 首页
    • \n
    • 全部商品
    • \n
    • 储物收纳
    • \n
    • 家具
    • \n
    • 厨具
    • \n
    • 装饰品
    • \n
    • 纺织品
    • \n
    • 灯具
    • \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    "; +export default _default; +//# sourceMappingURL=IndexView.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..2440dda1d7694b636cf71055dab7f2942dc46985 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.d.ts.map" @@ -0,0 +1 @@ +{"version":3,"file":"IndexView.d.ts","sourceRoot":"","sources":["../../src/views/IndexView.ts"],"names":[],"mappings":";AAAA,wBAkC+B"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js" "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js" new file mode 100644 index 0000000000000000000000000000000000000000..fb96a6aa206a207ed22d56c50ac5c8b41e820cc0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js" @@ -0,0 +1,36 @@ +export default ` +
    +
    +
    +  EN中文 |退出登录   +
    +
    + +
    +
    `; +//# sourceMappingURL=IndexView.js.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js.map" "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js.map" new file mode 100644 index 0000000000000000000000000000000000000000..0076cbb5c7c7f6ec1c29e39cda4486c6cf13c7f2 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/IndexView.js.map" @@ -0,0 +1 @@ +{"version":3,"file":"IndexView.js","sourceRoot":"","sources":["../../src/views/IndexView.ts"],"names":[],"mappings":"AAAA,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+BAkCgB,CAAA"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.d.ts" "b/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.d.ts" new file mode 100644 index 0000000000000000000000000000000000000000..cf807be140c87e14c5356f43e04c3c89005244d9 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.d.ts" @@ -0,0 +1,3 @@ +declare const _default: "
    \n
    \n
    \n \n
    \n
    \n
    Hej!
    \n
    为大众创造更美好的日常生活
    \n
    \n
    \n
    IKEA.cn - Cookie Policy\n and\n Privacy Policy\n
    \n
    \n © Inter IKEA Systems B.V. 1999-2023\n
    \n
    \n
    \n
    \n
    \n
    \n

    欢迎来到宜家, 很高兴您来到这里

    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n \n 注册\n
    \n
    \n \n
    我已接受并同意宜家
    隐私条款\n
    \n

    \n 其他登录方式\n

    \n
    \n
    \n
    \n
    \n
    \n 微信登录\n
    \n
    \n
    \n
    \n
    \n 手机验证码登录\n
    \n
    \n
    \n
    \n
    "; +export default _default; +//# sourceMappingURL=LoginView.d.ts.map \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.d.ts.map" "b/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.d.ts.map" new file mode 100644 index 0000000000000000000000000000000000000000..c469152155fca1426b91fa17570b19b413432cf5 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/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,wBA4DO"} \ No newline at end of file diff --git "a/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.js" "b/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.js" new file mode 100644 index 0000000000000000000000000000000000000000..d28246c30f94d0a065b1db91cce591b83a8b36d0 --- /dev/null +++ "b/\347\216\213\351\221\253/yijia/client/dist/views/LoginView.js" @@ -0,0 +1,62 @@ +export default `