@jctrans-materials/comps-vue3 1.0.42-beta.0 → 1.0.42-beta.2

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/dist/index.esm.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ref, computed, onMounted, onBeforeUnmount, defineComponent, toRef, watch, openBlock, createElementBlock, normalizeClass, createElementVNode, renderSlot, Fragment, renderList, toDisplayString, withModifiers, createCommentVNode, withDirectives, withKeys, normalizeStyle, vModelText, unref, createBlock, Teleport, createTextVNode, vShow, createVNode, reactive, resolveComponent, mergeProps, toHandlers, withCtx, useSlots, Transition, resolveDynamicComponent, createSlots, isRef, onUnmounted, useModel, normalizeProps, guardReactiveProps, nextTick, getCurrentInstance, createStaticVNode, provide, createApp } from "vue";
2
- import { locationSearchV2, reportNewTypeDataApi, slideGetApi, slideCheckApi, setTokenAll, getAuthSessionItems, getSessionHeaderValue, getProjectId, loginByFacebookApi, loginByLinkedinApi, validateAccountExistApi, findListByMobileEmailApi, validateCompanyApi, sendLoginCodeCustomizedApi, changePwdApi, getCompanyOptionApi, checkAccountExistsFPApi, getMEVCodeApi, resetPasswordApi, emitter, MODAL_ACTION, resetAuthSessionItems, registerJoinCompanyBindWechatApi, registerJoinCompanyApi, registerUserCompBindWechatApi, registerApi, Encrypt, getLocalIpDataApi, findPAreaCodeApi, findDictApi, inviteJoinGetCompApi, sendEmailCodeApi, sendMobileCodeApi, getLoginQrCode, setAuthSessionItems, loginByQrCode, getFirstDomain, loginApi, loginByEmailOrMobileCodeApi, loginPwdBindWechatApi, loginCodeBindWechatApi, getAppId, completeJoinCompanyRedirectApi, completeCompRedirectApi, getUserInfoApi, bindThirdPartyByPwdApi, bindThirdPartyByCodeApi, registerJoinCompByThirdPartyApi, registerByThirdPartyApi, resetGioSessionItems, getRememberAccount, Decrypt, setRememberMe, registerThirdPartyCustomizedApi, registerCustomizedApi, tracker, normalizeClickPageAttrs, initSharedConfig } from "@jctrans-materials/shared";
2
+ import { locationSearchV2, reportNewTypeDataApi, slideGetApi, slideCheckApi, setTokenAll, getAuthSessionItems, getSessionHeaderValue, getProjectId, loginByFacebookApi, loginByLinkedinApi, findListByMobileEmailApi, validateCompanyApi, validateAccountExistApi, sendLoginCodeCustomizedApi, changePwdApi, getCompanyOptionApi, checkAccountExistsFPApi, getMEVCodeApi, resetPasswordApi, emitter, MODAL_ACTION, resetAuthSessionItems, registerJoinCompanyBindWechatApi, registerJoinCompanyApi, registerUserCompBindWechatApi, registerApi, Encrypt, getLocalIpDataApi, findPAreaCodeApi, findDictApi, inviteJoinGetCompApi, sendEmailCodeApi, sendMobileCodeApi, getLoginQrCode, setAuthSessionItems, loginByQrCode, getFirstDomain, loginApi, loginByEmailOrMobileCodeApi, loginPwdBindWechatApi, loginCodeBindWechatApi, getAppId, completeJoinCompanyRedirectApi, completeCompRedirectApi, getUserInfoApi, bindThirdPartyByPwdApi, bindThirdPartyByCodeApi, registerJoinCompByThirdPartyApi, registerByThirdPartyApi, resetGioSessionItems, getRememberAccount, Decrypt, setRememberMe, registerThirdPartyCustomizedApi, registerCustomizedApi, tracker, normalizeClickPageAttrs, initSharedConfig } from "@jctrans-materials/shared";
3
3
  import { MODAL_ACTION as MODAL_ACTION2, createRequest, emitter as emitter2, getAppId as getAppId2, initSharedConfig as initSharedConfig2 } from "@jctrans-materials/shared";
4
4
  import { useFormItem, ElMessage, vLoading, ElInput, ElDialog, ElForm, ElFormItem, ElButton, ElSelect, ElOption, ElRow, ElCol, ElCheckbox, ElRadioButton, ElRadioGroup, ElMessageBox, ElCascader, ElTag } from "element-plus";
5
5
  function _mergeNamespaces(n, m) {
@@ -1772,7 +1772,7 @@ const _hoisted_4$s = {
1772
1772
  key: 0,
1773
1773
  class: "search-tag collapse"
1774
1774
  };
1775
- const _hoisted_5$o = ["placeholder"];
1775
+ const _hoisted_5$p = ["placeholder"];
1776
1776
  const _hoisted_6$l = { class: "suffix-area" };
1777
1777
  const _hoisted_7$h = {
1778
1778
  key: 1,
@@ -2193,7 +2193,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
2193
2193
  onBlur: onLocalBlur,
2194
2194
  onInput,
2195
2195
  onKeydown: withKeys(handleDelete, ["delete"])
2196
- }, null, 46, _hoisted_5$o), [
2196
+ }, null, 46, _hoisted_5$p), [
2197
2197
  [vModelText, query.value]
2198
2198
  ])
2199
2199
  ]),
@@ -3214,7 +3214,7 @@ const _hoisted_1$C = {
3214
3214
  const _hoisted_2$x = { class: "modal-header" };
3215
3215
  const _hoisted_3$u = { class: "header-title" };
3216
3216
  const _hoisted_4$r = { class: "modal-body" };
3217
- const _hoisted_5$n = { class: "form-item" };
3217
+ const _hoisted_5$o = { class: "form-item" };
3218
3218
  const _hoisted_6$k = { class: "required" };
3219
3219
  const _hoisted_7$g = { class: "input-box" };
3220
3220
  const _hoisted_8$f = ["placeholder"];
@@ -3368,7 +3368,7 @@ const _sfc_main$G = {
3368
3368
  }, "×")
3369
3369
  ]),
