@jctrans-materials/comps-vue3 1.0.42-beta.1 → 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
@@ -11252,6 +11252,7 @@ function useThirdPartyLogin$1(config) {
11252
11252
  }
11253
11253
  };
11254
11254
  const handleLoginSuccess = (res) => {
11255
+ var _a;
11255
11256
  const data = res.data || res;
11256
11257
  console.log("🍉 处理登录结果:", data);
11257
11258
  loginResult.value = data;
@@ -11275,11 +11276,17 @@ function useThirdPartyLogin$1(config) {
11275
11276
  console.log("👉 直接登录成功,准备跳转");
11276
11277
  isBindDialogVisible.value = false;
11277
11278
  isRegisterVisible.value = false;
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
+ }
11278
11286
  if (unref(config.test)) {
11279
11287
  logTestLoginResult("第三方(Facebook/LinkedIn)登录", data);
11280
11288
  return;
11281
11289
  }
11282
- setTokenAll(data.result);
11283
11290
  if (config.onSuccess) {
11284
11291
  config.onSuccess(data);
11285
11292
  } else {
@@ -12706,6 +12713,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12706
12713
  disabledTabs.mobile = false;
12707
12714
  codeVerifyUuid.value = "";
12708
12715
  verifyData.value = null;
12716
+ verifyVisible.value = false;
12709
12717
  loading.value = false;
12710
12718
  }
12711
12719
  return (_ctx, _cache) => {
@@ -12909,7 +12917,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
12909
12917
  };
12910
12918
  }
12911
12919
  });
12912
- 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"]]);
12913
12921
  const __vite_glob_0_4 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
12914
12922
  __proto__: null,
12915
12923
  default: index$4
@@ -23590,6 +23598,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23590
23598
  fetchWxCode();
23591
23599
  };
23592
23600
  const processLoginSuccess = async (loginData) => {
23601
+ var _a;
23593
23602
  if (loginData.result) {
23594
23603
  setTokenAll(loginData.result);
23595
23604
  }
@@ -23614,6 +23623,10 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23614
23623
  fetchWxCode();
23615
23624
  }
23616
23625
  } else {
23626
+ if ((_a = loginData.result) == null ? void 0 : _a.improveComp) {
23627
+ emit("need-complete", loginData.result.improveComp);
23628
+ return;
23629
+ }
23617
23630
  completeRedirect(loginData.redirectPath);
23618
23631
  }
23619
23632
  };
@@ -23705,7 +23718,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23705
23718
  };
23706
23719
  }
23707
23720
  });
23708
- 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"]]);
23709
23722
  const _sfc_main$b = {
23710
23723
  name: "LoginTypeSwitcher",
23711
23724
  components: {
@@ -24583,7 +24596,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24583
24596
  };
24584
24597
  }
24585
24598
  });
