PromotionController.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { PageListController } from "@queenjs/controllers";
  2. export class PromotionController {
  3. ListCtrl = new PageListController<any, any>();
  4. createPromotion() {
  5. console.log("createPromotion");
  6. }
  7. onMenuClick(menu: string, item: any) {
  8. console.log("onMenuClick", menu, item);
  9. }
  10. onEdit(item: any) {
  11. const _params = new URLSearchParams(decodeURIComponent(location.search));
  12. const host = _params.get("host");
  13. if (location.host == "www.infish.cn") {
  14. const url = `${location.origin}/projects/queenshowv1/editor.html?host=${host}#/?id=${item._id}`;
  15. location.href = url;
  16. return;
  17. }
  18. const url = `${location.origin}/editor.html?host=${host}#/?id=${item._id}`;
  19. location.href = url;
  20. }
  21. onPreview(item: any) {
  22. if (location.host == "www.infish.cn") {
  23. const url = `${location.origin}/projects/queenshowv1/share.html#/?id=${item._id}`;
  24. location.href = url;
  25. return;
  26. }
  27. const url = `${location.origin}/share.html#/?id=${item._id}`;
  28. location.href = url;
  29. }
  30. changeThumbnail() {
  31. //
  32. }
  33. updateDesign(record: any, data: any) {
  34. console.log("record: ", record, data);
  35. }
  36. }