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

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
@@ -11266,6 +11266,10 @@ function useThirdPartyLogin$1(config) {
11266
11266
  (data == null ? void 0 : data.thirdPartyInfo) || {},
11267
11267
  (data == null ? void 0 : data.mobileEmailList) || []
11268
11268
  );
11269
+ setThirdPartySessions$1(
11270
+ (data == null ? void 0 : data.thirdPartyInfo) || {},
11271
+ (data == null ? void 0 : data.mobileEmailList) || []
11272
+ );
11269
11273
  if (list.length > 0) {
11270
11274
  console.log("👉 进入绑定流程");
11271
11275
  bindList.value = list;
@@ -22365,13 +22369,13 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
22365
22369
  onClick: applyJoin
22366
22370
  }, [
22367
22371
  createTextVNode(toDisplayString(register_join_in.value) + " ", 1),
22368
- _cache[0] || (_cache[0] = createStaticVNode('<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-2da35046><g id="icon/more/8" clip-path="url(#clip0_1016_6109)" data-v-2da35046><path id="Vector 79" d="M2 3L5 6L2 9" stroke="white" stroke-linejoin="round" data-v-2da35046></path></g><defs data-v-2da35046><clipPath id="clip0_1016_6109" data-v-2da35046><rect width="8" height="12" fill="white" data-v-2da35046></rect></clipPath></defs></svg>', 1))
22372
+ _cache[0] || (_cache[0] = createStaticVNode('<svg width="8" height="12" viewBox="0 0 8 12" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-d15f8d69><g id="icon/more/8" clip-path="url(#clip0_1016_6109)" data-v-d15f8d69><path id="Vector 79" d="M2 3L5 6L2 9" stroke="white" stroke-linejoin="round" data-v-d15f8d69></path></g><defs data-v-d15f8d69><clipPath id="clip0_1016_6109" data-v-d15f8d69><rect width="8" height="12" fill="white" data-v-d15f8d69></rect></clipPath></defs></svg>', 1))
22369
22373
  ])
22370
22374
  ]);
22371
22375
  };
22372
22376
  }
22373
22377
  });
22374
- const ApplyJoinBtn = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-2da35046"]]);
22378
+ const ApplyJoinBtn = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-d15f8d69"]]);
22375
22379
  const _sfc_main$d = {
22376
22380
  name: "RegisterForm",
22377
22381
  components: {
@@ -22401,29 +22405,50 @@ const _sfc_main$d = {
22401
22405
  "third-party-click",
22402
22406
  "register-step-change"
22403
22407
  ],
22408
+ // =========================================================================
22409
+ // Computed - 派生状态,根据表单数据和选中城市动态计算
22410
+ // =========================================================================
22404
22411
  computed: {
22412
+ // 用户协议是否已勾选(仅读取 agree 字段值,用于外部快速判断)
22405
22413
  isAgree() {
22406
22414
  return this.form.agree;
22407
22415
  },
22416
+ // countryId - 从 city 对象的 raw 数据中提取国家 ID
22417
+ // 数据来源兼容两种结构:
22418
+ // 1. 直接选择城市:city.raw.country.id
22419
+ // 2. 搜索结果:city.raw.city.countryId
22420
+ // 用于区分国内/海外,驱动手机号/邮箱切换以及区号数据加载
22408
22421
  countryId() {
22409
22422
  var _a, _b, _c, _d, _e, _f, _g;
22410
22423
  return ((_c = (_b = (_a = this.form.city) == null ? void 0 : _a.raw) == null ? void 0 : _b.country) == null ? void 0 : _c.id) || ((_g = (_f = (_e = (_d = this.form) == null ? void 0 : _d.city) == null ? void 0 : _e.raw) == null ? void 0 : _f.city) == null ? void 0 : _g.countryId);
22411
22424
  },
22425
+ // cityId - 从 city 对象中提取城市 ID,提交注册时作为必填参数之一
22412
22426
  cityId() {
22413
22427
  var _a;
22414
22428
  return (_a = this.form.city) == null ? void 0 : _a.id;
22415
22429
  },
22430
+ // currentCountryIsChina - 判断当前所选城市是否在中国(countryId === 1)
22431
+ // 中国 → 显示手机号输入区(区号下拉 + 手机号);海外 → 显示企业邮箱输入区
22432
+ // 同时考虑 resistCompanyInfo(申请加入已有公司时传入的预设国家信息)
22416
22433
  currentCountryIsChina() {
22417
22434
  var _a;
22418
22435
  const id = this.countryId || ((_a = this.resistCompanyInfo) == null ? void 0 : _a.countryId);
22419
22436
  return [1].includes(Number(id));
22420
22437
  },
22438
+ // currentCompanyLabel - 根据中英文环境和国家动态切换公司名输入框的 placeholder 标签
22439
+ // 中国 + 中文 → "公司中文名称";海外 + 中文 → "公司英文名称"
22440
+ // 中国 + 英文 → "Company Name in Chinese";海外 + 英文 → "Company Name in English"
22421
22441
  currentCompanyLabel() {
22422
22442
  return this.isEn ? this.currentCountryIsChina ? "Company Name in Chinese" : "Company Name in English" : this.currentCountryIsChina ? "公司中文名称" : "公司英文名称";
22423
22443
  },
22444
+ // isTraderSector - 判断当前选择的行业是否为"货主"(Trade)
22445
+ // 货主行业无需填写公司名,Step2 中直接跳过公司名输入,仅展示勾选协议
22424
22446
  isTraderSector() {
22425
22447
  return this.form.sector === "Trade";
22426
22448
  },
22449
+ // codeInputLabel - 动态生成验证码输入框上方的提示标签
22450
+ // 根据国内/海外分别显示 "验证码已发送至手机号 138****0000" 或 "验证码已发送至邮箱 t***@example.com"
22451
+ // 通过工具函数 buildCodeInputLabel 拼接展示文案,支持中英文切换
22427
22452
  codeInputLabel() {
22428
22453
  return buildCodeInputLabel({
22429
22454
  isChina: this.currentCountryIsChina,
@@ -22433,47 +22458,74 @@ const _sfc_main$d = {
22433
22458
  });
22434
22459
  }
22435
22460
  },
22461
+ // 当注册步骤切换时,通知父组件更新 Banner 显隐状态
22436
22462
  watch: {
22437
22463
  registerStep(newVal) {
22438
22464
  this.$emit("register-step-change", newVal);
22439
22465
  }
22440
22466
  },
22467
+ // =========================================================================
22468
+ // data - 表单数据、校验规则、业务状态
22469
+ // =========================================================================
22441
22470
  data() {
22442
22471
  return {
22472
+ // 验证码是否可发送(由联系方式校验通过后置为 true)
22443
22473
  codeReady: false,
22444
- // 记录公司是否已注册的状态,用于 UI 展示申请加入逻辑
22474
+ // 公司查重结果:是否已存在英文/中文公司名,用于展示"申请加入"按钮
22445
22475
  companyResistEn: false,
22446
22476
  companyResistCn: false,
22477
+ // 滑块验证通过后保存的验证数据(uuid + code),用于获取验证码和提交注册
22447
22478
  verifyData: {},
22448
- // 注册分步状态:1 或 2
22479
+ // 注册分步状态:1(城市+联系方式) 或 2(验证码+行业+公司+协议)
22449
22480
  registerStep: 1,
22450
- // Step 1 进入 Step 2 时快照联系方式,用于返回 Step 1 时判断是否需要重置验证码
22481
+ // Step 1 进入 Step 2 时快照当前联系方式,返回 Step 1 时用于判断是否需重置验证码
22451
22482
  step1AccountSnapshot: "",
22483
+ // ===== 注册表单字段 =====
22452
22484
  form: {
22453
22485
  city: null,
22486
+ // 城市选择器绑定值(JcSearch 对象)
22454
22487
  cityId: "",
22488
+ // 城市 ID
22455
22489
  companyName: "",
22490
+ // 公司名称(中文或英文,取决于国家)
22456
22491
  countryId: "",
22492
+ // 国家 ID(从城市数据中提取)
22457
22493
  email: "",
22494
+ // 海外用户的邮箱
22458
22495
  phone: "",
22496
+ // 国内用户的手机号
22459
22497
  code: "",
22498
+ // 4 位验证码
22460
22499
  sector: "Logistics",
22500
+ // 行业类型,默认"货代"
22461
22501
  agree: false,
22502
+ // 是否同意用户协议
22462
22503
  useKq: false,
22504
+ // 是否使用快企查重(ChineseCompanySearch 组件回传)
22463
22505
  kqCode: "",
22506
+ // 快企查重编码
22464
22507
  kqInfo: null,
22508
+ // 快企查重返回的公司信息对象
22465
22509
  areaCode: "+86",
22510
+ // 手机区号(默认中国 +86)
22466
22511
  nameCn: "",
22512
+ // 中文姓名(申请加入已有公司时使用)
22467
22513
  nameEn: "",
22514
+ // 英文姓名
22468
22515
  firstName: "",
22516
+ // 名(海外用户申请加入已有公司时使用)
22469
22517
  lastName: ""
22518
+ // 姓(海外用户申请加入已有公司时使用)
22470
22519
  },
22520
+ // 行业类型选项列表(由接口动态获取,本地默认为三个选项)
22471
22521
  sectors: [
22472
22522
  { cn: "货代", en: "Freight Forwarder", value: "Logistics" },
22473
22523
  { cn: "货主", en: "Trader", value: "Trade" },
22474
22524
  { cn: "衍生产品供应商", en: "Vendor", value: "Service" }
22475
22525
  ],
22526
+ // ===== 表单校验规则 =====
22476
22527
  rules: {
22528
+ // city: 城市必选,change 和 blur 时触发
22477
22529
  city: [
22478
22530
  {
22479
22531
  required: true,
@@ -22481,6 +22533,7 @@ const _sfc_main$d = {
22481
22533
  trigger: ["change", "blur"]
22482
22534
  }
22483
22535
  ],
22536
+ // companyName: 公司名校验(货主行业跳过;通过 validateCompanyName 进行业务校验)
22484
22537
  companyName: [
22485
22538
  {
22486
22539
  required: true,
@@ -22494,6 +22547,7 @@ const _sfc_main$d = {
22494
22547
  trigger: "blur"
22495
22548
  }
22496
22549
  ],
22550
+ // nameCn: 中文姓名校验(仅在"已有公司 + 中国区"场景下生效),调用 validateName 校验中文名
22497
22551
  nameCn: [
22498
22552
  {
22499
22553
  required: true,
@@ -22507,6 +22561,7 @@ const _sfc_main$d = {
22507
22561
  trigger: "blur"
22508
22562
  }
22509
22563
  ],
22564
+ // firstName: 名校验(仅在"已有公司 + 海外区"场景下生效),调用 validateName 校验英文名
22510
22565
  firstName: [
22511
22566
  {
22512
22567
  required: true,
@@ -22520,6 +22575,7 @@ const _sfc_main$d = {
22520
22575
  trigger: "blur"
22521
22576
  }
22522
22577
  ],
22578
+ // lastName: 姓校验(仅在"已有公司 + 海外区"场景下生效)
22523
22579
  lastName: [
22524
22580
  {
22525
22581
  required: true,
@@ -22533,6 +22589,7 @@ const _sfc_main$d = {
22533
22589
  trigger: "blur"
22534
22590
  }
22535
22591
  ],
22592
+ // email: 邮箱格式校验(仅在海外区生效),调用 validateUserEmail 验证
22536
22593
  email: [
22537
22594
  {
22538
22595
  required: true,
@@ -22540,6 +22597,7 @@ const _sfc_main$d = {
22540
22597
  trigger: "blur"
22541
22598
  }
22542
22599
  ],
22600
+ // phone: 手机号格式校验(仅在中国区生效),调用 validateUserMobilefive 验证
22543
22601
  phone: [
22544
22602
  {
22545
22603
  required: true,
@@ -22547,6 +22605,7 @@ const _sfc_main$d = {
22547
22605
  trigger: "blur"
22548
22606
  }
22549
22607
  ],
22608
+ // code: 4 位验证码校验,调用 validateVerifyCode 验证格式和必填
22550
22609
  code: [
22551
22610
  {
22552
22611
  required: true,
@@ -22554,6 +22613,7 @@ const _sfc_main$d = {
22554
22613
  trigger: "blur"
22555
22614
  }
22556
22615
  ],
22616
+ // agree: 用户协议复选框必勾选,未勾选时显示提示
22557
22617
  agree: [
22558
22618
  {
22559
22619
  required: true,
@@ -22572,27 +22632,38 @@ const _sfc_main$d = {
22572
22632
  }
22573
22633
  ]
22574
22634
  },
22635
+ // 验证码倒计时中,防止用户重复发送
22575
22636
  isCounting: false,
22637
+ // 区号列表数据(从接口获取)
22576
22638
  areaCodeData: [],
22639
+ // 短信验证码发送后返回的 UID,提交注册时需回传后端
22577
22640
  mobileUid: "",
22578
- // 存储短信验证码凭证
22641
+ // 邮箱验证码发送后返回的 UID,提交注册时需回传后端
22579
22642
  emailUid: "",
22580
- // 存储邮箱验证码凭证
22643
+ // 是否展示已有公司卡片(true → 申请加入模式;false → 新设公司模式)
22581
22644
  hasResistCompany: false,
22645
+ // 已有公司信息对象(compId, compNameCn, compNameEn, cityNameCn 等)
22582
22646
  resistCompanyInfo: null,
22583
- // 存储接口返回的已有公司信息
22647
+ // 提交中状态,防止重复点击注册按钮
22584
22648
  loading: false
22585
22649
  };
22586
22650
  },
22651
+ // =========================================================================
22652
+ // 生命周期 - 初始化时获取区号、行业字典、并检查是否有 compKey 邀请
22653
+ // =========================================================================
22587
22654
  mounted() {
22588
22655
  this.getAreaCodeData();
22589
22656
  this.findDict();
22590
22657
  this.inviteJoinGetComp();
22591
22658
  },
22659
+ // =========================================================================
22660
+ // Methods - 业务方法
22661
+ // =========================================================================
22592
22662
  methods: {
22593
22663
  go2Agreement: go2Agreement$1,
22594
22664
  getAuthSessionItems,
22595
22665
  go2Policy: go2Policy$1,
22666
+ // ===== 受邀加入公司:通过 sessionStorage 中的 compKey 获取已有公司信息 =====
22596
22667
  async inviteJoinGetComp() {
22597
22668
  const sessions = getAuthSessionItems();
22598
22669
  const key = sessions.compKey;
@@ -22601,6 +22672,7 @@ const _sfc_main$d = {
22601
22672
  this.hasResistCompany = true;
22602
22673
  this.resistCompanyInfo = res.data;
22603
22674
  },
22675
+ // ===== 获取行业类型字典(从接口动态获取,与本地默认值合并) =====
22604
22676
  findDict() {
22605
22677
  findDictApi({
22606
22678
  dictType: "cmc_company_industry_sector"
@@ -22622,10 +22694,12 @@ const _sfc_main$d = {
22622
22694
  }).catch((err) => {
22623
22695
  });
22624
22696
  },
22697
+ // ===== 切换公司名时重置查重状态(清除之前的"已有公司"标记) =====
22625
22698
  handleChangeCompany() {
22626
22699
  this.companyResistCn = false;
22627
22700
  this.companyResistEn = false;
22628
22701
  },
22702
+ // ===== 取消加入已有公司 → 恢复到新设公司模式,清空所有相关状态 =====
22629
22703
  handleCancelJoin() {
22630
22704
  this.hasResistCompany = false;
22631
22705
  this.companyResistCn = false;
@@ -22637,8 +22711,8 @@ const _sfc_main$d = {
22637
22711
  this.form.firstName = "";
22638
22712
  this.form.lastName = "";
22639
22713
  },
22714
+ // ===== 选择行业类型 → 若切换为"货主",清空所有公司相关信息(货主不需要填公司) =====
22640
22715
  handleSelectSector(value) {
22641
- this.form.sector = value;
22642
22716
  if (value === "Trade") {
22643
22717
  this.form.companyName = "";
22644
22718
  this.form.useKq = false;
@@ -22654,16 +22728,17 @@ const _sfc_main$d = {
22654
22728
  this.form.lastName = "";
22655
22729
  }
22656
22730
  },
22657
- // 点击申请加入按钮
22731
+ // ===== 申请加入已有公司按钮 → 切换为"已有公司"卡片模式,清除公司名校验错误 =====
22658
22732
  handleApplyJoinClick() {
22659
22733
  this.hasResistCompany = true;
22660
22734
  this.$nextTick(() => {
22661
22735
  this.$refs.registerFormRef.clearValidate("companyName");
22662
22736
  });
22663
22737
  },
22664
- /**
22665
- * 注册 Step 1:进入 Step 2
22666
- */
22738
+ // ===== [Step 1 → Step 2] 校验城市+联系方式后进入验证码/公司信息页面 =====
22739
+ // 1. 根据国家判断校验城市+手机(中国)还是城市+邮箱(海外)
22740
+ // 2. 校验通过后,快照当前联系方式用于后续"返回"时的智能判断
22741
+ // 3. 切换到 Step 2,清除所有校验错误提示
22667
22742
  handleNextStep() {
22668
22743
  const step1Fields = this.currentCountryIsChina ? ["city", "phone"] : ["city", "email"];
22669
22744
  this.$refs.registerFormRef.validateField(step1Fields, (isValid) => {
@@ -22675,9 +22750,10 @@ const _sfc_main$d = {
22675
22750
  });
22676
22751
  });
22677
22752
  },
22678
- /**
22679
- * 注册 Step 2:返回 Step 1
22680
- */
22753
+ // ===== [Step 2 → Step 1] 智能返回:已加入公司→取消加入;联系方式变化→重置验证码 =====
22754
+ // 两种返回路径:
22755
+ // 1. 当前处于"已有公司"卡片模式 → 取消加入,回到公司名输入界面
22756
+ // 2. 正常返回 Step 1:比对当前联系方式与快照,若发生变化则重置验证码状态
22681
22757
  handleBackToStep1() {
22682
22758
  if (this.hasResistCompany) {
22683
22759
  this.handleCancelJoin();
@@ -22692,9 +22768,14 @@ const _sfc_main$d = {
22692
22768
  this.$refs.registerFormRef.clearValidate();
22693
22769
  });
22694
22770
  },
22695
- /**
22696
- * 重置验证码相关状态
22697
- */
22771
+ // ===== 重置验证码所有相关状态 =====
22772
+ // 清空以下所有验证码相关的表单数据与 UI 状态:
22773
+ // - form.code:输入的 4 位验证码
22774
+ // - mobileUid / emailUid:滑块验证成功后服务端返回的 UID(用于验证码校验)
22775
+ // - verifyData:滑块验证组件的数据对象(含 ticket、randstr 等)
22776
+ // - codeReady:验证码输入框是否就绪(控制滑块重新弹出)
22777
+ // - isCounting:倒计时状态(停止倒计时)
22778
+ // 触发时机:用户返回 Step 1 且联系方式发生变化时
22698
22779
  resetVerifyState() {
22699
22780
  this.form.code = "";
22700
22781
  this.mobileUid = "";
@@ -22703,6 +22784,9 @@ const _sfc_main$d = {
22703
22784
  this.codeReady = false;
22704
22785
  this.isCounting = false;
22705
22786
  },
22787
+ // ===== 获取 IP 定位城市 + 区号列表 =====
22788
+ // 1. 调用 IP 定位 API 获取用户当前城市,自动填充城市选择器
22789
+ // 2. 调用区号列表 API 获取全球区号数据
22706
22790
  async getAreaCodeData() {
22707
22791
  var _a, _b, _c;
22708
22792
  const res1 = await getLocalIpDataApi();
@@ -22735,6 +22819,7 @@ const _sfc_main$d = {
22735
22819
  const res = await findPAreaCodeApi();
22736
22820
  this.areaCodeData = res.data.data.records;
22737
22821
  },
22822
+ // ===== 清空城市 → 重置验证码 + 公司查重 + 姓名等所有相关状态 =====
22738
22823
  handleClearCity() {
22739
22824
  this.resetVerifyState();
22740
22825
  this.companyResistEn = false;
@@ -22745,6 +22830,12 @@ const _sfc_main$d = {
22745
22830
  this.form.firstName = "";
22746
22831
  this.form.lastName = "";
22747
22832
  },
22833
+ // ===== 选择城市 → 处理城市/国家变化后的副作用 =====
22834
+ // 1. 提取城市 ID 和国家 ID
22835
+ // 2. 重置验证码状态(城市变化后需重新获取验证码)
22836
+ // 3. 非 compKey 邀请场景下,重置公司查重状态
22837
+ // 4. 若国家发生变化,清空公司名和快企信息(避免中英文公司名残留)
22838
+ // 5. 触发城市和公司名校验
22748
22839
  handleSelectCity(e) {
22749
22840
  var _a, _b, _c, _d;
22750
22841
  const prevCountryId = this.form.countryId;
@@ -22774,14 +22865,25 @@ const _sfc_main$d = {
22774
22865
  this.$refs.registerFormRef.validateField("city");
22775
22866
  });
22776
22867
  },
22868
+ // ===== 校验单个表单字段 =====
22869
+ // 用于在字段值变化时做局部校验(blur 事件触发),而非全量 validate
22870
+ // 特殊逻辑:当校验的是 email 或 phone 字段且校验通过,自动将 codeReady 置为 true,
22871
+ // 允许用户点击发送验证码;若校验失败则 codeReady 为 false,按钮保持禁用
22777
22872
  validateField(field) {
22778
- if (!this.$refs.registerFormRef) return;
22779
22873
  this.$refs.registerFormRef.validateField(field, (isValid) => {
22780
22874
  if (field === "email" || field === "phone") {
22781
22875
  this.codeReady = isValid;
22782
22876
  }
22783
22877
  });
22784
22878
  },
22879
+ // ===== 发送验证码 =====
22880
+ // 根据当前国家选择 API:中国 → sendMobileCodeApi(短信),海外 → sendEmailCodeApi(邮箱)
22881
+ // 参数说明:
22882
+ // captchaData:滑块验证通过后传入的数据
22883
+ // - uuid:滑块会话标识(注册提交时需与验证码一起回传)
22884
+ // - code:滑块验证码
22885
+ // startTimer:CodeInput 组件提供的倒计时启动函数(仅在接口成功时调用,避免失败时锁死按钮)
22886
+ // 成功后将返回的 verifyCode 存入 mobileUid/emailUid,用于后续注册提交时的校验回传
22785
22887
  handleGetCode({ captchaData, startTimer }) {
22786
22888
  this.verifyData = captchaData;
22787
22889
  const params = {
@@ -22816,6 +22918,19 @@ const _sfc_main$d = {
22816
22918
  });
22817
22919
  console.log("发送注册验证码");
22818
22920
  },
22921
+ // ===== 提交注册:全量校验后构建 payload,分流至"新设公司"或"申请加入" =====
22922
+ // 执行步骤:
22923
+ // 1. 全量表单校验(el-form validate)
22924
+ // 2. 检查是否已获取验证码(verifyData.uuid 必须存在,否则提示"请先获取验证码")
22925
+ // 3. 构建通用提交参数:appId、session 来源信息(clickSource/activityCode/referenceUserId/empNo)、
22926
+ // 行业类型(industrySector)、滑块验证数据(uuid/code)、项目 ID、注册入口标记
22927
+ // 4. 根据联系方式类型分支:
22928
+ // - MOBILE(中国区):区号 + 加密后的手机号 + 验证码 + 验证码 UUID
22929
+ // - EMAIL(海外区):邮箱地址 + 验证码 + 验证码 UUID
22930
+ // 5. 分流到具体提交方法:
22931
+ // - hasResistCompany=true → handleApplyJoinSubmit(申请加入已有公司)
22932
+ // - hasResistCompany=false → handleNewCompanySubmit(新设公司注册)
22933
+ // - 同时收集 session 中的国家/城市/公司名缓存,供注册后写入
22819
22934
  handleRegister() {
22820
22935
  this.$refs.registerFormRef.validate((valid) => {
22821
22936
  var _a;
@@ -22871,9 +22986,14 @@ const _sfc_main$d = {
22871
22986
  }
22872
22987
  });
22873
22988
  },
22874
- /**
22875
- * 逻辑 A:新设公司注册
22876
- */
22989
+ // ===== [A 路径] 新设公司注册 =====
22990
+ // 构建注册 payload 并调用注册 API:
22991
+ // 1. 合并基础参数 + 城市(cityId)/ 国家(countryId)/ 行业(industrySector)
22992
+ // 2. 非货主行业:附加公司名(中国→compNameCn,海外→compNameEn)+ 快企查重信息
22993
+ // (注意:kqInfo 中若含 compId 字段需排除,避免与新接口的 compId 语义冲突)
22994
+ // 3. 货主行业:不提交公司名称相关字段
22995
+ // 4. 根据 session 中的 uniqueCode 判断调用普通注册 API 或第三方绑定注册 API
22996
+ // 注册成功后统一调用 handlePostRegister 处理响应分流
22877
22997
  async handleNewCompanySubmit(baseData) {
22878
22998
  const sessionStorageItems = this.getAuthSessionItems();
22879
22999
  const registerPayload = {
@@ -22912,9 +23032,14 @@ const _sfc_main$d = {
22912
23032
  this.loading = false;
22913
23033
  }
22914
23034
  },
22915
- /**
22916
- * 逻辑 B:申请加入公司提交
22917
- */
23035
+ // ===== [B 路径] 申请加入已有公司 =====
23036
+ // 构建申请 payload 并调用注册 API:
23037
+ // 1. 携带已有公司 ID(compId),来源:公司查重匹配或 compKey 邀请链接
23038
+ // 2. 申请者姓名:中国区提交 nameCn;海外区拼接 firstName + lastName 为 nameEn
23039
+ // 3. 移除与新设公司相关的字段(industrySector、compNameEn/Cn、countryId、cityId 等),
23040
+ // 因为加入已有公司无需新建公司信息
23041
+ // 4. 根据 uniqueCode 判断调用普通注册 API 或第三方绑定注册 API
23042
+ // 注册成功后统一调用 handlePostRegister 处理响应分流
22918
23043
  async handleApplyJoinSubmit(baseData) {
22919
23044
  const sessionStorageItems = this.getAuthSessionItems();
22920
23045
  const applyPayload = {
@@ -22959,6 +23084,10 @@ const _sfc_main$d = {
22959
23084
  this.loading = false;
22960
23085
  }
22961
23086
  },
23087
+ // ===== 延迟跳转工具函数 =====
23088
+ // 先清除 sessionStorage 中的认证缓存数据(路径、来源等),再执行页面跳转
23089
+ // delayInput 支持传入毫秒数或数字字符串,经 normalizeDelayMs 统一转换为毫秒
23090
+ // 典型用法:注册成功后延迟 1000ms 跳转到 redirectPath
22962
23091
  executeRedirectWithDelay(redirectPath, delayInput) {
22963
23092
  const delayMs = normalizeDelayMs(delayInput);
22964
23093
  setTimeout(() => {
@@ -22966,6 +23095,17 @@ const _sfc_main$d = {
22966
23095
  handleRedirect$1(redirectPath);
22967
23096
  }, delayMs);
22968
23097
  },
23098
+ // ===== 注册成功后的统一后处理 =====
23099
+ // 根据接口返回的 res.data 分三种情况处理:
23100
+ // 1. improveComp 存在(第三方登录注册后需要完善公司信息)
23101
+ // → 不入库 tgc,不做跳转,直接 emit need-complete 事件,
23102
+ // 由父组件切换到 CompleteInfoForm 完善信息
23103
+ // 2. redirect 为 true(注册成功直接登录)
23104
+ // → 写入 tgc 凭证到 Cookie(30 天有效期)
23105
+ // → emit register-success,携带流控对象(redirect/preventDefault 方法)
23106
+ // 如果父组件没有调用 redirect 或 preventDefault,则内部自动跳转到 redirectPath
23107
+ // 3. redirect 为 false(注册提交成功但需要审核)
23108
+ // → 提示"注册成功,请等待审核",不做跳转,关闭弹窗或保持当前状态
22969
23109
  handlePostRegister(res) {
22970
23110
  const sessionStorageItems = this.getAuthSessionItems();
22971
23111
  console.log("🍉 ~ RegisterForm.vue:749 ~ res.data:", res.data);
@@ -23471,7 +23611,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
23471
23611
  }, 8, ["model", "rules"])
23472
23612
  ]);
23473
23613
  }
23474
- const RegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3], ["__scopeId", "data-v-f13d1db1"]]);
23614
+ const RegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3], ["__scopeId", "data-v-4ae4e4b8"]]);
23475
23615
  const _imports_0$3 = "data:image/webp;base64,UklGRs4CAABXRUJQVlA4WAoAAAAQAAAAJwAAJwAAQUxQSFoBAAABN6KgbRtmp+3Gn/RDEBEEkzTVdowBQKcP3554FoBl23ba5llJyswNJ2VumGWofOY/p8qSit8R/Z8A+a8elYOpw8ta7XyzQK0aYSpXkxxr+l5TIvLMOMTaaw75atjrjVMg6apzYNuvnZH3q2Wxbl7NYR4Ddz6qB+/b4lxd8llHbmrIR018WxYu3QboXfHdMLae0xXZtvhGY+x52WHLcCHeNxRfOfR5Fu/tpdZaJ1mWZeOiA0zFL+w9j/I9NSffY5NUvmeVwTfp8PxNbrn9HRbs2zo8fU3Muq3K6EtK5JFtkzT6ilPmUrji+CvueSh64OULVMJJ0TamEq7JXBx7vAZTCVWXbcNlqBdm4nxFthPmGrPrJj2SvRBXUBdPNcTUvdQTXIu3eoP+gVt1hWlKyLaBQaNs275awvJIwlYeDaBH/f40BXQnkuCVq7HBmr5VI/naaP+iWj1bl98fVlA4IE4BAAAQBwCdASooACgAPi0ShkKhoQ42SgAMAWJZWxKQyHAkNc+PADbI89n6J94A3jAJQK0xA6Tk60mYtNspcySSE/tFIADM///yqf//Kgv//ywQt7g1bu7h+xw3tKfdFW3YSP2h0iF6VIn4CTXLv//vM//94Jv//ee+S0E0m6xnEgxdBDf7ewX/lL4BgZWe2EfgOrK0pMN4Qy5uWqWBS4KWWUfrCz0nMK/H/I4/+XhdD+65pGbyiKvih/6tn//ciDb/uimjajMDV4Q/Xe6/5j9xYKcn08xURQpu0wODf/+3SuKUFZLR0yHKFUmWQGuB/RhP/o3UFQW2JYdAdLNwvjre+S6H5X//i0Kc3jhiy9mLmUsuJ+4/5++fwdGZUbaTBUfk9QB9rjsVLVNwQW2lzccI98O08eePpfHRQKN1FzjT/cMehMc50hgx//o3l7EokAAA";
23476
23616
  const _imports_1$2 = "data:image/webp;base64,UklGRhACAABXRUJQVlA4WAoAAAAQAAAAGAAAFwAAQUxQSOcAAAABgINt27HlzZxs1+i945+yudmaXJMm27btmmzbtm094f2+L88RMQHoH0ivGDZ+dTufRGOhwhmw/QIfT5NlyDEEHdz1zdzA5sDmTZ4EKeWJp2may+JdpEray5o7HRnnPYCzy2e43uvNSQvW5CfhcwDY1eKWK4CX3WgRAt0NzG7T6At8vGkUw3FXXX8YGLkf9c+8rLBeOI2gxyD51juA6+5ZuFjaej6YvL3vEsEhxb5nuOicA8KHHlECg1QHMzfnukeCszhGAgY6hBCT+RTuvkMWUWQz7XsGgPs2OUSdS9Uv2N0tWOIT/l4AVlA4IAIBAACwBwCdASoZABgAPjESh0KiIQ39VgAQAYJbACdM5JkB+meFg2gDaAN0l4AD9QPSA/wHuJ/sl6KYX31WXITTIqQjhEf+VVEAAP0cZ9TkuKczs9Y1za4WaelqmDJ+pg5xRI8RGqa0Xf/vA/xc/Jt7352wODrO+GBNH/+k0H/0IZkEP/+9kflw8xfZOvuJnYDve0V1+ez//9tEgIWxjEjRen4x7s8w+Gha3PQxumTkBwxFTp+YlQXvZzWdZW3wRP0nsu895denVK5N8FE8Zg23a9118GTARL99uq+SY4/E8PeGs/GKL4ufe2EdSmq0ixJ9pxRZOAX/4XkoyRtaDa35BrgAAAA=";
23477
23617
  const _hoisted_1$c = { class: "login-wx" };
@@ -23718,7 +23858,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
23718
23858
  };
23719
23859
  }
23720
23860
  });
23721
- const WechatLogin = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-bb227280"]]);
23861
+ const WechatLogin = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-84a63da0"]]);
23722
23862
  const _sfc_main$b = {
23723
23863
  name: "LoginTypeSwitcher",
23724
23864
  components: {
@@ -23827,7 +23967,7 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
23827
23967
  _: 1
23828
23968
  }, 8, ["model-value", "onChange"]);
23829
23969
  }
23830
- const LoginTypeSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$2], ["__scopeId", "data-v-1dd50882"]]);
23970
+ const LoginTypeSwitcher = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["render", _sfc_render$2], ["__scopeId", "data-v-ed6d6ee4"]]);
23831
23971
  const _imports_0$2 = "data:image/webp;base64,UklGRhgCAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSKIAAAABgFZbb9xIEATBUAyhEAqhDBIGNgOXQaEIgiAYwtfZtM3+LyImgP4d+1BAVqvCAx8OLsECo3CFAfMo0ODsecsz88SjeXD/vNQjedOzPgDCuqfl0bRNKsBiEa5APD+aTCWI2l0AnZ3ehTnKW+9dgIp/Kf146Aa2PM5egI8Ns66WwwOBq70JvmyE6jVsIPwIOpB4xuyMXU5jbhlnDF0lSm/03whWUDggUAEAAPALAJ0BKjAAMAA+LRKGQqGhDjduAAwBYlsAMgdwP4BoK/wA4aTvN+x2I4/APyq/oHuA/gHOJ7gD9XfMA6QDrYP0z9gD9APRQ/ZD4FP219gD9UARvMpbMuVN2542MibJh8RTb2jFdmX4AP7/8PzX//KRnpdaTTuezU2wfPVue6zvilNiLydYqgogCDf+z+cTn0sw++BUMUAXW/ykOXcyNB2xLlv/9baGU9jTlskvg+1Mv/puM3RR2VkkR8nzfym/nfxZ64t/3bWsauPme9EKHGYBBZv8u8jT/DUfv3hKs//3THxis4v6eWcTTUpo9W6e2PurHwS2B16ei/If+Ww23FLqmd3jWPwTwBTDBEJ3HBZfQftnPWpA9rY4f//0skE1+0YwOJB/my/FIk/GCZloGHd/7iN//8vNjd/zOhSoSRNP6Xtp1K0Qc6nr99ilYAAAAA==";
23832
23972
  const _imports_1$1 = "data:image/webp;base64,UklGRiQBAABXRUJQVlA4WAoAAAAQAAAALwAALwAAQUxQSL8AAAABcFXbVtygAAdPSGKgDqIgMVAMgAIcxEdRAApQcJ0E3tD5LyLYuG0jSXKOaqvMPsL9Ha6xASWTFT5hMHmbKphYTJIwNRlAYFz0ZMB4PDiqHrB+XhpHMT4TIOtZOJhbp0OUOCcy1XDo75yrSk6UONkFJb71XIAWhxs/aFYm7qhkV5PvDmWYa1lGV2s4Wwd6OcM6RlE+dOaZZrpEXD5BoOr3d+sQWTfFkxAbhATAOF1DN6cKD1TD3cncipS2uz9DBwBWUDggPgAAAFADAJ0BKjAAMAA+JQ6FQqGHjAYAkS0gABSWHJn8435xRpEAAP7//k4XP//7dtNf5ihlI///6OQD//9v7AAA";
23833
23973
  const _hoisted_1$a = { class: "wechat-choose-type" };
@@ -23895,7 +24035,7 @@ const _sfc_main$a = /* @__PURE__ */ defineComponent({
23895
24035
  };
23896
24036
  }
23897
24037
  });
23898
- const WechatChooseType = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-09068331"]]);
24038
+ const WechatChooseType = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__scopeId", "data-v-f485c6be"]]);
23899
24039
  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";
23900
24040
  const _imports_2 = "data:image/webp;base64,UklGRtgAAABXRUJQVlA4WAoAAAAQAAAAHwAAHwAAQUxQSG8AAAABcFXbVq2cCEQ4EYxABBtIhNvg0kAaEMEIJwoRiLB86/b5GxETYP9n6T1rGiyaBULjMJPEAvaaDOwkdgBWSRrAKH4rxsOTq3NzbfD0/Cr+eACzZk/XHl+Bluz5DlRTBnRTOuCSAmHSBlU0xlbzdwIAVlA4IEIAAABwAwCdASogACAAPjESjEYiENDKACADBLSAACWH58lev5ur/aAA/iw///2p6j//i/2//+H8FPIH///0cbN//9v7AAA=";
23901
24041
  function useAuthLogin(options = {}) {
@@ -24210,7 +24350,6 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24210
24350
  const emits = __emit;
24211
24351
  const {
24212
24352
  loading: loadingBtn,
24213
- // 将 Hook 的 loading 重命名为 loadingBtn
24214
24353
  handleBindSubmit
24215
24354
  } = useAuthLogin({
24216
24355
  appId: "ERA",
@@ -24596,7 +24735,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
24596
24735
  };
24597
24736
  }
24598
24737
  });
24599
- const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-65dd1b92"]]);
24738
+ const WechatBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__scopeId", "data-v-a39fbac2"]]);
24600
24739
  const _sfc_main$8 = {
24601
24740
  name: "CompleteInfoForm",
24602
24741
  components: {
@@ -24726,29 +24865,44 @@ const _sfc_main$8 = {
24726
24865
  };
24727
24866
  },
24728
24867
  computed: {
24868
+ // 当前城市所属国家 ID
24729
24869
  countryId() {
24730
24870
  var _a, _b, _c, _d;
24731
24871
  return ((_c = (_b = (_a = this.form.city) == null ? void 0 : _a.raw) == null ? void 0 : _b.country) == null ? void 0 : _c.id) || ((_d = this.resistCompanyInfo) == null ? void 0 : _d.countryId);
24732
24872
  },
24873
+ // 当前城市 ID
24733
24874
  cityId() {
24734
24875
  var _a;
24735
24876
  return (_a = this.form.city) == null ? void 0 : _a.id;
24736
24877
  },
24878
+ // 当前国家是否为中国
24737
24879
  currentCountryIsChina() {
24738
24880
  const id = this.countryId;
24739
24881
  return [1].includes(Number(id));
24740
24882
  },
24883
+ // 公司名称输入框标签文字
24741
24884
  currentCompanyLabel() {
24742
24885
  return this.isEn ? this.currentCountryIsChina ? "Company Name in Chinese" : "Company Name in English" : this.currentCountryIsChina ? "公司中文名称" : "公司英文名称";
24743
24886
  },
24887
+ /**
24888
+ * 是否显示手机验证码区域
24889
+ * 条件:渲染就绪 && 中国区 && 当前用户未绑定手机号
24890
+ * 已绑定手机号的用户无需再次验证
24891
+ */
24744
24892
  isShowMobileCode() {
24745
24893
  if (!this.isReady) return false;
24746
24894
  return this.currentCountryIsChina && !this.currentUserMobile;
24747
24895
  },
24896
+ /**
24897
+ * 是否显示邮箱验证码区域
24898
+ * 条件:渲染就绪 && 当前用户未绑定邮箱
24899
+ * 已绑定邮箱的用户无需再次验证
24900
+ */
24748
24901
  isShowEmailCode() {
24749
24902
  if (!this.isReady) return false;
24750
24903
  return !this.currentUserEmail;
24751
24904
  },
24905
+ // 验证码输入组件标签
24752
24906
  codeInputLabel() {
24753
24907
  return buildCodeInputLabel({
24754
24908
  isChina: this.currentCountryIsChina,
@@ -24840,6 +24994,13 @@ const _sfc_main$8 = {
24840
24994
  }
24841
24995
  });
24842
24996
  },
24997
+ /**
24998
+ * 发送验证码
24999
+ * @param captchaData - 滑块验证返回的 { uuid, code }
25000
+ * @param type - 'mobile' 发送手机验证码 | 'email' 发送邮箱验证码
25001
+ * 根据 type 参数选择不同的 API,成功后设置对应的 codeSent/Uid 状态,
25002
+ * 接口成功后才调用 startTimer 启动倒计时
25003
+ */
24843
25004
  handleGetCode({ captchaData, startTimer }, type = "mobile") {
24844
25005
  var _a;
24845
25006
  this.verifyData = captchaData;
@@ -24894,7 +25055,11 @@ const _sfc_main$8 = {
24894
25055
  }
24895
25056
  });
24896
25057
  },