24586
- const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-d48138a4"]]);
24599
+ const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-65dd1b92"]]);
24587
24600
  const _sfc_main$8 = {
24588
24601
  name: "CompleteInfoForm",
24589
24602
  components: {
@@ -24612,6 +24625,10 @@ const _sfc_main$8 = {
24612
24625
  verifyData: {},
24613
24626
  codeReady: false,
24614
24627
  codeSent: false,
24628
+ mobileCodeReady: false,
24629
+ emailCodeReady: false,
24630
+ mobileCodeSent: false,
24631
+ emailCodeSent: false,
24615
24632
  mobileUid: "",
24616
24633
  emailUid: "",
24617
24634
  areaCodeData: [],
@@ -24633,7 +24650,8 @@ const _sfc_main$8 = {
24633
24650
  phone: "",
24634
24651
  areaCode: "+86",
24635
24652
  email: "",
24636
- code: "",
24653
+ mobileCode: "",
24654
+ emailCode: "",
24637
24655
  useKq: false,
24638
24656
  kqCode: "",
24639
24657
  kqInfo: null
@@ -24690,7 +24708,14 @@ const _sfc_main$8 = {
24690
24708
  trigger: "blur"
24691
24709
  }
24692
24710
  ],
24693
- 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: [
24694
24719
  {
24695
24720
  required: true,
24696
24721
  validator: (rule, value, cb) => validateVerifyCode$1(rule, value, cb, this.isEn),
@@ -24804,41 +24829,44 @@ const _sfc_main$8 = {
24804
24829
  },
24805
24830
  validateField(field) {
24806
24831
  this.$refs.formRef.validateField(field, (isValid) => {
24807
- if (field === "phone" || field === "email") {
24808
- this.codeReady = isValid;
24809
- this.codeSent = false;
24810
- if (field === "phone") {
24811
- this.mobileUid = "";
24812
- } else {
24813
- this.emailUid = "";
24814
- }
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 = "";
24815
24840
  }
24816
24841
  });
24817
24842
  },
24818
- handleGetCode({ captchaData, startTimer }) {
24843
+ handleGetCode({ captchaData, startTimer }, type = "mobile") {
24844
+ var _a;
24819
24845
  this.verifyData = captchaData;
24846
+ const isMobile = type === "mobile";
24820
24847
  const params = {
24821
- target: this.isShowMobileCode ? this.form.phone : this.form.email,
24848
+ target: isMobile ? this.form.phone : this.form.email,
24822
24849
  uuid: captchaData.uuid,
24823
24850
  code: captchaData.code
24824
24851
  };
24825
- const api2 = this.isShowMobileCode ? sendMobileCodeApi : sendEmailCodeApi;
24826
- if (this.isShowMobileCode) {
24852
+ const api2 = isMobile ? sendMobileCodeApi : sendEmailCodeApi;
24853
+ if (isMobile) {
24827
24854
  params.areaCode = this.form.areaCode;
24828
- params.areaCodeCountryId = this.areaCodeData.find(
24855
+ params.areaCodeCountryId = (_a = this.areaCodeData.find(
24829
24856
  (item) => item.telCode === this.form.areaCode
24830
- ).id;
24857
+ )) == null ? void 0 : _a.id;
24831
24858
  }
24832
24859
  api2(params).then((res) => {
24833
- var _a;
24834
- 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;
24835
24862
  if (res.data.code === 0 && verifyCode) {
24836
- if (this.isShowMobileCode) {
24863
+ if (isMobile) {
24837
24864
  this.mobileUid = verifyCode;
24865
+ this.mobileCodeSent = true;
24838
24866
  } else {
24839
24867
  this.emailUid = verifyCode;
24868
+ this.emailCodeSent = true;
24840
24869
  }
24841
- this.codeSent = true;
24842
24870
  startTimer();
24843
24871
  ElMessage.success(this.isEn ? "Code Sent" : "验证码已发送");
24844
24872
  } else {
@@ -24853,7 +24881,7 @@ const _sfc_main$8 = {
24853
24881
  handleSubmit() {
24854
24882
  this.$refs.formRef.validate((valid) => {
24855
24883
  if (!valid) return;
24856
- if ((this.isShowMobileCode || this.isShowEmailCode) && !this.codeSent) {
24884
+ if (this.isShowMobileCode && !this.mobileCodeSent || this.isShowEmailCode && !this.emailCodeSent) {
24857
24885
  ElMessage.warning(
24858
24886
  this.isEn ? "Please send the verification code first" : "请先发送验证码"
24859
24887
  );
@@ -24868,6 +24896,7 @@ const _sfc_main$8 = {
24868
24896
  },
24869
24897
  // 逻辑 A:新设公司提交 (原有逻辑)
24870
24898
  handleNewSubmit() {
24899
+ var _a;
24871
24900
  this.loading = true;
24872
24901
  const payload = {
24873
24902
  cityId: this.form.cityId,
@@ -24877,14 +24906,14 @@ const _sfc_main$8 = {
24877
24906
  nameEn: !this.currentCountryIsChina ? this.form.companyName : "",
24878
24907
  mobile: this.form.phone,
24879
24908
  mobileVerificationCodeUuid: this.mobileUid,
24880
- mobileVerificationCodeVal: this.isShowMobileCode ? this.form.code : "",
24909
+ mobileVerificationCodeVal: this.isShowMobileCode ? this.form.mobileCode : "",
24881
24910
  areaCode: this.form.areaCode,
24882
- areaCodeCountryId: this.areaCodeData.find(
24911
+ areaCodeCountryId: (_a = this.areaCodeData.find(
24883
24912
  (item) => item.telCode === this.form.areaCode
24884
- ).id,
24913
+ )) == null ? void 0 : _a.id,
24885
24914
  email: this.form.email,
24886
24915
  emailVerificationCodeUuid: this.emailUid,
24887
- emailVerificationCodeVal: this.isShowEmailCode ? this.form.code : "",
24916
+ emailVerificationCodeVal: this.isShowEmailCode ? this.form.emailCode : "",
24888
24917
  toSys: "ERA",
24889
24918
  path: (window == null ? void 0 : window.location.pathname) || "/",
24890
24919
  ...this.form.kqInfo
@@ -24896,12 +24925,17 @@ const _sfc_main$8 = {
24896
24925
  } else {
24897
24926
  ElMessage.error(res.data.msg);
24898
24927
  }
24928
+ }).catch(() => {
24929
+ ElMessage.error(
24930
+ this.isEn ? "Submission failed" : "提交失败,请重试"
24931
+ );
24899
24932
  }).finally(() => {
24900
24933
  this.loading = false;
24901
24934
  });
24902
24935
  },
24903
24936
  // 逻辑 B:申请加入公司提交 (参考 RegisterForm 逻辑)
24904
24937
  handleJoinSubmit() {
24938
+ var _a;
24905
24939
  this.loading = true;
24906
24940
  const payload = {
24907
24941
  compId: this.resistCompanyInfo.compId,
@@ -24910,17 +24944,17 @@ const _sfc_main$8 = {
24910
24944
  industrySector: this.form.sector,
24911
24945
  // 验证码信息
24912
24946
  areaCode: this.form.areaCode,
24913
- areaCodeCountryId: this.areaCodeData.find(
24947
+ areaCodeCountryId: (_a = this.areaCodeData.find(
24914
24948
  (item) => item.telCode === this.form.areaCode
24915
- ).id,
24949
+ )) == null ? void 0 : _a.id,
24916
24950
  account: this.isShowMobileCode ? this.form.phone : this.form.email,
24917
24951
  type: this.isShowMobileCode ? "MOBILE" : "EMAIL",
24918
24952
  mobile: this.form.phone,
24919
24953
  mobileVerificationCodeUuid: this.mobileUid,
24920
- mobileVerificationCodeVal: this.isShowMobileCode ? this.form.code : "",
24954
+ mobileVerificationCodeVal: this.isShowMobileCode ? this.form.mobileCode : "",
24921
24955
  email: this.form.email,
24922
24956
  emailVerificationCodeUuid: this.emailUid,
24923
- emailVerificationCodeVal: this.isShowEmailCode ? this.form.code : "",
24957
+ emailVerificationCodeVal: this.isShowEmailCode ? this.form.emailCode : "",
24924
24958
  toSys: getAppId() || "ERA",
24925
24959
  path: (window == null ? void 0 : window.location.pathname) || "/"
24926
24960
  };
@@ -24994,7 +25028,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
24994
25028
  createElementVNode("div", _hoisted_2$6, [
24995
25029
  createElementVNode("div", _hoisted_3$6, toDisplayString($props.isEn ? "Complete Your Information" : "完善企业信息"), 1),
24996
25030
  createElementVNode("div", _hoisted_4$6, [
24997
- _cache[15] || (_cache[15] = createElementVNode("img", {
25031
+ _cache[17] || (_cache[17] = createElementVNode("img", {
24998
25032
  src: "https://resources.jctrans.com/res/era/pc/img/icon_gantan.png",
24999
25033
  alt: ""
25000
25034
  }, null, -1)),
@@ -25027,7 +25061,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25027
25061
  placeholder: $props.isEn ? "Location(City)" : "请输入公司所在城市",
25028
25062
  onSelect: $options.handleSelectCity
25029
25063
  }, {
25030
- prefix: withCtx(() => [..._cache[16] || (_cache[16] = [
25064
+ prefix: withCtx(() => [..._cache[18] || (_cache[18] = [
25031
25065
  createElementVNode("i", { class: "icon-auth-location" }, null, -1)
25032
25066
  ])]),
25033
25067
  _: 1
@@ -25058,7 +25092,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25058
25092
  "onUpdate:existStatus": $options.handleCompanyExistStatus,
25059
25093
  onChange: $options.handleChangeCompany
25060
25094
  }, {
25061
- prefix: withCtx(() => [..._cache[17] || (_cache[17] = [
25095
+ prefix: withCtx(() => [..._cache[19] || (_cache[19] = [
25062
25096
  createElementVNode("i", { class: "icon-auth-company" }, null, -1)
25063
25097
  ])]),
25064
25098
  _: 1
@@ -25120,7 +25154,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25120
25154
  label: $options.currentCountryIsChina ? $props.isEn ? "Your Full Name in Chinese" : "您的中文名称" : $props.isEn ? "Your Full Name in English" : "您的名称",
25121
25155
  placeholder: $props.isEn ? "Please enter your name to prove your identity" : "请输入您的姓名,以证明您的身份"
25122
25156
  }, {
25123
- prefix: withCtx(() => [..._cache[18] || (_cache[18] = [
25157
+ prefix: withCtx(() => [..._cache[20] || (_cache[20] = [
25124
25158
  createElementVNode("i", { class: "icon-auth-user" }, null, -1)
25125
25159
  ])]),
25126
25160
  _: 1
@@ -25153,7 +25187,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25153
25187
  maxlength: "15"
25154
25188
  }, {
25155
25189
  prefix: withCtx(() => [
25156
- _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)),
25157
25191
  createVNode(_component_el_form_item, {
25158
25192
  prop: "areaCode",
25159
25193
  class: "tel-areacode",
@@ -25190,24 +25224,24 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25190
25224
  ]),
25191
25225
  _: 1
25192
25226
  }, 512),
25193
- createVNode(_component_el_form_item, { prop: "code" }, {
25227
+ createVNode(_component_el_form_item, { prop: "mobileCode" }, {
25194
25228
  default: withCtx(() => [
25195
25229
  createVNode(_component_CodeInput, {
25196
- modelValue: $data.form.code,
25197
- "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),
25198
25232
  label: $options.codeInputLabel,
25199
25233
  placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
25200
- ready: $data.codeReady,
25234
+ ready: $data.mobileCodeReady,
25201
25235
  "is-en": $props.isEn,
25202
25236
  "show-icon": "",
25203
25237
  "form-type-color": "4",
25204
- onSend: $options.handleGetCode
25238
+ onSend: _cache[12] || (_cache[12] = (data) => $options.handleGetCode(data, "mobile"))
25205
25239
  }, {
25206
- prefix: withCtx(() => [..._cache[20] || (_cache[20] = [
25240
+ prefix: withCtx(() => [..._cache[22] || (_cache[22] = [
25207
25241
  createElementVNode("i", { class: "icon-verify" }, null, -1)
25208
25242
  ])]),
25209
25243
  _: 1
25210
- }, 8, ["modelValue", "label", "placeholder", "ready", "is-en", "onSend"])
25244
+ }, 8, ["modelValue", "label", "placeholder", "ready", "is-en"])
25211
25245
  ]),
25212
25246
  _: 1
25213
25247
  })
@@ -25220,12 +25254,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25220
25254
  default: withCtx(() => [
25221
25255
  createVNode(_component_JcFloatInput, {
25222
25256
  modelValue: $data.form.email,
25223
- "onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.email = $event),
25257
+ "onUpdate:modelValue": _cache[13] || (_cache[13] = ($event) => $data.form.email = $event),
25224
25258
  label: $props.isEn ? "Business Email Address" : "企业邮箱",
25225
25259
  placeholder: $props.isEn ? "Business Email Address, QQ Mail is not available" : "请输入您的企业邮箱,暂不支持QQ邮箱",
25226
- onBlur: _cache[13] || (_cache[13] = ($event) => $options.validateField("email"))
25260
+ onBlur: _cache[14] || (_cache[14] = ($event) => $options.validateField("email"))
25227
25261
  }, {
25228
- prefix: withCtx(() => [..._cache[21] || (_cache[21] = [
25262
+ prefix: withCtx(() => [..._cache[23] || (_cache[23] = [
25229
25263
  createElementVNode("i", { class: "icon-auth-email" }, null, -1)
25230
25264
  ])]),
25231
25265
  _: 1
@@ -25233,24 +25267,24 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25233
25267
  ]),
25234
25268
  _: 1
25235
25269
  }),
25236
- createVNode(_component_el_form_item, { prop: "code" }, {
25270
+ createVNode(_component_el_form_item, { prop: "emailCode" }, {
25237
25271
  default: withCtx(() => [
25238
25272
  createVNode(_component_CodeInput, {
25239
- modelValue: $data.form.code,
25240
- "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),
25241
25275
  label: $options.codeInputLabel,
25242
25276
  placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
25243
- ready: $data.codeReady,
25277
+ ready: $data.emailCodeReady,
25244
25278
  "is-en": $props.isEn,
25245
25279
  "show-icon": "",
25246
25280
  "form-type-color": "4",
25247
- onSend: $options.handleGetCode
25281
+ onSend: _cache[16] || (_cache[16] = (data) => $options.handleGetCode(data, "email"))
25248
25282
  }, {
25249
- prefix: withCtx(() => [..._cache[22] || (_cache[22] = [
25283
+ prefix: withCtx(() => [..._cache[24] || (_cache[24] = [
25250
25284
  createElementVNode("i", { class: "icon-verify" }, null, -1)
25251
25285
  ])]),
25252
25286
  _: 1
25253
- }, 8, ["modelValue", "label", "placeholder", "ready", "is-en", "onSend"])
25287
+ }, 8, ["modelValue", "label", "placeholder", "ready", "is-en"])
25254
25288
  ]),
25255
25289
  _: 1
25256
25290
  })
@@ -25258,7 +25292,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25258
25292
  createVNode(_component_el_button, {
25259
25293
  class: "submit-btn register-btn register-btn-is-active",
25260
25294
  loading: $data.loading,
25261
- disabled: ($options.isShowMobileCode || $options.isShowEmailCode) && !$data.codeSent,
25295
+ disabled: $options.isShowMobileCode && !$data.mobileCodeSent || $options.isShowEmailCode && !$data.emailCodeSent,
25262
25296
  onClick: $options.handleSubmit
25263
25297
  }, {
25264
25298
  default: withCtx(() => [
@@ -25271,7 +25305,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25271
25305
  }, 8, ["model", "rules"])
25272
25306
  ]);
25273
25307
  }
25274
- const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-1844ec39"]]);
25308
+ const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-27828578"]]);
25275
25309
  const _hoisted_1$7 = { class: "auth-footer-box" };
25276
25310
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
25277
25311
  __name: "FooterBox",
@@ -25478,13 +25512,12 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25478
25512
  }
25479
25513
  loading.value = true;
25480
25514
  try {
25481
- const { MD5 } = await Promise.resolve().then(() => index$6);
25482
25515
  const { data: res } = await resetPasswordApi({
25483
25516
  id: userData.value.id,
25484
25517
  account: userData.value.account,
25485
25518
  codeId: codeUid.value,
25486
25519
  codeValue: formB.code,
25487
- password: MD5(formB.password).toString(),
25520
+ password: cryptoJsExports.MD5(formB.password).toString(),
25488
25521
  ...verifyData.value
25489
25522
  });
25490
25523
  if (res.code === 0) {
@@ -25695,7 +25728,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25695
25728
  };
25696
25729
  }
25697
25730
  });
25698
- const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-74e2cbb2"]]);
25731
+ const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-080cea7a"]]);
25699
25732
  const _hoisted_1$5 = { class: "auth-bottom-tip" };
25700
25733
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
25701
25734
  __name: "AuthBottomTip",
@@ -25996,6 +26029,18 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
25996
26029
  res.data.data
25997
26030
  );
25998
26031
  const data = res.data.data;
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;
26037
+ }
26038
+ if (data.result) {
26039
+ setTokenAll(data.result);
26040
+ }
26041
+ if (data.tgc) {
26042
+ api$1.set("tgc", data.tgc, { expires: 30 });
26043
+ }
25999
26044
  emit("login-success", {
26000
26045
  ...data || {},
26001
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),
@@ -26229,9 +26274,9 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26229
26274
  };
26230
26275
  }
26231
26276
  });
26232
- const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-42f093a7"]]);
26277
+ const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bd30117f"]]);
26233
26278
  const _sfc_main$3 = {
26234
- name: "RegisterForm",
26279
+ name: "ThirdRegisterForm",
26235
26280
  components: {
26236
26281
  ElDialog,
26237
26282
  ElForm,
@@ -26746,6 +26791,7 @@ const _sfc_main$3 = {
26746
26791
  const res = await registerThirdPartyCustomizedApi(registerPayload);
26747
26792
  this.handlePostRegister(res);
26748
26793
  } catch (err) {
26794
+ console.error("ThirdRegisterForm handleNewCompanySubmit error:", err);
26749
26795
  this.loading = false;
26750
26796
  }
26751
26797
  },
@@ -26784,6 +26830,7 @@ const _sfc_main$3 = {
26784
26830
  const res = await registerThirdPartyCustomizedApi(applyPayload);
26785
26831
  this.handlePostRegister(res);
26786
26832
  } catch (err) {
26833
+ console.error("ThirdRegisterForm handleApplyJoinSubmit error:", err);
26787
26834
  this.loading = false;
26788
26835
  }
26789
26836
  },
@@ -27286,7 +27333,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
27286
27333
  }, 8, ["model", "rules"])
27287
27334
  ]);
27288
27335
  }
27289
- 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"]]);
27290
27337
  function useLoginForm(options) {
27291
27338
  const { isEn, loginType } = options;
27292
27339
  const loginFormRef = ref();
@@ -27686,7 +27733,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27686
27733
  isUserClosed,
27687
27734
  startLogin,
27688
27735
  handleBindThirdParty,
27689
- resetBindRegisterState
27736
+ resetBindRegisterState,
27737
+ resetState: resetThirdPartyState
27690
27738
  } = useThirdPartyLogin$1({
27691
27739
  appId,
27692
27740
  isEn,
@@ -27700,6 +27748,12 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27700
27748
  });
27701
27749
  currentVisible.value = false;
27702
27750
  executeRedirect(loginData);
27751
+ },
27752
+ onNeedComplete: (loginData) => {
27753
+ handleNeedComplete({
27754
+ mode: "login",
27755
+ accountType: resolveAccountType(thirdType.value || "")
27756
+ });
27703
27757
  }
27704
27758
  });
27705
27759
  watch(isUserClosed, (val) => {
@@ -27791,6 +27845,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
27791
27845
  resetAuthSessionItems();
27792
27846
  resetGioSessionItems();
27793
27847
  resetBindRegisterState();
27848
+ resetThirdPartyState();
27794
27849
  }
27795
27850
  function handleNeedComplete(options = {}) {
27796
27851
  const mode2 = (options == null ? void 0 : options.mode) === "register" ? "register" : "login";
@@ -28265,7 +28320,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
28265
28320
  };
28266
28321
  }
28267
28322
  });
28268
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-1899ec69"]]);
28323
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a9dd56d0"]]);
28269
28324
  const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28270
28325
  __proto__: null,
28271
28326
  default: index$2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jctrans-materials/comps-vue3",
3
- "version": "1.0.42-beta.1",
3
+ "version": "1.0.42-beta.2",
4
4
  "private": false,
5
5
  "description": "",
6
6
  "type": "module",
@@ -38,7 +38,7 @@
38
38
  "nanoid": "^5.1.6",
39
39
  "qrcode": "^1.5.4",
40
40
  "tailwindcss": "4.1.18",
41
- "@jctrans-materials/shared": "1.0.42-beta.1"
41
+ "@jctrans-materials/shared": "1.0.42-beta.2"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@tailwindcss/postcss": "4.1.18",