@pit-front-end/utils
Version:
湖南创智艾泰克科技有限公司
41 lines (40 loc) • 772 B
JavaScript
function u() {
const t = window.location.href;
if (t.indexOf("?") != -1) {
const e = {};
return t.slice(t.indexOf("?") + 1).split("&").forEach((o) => {
const r = o.split("=");
r[0] && (e[r[0]] = decodeURIComponent(r[1]));
}), e;
} else
return {};
}
function n(t) {
const e = u();
if (t)
return e[t];
}
function i() {
return n("projectId");
}
function a() {
return n("majorId");
}
function d() {
return localStorage.getItem("userId") || "";
}
function s() {
return localStorage.getItem("bidId") || "";
}
function f() {
return localStorage.getItem("taskStatus") || "";
}
export {
s as getBidId,
n as getKeyByUrl,
a as getMajorId,
i as getProjectId,
u as getQueryString,
f as getTaskStatus,
d as getUserId
};