fix: 增加plan参数

This commit is contained in:
zhangds 2024-05-07 09:53:20 +08:00
parent 2ad292f1a8
commit 3cd32552f6
2 changed files with 9 additions and 4 deletions

View File

@ -126,9 +126,14 @@
const GLOBAL_URL = window.location.href; // 当前url
//获取链接携带的参数
let linkId = "1402"; // 设置默认落地页参数
let keyCode = globalGetQueryString(GLOBAL_URL)[0];
console.log(keyCode);
debugger
let keyCode = ""; // key码
let URL_PARAMS = globalGetQueryString(GLOBAL_URL)[0]; // 获取 key 或者 id
if (!URL_PARAMS || URL_PARAMS === "") {
self.openErrorDialog("兑换链接错误");
return
}
let plan_res = await req.axiosGet('/plan/plan_theme/' + URL_PARAMS);
console.log("plan_res =>", plan_res);
return
// === 通过接口获取 id和keycode

View File

@ -94,6 +94,6 @@ const globalGetQueryString = (url) => {
// 获取路径
const path = urlObj.pathname;
// 分割路径
const partsArr = path.split("/");
const partsArr = path.split("/").filter((item) => item !== "");
return partsArr;
};