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