24897
- // 逻辑 A:新设公司提交 (原有逻辑)
25058
+ /**
25059
+ * 逻辑 A:新设公司提交
25060
+ * 组装城市、公司名、行业、手机/邮箱验证码数据,
25061
+ * 调用 completeCompRedirectApi 完成完善信息
25062
+ */
24898
25063
  handleNewSubmit() {
24899
25064
  var _a;
24900
25065
  this.loading = true;
@@ -24933,7 +25098,11 @@ const _sfc_main$8 = {
24933
25098
  this.loading = false;
24934
25099
  });
24935
25100
  },
24936
- // 逻辑 B:申请加入公司提交 (参考 RegisterForm 逻辑)
25101
+ /**
25102
+ * 逻辑 B:申请加入已有公司提交
25103
+ * 传入已有公司 compId + 用户姓名 + 验证码,调用 completeJoinCompanyRedirectApi
25104
+ * 成功后写入 tgc Cookie 并执行页面重定向
25105
+ */
24937
25106
  handleJoinSubmit() {
24938
25107
  var _a;
24939
25108
  this.loading = true;
@@ -25305,7 +25474,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
25305
25474
  }, 8, ["model", "rules"])
25306
25475
  ]);
25307
25476
  }
25308
- const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-27828578"]]);
25477
+ const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-8d245598"]]);
25309
25478
  const _hoisted_1$7 = { class: "auth-footer-box" };
25310
25479
  const _sfc_main$7 = /* @__PURE__ */ defineComponent({
25311
25480
  __name: "FooterBox",
@@ -25354,7 +25523,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
25354
25523
  };
25355
25524
  }
25356
25525
  });
25357
- const FooterBox = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-de818a5b"]]);
25526
+ const FooterBox = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__scopeId", "data-v-00dec381"]]);
25358
25527
  const _hoisted_1$6 = { class: "forget-password-wrapper" };
25359
25528
  const _hoisted_2$5 = { class: "forgot-pwd-container" };
25360
25529
  const _hoisted_3$5 = { class: "header-title" };
@@ -25728,7 +25897,7 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
25728
25897
  };
25729
25898
  }
25730
25899
  });
25731
- const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-080cea7a"]]);
25900
+ const ForgetPassword = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__scopeId", "data-v-9dd4814c"]]);
25732
25901
  const _hoisted_1$5 = { class: "auth-bottom-tip" };
25733
25902
  const _sfc_main$5 = /* @__PURE__ */ defineComponent({
25734
25903
  __name: "AuthBottomTip",
@@ -25776,7 +25945,7 @@ const _sfc_main$5 = /* @__PURE__ */ defineComponent({
25776
25945
  };
25777
25946
  }
25778
25947
  });
25779
- const AuthBottomTip = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-db3be545"]]);
25948
+ const AuthBottomTip = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__scopeId", "data-v-b4421e4f"]]);
25780
25949
  const _imports_0 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1767855712095'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9362'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20fill='currentcolor'%20d='M113.242353%20250.217412l356.352%20356.412235a60.235294%2060.235294%200%200%200%2080.655059%204.156235l4.577882-4.156235%20356.111059-356.171294c1.204706%204.397176%201.987765%208.914824%202.409412%2013.552941l0.240941%206.987294v481.882353c0%2042.345412-32.768%2077.101176-74.270118%2080.112941l-6.023529%200.240942H190.765176a80.293647%2080.293647%200%200%201-80.112941-74.330353l-0.180706-6.02353v-481.882353c0-4.818824%200.421647-9.456941%201.204706-14.034823l1.505883-6.746353z%20m720.052706-59.512471c4.818824%200%209.637647%200.421647%2014.215529%201.204706l6.866824%201.566118-342.136471%20342.13647-342.256941-342.13647c4.397176-1.204706%209.035294-2.048%2013.673412-2.409412l7.107764-0.361412h642.529883z'%20p-id='9363'%3e%3c/path%3e%3c/svg%3e";
25781
25950
  const _imports_1 = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1767855760413'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='9516'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M694.874353%20918.949647c-57.825882-2.108235-221.726118-24.696471-393.336471-196.367059-171.610353-171.550118-194.258824-335.450353-196.367058-393.33647-3.252706-88.124235%2064.271059-173.778824%20142.336-207.209412a59.030588%2059.030588%200%200%201%2058.006588%206.324706c64.210824%2046.863059%20108.604235%20117.639529%20146.672941%20173.357176%2017.227294%2025.178353%2013.071059%2059.512471-10.24%2079.75153L363.52%20439.717647a19.275294%2019.275294%200%200%200-5.722353%2024.696471c17.709176%2032.346353%2049.332706%2080.353882%2085.473882%20116.495058%2036.141176%2036.141176%2086.437647%2069.752471%20120.952471%2089.509648a19.395765%2019.395765%200%200%200%2025.840941-6.445177l50.959059-77.703529c19.516235-25.961412%2056.018824-31.623529%2082.582588-13.251765%2056.500706%2039.092706%20122.458353%2082.642824%20170.706824%20144.444235a59.030588%2059.030588%200%200%201%207.589647%2059.632941c-33.611294%2078.426353-118.663529%20145.167059-207.088941%20141.914353z'%20p-id='9517'%3e%3c/path%3e%3c/svg%3e";
25782
25951
  const _hoisted_1$4 = { class: "bind-container" };
@@ -26274,7 +26443,7 @@ const _sfc_main$4 = /* @__PURE__ */ defineComponent({
26274
26443
  };
26275
26444
  }
26276
26445
  });
26277
- const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-bd30117f"]]);
26446
+ const ThirdBindLogin = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__scopeId", "data-v-e8b08f1c"]]);
26278
26447
  const _sfc_main$3 = {
26279
26448
  name: "ThirdRegisterForm",
26280
26449
  components: {
@@ -26305,34 +26474,43 @@ const _sfc_main$3 = {
26305
26474
  "register-step-change"
26306
26475
  ],
26307
26476
  computed: {
26477
+ // 是否同意用户协议
26308
26478
  isAgree() {
26309
26479
  return this.form.agree;
26310
26480
  },
26481
+ // 当前选择的城市所属国家 ID
26311
26482
  countryId() {
26312
26483
  var _a, _b, _c;
26313
26484
  return (_c = (_b = (_a = this.form.city) == null ? void 0 : _a.raw) == null ? void 0 : _b.country) == null ? void 0 : _c.id;
26314
26485
  },
26486
+ // 当前选择的城市 ID
26315
26487
  cityId() {
26316
26488
  var _a;
26317
26489
  return (_a = this.form.city) == null ? void 0 : _a.id;
26318
26490
  },
26491
+ // 当前国家是否为中国(countryId=1 为中国),影响表单字段与验证码发送方式
26319
26492
  currentCountryIsChina() {
26320
26493
  var _a;
26321
26494
  const id = this.countryId || ((_a = this.resistCompanyInfo) == null ? void 0 : _a.countryId);
26322
26495
  return [1].includes(Number(id));
26323
26496
  },
26497
+ // 公司名称输入框的 placeholder 文字,根据语言和地区动态切换
26324
26498
  currentCompanyLabel() {
26325
26499
  return this.isEn ? this.currentCountryIsChina ? "Company Name in Chinese" : "Company Name in English" : this.currentCountryIsChina ? "公司中文名称" : "公司英文名称";
26326
26500
  },
26501
+ // 是否选择了"货主(Trader)"行业类型,货主不需要填写公司名称
26327
26502
  isTraderSector() {
26328
26503
  return this.form.sector === "Trade";
26329
26504
  },
26505
+ // 是否显示邮箱绑定按钮(海外区 && 有第三方邮箱验证列表)
26330
26506
  showEmailBindBtn() {
26331
26507
  return !this.currentCountryIsChina && this.thirdPartyEmailVerifyList.length > 0;
26332
26508
  },
26509
+ // 是否显示手机号绑定按钮(中国区 && 有第三方手机验证列表)
26333
26510
  showMobileBindBtn() {
26334
26511
  return this.currentCountryIsChina && this.thirdPartyMobileVerifyList.length > 0;
26335
26512
  },
26513
+ // 验证码输入组件的标签文字,根据地区自动拼接手机号/邮箱
26336
26514
  codeInputLabel() {
26337
26515
  return buildCodeInputLabel({
26338
26516
  isChina: this.currentCountryIsChina,
@@ -26504,6 +26682,10 @@ const _sfc_main$3 = {
26504
26682
  type === "email" ? this.thirdPartyEmailVerifyList : this.thirdPartyMobileVerifyList
26505
26683
  );
26506
26684
  },
26685
+ /**
26686
+ * Step 1 → Step 2:校验城市 + 联系方式(手机/邮箱)后进入第 2 步
26687
+ * 同时快照当前联系方式,用于返回 Step 1 时的变更检测
26688
+ */
26507
26689
  handleNextStep() {
26508
26690
  const step1Fields = this.currentCountryIsChina ? ["city", "phone"] : ["city", "email"];
26509
26691
  this.$refs.registerFormRef.validateField(step1Fields, (isValid) => {
@@ -26515,6 +26697,11 @@ const _sfc_main$3 = {
26515
26697
  });
26516
26698
  });
26517
26699
  },
26700
+ /**
26701
+ * Step 2 → Step 1:返回到第 1 步
26702
+ * - 如果处于"已加入公司"状态,则回到公司名输入界面(取消加入)
26703
+ * - 如果联系方式有变更,重置验证码相关状态
26704
+ */
26518
26705
  handleBackToStep1() {
26519
26706
  if (this.hasResistCompany) {
26520
26707
  this.handleCancelJoin();
@@ -26674,6 +26861,13 @@ const _sfc_main$3 = {
26674
26861
  }
26675
26862
  });
26676
26863
  },
26864
+ /**
26865
+ * 发送验证码
26866
+ * - 滑块验证成功后的回调,接收 captchaData(含 uuid + code)
26867
+ * - 根据 currentCountryIsChina 选择 sendMobileCodeApi 或 sendEmailCodeApi
26868
+ * - 成功后保存 verifyCode UUID(mobileUid/emailUid),用于注册时提交
26869
+ * - 接口成功后才调用 startTimer() 启动倒计时,避免失败时按钮被锁
26870
+ */
26677
26871
  handleGetCode({ captchaData, startTimer }) {
26678
26872
  this.verifyData = captchaData;
26679
26873
  const params = {
@@ -26707,6 +26901,12 @@ const _sfc_main$3 = {
26707
26901
  console.error(err);
26708
26902
  });
26709
26903
  },
26904
+ /**
26905
+ * 注册提交入口
26906
+ * 1. 表单整体校验
26907
+ * 2. 组装提交数据(区分手机号/邮箱、拼接第三方登录信息)
26908
+ * 3. 业务分流:hasResistCompany ? 申请加入公司 : 新设公司注册
26909
+ */
26710
26910
  handleRegister() {
26711
26911
  this.$refs.registerFormRef.validate((valid) => {
26712
26912
  var _a;
@@ -26841,6 +27041,14 @@ const _sfc_main$3 = {
26841
27041
  handleRedirect$1(redirectPath);
26842
27042
  }, delayMs);
26843
27043
  },
27044
+ /**
27045
+ * 注册成功后的处理流程
27046
+ * 1. 写入登录凭证(tgc Cookie + token)
27047
+ * 2. improveComp 检查:如果后端返回 improveComp 标记,说明需要完善公司信息,
27048
+ * 则 emit need-complete 事件并 return,不执行重定向
27049
+ * 3. 正常流程:emit register-success 事件(包含 redirect/preventDefault 流控能力),
27050
+ * 如果父组件未处理则自动执行重定向
27051
+ */
26844
27052
  handlePostRegister(res) {
26845
27053
  const sessionStorageItems = this.getAuthSessionItems();
26846
27054
  if (res.data.code === 0) {
@@ -27333,7 +27541,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
27333
27541
  }, 8, ["model", "rules"])
27334
27542
  ]);
27335
27543
  }
27336
- const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-8dbec28d"]]);
27544
+ const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-fda6eabc"]]);
27337
27545
  function useLoginForm(options) {
27338
27546
  const { isEn, loginType } = options;
27339
27547
  const loginFormRef = ref();
@@ -28320,7 +28528,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
28320
28528
  };
28321
28529
  }
28322
28530
  });
28323
- const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-a9dd56d0"]]);
28531
+ const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-80de1603"]]);
28324
28532
  const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
28325
28533
  __proto__: null,
28326
28534
  default: index$2
@@ -29419,7 +29627,9 @@ const {
29419
29627
  AirLineSearch,
29420
29628
  SeaLineSearch,
29421
29629
  LineCascader,
29422
- JcImg
29630
+ JcImg,
29631
+ ForgotPasswordDialog,
29632
+ ChangePasswordDialog
29423
29633
  } = components;
29424
29634
  let installed = false;
29425
29635
  const index = {
@@ -29442,8 +29652,10 @@ export {
29442
29652
  AirCarrierSearch,
29443
29653
  AirLineSearch,
29444
29654
  ApplyDataDialog,
29655
+ ChangePasswordDialog,
29445
29656
  ChineseCompanySearch,
29446
29657
  CodeInput,
29658
+ ForgotPasswordDialog,
29447
29659
  GlobalModal,
29448
29660
  GoogleInput,
29449
29661
  JcCarrierSearch,