This commit is contained in:
醉梦
2024-09-24 17:45:24 +08:00
parent 664547ecf9
commit 6f38577012
844 changed files with 153916 additions and 0 deletions
+492
View File
@@ -0,0 +1,492 @@
(self.webpackChunk_N_E = self.webpackChunk_N_E || []).push([
[3381],
{
18017: function (n, e, o) {
"use strict";
o.d(e, {
K: function () {
return h;
},
});
var t = o(59072),
c = o(4637),
i = o(41934),
s = o(98537),
r = o(16114),
u = o(48522),
a = o(12005),
l = o(39145),
d = o(19741),
f = o.n(d),
m = (0, i.BW)(u.q).isProdSandbox,
h = function (n) {
var e = (0, t.Z)((0, s.Y)(!0), 2),
o = e[0],
i = e[1],
u = (0, t.Z)((0, s.Y)(!1), 3)[2],
d = function () {
i(!1), n.onCancel && n.onCancel();
},
h = function () {
i(!1);
};
return (
(0, r.FI)(function () {
var e = function (e) {
e.data &&
e.data.activateSuccess &&
(h(),
u.current ||
((u.current = !0),
/(qifu)|(qifu-sandbox)|(tms)/.test(location.host)
? (0, a.b1)()
: (0, a.NN)()),
n.onOk && n.onOk());
};
return (
window.addEventListener("message", e, !1),
function () {
window.removeEventListener("message", e);
}
);
}),
(0, c.jsx)(l.d, {
show: o,
maskClosable: n.maskClosable,
onClose: d,
children: (0, c.jsxs)(c.Fragment, {
children: [
(0, c.jsx)("iframe", {
className: f().iframe,
width: "600",
height: "600",
src: "".concat(
m ? "ht:/cloudtest.baidu.com" : "",
"/iam/#/iam/user/v2/activate~hideBar=1"
),
}),
!n.hideCloseIcon &&
(0, c.jsx)("div", {
className: f()["close-icon"],
onClick: d,
}),
],
}),
})
);
};
},
51592: function (n, e, o) {
"use strict";
o.d(e, {
F: function () {
return v;
},
});
var t = o(59072),
c = o(4637),
i = o(41934),
s = o(98537),
r = o(16114),
u = o(48522),
a = o(674),
l = o(39145),
d = o(72344),
f = o.n(d),
m = (0, i.BW)(u.q).isProdSandbox,
h = function (n) {
var e = (0, t.Z)((0, s.Y)(!0), 2),
o = e[0],
i = e[1],
u = (0, t.Z)((0, s.Y)(!1), 3)[2],
a = function () {
i(!1), n.onCancel && n.onCancel();
},
d = function () {
i(!1);
};
return (
(0, r.FI)(function () {
var e = !1,
o = function (o) {
var t, c;
(null === (t = o.data) || void 0 === t
? void 0
: t.loginSuccess) &&
(d(),
!u.current &&
((u.current = !0), n.onOk && n.onOk({ regSuccess: e }))),
(null === (c = o.data) || void 0 === c
? void 0
: c.regSuccess) && (e = !0);
};
return (
window.addEventListener("message", o, !1),
function () {
window.removeEventListener("message", o);
}
);
}),
(0, c.jsx)(l.d, {
show: o,
maskClosable: n.maskClosable,
onClose: a,
className: "u-login-modal",
children: (0, c.jsxs)(c.Fragment, {
children: [
(0, c.jsx)("iframe", {
className: f().iframe,
width: "600",
height: "600",
src:
n.loginUrl ||
"ht:/login.bce"
.concat(m ? "test" : "", ".baidu.com/?redirect=")
.concat(
encodeURIComponent(
"ht:/".concat(
m ? "cloudtest" : "cloud",
".baidu.com/inner-login.html"
)
)
),
}),
!n.hideCloseIcon &&
(0, c.jsx)("div", {
className: f()["close-icon"],
onClick: a,
}),
],
}),
})
);
},
v = h;
v.open = function (n) {
(0, i.BW)(a.K).open({ component: h, props: n });
};
},
39145: function (n, e, o) {
"use strict";
o.d(e, {
d: function () {
return l;
},
});
var t = o(72006),
c = o(4405),
i = o(4637),
s = o(59496),
r = o(87995),
u = o(76150),
a = o.n(u);
function l(n) {
var e = n.isResetBody,
o = void 0 === e || e,
u = n.className,
l = n.style,
d = n.onClose,
f = n.maskClosable,
m = n.show,
h = n.keepModule,
v = void 0 !== h && h,
b = (0, s.useState)("0"),
p = b[0],
C = b[1],
g = (0, s.useState)("-1"),
k = g[0],
w = g[1],
y = (0, s.useState)("none"),
N = y[0],
x = y[1],
I = (0, s.useRef)(),
T = (0, s.useRef)(!1),
E = (0, s.useRef)(),
S = (0, s.useRef)(),
_ = (0, s.useRef)(null),
L = (0, s.useCallback)(
function () {
C("0"),
setTimeout(function () {
w("-1");
}, 400),
(T.current = !0),
o &&
document.body.classList.contains("header-body-no-scroll") &&
(document.body.classList.remove("header-body-no-scroll"),
(document.body.style.top = null),
(document.body.style.overflowY = null),
window.scrollTo({ top: _.current }),
(_.current = null));
},
[o]
);
(0, s.useEffect)(
function () {
return (
(E.current = document.querySelector("html")),
(S.current = document.body),
m
? (x("block"),
setTimeout(function () {
C("1"), w("1999");
}, 100),
(T.current = !1),
_.current || (_.current = window.scrollY),
document.body.classList.add("header-body-no-scroll"),
(document.body.style.top = "-".concat(_.current || 0, "px")),
document.body.scrollHeight > document.body.clientHeight &&
(document.body.style.overflowY = "scroll"))
: L(),
function () {
v || L();
}
);
},
[m, v, L]
);
var q = function () {
f && L();
},
U = function (n) {
if (n && (d && d(), !v)) {
var e = I.current.parentElement,
o = "DIV" === (null == e ? void 0 : e.tagName) ? e : I.current;
r.unmountComponentAtNode(o), o.remove();
}
};
return (0, i.jsx)("div", {
onTransitionEnd: function () {
return U(T.current);
},
className: "".concat(a()["u-modal-mask"], " ").concat(u || ""),
style: (0, c.Z)((0, t.Z)({}, l), {
opacity: p,
display: N,
zIndex: k,
}),
onClick: q,
ref: I,
children: (0, i.jsx)("div", {
onClick: function (n) {
n.stopPropagation();
},
className: "content-container",
style: { opacity: p },
children: n.children,
}),
});
}
},
23381: function (n, e, o) {
"use strict";
o.d(e, {
X: function () {
return f;
},
});
var t = o(59072),
c = o(40531);
o(67269);
var i = o(32699),
s = o(41934),
r = o(88576),
u = o(75239),
a = o(674),
l = o(18017),
d = o(13796),
f = function (n) {
var e = n.genLoginUrl,
o = n.mobile,
f = void 0 !== o && o,
m = (0, t.Z)(
(0, d.t)({
isCheckUserType: !1,
maskClosable: !0,
isImmediately: !1,
genLoginUrl: e || null,
}),
3
),
h = m[0],
v = m[2],
b = function () {
return new Promise(function (n, e) {
return (0, i.debounce)(
function () {
v(function (o) {
o.hasLogin
? u.y
.get(r.N.GET_ACCOUNT_STATUS)
.then(function (o) {
if (o.success && o.result) {
var t = o.result.code;
200 === t
? (e(o), c.default.error("接口异常,请重试"))
: 201 === t
? f
? n(t)
: (0, s.BW)(a.K).open({
component: l.K,
props: {
maskClosable: !0,
onOk: function () {
n(t);
},
},
})
: n(t);
} else e(o), c.default.error("登录异常,请重试");
})
.catch(function (n) {
e(n),
console.error(n),
c.default.error("接口异常,请重试");
})
: (e(o), c.default.error("登录异常,请重试"));
});
},
1e3,
{ leading: !0, trailing: !1 }
)();
});
};
return [h, v, b];
};
},
13796: function (n, e, o) {
"use strict";
o.d(e, {
t: function () {
return g;
},
});
var t = o(72006),
c = o(59072),
i = o(88929),
s = o(53594),
r = o(41934),
u = o(98537),
a = o(16114),
l = o(75239),
d = o(674),
f = o(42314),
m = o(59496),
h = o(48522),
v = o(12005),
b = o(51592),
p = o(88576),
C = (0, r.BW)(f.i),
g = function (n) {
var e = n.isCheckUserType,
o = void 0 === e || e,
g = n.isImmediately,
k = void 0 === g || g,
w = n.maskClosable,
y = n.hideCloseIcon,
N = n.loginCallback,
x = n.checkUserTypeCallback,
I = n.genLoginUrl,
T = (0, c.Z)((0, u.Y)((0, r.BW)(f.i).userinfo), 3),
E = T[0],
S = T[1],
_ = T[2],
L = (0, m.useState)(null),
q = L[0],
U = L[1],
Z = function () {
var n =
arguments.length > 0 && void 0 !== arguments[0]
? arguments[0]
: x;
l.y.post(p.N.ACCOUNT_REAL_NAME_TYPE).then(function (e) {
U(e.result), n && n(e.result);
});
},
B = function () {
var n =
arguments.length > 0 && void 0 !== arguments[0]
? arguments[0]
: N;
if (E) {
if (E.hasLogin) n && n(E);
else {
if ((0, s.tq)()) {
var e = "";
if (I) e = I();
else {
var o =
encodeURIComponent(
location.href.replace(location.hash, "")
) + location.hash,
t = (0, r.BW)(h.q).isProdSandbox ? "sandbox" : "online";
e = "".concat(i.ZE[t], "?redirect=").concat(o);
}
window.open(e, "_self");
return;
}
(0, r.BW)(d.K).open({
component: b.F,
props: {
maskClosable: w,
hideCloseIcon: y,
loginUrl: I && I(),
onOk: function (e) {
var o = e.regSuccess;
window.require
? window.require(["portalCommon"], function (e) {
e.userinfoInit(function (e) {
setTimeout(function () {
!k && n && n(e);
}, 300),
/(qifu)|(qifu-sandbox)|(tms)/.test(
location.host
)
? o && (0, v.b1)()
: o && (0, v.NN)();
});
})
: window.portalCommon.userinfoInit(function (e) {
setTimeout(function () {
!k && n && n(e);
}, 300),
/(qifu)|(qifu-sandbox)|(tms)/.test(
location.host
)
? o && (0, v.b1)()
: o && (0, v.NN)();
});
},
},
});
}
}
};
return (
(0, a.FI)(function () {
C.userinfo && S((0, t.Z)({}, C.userinfo)),
C.subscribe(function (n) {
S((0, t.Z)({}, n));
});
}),
(0, m.useEffect)(
function () {
E && k && (B(), E.hasLogin && o && Z());
},
[E]
),
[E, q, B, Z, _]
);
};
},
19741: function (n) {
n.exports = { iframe: "wI9TPBti", "close-icon": "X_sIICkW" };
},
72344: function (n) {
n.exports = { iframe: "lSRbdT1p", "close-icon": "__6HXQwAwh" };
},
76150: function (n) {
n.exports = { "u-modal-mask": "__9EcYiCyZ" };
},
},
]);