Commit 3cc19fd2 authored by rockyl's avatar rockyl

修复复制星速台链接projectid为undefined的问题

parent be596d28
...@@ -104,7 +104,7 @@ ...@@ -104,7 +104,7 @@
if (env === "test" && data.notLogin) { if (env === "test" && data.notLogin) {
localStorage.setItem("ticket", ""); localStorage.setItem("ticket", "");
await this.getTicket(getTestEnvTicket); await this.getTicket(getTestEnvTicket);
this.getSkinsList(this.projectId); this.getSkinsList(this.pxPid);
} else if (env === "prod" && data.notLogin) { } else if (env === "prod" && data.notLogin) {
localStorage.setItem("prod_ticket", ""); localStorage.setItem("prod_ticket", "");
this.$message({ this.$message({
...@@ -182,14 +182,14 @@ ...@@ -182,14 +182,14 @@
}, },
/** 获取访问链接 */ /** 获取访问链接 */
getUrl() { getUrl() {
const {tplType, env, skinId, projectId, skinList} = this; const {env, skinId, pxPid, skinList} = this;
let type = 1; let type = 1;
skinList.forEach(skin => { skinList.forEach(skin => {
if (skin.id === skinId) { if (skin.id === skinId) {
type = skin.type; type = skin.type;
} }
}); });
const url = `${pxHostMapping[env]}/projectx/${projectId}/${ const url = `${pxHostMapping[env]}/projectx/${pxPid}/${
type === "1" ? "index" : skinId type === "1" ? "index" : skinId
}.html`; }.html`;
copy(url); copy(url);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment