ComponentController.ts 778 B

123456789101112131415161718192021222324
  1. import { PageListController } from "@queenjs/controllers";
  2. export class ComponentController {
  3. ListCtrl = new PageListController<any, any>();
  4. createComp() {
  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}&mode=editComp`;
  15. // location.href = url;
  16. // return;
  17. // }
  18. const url = `${location.origin}/editor.html?host=${host}#/?id=${item._id}&mode=editComp`;
  19. location.href = url;
  20. }
  21. }