GoodsData.ts 641 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. import { ItemEnum } from "../common/InterfaceAddEnum";
  2. interface BaseItem {
  3. conf: {};
  4. id: number;
  5. count: string;
  6. type: ItemEnum;
  7. }
  8. class Data {
  9. private _goodsData: { [id: string]: BaseItem } = {};
  10. init(): void {
  11. this.reset();
  12. }
  13. reset(): void {
  14. this._goodsData = {};
  15. }
  16. purge(): void {
  17. this.reset();
  18. }
  19. setAllGoods() {
  20. }
  21. getAllGoods() {
  22. }
  23. getBagGoods() {
  24. }
  25. getGoodsById(id: string) {
  26. }
  27. addGoodsById(id: string, num: number) {
  28. }
  29. getGoodsLocalInfo(id: string, num: number) {
  30. }
  31. }
  32. export let MailData = new Data;