vue-layout-gitcode 1.10.3 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{GloabarSearch-C-ufnLvF.js → GloabarSearch-By3gMqr5.js} +3 -3
- package/{MenuItem-CPFl05jE.js → MenuItem-Cm9MfzFK.js} +1 -1
- package/{ProjectMenuList-DSN0M_15.js → ProjectMenuList-Bc9kQJxY.js} +2 -2
- package/{ProjectMenuListV2-1b7qhT4G.js → ProjectMenuListV2-hrS6FDx2.js} +2 -2
- package/{ProjectSearch-D4Sw6ivM.js → ProjectSearch-Dn7KpEXq.js} +1 -1
- package/{SearchHistoryList-CS_CFBUo.js → SearchHistoryList-BhGjwV79.js} +1 -1
- package/{SearchPrefixTag-uN3Cgb9n.js → SearchPrefixTag-DnMJrNAb.js} +1 -1
- package/{SearchRecommed-6lHUWr1n.js → SearchRecommed-DrJjIXTk.js} +2 -2
- package/{SearchScopeList-DOJcRpNH.js → SearchScopeList-RzX52eKP.js} +1 -1
- package/{UserSearch-BfqmHJqu.js → UserSearch-B9_DTuGr.js} +1 -1
- package/{index-BGZZE9SF.js → index-R5u6vIQd.js} +2 -2
- package/index-dzjfyxs4.js +335 -0
- package/{index-DdptwjGd.js → index-hbNP7Gxd.js} +288 -116
- package/{index-CvWYO3_s.js → index-iC2vZB0n.js} +1 -1
- package/{index-D87UZqWQ.js → index-vy7s96fo.js} +1 -1
- package/index.js +1 -1
- package/{notice-J26BrWLM.js → notice-IqJyqZQT.js} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/{transWebUrl-B7NuZV-x.js → transWebUrl-htNmNx0Y.js} +1 -1
|
@@ -13770,14 +13770,15 @@ function headRequest(request) {
|
|
|
13770
13770
|
},
|
|
13771
13771
|
/** 获取gitcode手机号验证码 */
|
|
13772
13772
|
verifyRegisterCode(data) {
|
|
13773
|
-
const { mobile, type, raw_data, captchaId, token, authenticate } = data;
|
|
13773
|
+
const { mobile, type, raw_data, captchaId, token, authenticate, validate } = data;
|
|
13774
13774
|
const requestData = filterApiParams({
|
|
13775
13775
|
biz_enum: type,
|
|
13776
13776
|
mobile,
|
|
13777
13777
|
raw_data: raw_data || "",
|
|
13778
13778
|
captcha_id: captchaId,
|
|
13779
13779
|
token,
|
|
13780
|
-
authenticate
|
|
13780
|
+
authenticate,
|
|
13781
|
+
validate
|
|
13781
13782
|
});
|
|
13782
13783
|
return reqCatch(
|
|
13783
13784
|
() => request({
|
|
@@ -13789,13 +13790,14 @@ function headRequest(request) {
|
|
|
13789
13790
|
},
|
|
13790
13791
|
/** 快捷注册短信验证 */
|
|
13791
13792
|
getQuickLoginMsg(data) {
|
|
13792
|
-
const { mobile, biz_enum, captchaId, token, authenticate } = data;
|
|
13793
|
+
const { mobile, biz_enum, captchaId, token, authenticate, validate } = data;
|
|
13793
13794
|
const requestData = filterApiParams({
|
|
13794
13795
|
mobile,
|
|
13795
13796
|
biz_enum: biz_enum || "LOGIN",
|
|
13796
13797
|
captcha_id: captchaId,
|
|
13797
13798
|
token,
|
|
13798
|
-
authenticate
|
|
13799
|
+
authenticate,
|
|
13800
|
+
validate
|
|
13799
13801
|
});
|
|
13800
13802
|
return reqCatch(
|
|
13801
13803
|
() => request({
|
|
@@ -13806,10 +13808,10 @@ function headRequest(request) {
|
|
|
13806
13808
|
);
|
|
13807
13809
|
},
|
|
13808
13810
|
/** 重置密码 - 获取手机或者邮箱验证码 */
|
|
13809
|
-
getMobileEmailCode({ mobile_email = "", captcha_id = "", token = "", authenticate = "" }) {
|
|
13811
|
+
getMobileEmailCode({ mobile_email = "", captcha_id = "", token = "", authenticate = "", validate = "" }) {
|
|
13810
13812
|
return reqCatch(
|
|
13811
13813
|
() => request({
|
|
13812
|
-
url: `/api/v1/user/forgetCode?mobile_email=${mobile_email}&captcha_id=${captcha_id}&token=${token}&authenticate=${authenticate}`
|
|
13814
|
+
url: `/api/v1/user/forgetCode?mobile_email=${mobile_email}&captcha_id=${captcha_id}&token=${token}&authenticate=${authenticate}&validate=${validate}`
|
|
13813
13815
|
})
|
|
13814
13816
|
);
|
|
13815
13817
|
},
|
|
@@ -13899,7 +13901,8 @@ function headRequest(request) {
|
|
|
13899
13901
|
password: cryptoCode.toString(),
|
|
13900
13902
|
captcha_id: data == null ? void 0 : data.captchaId,
|
|
13901
13903
|
token: data == null ? void 0 : data.token,
|
|
13902
|
-
authenticate: data == null ? void 0 : data.authenticate
|
|
13904
|
+
authenticate: data == null ? void 0 : data.authenticate,
|
|
13905
|
+
validate: data == null ? void 0 : data.validate
|
|
13903
13906
|
});
|
|
13904
13907
|
return reqCatch(
|
|
13905
13908
|
() => request({
|
|
@@ -14000,6 +14003,15 @@ function headRequest(request) {
|
|
|
14000
14003
|
})
|
|
14001
14004
|
);
|
|
14002
14005
|
},
|
|
14006
|
+
/** 获取配置的图片验证码类型 */
|
|
14007
|
+
getCaptchaType() {
|
|
14008
|
+
return reqCatch(
|
|
14009
|
+
() => request({
|
|
14010
|
+
url: `/uc/api/v1/captcha/config `,
|
|
14011
|
+
method: "get"
|
|
14012
|
+
})
|
|
14013
|
+
);
|
|
14014
|
+
},
|
|
14003
14015
|
// mfa 恢复码登陆
|
|
14004
14016
|
postMfaRecover(data) {
|
|
14005
14017
|
return reqCatchV2(
|
|
@@ -14911,13 +14923,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
14911
14923
|
var _a;
|
|
14912
14924
|
const layoutConfig2 = useLayoutConfig();
|
|
14913
14925
|
const { t: $t } = i18n.global;
|
|
14914
|
-
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-
|
|
14915
|
-
const UserSearch = defineAsyncComponent(() => import("./UserSearch-
|
|
14916
|
-
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-
|
|
14917
|
-
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-
|
|
14918
|
-
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-
|
|
14919
|
-
const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-
|
|
14920
|
-
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-
|
|
14926
|
+
const ProjectSearch = defineAsyncComponent(() => import("./ProjectSearch-Dn7KpEXq.js"));
|
|
14927
|
+
const UserSearch = defineAsyncComponent(() => import("./UserSearch-B9_DTuGr.js"));
|
|
14928
|
+
const GloabarSearch = defineAsyncComponent(() => import("./GloabarSearch-By3gMqr5.js"));
|
|
14929
|
+
const SearchHistoryList = defineAsyncComponent(() => import("./SearchHistoryList-BhGjwV79.js"));
|
|
14930
|
+
const SearchScopeList = defineAsyncComponent(() => import("./SearchScopeList-RzX52eKP.js"));
|
|
14931
|
+
const SearchPrefixTag = defineAsyncComponent(() => import("./SearchPrefixTag-DnMJrNAb.js"));
|
|
14932
|
+
const SearchRecommed = defineAsyncComponent(() => import("./SearchRecommed-DrJjIXTk.js"));
|
|
14921
14933
|
const props = __props;
|
|
14922
14934
|
const repoInfo = inject("repoInfo");
|
|
14923
14935
|
const orgInfo = inject("orgInfo");
|
|
@@ -15666,7 +15678,7 @@ const autoAvokeLogin = ({ isLogin, loginFunc, openHarmonyGuide, loginSuccess, lo
|
|
|
15666
15678
|
loginFunc({ type: "login", triggerType: "", loginTriggerSource: "router_login_auth", ...loginFuncOpts }, loginSuccess, openHarmonyGuide);
|
|
15667
15679
|
}
|
|
15668
15680
|
};
|
|
15669
|
-
const NoticeModal = defineAsyncComponent(() => import("./notice-
|
|
15681
|
+
const NoticeModal = defineAsyncComponent(() => import("./notice-IqJyqZQT.js"));
|
|
15670
15682
|
function clearNotice() {
|
|
15671
15683
|
if (localStorage$2.getItem("validator_email")) {
|
|
15672
15684
|
localStorage$2.removeItem("validator_email");
|
|
@@ -16468,9 +16480,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
|
|
|
16468
16480
|
const layoutConfig2 = useLayoutConfig();
|
|
16469
16481
|
const { t: t2 } = i18n.global;
|
|
16470
16482
|
const route = useRoute();
|
|
16471
|
-
const MenuItem = defineAsyncComponent(() => import("./MenuItem-
|
|
16472
|
-
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-
|
|
16473
|
-
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-
|
|
16483
|
+
const MenuItem = defineAsyncComponent(() => import("./MenuItem-Cm9MfzFK.js"));
|
|
16484
|
+
const ProjectMenuListV2 = defineAsyncComponent(() => import("./ProjectMenuListV2-hrS6FDx2.js"));
|
|
16485
|
+
const ProjectMenuList = defineAsyncComponent(() => import("./ProjectMenuList-Bc9kQJxY.js"));
|
|
16474
16486
|
const props = __props;
|
|
16475
16487
|
console.log("slotKeys", props.slotKeys);
|
|
16476
16488
|
console.log("props", props);
|
|
@@ -18243,8 +18255,6 @@ async function csdnloginCheck(route, loginCallback, request) {
|
|
|
18243
18255
|
}
|
|
18244
18256
|
const layoutConfig = useLayoutConfig();
|
|
18245
18257
|
const { t: t$2 } = i18n.global;
|
|
18246
|
-
const GRAPH_CODE = 400017;
|
|
18247
|
-
const YUNPIAN_GRAPH_CODE = 400018;
|
|
18248
18258
|
const REMOTE_LOGIN_CODE = 400015;
|
|
18249
18259
|
const MAX_MOBILE_COUNT = 10;
|
|
18250
18260
|
const createLoginConfig = (request) => {
|
|
@@ -18274,23 +18284,34 @@ const createLoginConfig = (request) => {
|
|
|
18274
18284
|
}
|
|
18275
18285
|
},
|
|
18276
18286
|
// 密码登录
|
|
18277
|
-
async password({
|
|
18278
|
-
|
|
18287
|
+
async password({
|
|
18288
|
+
param,
|
|
18289
|
+
loginParams,
|
|
18290
|
+
graphValidate,
|
|
18291
|
+
lintRemoteLogin,
|
|
18292
|
+
yunpianGraphValidate,
|
|
18293
|
+
yiDunGraphValidate
|
|
18294
|
+
}) {
|
|
18295
|
+
var _a, _b, _c, _d;
|
|
18279
18296
|
const { validFunc, successFunc = () => {
|
|
18280
18297
|
}, failFunc = () => {
|
|
18281
|
-
} } = param;
|
|
18298
|
+
}, captchaType } = param;
|
|
18282
18299
|
const check = validFunc ? await validFunc() : true;
|
|
18283
18300
|
if (!check) return;
|
|
18284
18301
|
const result2 = await API.toLogin(loginParams);
|
|
18285
|
-
if (((_a = result2 == null ? void 0 : result2.error) == null ? void 0 : _a.error_code) ===
|
|
18302
|
+
if (((_a = result2 == null ? void 0 : result2.error) == null ? void 0 : _a.error_code) && (captchaType == null ? void 0 : captchaType.provider) === "SELF") {
|
|
18286
18303
|
graphValidate();
|
|
18287
18304
|
return;
|
|
18288
18305
|
}
|
|
18289
|
-
if (((_b = result2 == null ? void 0 : result2.error) == null ? void 0 : _b.error_code) ===
|
|
18306
|
+
if (((_b = result2 == null ? void 0 : result2.error) == null ? void 0 : _b.error_code) && (captchaType == null ? void 0 : captchaType.provider) === "YUNPIAN") {
|
|
18290
18307
|
yunpianGraphValidate();
|
|
18291
18308
|
return;
|
|
18292
18309
|
}
|
|
18293
|
-
if (((_c = result2 == null ? void 0 : result2.error) == null ? void 0 : _c.error_code) ===
|
|
18310
|
+
if (((_c = result2 == null ? void 0 : result2.error) == null ? void 0 : _c.error_code) && (captchaType == null ? void 0 : captchaType.provider) === "YIDUN") {
|
|
18311
|
+
yiDunGraphValidate();
|
|
18312
|
+
return;
|
|
18313
|
+
}
|
|
18314
|
+
if (((_d = result2 == null ? void 0 : result2.error) == null ? void 0 : _d.error_code) === REMOTE_LOGIN_CODE) {
|
|
18294
18315
|
lintRemoteLogin();
|
|
18295
18316
|
return;
|
|
18296
18317
|
}
|
|
@@ -22413,7 +22434,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
|
22413
22434
|
}
|
|
22414
22435
|
});
|
|
22415
22436
|
const MFA = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-vue-layout-gitcode"]]);
|
|
22416
|
-
const SlidCaptcha = defineAsyncComponent(() => import("./index-
|
|
22437
|
+
const SlidCaptcha = defineAsyncComponent(() => import("./index-vy7s96fo.js"));
|
|
22417
22438
|
const useSlidCaptcha = () => {
|
|
22418
22439
|
const { mount, unMount } = usePopup("slid-captcha-popup");
|
|
22419
22440
|
const open = (config) => {
|
|
@@ -22432,7 +22453,7 @@ const useSlidCaptcha = () => {
|
|
|
22432
22453
|
close: unMount
|
|
22433
22454
|
};
|
|
22434
22455
|
};
|
|
22435
|
-
const YunpianCaptcha = defineAsyncComponent(() => import("./index-
|
|
22456
|
+
const YunpianCaptcha = defineAsyncComponent(() => import("./index-iC2vZB0n.js"));
|
|
22436
22457
|
const useYunpianCaptcha = () => {
|
|
22437
22458
|
const { mount, unMount } = usePopup("yunpian-captcha-popup");
|
|
22438
22459
|
const open = (config) => {
|
|
@@ -22458,6 +22479,37 @@ const useYunpianCaptcha = () => {
|
|
|
22458
22479
|
close: unMount
|
|
22459
22480
|
};
|
|
22460
22481
|
};
|
|
22482
|
+
const YiDunCaptcha = defineAsyncComponent(() => import("./index-dzjfyxs4.js"));
|
|
22483
|
+
const useYiDunCaptcha = () => {
|
|
22484
|
+
const { mount, unMount } = usePopup("yidun-captcha-popup");
|
|
22485
|
+
const open = (config) => {
|
|
22486
|
+
if (!(config == null ? void 0 : config.captchaId)) {
|
|
22487
|
+
console.error("易盾验证码 captchaId 不能为空");
|
|
22488
|
+
return;
|
|
22489
|
+
}
|
|
22490
|
+
mount(YiDunCaptcha, {
|
|
22491
|
+
captchaId: config.captchaId,
|
|
22492
|
+
modelValue: true,
|
|
22493
|
+
onSuccess: (resData) => {
|
|
22494
|
+
var _a;
|
|
22495
|
+
unMount();
|
|
22496
|
+
(_a = config == null ? void 0 : config.onSuccess) == null ? void 0 : _a.call(config, resData);
|
|
22497
|
+
},
|
|
22498
|
+
onClose: () => unMount(),
|
|
22499
|
+
onFallback: () => {
|
|
22500
|
+
unMount();
|
|
22501
|
+
nextTick(() => {
|
|
22502
|
+
var _a;
|
|
22503
|
+
(_a = config == null ? void 0 : config.onFallback) == null ? void 0 : _a.call(config, config == null ? void 0 : config.onSuccess);
|
|
22504
|
+
});
|
|
22505
|
+
}
|
|
22506
|
+
});
|
|
22507
|
+
};
|
|
22508
|
+
return {
|
|
22509
|
+
open,
|
|
22510
|
+
close: unMount
|
|
22511
|
+
};
|
|
22512
|
+
};
|
|
22461
22513
|
const _sfc_main$3 = {};
|
|
22462
22514
|
const _hoisted_1$2 = { class: "content-loading" };
|
|
22463
22515
|
function _sfc_render(_ctx, _cache) {
|
|
@@ -23193,9 +23245,20 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23193
23245
|
extraData: {}
|
|
23194
23246
|
});
|
|
23195
23247
|
};
|
|
23196
|
-
|
|
23248
|
+
const captchaType = ref({
|
|
23249
|
+
provider: "SELF"
|
|
23250
|
+
});
|
|
23251
|
+
const getCurrentCaptchaType = async () => {
|
|
23252
|
+
var _a;
|
|
23253
|
+
const res = await API.getCaptchaType();
|
|
23254
|
+
if (!res.error) {
|
|
23255
|
+
captchaType.value = ((_a = res == null ? void 0 : res.data) == null ? void 0 : _a.data) || { provider: "SELF" };
|
|
23256
|
+
}
|
|
23257
|
+
};
|
|
23258
|
+
const captchaMode = ref("yunpian");
|
|
23197
23259
|
const slidCaptcha = useSlidCaptcha();
|
|
23198
23260
|
const yunpianCaptcha = useYunpianCaptcha();
|
|
23261
|
+
const yiDunCaptcha = useYiDunCaptcha();
|
|
23199
23262
|
const LoginCheck = async () => {
|
|
23200
23263
|
let agreementFlag = false;
|
|
23201
23264
|
if (!status.value || !dataShareChecked.value) {
|
|
@@ -23305,6 +23368,156 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23305
23368
|
}
|
|
23306
23369
|
});
|
|
23307
23370
|
};
|
|
23371
|
+
const getYiDunCaptchaId = ({ scene, isDomesticNumber = true }) => {
|
|
23372
|
+
var _a, _b, _c;
|
|
23373
|
+
if (captchaType.value.provider !== "YIDUN") {
|
|
23374
|
+
return "";
|
|
23375
|
+
}
|
|
23376
|
+
if (scene === "password") {
|
|
23377
|
+
return (_a = captchaType.value.international) == null ? void 0 : _a.captcha_id;
|
|
23378
|
+
}
|
|
23379
|
+
if (scene === "sendCode") {
|
|
23380
|
+
return isDomesticNumber ? (_b = captchaType.value.domestic) == null ? void 0 : _b.captcha_id : (_c = captchaType.value.international) == null ? void 0 : _c.captcha_id;
|
|
23381
|
+
}
|
|
23382
|
+
return "";
|
|
23383
|
+
};
|
|
23384
|
+
const handleCaptchaVerification = (conf, options = {}) => {
|
|
23385
|
+
try {
|
|
23386
|
+
const { isDomesticNumber = true, checkCondition, extraParams = {} } = options;
|
|
23387
|
+
if (checkCondition && !checkCondition(conf)) {
|
|
23388
|
+
return false;
|
|
23389
|
+
}
|
|
23390
|
+
if (captchaMode.value === "yunpian") {
|
|
23391
|
+
yunpianCaptcha.open({
|
|
23392
|
+
onSuccess: (captchaData) => {
|
|
23393
|
+
handleCountDown({
|
|
23394
|
+
...conf,
|
|
23395
|
+
token: captchaData == null ? void 0 : captchaData.token,
|
|
23396
|
+
authenticate: captchaData == null ? void 0 : captchaData.authenticate,
|
|
23397
|
+
captchaId: captchaData == null ? void 0 : captchaData.captchaId,
|
|
23398
|
+
...extraParams
|
|
23399
|
+
});
|
|
23400
|
+
},
|
|
23401
|
+
onFallback: (originalOnSuccess) => {
|
|
23402
|
+
captchaMode.value = "tianai";
|
|
23403
|
+
slidCaptcha.open({
|
|
23404
|
+
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23405
|
+
captchaId: captchaData.id
|
|
23406
|
+
})
|
|
23407
|
+
});
|
|
23408
|
+
}
|
|
23409
|
+
});
|
|
23410
|
+
return true;
|
|
23411
|
+
}
|
|
23412
|
+
if (captchaMode.value === "tianai") {
|
|
23413
|
+
slidCaptcha.open({
|
|
23414
|
+
onSuccess: (captchaData) => {
|
|
23415
|
+
handleCountDown({
|
|
23416
|
+
...conf,
|
|
23417
|
+
captchaId: captchaData.id,
|
|
23418
|
+
...extraParams
|
|
23419
|
+
});
|
|
23420
|
+
}
|
|
23421
|
+
});
|
|
23422
|
+
return true;
|
|
23423
|
+
}
|
|
23424
|
+
if (captchaMode.value === "yidun") {
|
|
23425
|
+
const currentCaptchaId = getYiDunCaptchaId({ scene: "sendCode", isDomesticNumber });
|
|
23426
|
+
if (!currentCaptchaId) {
|
|
23427
|
+
console.error("易盾验证码 ID 未获取到,降级到天爱验证码");
|
|
23428
|
+
captchaMode.value = "tianai";
|
|
23429
|
+
slidCaptcha.open({
|
|
23430
|
+
onSuccess: (captchaData) => {
|
|
23431
|
+
handleCountDown({
|
|
23432
|
+
...conf,
|
|
23433
|
+
captchaId: captchaData.id,
|
|
23434
|
+
...extraParams
|
|
23435
|
+
});
|
|
23436
|
+
}
|
|
23437
|
+
});
|
|
23438
|
+
return true;
|
|
23439
|
+
}
|
|
23440
|
+
yiDunCaptcha.open({
|
|
23441
|
+
captchaId: currentCaptchaId,
|
|
23442
|
+
onSuccess: (captchaData) => {
|
|
23443
|
+
handleCountDown({
|
|
23444
|
+
...conf,
|
|
23445
|
+
token: captchaData == null ? void 0 : captchaData.token,
|
|
23446
|
+
authenticate: captchaData == null ? void 0 : captchaData.authenticate,
|
|
23447
|
+
captchaId: currentCaptchaId,
|
|
23448
|
+
validate: captchaData == null ? void 0 : captchaData.validate,
|
|
23449
|
+
...extraParams
|
|
23450
|
+
});
|
|
23451
|
+
},
|
|
23452
|
+
onFallback: (originalOnSuccess) => {
|
|
23453
|
+
captchaMode.value = "tianai";
|
|
23454
|
+
slidCaptcha.open({
|
|
23455
|
+
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23456
|
+
captchaId: captchaData.id
|
|
23457
|
+
})
|
|
23458
|
+
});
|
|
23459
|
+
}
|
|
23460
|
+
});
|
|
23461
|
+
return true;
|
|
23462
|
+
}
|
|
23463
|
+
console.warn(`未知的验证码模式: ${captchaMode.value},降级到天爱验证码`);
|
|
23464
|
+
captchaMode.value = "tianai";
|
|
23465
|
+
slidCaptcha.open({
|
|
23466
|
+
onSuccess: (captchaData) => {
|
|
23467
|
+
handleCountDown({
|
|
23468
|
+
...conf,
|
|
23469
|
+
captchaId: captchaData.id,
|
|
23470
|
+
...extraParams
|
|
23471
|
+
});
|
|
23472
|
+
}
|
|
23473
|
+
});
|
|
23474
|
+
return true;
|
|
23475
|
+
} catch (error) {
|
|
23476
|
+
console.error("处理验证码时发生错误:", error);
|
|
23477
|
+
try {
|
|
23478
|
+
captchaMode.value = "tianai";
|
|
23479
|
+
slidCaptcha.open({
|
|
23480
|
+
onSuccess: (captchaData) => {
|
|
23481
|
+
handleCountDown({
|
|
23482
|
+
...conf,
|
|
23483
|
+
captchaId: captchaData.id,
|
|
23484
|
+
...options.extraParams
|
|
23485
|
+
});
|
|
23486
|
+
}
|
|
23487
|
+
});
|
|
23488
|
+
return true;
|
|
23489
|
+
} catch (fallbackError) {
|
|
23490
|
+
console.error("降级验证码也失败:", fallbackError);
|
|
23491
|
+
return false;
|
|
23492
|
+
}
|
|
23493
|
+
}
|
|
23494
|
+
};
|
|
23495
|
+
const yiDunGraphValidate = () => {
|
|
23496
|
+
loading.value = false;
|
|
23497
|
+
const currentCaptchaId = getYiDunCaptchaId({ scene: "password" });
|
|
23498
|
+
if (!currentCaptchaId) {
|
|
23499
|
+
console.error("验证码 ID 未获取到");
|
|
23500
|
+
return;
|
|
23501
|
+
}
|
|
23502
|
+
yiDunCaptcha.open({
|
|
23503
|
+
captchaId: currentCaptchaId,
|
|
23504
|
+
onSuccess: (captchaData) => {
|
|
23505
|
+
handleConfirm({
|
|
23506
|
+
validate: captchaData == null ? void 0 : captchaData.validate,
|
|
23507
|
+
token: captchaData == null ? void 0 : captchaData.token,
|
|
23508
|
+
authenticate: captchaData == null ? void 0 : captchaData.authenticate,
|
|
23509
|
+
captchaId: currentCaptchaId
|
|
23510
|
+
});
|
|
23511
|
+
},
|
|
23512
|
+
onFallback: (originalOnSuccess) => {
|
|
23513
|
+
slidCaptcha.open({
|
|
23514
|
+
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23515
|
+
captchaId: captchaData.id
|
|
23516
|
+
})
|
|
23517
|
+
});
|
|
23518
|
+
}
|
|
23519
|
+
});
|
|
23520
|
+
};
|
|
23308
23521
|
const errForRemoteLogin = ref(false);
|
|
23309
23522
|
const handleRemoteLogin = () => {
|
|
23310
23523
|
errForRemoteLogin.value = true;
|
|
@@ -23353,6 +23566,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23353
23566
|
const passwordParams = {
|
|
23354
23567
|
type: "password",
|
|
23355
23568
|
...res,
|
|
23569
|
+
validate: info == null ? void 0 : info.validate,
|
|
23356
23570
|
captchaId: info == null ? void 0 : info.captchaId,
|
|
23357
23571
|
token: info == null ? void 0 : info.token,
|
|
23358
23572
|
authenticate: info == null ? void 0 : info.authenticate
|
|
@@ -23363,12 +23577,14 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23363
23577
|
successFunc: loginSuccess,
|
|
23364
23578
|
failFunc: loginFail,
|
|
23365
23579
|
loginDeviceType: "pc",
|
|
23366
|
-
country
|
|
23580
|
+
country,
|
|
23581
|
+
captchaType: captchaType.value
|
|
23367
23582
|
},
|
|
23368
23583
|
loginParams: passwordParams,
|
|
23369
|
-
graphValidate,
|
|
23370
23584
|
lintRemoteLogin: handleRemoteLogin,
|
|
23371
|
-
|
|
23585
|
+
graphValidate,
|
|
23586
|
+
yunpianGraphValidate,
|
|
23587
|
+
yiDunGraphValidate
|
|
23372
23588
|
});
|
|
23373
23589
|
break;
|
|
23374
23590
|
}
|
|
@@ -23453,7 +23669,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23453
23669
|
mobile,
|
|
23454
23670
|
captchaId: conf == null ? void 0 : conf.captchaId,
|
|
23455
23671
|
token: conf == null ? void 0 : conf.token,
|
|
23456
|
-
authenticate: conf == null ? void 0 : conf.authenticate
|
|
23672
|
+
authenticate: conf == null ? void 0 : conf.authenticate,
|
|
23673
|
+
validate: conf == null ? void 0 : conf.validate
|
|
23457
23674
|
});
|
|
23458
23675
|
break;
|
|
23459
23676
|
}
|
|
@@ -23462,7 +23679,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23462
23679
|
mobile_email: mobile,
|
|
23463
23680
|
captcha_id: conf == null ? void 0 : conf.captchaId,
|
|
23464
23681
|
token: conf == null ? void 0 : conf.token,
|
|
23465
|
-
authenticate: conf == null ? void 0 : conf.authenticate
|
|
23682
|
+
authenticate: conf == null ? void 0 : conf.authenticate,
|
|
23683
|
+
validate: conf == null ? void 0 : conf.validate
|
|
23466
23684
|
});
|
|
23467
23685
|
res = await API.getMobileEmailCode(requestData);
|
|
23468
23686
|
break;
|
|
@@ -23473,7 +23691,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23473
23691
|
type: "BINDING_MOBILE",
|
|
23474
23692
|
captchaId: conf == null ? void 0 : conf.captchaId,
|
|
23475
23693
|
token: conf == null ? void 0 : conf.token,
|
|
23476
|
-
authenticate: conf == null ? void 0 : conf.authenticate
|
|
23694
|
+
authenticate: conf == null ? void 0 : conf.authenticate,
|
|
23695
|
+
validate: conf == null ? void 0 : conf.validate
|
|
23477
23696
|
});
|
|
23478
23697
|
break;
|
|
23479
23698
|
}
|
|
@@ -23483,7 +23702,8 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23483
23702
|
type: "REGISTER",
|
|
23484
23703
|
captchaId: conf == null ? void 0 : conf.captchaId,
|
|
23485
23704
|
token: conf == null ? void 0 : conf.token,
|
|
23486
|
-
authenticate: conf == null ? void 0 : conf.authenticate
|
|
23705
|
+
authenticate: conf == null ? void 0 : conf.authenticate,
|
|
23706
|
+
validate: conf == null ? void 0 : conf.validate
|
|
23487
23707
|
});
|
|
23488
23708
|
break;
|
|
23489
23709
|
}
|
|
@@ -23491,7 +23711,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23491
23711
|
return res;
|
|
23492
23712
|
};
|
|
23493
23713
|
const handleCountDown = async (conf) => {
|
|
23494
|
-
var _a, _b, _c;
|
|
23714
|
+
var _a, _b, _c, _d, _e;
|
|
23495
23715
|
const formData = await FormRef.value.ValidateFormKeys([conf.key]);
|
|
23496
23716
|
const mobile = getPhone(conf);
|
|
23497
23717
|
if (formData.type === "success") {
|
|
@@ -23503,98 +23723,49 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
23503
23723
|
const isDomesticNumber = country === "CN" || !country;
|
|
23504
23724
|
const isLoginOrRegister = formType.value === "login" || formType.value === "register";
|
|
23505
23725
|
if (!isDomesticNumber && !conf.noVerificationRequired && isLoginOrRegister) {
|
|
23506
|
-
if (
|
|
23507
|
-
|
|
23508
|
-
|
|
23509
|
-
|
|
23510
|
-
|
|
23511
|
-
|
|
23512
|
-
|
|
23513
|
-
captchaId: captchaData == null ? void 0 : captchaData.captchaId,
|
|
23514
|
-
noVerificationRequired: true,
|
|
23515
|
-
smsReported: true
|
|
23516
|
-
});
|
|
23517
|
-
},
|
|
23518
|
-
onFallback: (originalOnSuccess) => {
|
|
23519
|
-
captchaMode = "tianai";
|
|
23520
|
-
slidCaptcha.open({
|
|
23521
|
-
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23522
|
-
captchaId: captchaData.id
|
|
23523
|
-
})
|
|
23524
|
-
});
|
|
23525
|
-
}
|
|
23526
|
-
});
|
|
23527
|
-
return;
|
|
23528
|
-
} else if (captchaMode === "tianai") {
|
|
23529
|
-
slidCaptcha.open({
|
|
23530
|
-
onSuccess: (captchaData) => handleCountDown({ ...conf, captchaId: captchaData.id, noVerificationRequired: true, smsReported: true })
|
|
23531
|
-
});
|
|
23726
|
+
if (handleCaptchaVerification(conf, {
|
|
23727
|
+
isDomesticNumber,
|
|
23728
|
+
extraParams: {
|
|
23729
|
+
noVerificationRequired: true,
|
|
23730
|
+
smsReported: true
|
|
23731
|
+
}
|
|
23732
|
+
})) {
|
|
23532
23733
|
return;
|
|
23533
23734
|
}
|
|
23534
23735
|
}
|
|
23535
23736
|
if (formType.value === "forget") {
|
|
23536
|
-
|
|
23537
|
-
|
|
23538
|
-
|
|
23539
|
-
|
|
23540
|
-
|
|
23541
|
-
|
|
23542
|
-
|
|
23543
|
-
|
|
23544
|
-
|
|
23545
|
-
smsReported: true
|
|
23546
|
-
});
|
|
23547
|
-
},
|
|
23548
|
-
onFallback: (originalOnSuccess) => {
|
|
23549
|
-
captchaMode = "tianai";
|
|
23550
|
-
slidCaptcha.open({
|
|
23551
|
-
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23552
|
-
captchaId: captchaData.id
|
|
23553
|
-
})
|
|
23554
|
-
});
|
|
23555
|
-
}
|
|
23556
|
-
});
|
|
23737
|
+
const needVerification = captchaMode.value === "yunpian" && (!conf.token || !conf.authenticate) || captchaMode.value === "tianai" && !conf.captchaId || captchaMode.value === "yidun" && !conf.validate;
|
|
23738
|
+
if (needVerification) {
|
|
23739
|
+
if (handleCaptchaVerification(conf, {
|
|
23740
|
+
isDomesticNumber,
|
|
23741
|
+
checkCondition: () => needVerification,
|
|
23742
|
+
extraParams: {
|
|
23743
|
+
smsReported: true
|
|
23744
|
+
}
|
|
23745
|
+
})) {
|
|
23557
23746
|
return;
|
|
23558
23747
|
}
|
|
23559
|
-
} else if (captchaMode === "tianai" && !conf.captchaId) {
|
|
23560
|
-
slidCaptcha.open({
|
|
23561
|
-
onSuccess: (captchaData) => {
|
|
23562
|
-
handleCountDown({ ...conf, captchaId: captchaData.id, smsReported: true });
|
|
23563
|
-
}
|
|
23564
|
-
});
|
|
23565
|
-
return;
|
|
23566
23748
|
}
|
|
23567
23749
|
}
|
|
23568
23750
|
if (tabPanel.value === "verifyCode" || ["register", "forget", "bindPhone"].includes(formType.value)) {
|
|
23569
23751
|
const verifyCodeRes = await handleCountDownSubmission(conf, mobile);
|
|
23570
23752
|
if (["login", "register", "bindPhone"].includes(formType.value)) {
|
|
23571
|
-
if ((
|
|
23572
|
-
|
|
23573
|
-
|
|
23574
|
-
|
|
23575
|
-
|
|
23576
|
-
|
|
23577
|
-
|
|
23578
|
-
|
|
23579
|
-
|
|
23580
|
-
|
|
23581
|
-
|
|
23582
|
-
...conf,
|
|
23583
|
-
token: captchaData == null ? void 0 : captchaData.token,
|
|
23584
|
-
authenticate: captchaData == null ? void 0 : captchaData.authenticate,
|
|
23585
|
-
captchaId: captchaData == null ? void 0 : captchaData.captchaId,
|
|
23753
|
+
if ((_b = verifyCodeRes == null ? void 0 : verifyCodeRes.error) == null ? void 0 : _b.error_code) {
|
|
23754
|
+
if (((_c = captchaType.value) == null ? void 0 : _c.provider) === "SELF") {
|
|
23755
|
+
captchaMode.value = "tianai";
|
|
23756
|
+
} else if (((_d = captchaType.value) == null ? void 0 : _d.provider) === "YUNPIAN") {
|
|
23757
|
+
captchaMode.value = "yunpian";
|
|
23758
|
+
} else if (((_e = captchaType.value) == null ? void 0 : _e.provider) === "YIDUN") {
|
|
23759
|
+
captchaMode.value = "yidun";
|
|
23760
|
+
}
|
|
23761
|
+
if (handleCaptchaVerification(conf, {
|
|
23762
|
+
isDomesticNumber,
|
|
23763
|
+
extraParams: {
|
|
23586
23764
|
smsReported: true
|
|
23587
|
-
}),
|
|
23588
|
-
onFallback: (originalOnSuccess) => {
|
|
23589
|
-
captchaMode = "tianai";
|
|
23590
|
-
slidCaptcha.open({
|
|
23591
|
-
onSuccess: (captchaData) => originalOnSuccess == null ? void 0 : originalOnSuccess({
|
|
23592
|
-
captchaId: captchaData.id
|
|
23593
|
-
})
|
|
23594
|
-
});
|
|
23595
23765
|
}
|
|
23596
|
-
})
|
|
23597
|
-
|
|
23766
|
+
})) {
|
|
23767
|
+
return;
|
|
23768
|
+
}
|
|
23598
23769
|
}
|
|
23599
23770
|
}
|
|
23600
23771
|
if (!(verifyCodeRes == null ? void 0 : verifyCodeRes.error)) {
|
|
@@ -24029,6 +24200,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
24029
24200
|
const resetPwdDirectly = ref(false);
|
|
24030
24201
|
const resetPwdWhiteList = ["change_password"];
|
|
24031
24202
|
onMounted(() => {
|
|
24203
|
+
getCurrentCaptchaType();
|
|
24032
24204
|
if (tabPanel.value === "miniProgram" && formType.value === "login") {
|
|
24033
24205
|
getMiniProgramQrCode();
|
|
24034
24206
|
}
|
|
@@ -8,7 +8,7 @@ import { Message } from "vue-devui-lal/message";
|
|
|
8
8
|
import "vue-devui-lal/message/style.css";
|
|
9
9
|
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
10
10
|
import "vue-devui-lal/overlay/style.css";
|
|
11
|
-
import { a as i18n, k as usePageResize, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-
|
|
11
|
+
import { a as i18n, k as usePageResize, x as getLocaleLang, L as LANG_ZH, _ as _export_sfc } from "./index-hbNP7Gxd.js";
|
|
12
12
|
const _YunpianCaptchaManager = class _YunpianCaptchaManager {
|
|
13
13
|
constructor() {
|
|
14
14
|
__publicField(this, "ypRiddlerInstance", null);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, onMounted, onUnmounted, createBlock, openBlock, unref, withCtx, createElementVNode } from "vue";
|
|
2
|
-
import { x as getLocaleLang, L as LANG_ZH, y as useLayoutConfig, _ as _export_sfc } from "./index-
|
|
2
|
+
import { x as getLocaleLang, L as LANG_ZH, y as useLayoutConfig, _ as _export_sfc } from "./index-hbNP7Gxd.js";
|
|
3
3
|
import { FixedOverlay } from "vue-devui-lal/overlay";
|
|
4
4
|
import "vue-devui-lal/overlay/style.css";
|
|
5
5
|
const TARGET_TEXT = "Click in order:";
|
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, createBlock, openBlock, unref, isRef, withCtx, createElementVNode, normalizeClass, createVNode, createTextVNode } from "vue";
|
|
2
|
-
import { i as isPhone, u as useModel } from "./index-
|
|
2
|
+
import { i as isPhone, u as useModel } from "./index-hbNP7Gxd.js";
|
|
3
3
|
import { Notification } from "vue-devui-lal/notification";
|
|
4
4
|
import { Button } from "vue-devui-lal/button";
|
|
5
5
|
import "vue-devui-lal/notification/style.css";
|