3370
3370
  createElementVNode("div", _hoisted_4$r, [
3371
- createElementVNode("div", _hoisted_5$n, [
3371
+ createElementVNode("div", _hoisted_5$o, [
3372
3372
  createElementVNode("label", _hoisted_6$k, toDisplayString(unref(isEn) ? `Data To Add` : `需补充的数据`), 1),
3373
3373
  createElementVNode("div", _hoisted_7$g, [
3374
3374
  withDirectives(createElementVNode("input", {
@@ -3558,7 +3558,7 @@ const _hoisted_4$q = {
3558
3558
  key: 0,
3559
3559
  class: "google-input-wrap-prepend"
3560
3560
  };
3561
- const _hoisted_5$m = { class: "google-input-wrap-input" };
3561
+ const _hoisted_5$n = { class: "google-input-wrap-input" };
3562
3562
  function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
3563
3563
  const _component_el_input = resolveComponent("el-input");
3564
3564
  return openBlock(), createElementBlock("div", {
@@ -3574,7 +3574,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
3574
3574
  $options.isHavePrepend ? (openBlock(), createElementBlock("div", _hoisted_4$q, [
3575
3575
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
3576
3576
  ])) : createCommentVNode("", true),
3577
- createElementVNode("div", _hoisted_5$m, [
3577
+ createElementVNode("div", _hoisted_5$n, [
3578
3578
  createVNode(_component_el_input, mergeProps({ ref: "googleInput" }, _ctx.$attrs, {
3579
3579
  "model-value": $props.modelValue,
3580
3580
  placeholder: $props.placeholder
@@ -3616,7 +3616,7 @@ const _hoisted_4$p = {
3616
3616
  key: 0,
3617
3617
  class: "google-input-wrap-prepend"
3618
3618
  };
3619
- const _hoisted_5$l = { class: "google-input-wrap-input" };
3619
+ const _hoisted_5$m = { class: "google-input-wrap-input" };
3620
3620
  const _sfc_main$E = /* @__PURE__ */ Object.assign({
3621
3621
  name: "GoogleInput",
3622
3622
  inheritAttrs: false
@@ -3713,7 +3713,7 @@ const _sfc_main$E = /* @__PURE__ */ Object.assign({
3713
3713
  isHavePrepend.value ? (openBlock(), createElementBlock("div", _hoisted_4$p, [
3714
3714
  renderSlot(_ctx.$slots, "prefix", {}, void 0, true)
3715
3715
  ])) : createCommentVNode("", true),
3716
- createElementVNode("div", _hoisted_5$l, [
3716
+ createElementVNode("div", _hoisted_5$m, [
3717
3717
  createVNode(unref(ElInput), mergeProps({
3718
3718
  ref_key: "googleInputRef",
3719
3719
  ref: googleInputRef
@@ -10648,7 +10648,7 @@ const _hoisted_3$r = {
10648
10648
  style: { "position": "relative" }
10649
10649
  };
10650
10650
  const _hoisted_4$o = ["src"];
10651
- const _hoisted_5$k = {
10651
+ const _hoisted_5$l = {
10652
10652
  key: 0,
10653
10653
  class: "auth-captcha-loading"
10654
10654
  };
@@ -10694,7 +10694,7 @@ function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
10694
10694
  class: "main-img",
10695
10695
  onLoad: _cache[1] || (_cache[1] = (...args) => $options.handleImageLoaded && $options.handleImageLoaded(...args))
10696
10696
  }, null, 40, _hoisted_4$o),
10697
- $data.loading ? (openBlock(), createElementBlock("div", _hoisted_5$k, [
10697
+ $data.loading ? (openBlock(), createElementBlock("div", _hoisted_5$l, [
10698
10698
  _cache[5] || (_cache[5] = createElementVNode("div", { class: "loading-icon" }, null, -1)),
10699
10699
  createElementVNode("p", _hoisted_6$j, toDisplayString($options.isEn ? "Loading..." : "加载中..."), 1)
10700
10700
  ])) : createCommentVNode("", true),
@@ -10821,7 +10821,7 @@ const _sfc_main$C = {
10821
10821
  formTypeColor: { type: String, default: "1" },
10822
10822
  isEn: Boolean
10823
10823
  },
10824
- emits: ["update:modelValue", "send"],
10824
+ emits: ["update:modelValue", "send", "counting-change"],
10825
10825
  data() {
10826
10826
  return {
10827
10827
  isCounting: false,
@@ -10877,6 +10877,7 @@ const _sfc_main$C = {
10877
10877
  startTimer() {
10878
10878
  if (this.isCounting) return;
10879
10879
  this.isCounting = true;
10880
+ this.$emit("counting-change", true);
10880
10881
  this.countdown = this.duration;
10881
10882
  this.timer = setInterval(() => {
10882
10883
  this.countdown--;
@@ -10895,6 +10896,7 @@ const _sfc_main$C = {
10895
10896
  }
10896
10897
  this.isCounting = false;
10897
10898
  this.countdown = 0;
10899
+ this.$emit("counting-change", false);
10898
10900
  }
10899
10901
  },
10900
10902
  beforeUnmount() {
@@ -10947,7 +10949,7 @@ function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
10947
10949
  }, null, 8, ["visible", "is-en", "onSuccess"])
10948
10950
  ]);
10949
10951
  }
10950
- const CodeInput$1 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$9], ["__scopeId", "data-v-0d2de7ce"]]);
10952
+ const CodeInput$1 = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["render", _sfc_render$9], ["__scopeId", "data-v-f4407802"]]);
10951
10953
  const __vite_glob_0_3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
10952
10954
  __proto__: null,
10953
10955
  default: CodeInput$1
@@ -11250,6 +11252,7 @@ function useThirdPartyLogin$1(config) {
11250
11252
  }
11251
11253
  };
11252
11254
  const handleLoginSuccess = (res) => {
11255
+ var _a;
11253
11256
  const data = res.data || res;
11254
11257
  console.log("🍉 处理登录结果:", data);
11255
11258
  loginResult.value = data;
@@ -11274,6 +11277,16 @@ function useThirdPartyLogin$1(config) {
11274
11277
  isBindDialogVisible.value = false;
11275
11278
  isRegisterVisible.value = false;
11276
11279
  setTokenAll(data.result);
11280
+ if ((_a = data.result) == null ? void 0 : _a.improveComp) {
11281
+ if (config.onNeedComplete) {
11282
+ config.onNeedComplete(data);
11283
+ }
11284
+ return;
11285
+ }
11286
+ if (unref(config.test)) {
11287
+ logTestLoginResult("第三方(Facebook/LinkedIn)登录", data);
11288
+ return;
11289
+ }
11277
11290
  if (config.onSuccess) {
11278
11291
  config.onSuccess(data);
11279
11292
  } else {
@@ -11393,7 +11406,7 @@ function useThirdPartyLogin$1(config) {
11393
11406
  resetBindRegisterState
11394
11407
  };
11395
11408
  }
11396
- async function validateUserEmail$1(rule, value, callback, isEn = true, checkExist = true) {
11409
+ function validateEmailFormat(rule, value, callback, isEn = true) {
11397
11410
  if (!value || value.trim() === "") {
11398
11411
  return callback(
11399
11412
  new Error(isEn ? "Email address is required" : "请输入您的邮箱")
@@ -11421,27 +11434,32 @@ async function validateUserEmail$1(rule, value, callback, isEn = true, checkExis
11421
11434
  )
11422
11435
  );
11423
11436
  }
11424
- if (checkExist) {
11425
- try {
11426
- const { data } = await validateAccountExistApi({ target: value });
11427
- console.log("🍉 ~ constant.ts:67 ~ validateUserEmail ~ data:", data);
11428
- if (data.data) {
11429
- return callback(
11430
- new Error(
11431
- isEn ? "It's already occupied, please re-enter." : "已被占用,请重新输入"
11432
- )
11433
- );
11434
- }
11435
- callback();
11436
- } catch (error) {
11437
- callback(
11437
+ callback();
11438
+ }
11439
+ async function validateUserEmail$1(rule, value, callback, isEn = true, checkExist = true) {
11440
+ let formatError;
11441
+ validateEmailFormat(rule, value, (err) => {
11442
+ formatError = err;
11443
+ }, isEn);
11444
+ if (formatError) return callback(formatError);
11445
+ if (!checkExist) return callback();
11446
+ try {
11447
+ const { data } = await validateAccountExistApi({ target: value });
11448
+ console.log("🍉 ~ constant.ts:67 ~ validateUserEmail ~ data:", data);
11449
+ if (data.data) {
11450
+ return callback(
11438
11451
  new Error(
11439
- isEn ? "Validation failed, please re-enter." : "校验失败,请重新输入"
11452
+ isEn ? "It's already occupied, please re-enter." : "已被占用,请重新输入"
11440
11453
  )
11441
11454
  );
11442
11455
  }
11443
- } else {
11444
- return callback();
11456
+ callback();
11457
+ } catch (error) {
11458
+ callback(
11459
+ new Error(
11460
+ isEn ? "Validation failed, please re-enter." : "校验失败,请重新输入"
11461
+ )
11462
+ );
11445
11463
  }
11446
11464
  }
11447
11465
  async function validateThirdPartyEmail$1(rule, value, callback, isEn = true, context) {
@@ -11575,12 +11593,11 @@ function validateUserPass$1(rule, value, callback, isEn = true) {
11575
11593
  }
11576
11594
  callback();
11577
11595
  }
11578
- async function validateUserMobilefive$1(rule, value, callback, isEn = true, checkExist = true) {
11596
+ function validateMobileFormat(rule, value, callback, isEn = true) {
11579
11597
  const messages = {
11580
11598
  empty: isEn ? "Please enter your cell phone number" : "请输入手机号",
11581
11599
  minLen: isEn ? "please enter at least 2 characters." : "请输入至少 2 个字符.",
11582
- invalid: isEn ? "Invalid mobile address" : "手机号格式错误",
11583
- occupied: isEn ? "It's already occupied, please re- enter." : "已被占用,请重新输入"
11600
+ invalid: isEn ? "Invalid mobile address" : "手机号格式错误"
11584
11601
  };
11585
11602
  if (!value) {
11586
11603
  return callback(new Error(messages.empty));
@@ -11591,6 +11608,14 @@ async function validateUserMobilefive$1(rule, value, callback, isEn = true, chec
11591
11608
  if (value.length < 2) {
11592
11609
  return callback(new Error(messages.minLen));
11593
11610
  }
11611
+ callback();
11612
+ }
11613
+ async function validateUserMobilefive$1(rule, value, callback, isEn = true, checkExist = true) {
11614
+ let formatError;
11615
+ validateMobileFormat(rule, value, (err) => {
11616
+ formatError = err;
11617
+ }, isEn);
11618
+ if (formatError) return callback(formatError);
11594
11619
  if (!checkExist) {
11595
11620
  return callback();
11596
11621
  } else {
@@ -11598,11 +11623,19 @@ async function validateUserMobilefive$1(rule, value, callback, isEn = true, chec
11598
11623
  const res = await validateAccountExistApi({ target: value });
11599
11624
  console.log("🍉 ~ constant.ts:288 ~ validateUserMobilefive ~ res:", res);
11600
11625
  if (res && res.data.data) {
11601
- return callback(new Error(messages.occupied));
11626
+ return callback(
11627
+ new Error(
11628
+ isEn ? "It's already occupied, please re-enter." : "已被占用,请重新输入"
11629
+ )
11630
+ );
11602
11631
  }
11603
11632
  callback();
11604
11633
  } catch (error) {
11605
- callback(new Error(messages.occupied));
11634
+ callback(
11635
+ new Error(
11636
+ isEn ? "It's already occupied, please re-enter." : "已被占用,请重新输入"
11637
+ )
11638
+ );
11606
11639
  }
11607
11640
  }
11608
11641
  }
@@ -11750,6 +11783,29 @@ const handleRedirect$1 = (path, delay = 100) => {
11750
11783
  }
11751
11784
  }, delay);
11752
11785
  };
11786
+ const detectTestMode = (propTest) => {
11787
+ if (propTest === true) return true;
11788
+ if (typeof window === "undefined") return false;
11789
+ if (window.__JC_TEST_MODE__ === true) return true;
11790
+ try {
11791
+ const params = new URLSearchParams(window.location.search);
11792
+ if (params.get("test") === "1" || params.get("testMode") === "1") return true;
11793
+ } catch (_) {
11794
+ }
11795
+ try {
11796
+ const m = document.cookie.match(/(?:^|;\s*)jc-test-mode=([^;]+)/);
11797
+ if (m && m[1] === "1") return true;
11798
+ } catch (_) {
11799
+ }
11800
+ return false;
11801
+ };
11802
+ const logTestLoginResult = (label, data) => {
11803
+ console.log(
11804
+ `%c🧪 [TEST MODE] ${label} 登录接口完整返回值(已跳过 redirect):`,
11805
+ "color:#7c3aed;font-weight:bold",
11806
+ data
11807
+ );
11808
+ };
11753
11809
  const normalizeDelayMs = (delayInput) => {
11754
11810
  if (delayInput === void 0 || delayInput === null || delayInput === "") {
11755
11811
  return 0;
@@ -11814,7 +11870,7 @@ const _hoisted_1$x = { class: "change-pwd-container" };
11814
11870
  const _hoisted_2$t = { class: "header-title" };
11815
11871
  const _hoisted_3$q = { class: "tab-switcher" };
11816
11872
  const _hoisted_4$n = { class: "default-info" };
11817
- const _hoisted_5$j = { class: "title" };
11873
+ const _hoisted_5$k = { class: "title" };
11818
11874
  const _hoisted_6$i = { class: "user-value" };
11819
11875
  const _sfc_main$B = /* @__PURE__ */ defineComponent({
11820
11876
  ...{
@@ -12182,7 +12238,7 @@ const _sfc_main$B = /* @__PURE__ */ defineComponent({
12182
12238
  createVNode(unref(ElFormItem), { class: "info-item" }, {
12183
12239
  default: withCtx(() => [
12184
12240
  createElementVNode("p", _hoisted_4$n, [
12185
- createElementVNode("span", _hoisted_5$j, toDisplayString(activeTab.value === "email" ? __props.isEn ? "Email" : "邮箱" : __props.isEn ? "Mobile" : "手机号"), 1),
12241
+ createElementVNode("span", _hoisted_5$k, toDisplayString(activeTab.value === "email" ? __props.isEn ? "Email" : "邮箱" : __props.isEn ? "Mobile" : "手机号"), 1),
12186
12242
  createElementVNode("span", _hoisted_6$i, toDisplayString(displayAccount.value), 1)
12187
12243
  ])
12188
12244
  ]),
@@ -12451,7 +12507,7 @@ const _hoisted_1$v = { class: "forgot-pwd-container" };
12451
12507
  const _hoisted_2$r = { class: "header-title" };
12452
12508
  const _hoisted_3$p = { class: "tab-switcher" };
12453
12509
  const _hoisted_4$m = { class: "default-info" };
12454
- const _hoisted_5$i = { class: "title" };
12510
+ const _hoisted_5$j = { class: "title" };
12455
12511
  const _hoisted_6$h = { class: "user-value" };
12456
12512
  const _sfc_main$z = /* @__PURE__ */ defineComponent({
12457
12513
  ...{ name: "ForgotPasswordDialog", inheritAttrs: false },
@@ -12657,6 +12713,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12657
12713
  disabledTabs.mobile = false;
12658
12714
  codeVerifyUuid.value = "";
12659
12715
  verifyData.value = null;
12716
+ verifyVisible.value = false;
12660
12717
  loading.value = false;
12661
12718
  }
12662
12719
  return (_ctx, _cache) => {
@@ -12775,7 +12832,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12775
12832
  createVNode(unref(ElFormItem), { class: "info-item" }, {
12776
12833
  default: withCtx(() => [
12777
12834
  createElementVNode("p", _hoisted_4$m, [
12778
- createElementVNode("span", _hoisted_5$i, toDisplayString(activeTab.value === "email" ? __props.isEn ? "Email" : "邮箱" : __props.isEn ? "Mobile" : "手机号"), 1),
12835
+ createElementVNode("span", _hoisted_5$j, toDisplayString(activeTab.value === "email" ? __props.isEn ? "Email" : "邮箱" : __props.isEn ? "Mobile" : "手机号"), 1),
12779
12836
  createElementVNode("span", _hoisted_6$h, toDisplayString(activeTab.value === "email" ? userData.value.email : userData.value.mobile), 1)
12780
12837
  ])
12781
12838
  ]),
@@ -12860,7 +12917,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12860
12917
  };
12861
12918
  }
12862
12919
  });
12863
- const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-b332b345"]]);
12920
+ const index$4 = /* @__PURE__ */ _export_sfc(_sfc_main$z, [["__scopeId", "data-v-3f11f601"]]);
12864
12921
  const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12865
12922
  __proto__: null,
12866
12923
  default: index$4
@@ -13132,7 +13189,7 @@ const _hoisted_2$p = {
13132
13189
  };
13133
13190
  const _hoisted_3$n = { class: "jc:p-4 jc:text-sm jc:text-center jc:text-gray-500" };
13134
13191
  const _hoisted_4$l = { key: 0 };
13135
- const _hoisted_5$h = {
13192
+ const _hoisted_5$i = {
13136
13193
  key: 1,
13137
13194
  class: "jc:flex jc:flex-wrap jc:justify-center jc:items-center"
13138
13195
  };
@@ -13451,7 +13508,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
13451
13508
  }, createSlots({
13452
13509
  empty: withCtx(() => [
13453
13510
  createElementVNode("div", _hoisted_3$n, [
13454
- loading.value ? (openBlock(), createElementBlock("div", _hoisted_4$l, toDisplayString(unref(isEn) ? "Searching..." : "正在搜索中..."), 1)) : (openBlock(), createElementBlock("div", _hoisted_5$h, [
13511
+ loading.value ? (openBlock(), createElementBlock("div", _hoisted_4$l, toDisplayString(unref(isEn) ? "Searching..." : "正在搜索中..."), 1)) : (openBlock(), createElementBlock("div", _hoisted_5$i, [
13455
13512
  __props.showApplyData ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
13456
13513
  createElementVNode("p", null, toDisplayString(unref(isEn) ? `No results found. ` : `暂无结果,`), 1),
13457
13514
  createElementVNode("div", _hoisted_6$g, [
@@ -13598,7 +13655,7 @@ const _hoisted_2$o = {
13598
13655
  };
13599
13656
  const _hoisted_3$m = { class: "wrapper-main" };
13600
13657
  const _hoisted_4$k = { class: "wrapper-label" };
13601
- const _hoisted_5$g = {
13658
+ const _hoisted_5$h = {
13602
13659
  key: 1,
13603
13660
  class: "wrapper-append"
13604
13661
  };
@@ -13669,7 +13726,7 @@ const _sfc_main$s = /* @__PURE__ */ Object.assign({
13669
13726
  renderSlot(_ctx.$slots, "default", {}, void 0, true)
13670
13727
  ]),
13671
13728
  createElementVNode("p", _hoisted_4$k, toDisplayString(__props.label), 1),
13672
- isHaveAppend.value ? (openBlock(), createElementBlock("div", _hoisted_5$g, [
13729
+ isHaveAppend.value ? (openBlock(), createElementBlock("div", _hoisted_5$h, [
13673
13730
  renderSlot(_ctx.$slots, "suffix", {}, void 0, true)
13674
13731
  ])) : createCommentVNode("", true)
13675
13732
  ])
@@ -15030,7 +15087,7 @@ const _hoisted_1$p = { class: "register-form-container" };
15030
15087
  const _hoisted_2$m = { class: "register-title" };
15031
15088
  const _hoisted_3$l = { class: "resist-company-info-card" };
15032
15089
  const _hoisted_4$j = { class: "card-header" };
15033
- const _hoisted_5$f = { class: "title-group" };
15090
+ const _hoisted_5$g = { class: "title-group" };
15034
15091
  const _hoisted_6$f = { class: "tip-text" };
15035
15092
  const _hoisted_7$d = { class: "company-content" };
15036
15093
  const _hoisted_8$c = { class: "company-name" };
@@ -15148,7 +15205,7 @@ function _sfc_render$8(_ctx, _cache, $props, $setup, $data, $options) {
15148
15205
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
15149
15206
  createElementVNode("div", _hoisted_3$l, [
15150
15207
  createElementVNode("div", _hoisted_4$j, [
15151
- createElementVNode("div", _hoisted_5$f, [
15208
+ createElementVNode("div", _hoisted_5$g, [
15152
15209
  createElementVNode("span", _hoisted_6$f, toDisplayString($props.isEn ? "Company name" : "公司名称"), 1)
15153
15210
  ]),
15154
15211
  createElementVNode("span", {
@@ -17888,7 +17945,7 @@ const _hoisted_1$m = { class: "wechat-choose-type" };
17888
17945
  const _hoisted_2$j = { class: "choose-title" };
17889
17946
  const _hoisted_3$i = { class: "choose-nav" };
17890
17947
  const _hoisted_4$h = { class: "btn-container" };
17891
- const _hoisted_5$e = { class: "btn-content" };
17948
+ const _hoisted_5$f = { class: "btn-content" };
17892
17949
  const _hoisted_6$e = { class: "btn-content" };
17893
17950
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
17894
17951
  __name: "WechatChooseType",
@@ -17915,7 +17972,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
17915
17972
  onClick: handleRegister
17916
17973
  }, {
17917
17974
  default: withCtx(() => [
17918
- createElementVNode("div", _hoisted_5$e, [
17975
+ createElementVNode("div", _hoisted_5$f, [
17919
17976
  _cache[0] || (_cache[0] = createElementVNode("img", {
17920
17977
  class: "icon-account",
17921
17978
  src: _imports_0$7,
@@ -19002,7 +19059,7 @@ const _hoisted_1$k = { class: "complete-info-container" };
19002
19059
  const _hoisted_2$h = { class: "complete-info-container_header" };
19003
19060
  const _hoisted_3$g = { class: "complete-info-container_title" };
19004
19061
  const _hoisted_4$f = { class: "complete-info-container_tip-box" };
19005
- const _hoisted_5$d = { class: "sector-section" };
19062
+ const _hoisted_5$e = { class: "sector-section" };
19006
19063
  const _hoisted_6$d = { class: "sector-label" };
19007
19064
  const _hoisted_7$c = { class: "sector-group" };
19008
19065
  const _hoisted_8$b = ["onClick"];
@@ -19116,7 +19173,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
19116
19173
  key: 0,
19117
19174
  onApplyJoin: $options.handleApplyJoinClick
19118
19175
  }, null, 8, ["onApplyJoin"])) : createCommentVNode("", true),
19119
- createElementVNode("div", _hoisted_5$d, [
19176
+ createElementVNode("div", _hoisted_5$e, [
19120
19177
  createElementVNode("p", _hoisted_6$d, toDisplayString($props.isEn ? "Industry Sector" : "行业类型"), 1),
19121
19178
  createElementVNode("div", _hoisted_7$c, [
19122
19179
  (openBlock(true), createElementBlock(Fragment, null, renderList($data.sectors, (item) => {
@@ -19550,7 +19607,7 @@ const _hoisted_4$e = {
19550
19607
  key: 0,
19551
19608
  class: "kefu-wrapper"
19552
19609
  };
19553
- const _hoisted_5$c = { class: "kefu-text" };
19610
+ const _hoisted_5$d = { class: "kefu-text" };
19554
19611
  const _hoisted_6$c = {
19555
19612
  key: 1,
19556
19613
  class: "form-wrapper"
@@ -19670,7 +19727,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
19670
19727
  src: _imports_0$5,
19671
19728
  class: "kefu-img"
19672
19729
  }, null, -1)),
19673
- createElementVNode("p", _hoisted_5$c, toDisplayString(__props.isEn ? "The current account does not have a phone number and email, and cannot be verified. Please contact customer service directly" : "当前账号没有手机号和邮箱,无法验证,请直接联系客服。"), 1),
19730
+ createElementVNode("p", _hoisted_5$d, toDisplayString(__props.isEn ? "The current account does not have a phone number and email, and cannot be verified. Please contact customer service directly" : "当前账号没有手机号和邮箱,无法验证,请直接联系客服。"), 1),
19674
19731
  createElementVNode("div", null, toDisplayString(__props.isEn ? "Customer Service" : "联系客服"), 1)
19675
19732
  ])) : (openBlock(), createElementBlock("div", _hoisted_6$c, [
19676
19733
  unref(activeStep) === 1 ? (openBlock(), createElementBlock("div", _hoisted_7$b, [
@@ -19878,7 +19935,7 @@ const _hoisted_3$e = {
19878
19935
  class: "user-list"
19879
19936
  };
19880
19937
  const _hoisted_4$d = ["onClick"];
19881
- const _hoisted_5$b = { class: "bind-user-card__right" };
19938
+ const _hoisted_5$c = { class: "bind-user-card__right" };
19882
19939
  const _hoisted_6$b = { class: "bind-user-card__right__title" };
19883
19940
  const _hoisted_7$a = { class: "bind-user-card__right__desc" };
19884
19941
  const _hoisted_8$9 = {
@@ -20168,7 +20225,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
20168
20225
  _cache[12] || (_cache[12] = createElementVNode("div", { class: "bind-user-card__left" }, [
20169
20226
  createElementVNode("div", { class: "account-icon" })
20170
20227
  ], -1)),
20171
- createElementVNode("div", _hoisted_5$b, [
20228
+ createElementVNode("div", _hoisted_5$c, [
20172
20229
  createElementVNode("div", _hoisted_6$b, toDisplayString(__props.isEn ? item.userNameEn || item.userNameCn : item.userNameCn || item.userNameEn), 1),
20173
20230
  createElementVNode("div", _hoisted_7$a, toDisplayString(__props.isEn ? item.compNameEn || item.compNameCn : item.compNameEn || item.compNameEn), 1),
20174
20231
  item.email ? (openBlock(), createElementBlock("div", _hoisted_8$9, [
@@ -20854,7 +20911,7 @@ const _hoisted_1$g = { class: "third-register-form-container" };
20854
20911
  const _hoisted_2$e = { class: "resist-company-info-card" };
20855
20912
  const _hoisted_3$d = { class: "card-header" };
20856
20913
  const _hoisted_4$c = { class: "title-group" };
20857
- const _hoisted_5$a = { class: "tip-text" };
20914
+ const _hoisted_5$b = { class: "tip-text" };
20858
20915
  const _hoisted_6$a = { class: "company-content" };
20859
20916
  const _hoisted_7$9 = { class: "company-name" };
20860
20917
  const _hoisted_8$8 = { class: "location-info" };
@@ -20963,7 +21020,7 @@ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
20963
21020
  createElementVNode("div", _hoisted_2$e, [
20964
21021
  createElementVNode("div", _hoisted_3$d, [
20965
21022
  createElementVNode("div", _hoisted_4$c, [
20966
- createElementVNode("span", _hoisted_5$a, toDisplayString($props.isEn ? "Company Name" : "公司名称"), 1)
21023
+ createElementVNode("span", _hoisted_5$b, toDisplayString($props.isEn ? "Company Name" : "公司名称"), 1)
20967
21024
  ]),
20968
21025
  createElementVNode("span", {
20969
21026
  class: "change-link",
@@ -21871,7 +21928,7 @@ const _hoisted_1$f = {
21871
21928
  const _hoisted_2$d = { class: "login-section" };
21872
21929
  const _hoisted_3$c = { class: "login-title" };
21873
21930
  const _hoisted_4$b = { key: 0 };
21874
- const _hoisted_5$9 = { key: 1 };
21931
+ const _hoisted_5$a = { key: 1 };
21875
21932
  const _hoisted_6$9 = { class: "tab-header" };
21876
21933
  const _hoisted_7$8 = {
21877
21934
  key: 1,
@@ -21941,7 +21998,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
21941
21998
  $data.formMode === "login" ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
21942
21999
  createElementVNode("div", _hoisted_2$d, [
21943
22000
  createElementVNode("div", _hoisted_3$c, [
21944
- $setup.thirdBindDialogVisible || $setup.thirdRegisterVisible ? (openBlock(), createElementBlock("p", _hoisted_4$b, toDisplayString($setup.isEn ? "New User Registration" : "新用户注册"), 1)) : (openBlock(), createElementBlock("p", _hoisted_5$9, toDisplayString($setup.isEn ? "Welcome Back to JCtrans" : "欢迎回到JCtrans"), 1))
22001
+ $setup.thirdBindDialogVisible || $setup.thirdRegisterVisible ? (openBlock(), createElementBlock("p", _hoisted_4$b, toDisplayString($setup.isEn ? "New User Registration" : "新用户注册"), 1)) : (openBlock(), createElementBlock("p", _hoisted_5$a, toDisplayString($setup.isEn ? "Welcome Back to JCtrans" : "欢迎回到JCtrans"), 1))
21945
22002
  ]),
21946
22003
  ["account", "code"].includes($data.loginType) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
21947
22004
  createElementVNode("div", _hoisted_6$9, [
@@ -22963,7 +23020,7 @@ const _hoisted_1$d = { class: "register-form-container" };
22963
23020
  const _hoisted_2$b = { class: "register-step-header" };
22964
23021
  const _hoisted_3$b = { class: "register-step-title" };
22965
23022
  const _hoisted_4$a = { class: "register-title" };
22966
- const _hoisted_5$8 = { class: "third-party-sign-in" };
23023
+ const _hoisted_5$9 = { class: "third-party-sign-in" };
22967
23024
  const _hoisted_6$8 = { class: "third-party-sign-in-title" };
22968
23025
  const _hoisted_7$7 = { class: "third-party-sign-in-group" };
22969
23026
  const _hoisted_8$6 = {
@@ -23160,7 +23217,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
23160
23217
  ]),
23161
23218
  _: 1
23162
23219
  }, 8, ["disabled", "loading", "onClick"]),
23163
- createElementVNode("div", _hoisted_5$8, [
23220
+ createElementVNode("div", _hoisted_5$9, [
23164
23221
  createElementVNode("div", _hoisted_6$8, toDisplayString($props.isEn ? "Sign in with" : "其他登录方式"), 1),
23165
23222
  createElementVNode("div", _hoisted_7$7, [
23166
23223
  createElementVNode("div", {
@@ -23541,6 +23598,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23541
23598
  fetchWxCode();
23542
23599
  };
23543
23600
  const processLoginSuccess = async (loginData) => {
23601
+ var _a;
23544
23602
  if (loginData.result) {
23545
23603
  setTokenAll(loginData.result);
23546
23604
  }
@@ -23565,6 +23623,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23565
23623
  fetchWxCode();
23566
23624
  }
23567
23625
  } else {
23626
+ if ((_a = loginData.result) == null ? void 0 : _a.improveComp) {
23627
+ emit("need-complete", loginData.result.improveComp);
23628
+ return;
23629
+ }
23568
23630
  completeRedirect(loginData.redirectPath);
23569
23631
  }
23570
23632
  };
@@ -23656,7 +23718,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23656
23718
  };
23657
23719
  }
23658
23720
  });
23659
- const WechatLogin = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-39252503"]]);
23721
+ const WechatLogin = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bb227280"]]);
23660
23722
  const _sfc_main$b = {
23661
23723
  name: "LoginTypeSwitcher",
23662
23724
  components: {
@@ -23772,7 +23834,7 @@ const _hoisted_1$a = { class: "wechat-choose-type" };
23772
23834
  const _hoisted_2$8 = { class: "choose-title" };
23773
23835
  const _hoisted_3$8 = { class: "choose-nav" };
23774
23836
  const _hoisted_4$8 = { class: "btn-container" };
23775
- const _hoisted_5$7 = { class: "btn-content" };
23837
+ const _hoisted_5$8 = { class: "btn-content" };
23776
23838
  const _hoisted_6$7 = { class: "btn-content" };
23777
23839
  const _sfc_main$a = /* @__PURE__ */ defineComponent({
23778
23840
  __name: "WechatChooseType",
@@ -23799,7 +23861,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23799
23861
  onClick: handleRegister
23800
23862
  }, {
23801
23863
  default: withCtx(() => [
23802
- createElementVNode("div", _hoisted_5$7, [
23864
+ createElementVNode("div", _hoisted_5$8, [
23803
23865
  _cache[0] || (_cache[0] = createElementVNode("img", {
23804
23866
  class: "icon-account",
23805
23867
  src: _imports_0$2,
@@ -23833,7 +23895,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23833
23895
  };
23834
23896
  }
23835
23897
  });
23836
- const WechatChooseType = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-d6500e67"]]);
23898
+ const WechatChooseType = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-09068331"]]);
23837
23899
  const _imports_0$1 = "data:image/webp;base64,UklGRkYDAABXRUJQVlA4WAoAAAAQAAAATwAATwAAQUxQSK0BAAABkJVtT55JrwQkRAISIqEOBgl1sDhoHVAHXQdIQEIkICH780ETOodzEBETgJ+MA3FKG8fvIaQiOm5lCy/j2vVx4RdxVdtKLwmH2pfwBmrqKbQeifr2bTUSdd/WIlH/HpcqOuxnyjJT9/0aqISFkg47AaCJGwDOgeaFZPQb/7dR/I9HSsuwjsuHapaXKRMaAZCOawBQJvoyMqN3PvqEypGrzsZFgvrLmShgXXYrjMDHLSLS6rGR3+ZUCVy7TtfklVz6Dq76XJIPe0gMh9oW8iAHIWpqLeSAbhdJ1L5Hh8ssB1HPTnZsJTjUV4IZxChFHUrartG5nf2TZju2EdQRAaifCgAe9GCG22QnHQoA7J8SAAw02wWxiPtIv4AgnyqAX6NmBxID1Am9S9ehlKqTwQ4kjxpkxj46gORJha6YPBCuR32FzQXxQYOswD7ng457heAj/8ndPmnYF6hwjaoqCUDglEspRAskn1Ml4WF1E/huCY/ZjZ1MT6eM9UNzufBGEocaXgFqZhdem412vJiqCb8JiJdM9f/OdwHg/a4i0soeQZeqvO4pi8bvBWD8PAwAVlA4IHIBAACQDQCdASpQAFAAPjESh0KiIQzPMmYQAYJYgDTVCv5F+Mf4gb4DJX+Sz7l/ANsR/t26P/QD/AegB1gH9L/gHoV9YB+tfoUf7T/efAf+sP68fAV+m//U1vlDvsJaoYWahGVgTNJjQto23T3wmPTWzB6ZzMk6AwAA/v7uqgr/9ZP//7blAnmnE6lioCaVp1+WnldB5HpBbYjxc1NG5XU54UvD9kf2w/pZ7/42ltzXYtGbK1//nqr8tjkze5eVKps78/9WExTMn4pKTe3c8mpsuj8YwNG+XmxN6qsxIT2EwKQHnE5z8J/+pe+1IL/r1o8YBWTv7H+OAb1dnyF/HIBfP7w3V0JsIK9k9luJE6Inls4/P8XLinjMj63/lB+fL9Mg/9VBqi1r084wLn/+c3RisrFoveLUv2I5xww1R/MwdnWNwJwQ8oKLyHlGl0b3UxrGhAtGoS5KzFv4B538wnEyq7d8a9J8x7Ua1ZythfCc5mNgAAAA";
23838
23900
  const _imports_2 = "data:image/webp;base64,UklGRtgAAABXRUJQVlA4WAoAAAAQAAAAHwAAHwAAQUxQSG8AAAABcFXbVq2cCEQ4EYxABBtIhNvg0kAaEMEIJwoRiLB86/b5GxETYP9n6T1rGiyaBULjMJPEAvaaDOwkdgBWSRrAKH4rxsOTq3NzbfD0/Cr+eACzZk/XHl+Bluz5DlRTBnRTOuCSAmHSBlU0xlbzdwIAVlA4IEIAAABwAwCdASogACAAPjESjEYiENDKACADBLSAACWH58lev5ur/aAA/iw///2p6j//i/2//+H8FPIH///0cbN//9v7AAA=";
23839
23901
  function useAuthLogin(options = {}) {
@@ -23847,6 +23909,10 @@ function useAuthLogin(options = {}) {
23847
23909
  "🍉 ~ useAuthLogin.ts:36 ~ executeRedirect ~ loginData:",
23848
23910
  loginData
23849
23911
  );
23912
+ if (unref(options.test)) {
23913
+ logTestLoginResult("账号/验证码/微信/绑定登录", loginData);
23914
+ return;
23915
+ }
23850
23916
  const session = getAuthSessionItems() || {};
23851
23917
  const redirectPath = loginData.redirectPath || session.path || "/";
23852
23918
  if (loginData.result) {
@@ -24128,10 +24194,11 @@ function useAuthLogin(options = {}) {
24128
24194
  handleBindSubmit
24129
24195
  };
24130
24196
  }
24131
- const _hoisted_1$9 = { class: "bind-wechat-title" };
24132
- const _hoisted_2$7 = { class: "title" };
24133
- const _hoisted_3$7 = { class: "sub-title" };
24134
- const _hoisted_4$7 = { class: "register-bottom" };
24197
+ const _hoisted_1$9 = { class: "jc:p-4" };
24198
+ const _hoisted_2$7 = { class: "bind-wechat-title" };
24199
+ const _hoisted_3$7 = { class: "title" };
24200
+ const _hoisted_4$7 = { class: "sub-title" };
24201
+ const _hoisted_5$7 = { class: "register-bottom" };
24135
24202
  const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24136
24203
  __name: "WechatBindLogin",
24137
24204
  props: {
@@ -24204,7 +24271,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24204
24271
  {
24205
24272
  required: true,
24206
24273
  validator: (rule, value, cb) => {
24207
- validateUserEmail$1(rule, value, cb, props.isEn, false);
24274
+ validateEmailFormat(rule, value, cb, props.isEn);
24208
24275
  },
24209
24276
  trigger: "blur"
24210
24277
  }
@@ -24213,7 +24280,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24213
24280
  {
24214
24281
  required: true,
24215
24282
  validator: (rule, value, cb) => {
24216
- validateUserMobilefive$1(rule, value, cb, props.isEn, false);
24283
+ validateMobileFormat(rule, value, cb, props.isEn);
24217
24284
  },
24218
24285
  trigger: "blur"
24219
24286
  }
@@ -24313,7 +24380,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24313
24380
  params.areaCode = loginForm.value.areaCode;
24314
24381
  }
24315
24382
  const apiFn = isMobile ? sendMobileCodeApi : sendEmailCodeApi;
24316
- startTimer();
24317
24383
  apiFn(params).then((res) => {
24318
24384
  var _a;
24319
24385
  const verifyCode = ((_a = res.data.data) == null ? void 0 : _a.verifyCode) || res.data.verifyCode;
@@ -24323,6 +24389,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24323
24389
  } else {
24324
24390
  emailUid.value = verifyCode;
24325
24391
  }
24392
+ startTimer();
24326
24393
  ElMessage.success(
24327
24394
  props.isEn ? "Verification code sent" : "验证码已发送"
24328
24395
  );
@@ -24333,17 +24400,17 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24333
24400
  console.log("发送注册验证码");
24334
24401
  }
24335
24402
  return (_ctx, _cache) => {
24336
- return openBlock(), createElementBlock("div", null, [
24337
- createElementVNode("div", _hoisted_1$9, [
24338
- createElementVNode("div", _hoisted_2$7, [
24339
- _cache[11] || (_cache[11] = createElementVNode("img", {
24403
+ return openBlock(), createElementBlock("div", _hoisted_1$9, [
24404
+ createElementVNode("div", _hoisted_2$7, [
24405
+ createElementVNode("div", _hoisted_3$7, [
24406
+ _cache[12] || (_cache[12] = createElementVNode("img", {
24340
24407
  class: "icon-auth-wechat",
24341
24408
  src: _imports_0$1,
24342
24409
  alt: ""
24343
24410
  }, null, -1)),
24344
24411
  createTextVNode(" " + toDisplayString(__props.isEn ? "Log in and link with WeChat" : "登录并绑定微信"), 1)
24345
24412
  ]),
24346
- createElementVNode("div", _hoisted_3$7, toDisplayString(__props.isEn ? "After linking, you can log in via WeChat scan, which is convenient and quick" : "绑定后,可通过微信扫码登录,方便快捷"), 1)
24413
+ createElementVNode("div", _hoisted_4$7, toDisplayString(__props.isEn ? "After linking, you can log in via WeChat scan, which is convenient and quick" : "绑定后,可通过微信扫码登录,方便快捷"), 1)
24347
24414
  ]),
24348
24415
  createVNode(unref(ElForm), {
24349
24416
  ref_key: "bindLoginFormRef",
@@ -24493,12 +24560,13 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24493
24560
  placeholder: __props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
24494
24561
  ready: codeReady.value,
24495
24562
  "is-en": __props.isEn,
24496
- onSend: handleGetCode
24563
+ onSend: handleGetCode,
24564
+ onCountingChange: _cache[10] || (_cache[10] = (val) => isCounting.value = val)
24497
24565
  }, null, 8, ["modelValue", "label", "placeholder", "ready", "is-en"])
24498
24566
  ]),
24499
24567
  _: 1
24500
24568
  })) : createCommentVNode("", true),
24501
- createElementVNode("div", _hoisted_4$7, [
24569
+ createElementVNode("div", _hoisted_5$7, [
24502
24570
  createVNode(unref(ElButton), {
24503
24571
  class: "submit-btn",
24504
24572
  onClick: handleSubmit,
@@ -24506,7 +24574,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24506
24574
  }, {
24507
24575
  default: withCtx(() => [
24508
24576
  createTextVNode(toDisplayString(__props.isEn ? "Login and Link" : "登录并绑定") + " ", 1),
24509
- _cache[12] || (_cache[12] = createElementVNode("img", {
24577
+ _cache[13] || (_cache[13] = createElementVNode("img", {
24510
24578
  style: { "width": "16px", "height": "16px", "vertical-align": "middle" },
24511
24579
  src: _imports_2,
24512
24580
  alt: ""
@@ -24520,7 +24588,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24520
24588
  }, 8, ["model", "rules"]),
24521
24589
  createVNode(JcVerifySlide$1, {
24522
24590
  visible: captchaVisible.value,
24523
- "onUpdate:visible": _cache[10] || (_cache[10] = ($event) => captchaVisible.value = $event),
24591
+ "onUpdate:visible": _cache[11] || (_cache[11] = ($event) => captchaVisible.value = $event),
24524
24592
  "is-en": __props.isEn,
24525
24593
  onSuccess: handleCaptchaSuccess
24526
24594
  }, null, 8, ["visible", "is-en"])
@@ -24528,7 +24596,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24528
24596
  };
24529
24597
  }
24530
24598
  });
24531
- const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d7904a47"]]);
24599
+ const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-65dd1b92"]]);
24532
24600
  const _sfc_main$8 = {
24533
24601
  name: "CompleteInfoForm",
24534
24602
  components: {
@@ -24557,6 +24625,10 @@ const _sfc_main$8 = {
24557
24625
  verifyData: {},
24558
24626
  codeReady: false,
24559
24627
  codeSent: false,
24628
+ mobileCodeReady: false,
24629
+ emailCodeReady: false,
24630
+ mobileCodeSent: false,
24631
+ emailCodeSent: false,
24560
24632
  mobileUid: "",
24561
24633
  emailUid: "",
24562
24634
  areaCodeData: [],
@@ -24578,7 +24650,8 @@ const _sfc_main$8 = {
24578
24650
  phone: "",
24579
24651
  areaCode: "+86",
24580
24652
  email: "",
24581
- code: "",
24653
+ mobileCode: "",
24654
+ emailCode: "",
24582
24655
  useKq: false,
24583
24656
  kqCode: "",
24584
24657
  kqInfo: null
@@ -24624,18 +24697,25 @@ const _sfc_main$8 = {
24624
24697
  phone: [
24625
24698
  {
24626
24699
  required: true,
24627
- validator: (rule, value, cb) => validateUserMobilefive$1(rule, value, cb, this.isEn, false),
24700
+ validator: (rule, value, cb) => validateMobileFormat(rule, value, cb, this.isEn),
24628
24701
  trigger: "blur"
24629
24702
  }
24630
24703
  ],
24631
24704
  email: [
24632
24705
  {
24633
24706
  required: true,
24634
- validator: (rule, value, cb) => validateUserEmail$1(rule, value, cb, this.isEn, false),
24707
+ validator: (rule, value, cb) => validateEmailFormat(rule, value, cb, this.isEn),
24635
24708
  trigger: "blur"
24636
24709
  }
24637
24710
  ],
24638
- code: [
24711
+ mobileCode: [
24712
+ {
24713
+ required: true,
24714
+ validator: (rule, value, cb) => validateVerifyCode$1(rule, value, cb, this.isEn),
24715
+ trigger: "blur"
24716
+ }
24717
+ ],
24718
+ emailCode: [
24639
24719
  {
24640
24720
  required: true,
24641
24721
  validator: (rule, value, cb) => validateVerifyCode$1(rule, value, cb, this.isEn),
@@ -24749,42 +24829,45 @@ const _sfc_main$8 = {
24749
24829
  },
24750
24830
  validateField(field) {
24751
24831
  this.$refs.formRef.validateField(field, (isValid) => {
24752
- if (field === "phone" || field === "email") {
24753
- this.codeReady = isValid;
24754
- this.codeSent = false;
24755
- if (field === "phone") {
24756
- this.mobileUid = "";
24757
- } else {
24758
- this.emailUid = "";
24759
- }
24832
+ if (field === "phone") {
24833
+ this.mobileCodeReady = isValid;
24834
+ this.mobileCodeSent = false;
24835
+ this.mobileUid = "";
24836
+ } else if (field === "email") {
24837
+ this.emailCodeReady = isValid;
24838
+ this.emailCodeSent = false;
24839
+ this.emailUid = "";
24760
24840
  }
24761
24841
  });
24762
24842
  },
24763
- handleGetCode({ captchaData, startTimer }) {
24843
+ handleGetCode({ captchaData, startTimer }, type = "mobile") {
24844
+ var _a;
24764
24845
  this.verifyData = captchaData;
24846
+ const isMobile = type === "mobile";
24765
24847
  const params = {
24766
- target: this.isShowMobileCode ? this.form.phone : this.form.email,
24848
+ target: isMobile ? this.form.phone : this.form.email,
24767
24849
  uuid: captchaData.uuid,
24768
24850
  code: captchaData.code
24769
24851
  };
24770
- const api2 = this.isShowMobileCode ? sendMobileCodeApi : sendEmailCodeApi;
24771
- if (this.isShowMobileCode) {
24852
+ const api2 = isMobile ? sendMobileCodeApi : sendEmailCodeApi;
24853
+ if (isMobile) {
24772
24854
  params.areaCode = this.form.areaCode;
24773
- params.areaCodeCountryId = this.areaCodeData.find(
24855
+ params.areaCodeCountryId = (_a = this.areaCodeData.find(
24774
24856
  (item) => item.telCode === this.form.areaCode
24775
- ).id;
24857
+ )) == null ? void 0 : _a.id;
24776
24858
  }
24777
- startTimer();
24778
24859
  api2(params).then((res) => {
24779
- var _a;
24780
- const verifyCode = ((_a = res.data.data) == null ? void 0 : _a.verifyCode) || res.data.verifyCode;
24860
+ var _a2;
24861
+ const verifyCode = ((_a2 = res.data.data) == null ? void 0 : _a2.verifyCode) || res.data.verifyCode;
24781
24862
  if (res.data.code === 0 && verifyCode) {
24782
- if (this.isShowMobileCode) {
24863
+ if (isMobile) {
24783
24864
  this.mobileUid = verifyCode;
24865
+ this.mobileCodeSent = true;
24784
24866
  } else {
24785
24867
  this.emailUid = verifyCode;
24868
+ this.emailCodeSent = true;
24786
24869
  }
24787
- this.codeSent = true;
24870
+ startTimer();
24788
24871
  ElMessage.success(this.isEn ? "Code Sent" : "验证码已发送");
24789
24872
  } else {
24790
24873
  ElMessage.error(
@@ -24798,7 +24881,7 @@ const _sfc_main$8 = {
24798
24881
  handleSubmit() {
24799
24882
  this.$refs.formRef.validate((valid) => {
24800
24883
  if (!valid) return;
24801
- if ((this.isShowMobileCode || this.isShowEmailCode) && !this.codeSent) {
24884
+ if (this.isShowMobileCode && !this.mobileCodeSent || this.isShowEmailCode && !this.emailCodeSent) {
24802
24885
  ElMessage.warning(
24803
24886
  this.isEn ? "Please send the verification code first" : "请先发送验证码"
24804
24887
  );
@@ -24813,6 +24896,7 @@ const _sfc_main$8 = {
24813
24896
  },
24814
24897
  // 逻辑 A:新设公司提交 (原有逻辑)
24815
24898
  handleNewSubmit() {
24899
+ var _a;
24816
24900
  this.loading = true;
24817
24901
  const payload = {
24818
24902
  cityId: this.form.cityId,
@@ -24822,14 +24906,14 @@ const _sfc_main$8 = {
24822
24906
  nameEn: !this.currentCountryIsChina ? this.form.companyName : "",
24823
24907
  mobile: this.form.phone,
24824
24908
  mobileVerificationCodeUuid: this.mobileUid,
24825
- mobileVerificationCodeVal: this.isShowMobileCode ? this.form.code : "",
24909
+ mobileVerificationCodeVal: this.isShowMobileCode ? this.form.mobileCode : "",
24826
24910
  areaCode: this.form.areaCode,
24827
- areaCodeCountryId: this.areaCodeData.find(
24911
+ areaCodeCountryId: (_a = this.areaCodeData.find(
24828
24912
  (item) => item.telCode === this.form.areaCode
24829
- ).id,
24913
+ )) == null ? void 0 : _a.id,
24830
24914
  email: this.form.email,
24831
24915
  emailVerificationCodeUuid: this.emailUid,
24832
- emailVerificationCodeVal: this.isShowEmailCode ? this.form.code : "",
24916
+ emailVerificationCodeVal: this.isShowEmailCode ? this.form.emailCode : "",
24833
24917
  toSys: "ERA",
24834
24918
  path: (window == null ? void 0 : window.location.pathname) || "/",
24835
24919
  ...this.form.kqInfo
@@ -24841,12 +24925,17 @@ const _sfc_main$8 = {
24841
24925
  } else {
24842
24926
  ElMessage.error(res.data.msg);
24843
24927
  }
24928
+ }).catch(() => {
24929
+ ElMessage.error(
24930
+ this.isEn ? "Submission failed" : "提交失败,请重试"
24931
+ );
24844
24932
  }).finally(() => {
24845
24933
  this.loading = false;
24846
24934
  });
24847
24935
  },
24848
24936
  // 逻辑 B:申请加入公司提交 (参考 RegisterForm 逻辑)
24849
24937
  handleJoinSubmit() {
24938
+ var _a;
24850
24939
  this.loading = true;
24851
24940
  const payload = {
24852
24941
  compId: this.resistCompanyInfo.compId,
@@ -24855,17 +24944,17 @@ const _sfc_main$8 = {
24855
24944
  industrySector: this.form.sector,
24856
24945
  // 验证码信息
24857
24946
  areaCode: this.form.areaCode,
24858
- areaCodeCountryId: this.areaCodeData.find(
24947
+ areaCodeCountryId: (_a = this.areaCodeData.find(
24859
24948
  (item) => item.telCode === this.form.areaCode
24860
- ).id,
24949
+ )) == null ? void 0 : _a.id,
24861
24950
  account: this.isShowMobileCode ? this.form.phone : this.form.email,
24862
24951
  type: this.isShowMobileCode ? "MOBILE" : "EMAIL",
24863
24952
  mobile: this.form.phone,
24864
24953
  mobileVerificationCodeUuid: this.mobileUid,
24865
- mobileVerificationCodeVal: this.isShowMobileCode ? this.form.code : "",
24954
+ mobileVerificationCodeVal: this.isShowMobileCode ? this.form.mobileCode : "",
24866
24955
  email: this.form.email,
24867
24956
  emailVerificationCodeUuid: this.emailUid,
24868
- emailVerificationCodeVal: this.isShowEmailCode ? this.form.code : "",
24957
+ emailVerificationCodeVal: this.isShowEmailCode ? this.form.emailCode : "",
24869
24958
  toSys: getAppId() || "ERA",
24870
24959
  path: (window == null ? void 0 : window.location.pathname) || "/"
24871
24960
  };
@@ -24939,7 +25028,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
24939
25028
  createElementVNode("div", _hoisted_2$6, [
24940
25029
  createElementVNode("div", _hoisted_3$6, toDisplayString($props.isEn ? "Complete Your Information" : "完善企业信息"), 1),
24941
25030
  createElementVNode("div", _hoisted_4$6, [
24942
- _cache[15] || (_cache[15] = createElementVNode("img", {
25031
+ _cache[17] || (_cache[17] = createElementVNode("img", {
24943
25032
  src: "https://resources.jctrans.com/res/era/pc/img/icon_gantan.png",
24944
25033
  alt: ""
24945
25034
  }, null, -1)),
@@ -24972,7 +25061,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
24972
25061
  placeholder: $props.isEn ? "Location(City)" : "请输入公司所在城市",
24973
25062
  onSelect: $options.handleSelectCity
24974
25063
  }, {
24975
- prefix: withCtx(() => [..._cache[16] || (_cache[16] = [
25064
+ prefix: withCtx(() => [..._cache[18] || (_cache[18] = [
24976
25065
  createElementVNode("i", { class: "icon-auth-location" }, null, -1)
24977
25066
  ])]),
24978
25067
  _: 1
@@ -25003,7 +25092,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25003
25092
  "onUpdate:existStatus": $options.handleCompanyExistStatus,
25004
25093
  onChange: $options.handleChangeCompany
25005
25094
  }, {
25006
- prefix: withCtx(() => [..._cache[17] || (_cache[17] = [
25095
+ prefix: withCtx(() => [..._cache[19] || (_cache[19] = [
25007
25096
  createElementVNode("i", { class: "icon-auth-company" }, null, -1)
25008
25097
  ])]),
25009
25098
  _: 1
@@ -25065,7 +25154,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25065
25154
  label: $options.currentCountryIsChina ? $props.isEn ? "Your Full Name in Chinese" : "您的中文名称" : $props.isEn ? "Your Full Name in English" : "您的名称",
25066
25155
  placeholder: $props.isEn ? "Please enter your name to prove your identity" : "请输入您的姓名,以证明您的身份"
25067
25156
  }, {
25068
- prefix: withCtx(() => [..._cache[18] || (_cache[18] = [
25157
+ prefix: withCtx(() => [..._cache[20] || (_cache[20] = [
25069
25158
  createElementVNode("i", { class: "icon-auth-user" }, null, -1)
25070
25159
  ])]),
25071
25160
  _: 1
@@ -25098,7 +25187,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25098
25187
  maxlength: "15"
25099
25188
  }, {
25100
25189
  prefix: withCtx(() => [
25101
- _cache[19] || (_cache[19] = createElementVNode("i", { class: "icon-auth-phone" }, null, -1)),
25190
+ _cache[21] || (_cache[21] = createElementVNode("i", { class: "icon-auth-phone" }, null, -1)),
25102
25191
  createVNode(_component_el_form_item, {
25103
25192
  prop: "areaCode",
25104
25193
  class: "tel-areacode",
@@ -25135,24 +25224,24 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25135
25224
  ]),
25136
25225
  _: 1
25137
25226
  }, 512),
25138
- createVNode(_component_el_form_item, { prop: "code" }, {
25227
+ createVNode(_component_el_form_item, { prop: "mobileCode" }, {
25139
25228
  default: withCtx(() => [
25140
25229
  createVNode(_component_CodeInput, {
25141
- modelValue: $data.form.code,
25142
- "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.code = $event),
25230
+ modelValue: $data.form.mobileCode,
25231
+ "onUpdate:modelValue": _cache[11] || (_cache[11] = ($event) => $data.form.mobileCode = $event),
25143
25232
  label: $options.codeInputLabel,
25144
25233
  placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
25145
- ready: $data.codeReady,
25234
+ ready: $data.mobileCodeReady,
25146
25235
  "is-en": $props.isEn,
25147
25236
  "show-icon": "",
25148
25237
  "form-type-color": "4",
25149
- onSend: $options.handleGetCode
25238
+ onSend: _cache[12] || (_cache[12] = (data) => $options.handleGetCode(data, "mobile"))
25150
25239
  }, {
25151
- prefix: withCtx(() => [..._cache[20] || (_cache[20] = [
25240
+ prefix: withCtx(() => [..._cache[22] || (_cache[22] = [
25152
25241
  createElementVNode("i", { class: "icon-verify" }, null, -1)
25153
25242
  ])]),
25154
25243
  _: 1
25155
- }, 8, ["modelValue", "label", "placeholder", "ready", "is-en", "onSend"])
25244
+ }, 8, ["modelValue", "label", "placeholder", "ready", "is-en"])
25156
25245
  ]),
25157
25246
  _: 1
25158
25247
  })
@@ -25165,12 +25254,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25165
25254
  default: withCtx(() => [
25166
25255
  createVNode(_component_JcFloatInput, {
25167
25256
  modelValue: $data.form.email,
25168
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.email = $event),
25257
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.form.email = $event),
25169
25258
  label: $props.isEn ? "Business Email Address" : "企业邮箱",
25170
25259
  placeholder: $props.isEn ? "Business Email Address, QQ Mail is not available" : "请输入您的企业邮箱,暂不支持QQ邮箱",
25171
- onBlur: _cache[13] || (_cache[13] = ($event) => $options.validateField("email"))
25260
+ onBlur: _cache[14] || (_cache[14] = ($event) => $options.validateField("email"))
25172
25261
  }, {
25173
- prefix: withCtx(() => [..._cache[21] || (_cache[21] = [
25262
+ prefix: withCtx(() => [..._cache[23] || (_cache[23] = [
25174
25263
  createElementVNode("i", { class: "icon-auth-email" }, null, -1)
25175
25264
  ])]),
25176
25265
  _: 1
@@ -25178,24 +25267,24 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25178
25267
  ]),
25179
25268
  _: 1
25180
25269
  }),
25181
- createVNode(_component_el_form_item, { prop: "code" }, {
25270
+ createVNode(_component_el_form_item, { prop: "emailCode" }, {
25182
25271
  default: withCtx(() => [
25183
25272
  createVNode(_component_CodeInput, {
25184
- modelValue: $data.form.code,
25185
- "onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.form.code = $event),
25273
+ modelValue: $data.form.emailCode,
25274
+ "onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => $data.form.emailCode = $event),
25186
25275
  label: $options.codeInputLabel,
25187
25276
  placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
25188
- ready: $data.codeReady,
25277
+ ready: $data.emailCodeReady,
25189
25278
  "is-en": $props.isEn,
25190
25279
  "show-icon": "",
25191
25280
  "form-type-color": "4",
25192
- onSend: $options.handleGetCode
25281
+ onSend: _cache[16] || (_cache[16] = (data) => $options.handleGetCode(data, "email"))
25193
25282
  }, {
25194
- prefix: withCtx(() => [..._cache[22] || (_cache[22] = [
25283
+ prefix: withCtx(() => [..._cache[24] || (_cache[24] = [
25195
25284
  createElementVNode("i", { class: "icon-verify" }, null, -1)
25196
25285
  ])]),
25197
25286
  _: 1
25198
- }, 8, ["modelValue", "label", "placeholder", "ready", "is-en", "onSend"])
25287
+ }, 8, ["modelValue", "label", "placeholder", "ready", "is-en"])
25199
25288
  ]),
25200
25289
  _: 1
25201
25290
  })
@@ -25203,7 +25292,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25203
25292
  createVNode(_component_el_button, {
25204
25293
  class: "submit-btn register-btn register-btn-is-active",
25205
25294
  loading: $data.loading,
25206
- disabled: ($options.isShowMobileCode || $options.isShowEmailCode) && !$data.codeSent,
25295
+ disabled: $options.isShowMobileCode && !$data.mobileCodeSent || $options.isShowEmailCode && !$data.emailCodeSent,
25207
25296
  onClick: $options.handleSubmit
25208
25297
  }, {
25209
25298
  default: withCtx(() => [
@@ -25216,7 +25305,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25216
25305
  }, 8, ["model", "rules"])
25217
25306
  ]);
25218
25307
  }
25219
- const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-26754358"]]);
25308
+ const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-27828578"]]);
25220
25309
  const _hoisted_1$7 = { class: "auth-footer-box" };
25221
25310
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
25222
25311
  __name: "FooterBox",
@@ -25292,7 +25381,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25292
25381
  const formB = reactive({ code: "", password: "", confirmPassword: "" });
25293
25382
  const userData = ref({});
25294
25383
  const disabledTabs = reactive({ email: false, mobile: false });
25295
- const codeVerifyUuid = ref("");
25384
+ const codeUid = ref("");
25296
25385
  const rulesA = {
25297
25386
  userName: [
25298
25387
  {
@@ -25403,7 +25492,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25403
25492
  });
25404
25493
  if (res.code === 0) {
25405
25494
  ElMessage.success(props.isEn ? "Verification code sent" : "验证码已发送");
25406
- codeVerifyUuid.value = ((_a = res.data) == null ? void 0 : _a.verifyCode) || "";
25495
+ codeUid.value = ((_a = res.data) == null ? void 0 : _a.verifyCode) || "";
25407
25496
  startTimer();
25408
25497
  } else {
25409
25498
  ElMessage.error(res.msg || "Failed");
@@ -25423,13 +25512,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25423
25512
  }
25424
25513
  loading.value = true;
25425
25514
  try {
25426
- const { MD5 } = await Promise.resolve().then(() => index$6);
25427
25515
  const { data: res } = await resetPasswordApi({
25428
25516
  id: userData.value.id,
25429
25517
  account: userData.value.account,
25430
- codeId: codeVerifyUuid.value,
25518
+ codeId: codeUid.value,
25431
25519
  codeValue: formB.code,
25432
- password: MD5(formB.password).toString(),
25520
+ password: cryptoJsExports.MD5(formB.password).toString(),
25433
25521
  ...verifyData.value
25434
25522
  });
25435
25523
  if (res.code === 0) {
@@ -25451,7 +25539,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25451
25539
  if (disabledTabs[tab]) return;
25452
25540
  activeTab.value = tab;
25453
25541
  formB.code = "";
25454
- codeVerifyUuid.value = "";
25542
+ codeUid.value = "";
25455
25543
  }
25456
25544
  return (_ctx, _cache) => {
25457
25545
  return openBlock(), createElementBlock("div", _hoisted_1$6, [
@@ -25640,7 +25728,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25640
25728
  };
25641
25729
  }
25642
25730
  });
25643
- const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-a15f18ff"]]);
25731
+ const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-080cea7a"]]);
25644
25732
  const _hoisted_1$5 = { class: "auth-bottom-tip" };
25645
25733
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
25646
25734
  __name: "AuthBottomTip",
@@ -25724,8 +25812,10 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25724
25812
  isEn: { type: Boolean, default: false },
25725
25813
  bindList: { type: Array, default: () => [] }
25726
25814
  },
25727
- setup(__props) {
25815
+ emits: ["login-success"],
25816
+ setup(__props, { emit: __emit }) {
25728
25817
  const props = __props;
25818
+ const emit = __emit;
25729
25819
  const submitting = ref(false);
25730
25820
  const selectedUser = ref(null);
25731
25821
  const currentUser = computed(() => {
@@ -25791,7 +25881,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25791
25881
  {
25792
25882
  required: true,
25793
25883
  validator: (rule, value, cb) => {
25794
- validateUserEmail$1(rule, value, cb, props.isEn, false);
25884
+ validateEmailFormat(rule, value, cb, props.isEn);
25795
25885
  },
25796
25886
  trigger: "blur"
25797
25887
  }
@@ -25800,7 +25890,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25800
25890
  {
25801
25891
  required: true,
25802
25892
  validator: (rule, value, cb) => {
25803
- validateUserMobilefive$1(rule, value, cb, props.isEn, false);
25893
+ validateMobileFormat(rule, value, cb, props.isEn);
25804
25894
  },
25805
25895
  trigger: "blur"
25806
25896
  }
@@ -25853,13 +25943,13 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25853
25943
  };
25854
25944
  if (isMobile) params.areaCode = loginForm.value.areaCode;
25855
25945
  const apiFn = isMobile ? sendMobileCodeApi : sendEmailCodeApi;
25856
- if (startTimerFn) startTimerFn();
25857
25946
  apiFn(params).then((res) => {
25858
25947
  var _a;
25859
25948
  const verifyCode = ((_a = res.data.data) == null ? void 0 : _a.verifyCode) || res.data.verifyCode;
25860
25949
  if (res.data.code === 0 || res.data.code === 200) {
25861
25950
  if (isMobile) mobileUid.value = verifyCode;
25862
25951
  else emailUid.value = verifyCode;
25952
+ if (startTimerFn) startTimerFn();
25863
25953
  ElMessage.success(props.isEn ? "Code sent" : "验证码已发送");
25864
25954
  } else {
25865
25955
  ElMessage.error(res.data.msg);
@@ -25926,6 +26016,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25926
26016
  });
25927
26017
  }
25928
26018
  apiPromise.then((res) => {
26019
+ var _a, _b, _c, _d, _e, _f;
25929
26020
  console.log("🍉 ~ ThirdBindLogin.vue:483 ~ doBindRequest ~ res:", res);
25930
26021
  if (res.data.code !== 0) {
25931
26022
  return ElMessage.error(
@@ -25938,15 +26029,23 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25938
26029
  res.data.data
25939
26030
  );
25940
26031
  const data = res.data.data;
25941
- if (data.tgc) {
25942
- api$1.set("tgc", data.tgc, { expires: 30 });
26032
+ if (data.subCode === "USER_HAS_OTHER_BIND" || res.data.subCode === "USER_HAS_OTHER_BIND") {
26033
+ ElMessage.error(
26034
+ props.isEn ? "Bound to other user" : "该账号已绑定其他用户"
26035
+ );
26036
+ return;
25943
26037
  }
25944
26038
  if (data.result) {
25945
26039
  setTokenAll(data.result);
25946
26040
  }
25947
- if (data.redirectPath) {
25948
- handleRedirect$1(data.redirectPath);
26041
+ if (data.tgc) {
26042
+ api$1.set("tgc", data.tgc, { expires: 30 });
25949
26043
  }
26044
+ emit("login-success", {
26045
+ ...data || {},
26046
+ accountType: ((_a = currentUser.value) == null ? void 0 : _a.accountType) || ((_b = currentUser.value) == null ? void 0 : _b.email) || ((_c = currentUser.value) == null ? void 0 : _c.mobile),
26047
+ mode: "login"
26048
+ });
25950
26049
  return;
25951
26050
  }
25952
26051
  if (res.data.subCode === "USER_HAS_OTHER_BIND") {
@@ -25961,9 +26060,11 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25961
26060
  if (res.data.tgc) {
25962
26061
  api$1.set("tgc", res.data.tgc, { expires: 30 });
25963
26062
  }
25964
- if (res.data.redirectPath) {
25965
- handleRedirect$1(res.data.redirectPath);
25966
- }
26063
+ emit("login-success", {
26064
+ ...res.data || {},
26065
+ accountType: ((_d = currentUser.value) == null ? void 0 : _d.accountType) || ((_e = currentUser.value) == null ? void 0 : _e.email) || ((_f = currentUser.value) == null ? void 0 : _f.mobile),
26066
+ mode: "login"
26067
+ });
25967
26068
  }).finally(() => {
25968
26069
  submitting.value = false;
25969
26070
  });
@@ -26173,9 +26274,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26173
26274
  };
26174
26275
  }
26175
26276
  });
26176
- const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e5e9036f"]]);
26277
+ const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bd30117f"]]);
26177
26278
  const _sfc_main$3 = {
26178
- name: "RegisterForm",
26279
+ name: "ThirdRegisterForm",
26179
26280
  components: {
26180
26281
  ElDialog,
26181
26282
  ElForm,
@@ -26690,6 +26791,7 @@ const _sfc_main$3 = {
26690
26791
  const res = await registerThirdPartyCustomizedApi(registerPayload);
26691
26792
  this.handlePostRegister(res);
26692
26793
  } catch (err) {
26794
+ console.error("ThirdRegisterForm handleNewCompanySubmit error:", err);
26693
26795
  this.loading = false;
26694
26796
  }
26695
26797
  },
@@ -26728,6 +26830,7 @@ const _sfc_main$3 = {
26728
26830
  const res = await registerThirdPartyCustomizedApi(applyPayload);
26729
26831
  this.handlePostRegister(res);
26730
26832
  } catch (err) {
26833
+ console.error("ThirdRegisterForm handleApplyJoinSubmit error:", err);
26731
26834
  this.loading = false;
26732
26835
  }
26733
26836
  },
@@ -27230,7 +27333,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
27230
27333
  }, 8, ["model", "rules"])
27231
27334
  ]);
27232
27335
  }
27233
- const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-6b5a903b"]]);
27336
+ const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-8dbec28d"]]);
27234
27337
  function useLoginForm(options) {
27235
27338
  const { isEn, loginType } = options;
27236
27339
  const loginFormRef = ref();
@@ -27273,7 +27376,7 @@ function useLoginForm(options) {
27273
27376
  {
27274
27377
  required: true,
27275
27378
  validator: (rule, value, cb) => {
27276
- validateUserEmail$1(rule, value, cb, isEn.value, false);
27379
+ validateEmailFormat(rule, value, cb, isEn.value);
27277
27380
  },
27278
27381
  trigger: "blur"
27279
27382
  }
@@ -27282,7 +27385,7 @@ function useLoginForm(options) {
27282
27385
  {
27283
27386
  required: true,
27284
27387
  validator: (rule, value, cb) => {
27285
- validateUserMobilefive$1(rule, value, cb, isEn.value, false);
27388
+ validateMobileFormat(rule, value, cb, isEn.value);
27286
27389
  },
27287
27390
  trigger: "blur"
27288
27391
  }
@@ -27490,7 +27593,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27490
27593
  loginPath: { default: "http://localhost:8086" },
27491
27594
  showTestThirdBtn: { type: Boolean, default: false },
27492
27595
  baseMode: { default: "login" },
27493
- appId: { default: "" }
27596
+ appId: { default: "" },
27597
+ test: { type: Boolean, default: false }
27494
27598
  },
27495
27599
  emits: ["update:visible", "update:baseMode", "open", "mode-change", "auth-dialog-close", "login-success", "register-success"],
27496
27600
  setup(__props, { emit: __emit }) {
@@ -27527,6 +27631,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27527
27631
  return false;
27528
27632
  });
27529
27633
  provide("isEn", isEn);
27634
+ const isTestMode = computed(() => detectTestMode(props.test));
27530
27635
  const currentVisible = ref(props.visible);
27531
27636
  const formMode = ref("login");
27532
27637
  const loginType = ref("account");
@@ -27594,6 +27699,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27594
27699
  } = useAuthLogin({
27595
27700
  appId,
27596
27701
  isEn,
27702
+ test: isTestMode,
27597
27703
  onNeedComplete: (data) => {
27598
27704
  console.log("需要完善信息,暂不关闭弹窗");
27599
27705
  const mode2 = loginType.value === "code" ? "register" : "login";
@@ -27627,10 +27733,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27627
27733
  isUserClosed,
27628
27734
  startLogin,
27629
27735
  handleBindThirdParty,
27630
- resetBindRegisterState
27736
+ resetBindRegisterState,
27737
+ resetState: resetThirdPartyState
27631
27738
  } = useThirdPartyLogin$1({
27632
27739
  appId,
27633
27740
  isEn,
27741
+ test: isTestMode,
27634
27742
  onSuccess: (loginData) => {
27635
27743
  const accountType = resolveAccountType(thirdType.value || "");
27636
27744
  emit("login-success", {
@@ -27640,6 +27748,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27640
27748
  });
27641
27749
  currentVisible.value = false;
27642
27750
  executeRedirect(loginData);
27751
+ },
27752
+ onNeedComplete: (loginData) => {
27753
+ handleNeedComplete({
27754
+ mode: "login",
27755
+ accountType: resolveAccountType(thirdType.value || "")
27756
+ });
27643
27757
  }
27644
27758
  });
27645
27759
  watch(isUserClosed, (val) => {
@@ -27731,6 +27845,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27731
27845
  resetAuthSessionItems();
27732
27846
  resetGioSessionItems();
27733
27847
  resetBindRegisterState();
27848
+ resetThirdPartyState();
27734
27849
  }
27735
27850
  function handleNeedComplete(options = {}) {
27736
27851
  const mode2 = (options == null ? void 0 : options.mode) === "register" ? "register" : "login";
@@ -27791,6 +27906,16 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27791
27906
  function handleWechatLogin() {
27792
27907
  formMode.value = "wechat-bind";
27793
27908
  }
27909
+ function handleThirdBindSuccess(loginData) {
27910
+ const accountType = resolveAccountType(thirdType.value || "");
27911
+ emit("login-success", {
27912
+ ...loginData || {},
27913
+ accountType,
27914
+ mode: "login"
27915
+ });
27916
+ currentVisible.value = false;
27917
+ executeRedirect(loginData);
27918
+ }
27794
27919
  function switchToRegister() {
27795
27920
  sessionStorage.removeItem("jc-auth-uniqueCode");
27796
27921
  formMode.value = "register";
@@ -28091,7 +28216,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
28091
28216
  key: 0,
28092
28217
  "is-en": isEn.value,
28093
28218
  "bind-list": unref(bindList),
28094
- class: "jc:mt-1"
28219
+ class: "jc:mt-1",
28220
+ onLoginSuccess: handleThirdBindSuccess
28095
28221
  }, null, 8, ["is-en", "bind-list"])) : createCommentVNode("", true),
28096
28222
  unref(thirdRegisterVisible) ? (openBlock(), createBlock(ThirdRegisterForm, {
28097
28223
  key: 1,
@@ -28194,7 +28320,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
28194
28320
  };
28195
28321
  }
28196
28322
  });
28197
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-4879eade"]]);
28323
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a9dd56d0"]]);
28198
28324
  const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28199
28325
  __proto__: null,
28200
28326
  default: index$2