UNPKG

cea-core

Version:
44 lines (43 loc) 1.17 kB
const schoolEdgeCases = { \u5B81\u6CE2\u5927\u5B66: { formIdx: 0, rememberMe: "on", checkCaptchaPath: "/needCaptcha.html", getCaptchaPath: "/captcha.html" }, \u6B66\u6C49\u5927\u5B66: { formIdx: 0, rememberMe: "on", checkCaptchaPath: "/needCaptcha.html", getCaptchaPath: "/sliderCaptcha.do" }, \u798F\u5DDE\u5927\u5B66: { formIdx: 0, rememberMe: "on", checkCaptchaPath: "/needCaptcha.html", getCaptchaPath: "/captcha.html", submitCaptchakey: "captchaResponse" } }; const defaultProps = { rememberMe: true, getCaptchaPath: "/getCaptcha.htl", checkCaptchaPath: "/checkNeedCaptcha.htl", formIdx: 2, pwdEncrypt: true }; const cloudDefaultProps = { lt: "/security/lt", rememberMe: true, getCaptchaPath: "/generateCaptcha", submitCaptchakey: "captcha" }; export default (schoolName, isCloud) => schoolName ? new Proxy(schoolEdgeCases[schoolName] || {}, { get(target, prop, receiver) { if (target[prop] === void 0) { return isCloud ? cloudDefaultProps[prop] : defaultProps[prop]; } return Reflect.get(target, prop, receiver); } }) : {}; //# sourceMappingURL=edge-case.js.map