|
@@ -1,5 +1,6 @@
|
|
|
import { queenApi } from "queenjs";
|
|
|
import { ResourceModule } from "..";
|
|
|
+import { getPathname } from "@/dict";
|
|
|
|
|
|
export const promotionAction = ResourceModule.action({
|
|
|
async renamePromotion(record: any) {
|
|
@@ -86,12 +87,12 @@ export const promotionAction = ResourceModule.action({
|
|
|
const res = await this.https.createPromotion(data);
|
|
|
//console.log(location.host, location.host == "www.infish.cn");
|
|
|
// if (location.host == "www.infish.cn") {
|
|
|
- // const url = `${location.origin}/projects/queenshowv1/editor.html#/?id=${res.result}`;
|
|
|
+ // const url = `${location.origin}${location.pathname}/projects/queenshowv1/editor.html#/?id=${res.result}`;
|
|
|
// location.href = url;
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
- const url = `${location.origin}/editor.html#/?id=${res.result}`;
|
|
|
+ const url = `${location.origin}${getPathname()}/editor.html#/?id=${res.result}`;
|
|
|
location.href = url;
|
|
|
},
|
|
|
|
|
@@ -103,12 +104,12 @@ export const promotionAction = ResourceModule.action({
|
|
|
const res = await this.https.createComp({ title });
|
|
|
// console.log(location.host, location.host == "www.infish.cn");
|
|
|
// if (location.host == "www.infish.cn") {
|
|
|
- // const url = `${location.origin}/projects/queenshowv1/editor.html#/?id=${res.result}&mode=editComp`;
|
|
|
+ // const url = `${location.origin}${location.pathname}/projects/queenshowv1/editor.html#/?id=${res.result}&mode=editComp`;
|
|
|
// location.href = url;
|
|
|
// return;
|
|
|
// }
|
|
|
|
|
|
- const url = `${location.origin}/editor.html#/?id=${res.result}&mode=editComp`;
|
|
|
+ const url = `${location.origin}${getPathname()}/editor.html#/?id=${res.result}&mode=editComp`;
|
|
|
location.href = url;
|
|
|
},
|
|
|
|