@jctrans-materials/comps-vue3 1.0.42-beta.4 → 1.0.42-beta.6
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/components/JcLoginDialog/composables/useLoginForm.d.ts +1 -0
- package/dist/components/JcLoginDialog/gioTrack.d.ts +31 -0
- package/dist/components/JcLoginDialog/index.d.ts +5 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.css +1 -1
- package/dist/index.esm.js +247 -58
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1809,7 +1809,7 @@ const _hoisted_23$2 = {
|
|
|
1809
1809
|
key: 0,
|
|
1810
1810
|
class: "no-result-label"
|
|
1811
1811
|
};
|
|
1812
|
-
const _hoisted_24$
|
|
1812
|
+
const _hoisted_24$1 = {
|
|
1813
1813
|
key: 1,
|
|
1814
1814
|
class: "no-result-label"
|
|
1815
1815
|
};
|
|
@@ -2293,7 +2293,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
2293
2293
|
unref(isFetchingMore) ? (openBlock(), createElementBlock("div", _hoisted_21$4, toDisplayString(isEn.value ? "Loading more..." : "正在加载更多..."), 1)) : createCommentVNode("", true)
|
|
2294
2294
|
], 64)) : query.value && !unref(loading) ? (openBlock(), createElementBlock("div", _hoisted_22$3, [
|
|
2295
2295
|
renderSlot(_ctx.$slots, "noData", {}, () => [
|
|
2296
|
-
!__props.showApplyData ? (openBlock(), createElementBlock("p", _hoisted_23$2, toDisplayString(isEn.value ? `No results found related to "${query.value}".` : `未找到与 "${query.value}" 相关的结果`), 1)) : (openBlock(), createElementBlock("div", _hoisted_24$
|
|
2296
|
+
!__props.showApplyData ? (openBlock(), createElementBlock("p", _hoisted_23$2, toDisplayString(isEn.value ? `No results found related to "${query.value}".` : `未找到与 "${query.value}" 相关的结果`), 1)) : (openBlock(), createElementBlock("div", _hoisted_24$1, [
|
|
2297
2297
|
createTextVNode(toDisplayString(isEn.value ? `No results found. ` : `暂无结果,`) + " ", 1),
|
|
2298
2298
|
createElementVNode("div", _hoisted_25$1, [
|
|
2299
2299
|
createElementVNode("span", {
|
|
@@ -22418,7 +22418,11 @@ const _sfc_main$d = {
|
|
|
22418
22418
|
"need-complete",
|
|
22419
22419
|
"register-success",
|
|
22420
22420
|
"third-party-click",
|
|
22421
|
-
"register-step-change"
|
|
22421
|
+
"register-step-change",
|
|
22422
|
+
// GIO 埋点:下一步点击 / 验证码发送 / 验证码失效(上抛父组件集中 track)
|
|
22423
|
+
"register-next-step",
|
|
22424
|
+
"verify-code-sent",
|
|
22425
|
+
"verify-code-expired"
|
|
22422
22426
|
],
|
|
22423
22427
|
// =========================================================================
|
|
22424
22428
|
// Computed - 派生状态,根据表单数据和选中城市动态计算
|
|
@@ -22491,6 +22495,8 @@ const _sfc_main$d = {
|
|
|
22491
22495
|
companyResistCn: false,
|
|
22492
22496
|
// 滑块验证通过后保存的验证数据(uuid + code),用于获取验证码和提交注册
|
|
22493
22497
|
verifyData: {},
|
|
22498
|
+
// 动态表单项强制重新渲染的 key,切换国家/登录方式时递增
|
|
22499
|
+
formKey: 0,
|
|
22494
22500
|
// 注册分步状态:1(城市+联系方式) 或 2(验证码+行业+公司+协议)
|
|
22495
22501
|
registerStep: 1,
|
|
22496
22502
|
// Step 1 进入 Step 2 时快照当前联系方式,返回 Step 1 时用于判断是否需重置验证码
|
|
@@ -22754,6 +22760,7 @@ const _sfc_main$d = {
|
|
|
22754
22760
|
// 1. 根据国家判断校验城市+手机(中国)还是城市+邮箱(海外)
|
|
22755
22761
|
// 2. 校验通过后,快照当前联系方式用于后续"返回"时的智能判断
|
|
22756
22762
|
// 3. 切换到 Step 2,清除所有校验错误提示
|
|
22763
|
+
// 4. 触发 GIO 埋点「下一步点击」
|
|
22757
22764
|
handleNextStep() {
|
|
22758
22765
|
const step1Fields = this.currentCountryIsChina ? ["city", "phone"] : ["city", "email"];
|
|
22759
22766
|
this.$refs.registerFormRef.validateField(step1Fields, (isValid) => {
|
|
@@ -22763,6 +22770,7 @@ const _sfc_main$d = {
|
|
|
22763
22770
|
this.$nextTick(() => {
|
|
22764
22771
|
this.$refs.registerFormRef.clearValidate();
|
|
22765
22772
|
});
|
|
22773
|
+
this.$emit("register-next-step", "normal");
|
|
22766
22774
|
});
|
|
22767
22775
|
},
|
|
22768
22776
|
// ===== [Step 2 → Step 1] 智能返回:已加入公司→取消加入;联系方式变化→重置验证码 =====
|
|
@@ -22872,6 +22880,7 @@ const _sfc_main$d = {
|
|
|
22872
22880
|
this.form.nameEn = "";
|
|
22873
22881
|
this.form.firstName = "";
|
|
22874
22882
|
this.form.lastName = "";
|
|
22883
|
+
this.formKey++;
|
|
22875
22884
|
}
|
|
22876
22885
|
this.$nextTick(() => {
|
|
22877
22886
|
if (this.form.companyName) {
|
|
@@ -22925,6 +22934,7 @@ const _sfc_main$d = {
|
|
|
22925
22934
|
}
|
|
22926
22935
|
startTimer();
|
|
22927
22936
|
ElMessage.success(msg);
|
|
22937
|
+
this.$emit("verify-code-sent");
|
|
22928
22938
|
} else {
|
|
22929
22939
|
ElMessage.error(res.data.msg);
|
|
22930
22940
|
}
|
|
@@ -23144,6 +23154,7 @@ const _sfc_main$d = {
|
|
|
23144
23154
|
const preventDefault = () => {
|
|
23145
23155
|
flowControl.isHandled = true;
|
|
23146
23156
|
};
|
|
23157
|
+
this.$emit("verify-code-expired", false);
|
|
23147
23158
|
this.$emit("register-success", {
|
|
23148
23159
|
user: res.data.data.result,
|
|
23149
23160
|
redirectPath,
|
|
@@ -23163,11 +23174,33 @@ const _sfc_main$d = {
|
|
|
23163
23174
|
ElMessage.success(
|
|
23164
23175
|
this.isEn ? "Registration successful, pending review" : "注册成功,请等待审核"
|
|
23165
23176
|
);
|
|
23177
|
+
this.$emit("verify-code-expired", false);
|
|
23166
23178
|
}
|
|
23167
23179
|
} else {
|
|
23168
23180
|
this.loading = false;
|
|
23169
23181
|
ElMessage.error(res.data.msg);
|
|
23182
|
+
const subCode = String(res.data.subCode || "");
|
|
23183
|
+
const msg = String(res.data.msg || "");
|
|
23184
|
+
if (/CODE|VERIFY/i.test(subCode) || /验证码|verification code/i.test(msg)) {
|
|
23185
|
+
this.$emit("verify-code-expired", true);
|
|
23186
|
+
}
|
|
23170
23187
|
}
|
|
23188
|
+
},
|
|
23189
|
+
// ===== GIO 埋点:供父组件在关闭时读取的表单字段快照 =====
|
|
23190
|
+
// 敏感字段(手机/邮箱/验证码)仅上报是否已填写;对象字段扁平化取关键值
|
|
23191
|
+
getGioFormSnapshot() {
|
|
23192
|
+
return {
|
|
23193
|
+
hasPhone: !!this.form.phone,
|
|
23194
|
+
hasEmail: !!this.form.email,
|
|
23195
|
+
hasCode: !!this.form.code,
|
|
23196
|
+
hasName: !!(this.form.nameCn || this.form.nameEn || this.form.firstName || this.form.lastName),
|
|
23197
|
+
cityId: this.form.cityId || this.cityId || "",
|
|
23198
|
+
companyName: this.form.companyName || "",
|
|
23199
|
+
sector: this.form.sector || "",
|
|
23200
|
+
agree: !!this.form.agree,
|
|
23201
|
+
useKq: !!this.form.useKq,
|
|
23202
|
+
isJoinCompany: !!this.hasResistCompany
|
|
23203
|
+
};
|
|
23171
23204
|
}
|
|
23172
23205
|
}
|
|
23173
23206
|
};
|
|
@@ -23199,11 +23232,7 @@ const _hoisted_19$2 = { class: "card-header" };
|
|
|
23199
23232
|
const _hoisted_20$1 = { class: "title-group" };
|
|
23200
23233
|
const _hoisted_21$1 = { class: "tip-text" };
|
|
23201
23234
|
const _hoisted_22$1 = { class: "location-info" };
|
|
23202
|
-
const _hoisted_23$1 = {
|
|
23203
|
-
key: 1,
|
|
23204
|
-
class: "name-row"
|
|
23205
|
-
};
|
|
23206
|
-
const _hoisted_24$1 = { class: "agree-text" };
|
|
23235
|
+
const _hoisted_23$1 = { class: "agree-text" };
|
|
23207
23236
|
function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
23208
23237
|
const _component_JcSearch = resolveComponent("JcSearch");
|
|
23209
23238
|
const _component_JcFloatWrapper = resolveComponent("JcFloatWrapper");
|
|
@@ -23273,14 +23302,14 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23273
23302
|
_: 1
|
|
23274
23303
|
}),
|
|
23275
23304
|
$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
23276
|
-
|
|
23277
|
-
|
|
23305
|
+
class: "phone-form-item",
|
|
23306
|
+
key: "phone-wrap-" + $data.formKey
|
|
23278
23307
|
}, {
|
|
23279
23308
|
default: withCtx(() => [
|
|
23280
23309
|
(openBlock(), createBlock(_component_el_form_item, {
|
|
23281
23310
|
prop: "phone",
|
|
23282
23311
|
ref: "phone",
|
|
23283
|
-
key:
|
|
23312
|
+
key: "phone-" + $data.formKey,
|
|
23284
23313
|
class: "tel-mobile",
|
|
23285
23314
|
"inline-message": true
|
|
23286
23315
|
}, {
|
|
@@ -23341,9 +23370,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23341
23370
|
_: 1
|
|
23342
23371
|
})) : createCommentVNode("", true),
|
|
23343
23372
|
!$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
23344
|
-
key: 1,
|
|
23345
23373
|
prop: "email",
|
|
23346
|
-
class: "email-form-item"
|
|
23374
|
+
class: "email-form-item",
|
|
23375
|
+
key: "email-" + $data.formKey
|
|
23347
23376
|
}, {
|
|
23348
23377
|
default: withCtx(() => [
|
|
23349
23378
|
createVNode(_component_JcFloatInput, {
|
|
@@ -23503,9 +23532,9 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23503
23532
|
createElementVNode("div", _hoisted_22$1, toDisplayString($props.isEn ? $data.resistCompanyInfo.countryNameEn : $data.resistCompanyInfo.countryNameCn) + " / " + toDisplayString($props.isEn ? $data.resistCompanyInfo.cityNameEn : $data.resistCompanyInfo.cityNameCn), 1)
|
|
23504
23533
|
]),
|
|
23505
23534
|
$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
23506
|
-
key: 0,
|
|
23507
23535
|
prop: "nameCn",
|
|
23508
|
-
class: "name-input-item"
|
|
23536
|
+
class: "name-input-item",
|
|
23537
|
+
key: "nameCn-" + $data.formKey
|
|
23509
23538
|
}, {
|
|
23510
23539
|
default: withCtx(() => [
|
|
23511
23540
|
createVNode(_component_JcFloatInput, {
|
|
@@ -23521,7 +23550,10 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23521
23550
|
}, 8, ["modelValue", "label", "placeholder"])
|
|
23522
23551
|
]),
|
|
23523
23552
|
_: 1
|
|
23524
|
-
})) : (openBlock(), createElementBlock("div",
|
|
23553
|
+
})) : (openBlock(), createElementBlock("div", {
|
|
23554
|
+
class: "name-row",
|
|
23555
|
+
key: "nameEn-" + $data.formKey
|
|
23556
|
+
}, [
|
|
23525
23557
|
createVNode(_component_el_form_item, {
|
|
23526
23558
|
prop: "firstName",
|
|
23527
23559
|
class: "name-input-item name-part"
|
|
@@ -23572,7 +23604,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23572
23604
|
"onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => $data.form.agree = $event)
|
|
23573
23605
|
}, {
|
|
23574
23606
|
default: withCtx(() => [
|
|
23575
|
-
createElementVNode("span",
|
|
23607
|
+
createElementVNode("span", _hoisted_23$1, [
|
|
23576
23608
|
$props.isEn ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
23577
23609
|
_cache[37] || (_cache[37] = createTextVNode(" I agree ", -1)),
|
|
23578
23610
|
createElementVNode("span", {
|
|
@@ -23626,7 +23658,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
23626
23658
|
}, 8, ["model", "rules"])
|
|
23627
23659
|
]);
|
|
23628
23660
|
}
|
|
23629
|
-
const RegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3], ["__scopeId", "data-v-
|
|
23661
|
+
const RegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["render", _sfc_render$3], ["__scopeId", "data-v-5b66b40c"]]);
|
|
23630
23662
|
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";
|
|
23631
23663
|
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=";
|
|
23632
23664
|
const _hoisted_1$c = { class: "login-wx" };
|
|
@@ -24779,6 +24811,8 @@ const _sfc_main$8 = {
|
|
|
24779
24811
|
verifyData: {},
|
|
24780
24812
|
codeReady: false,
|
|
24781
24813
|
codeSent: false,
|
|
24814
|
+
// 动态表单项强制重新渲染的 key,切换国家时递增
|
|
24815
|
+
formKey: 0,
|
|
24782
24816
|
mobileCodeReady: false,
|
|
24783
24817
|
emailCodeReady: false,
|
|
24784
24818
|
mobileCodeSent: false,
|
|
@@ -24987,8 +25021,12 @@ const _sfc_main$8 = {
|
|
|
24987
25021
|
},
|
|
24988
25022
|
handleSelectCity(e) {
|
|
24989
25023
|
var _a, _b, _c, _d;
|
|
25024
|
+
const prevCountryId = this.form.countryId;
|
|
24990
25025
|
this.form.cityId = e.id;
|
|
24991
25026
|
this.form.countryId = ((_b = (_a = e.raw) == null ? void 0 : _a.country) == null ? void 0 : _b.id) || ((_d = (_c = e.raw) == null ? void 0 : _c.city) == null ? void 0 : _d.countryId) || "";
|
|
25027
|
+
if (prevCountryId && Number(prevCountryId) !== Number(this.form.countryId)) {
|
|
25028
|
+
this.formKey++;
|
|
25029
|
+
}
|
|
24992
25030
|
this.$nextTick(() => {
|
|
24993
25031
|
if (!this.hasResistCompany && this.form.companyName) {
|
|
24994
25032
|
this.$refs.formRef.validateField("companyName");
|
|
@@ -25212,7 +25250,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25212
25250
|
createElementVNode("div", _hoisted_2$6, [
|
|
25213
25251
|
createElementVNode("div", _hoisted_3$6, toDisplayString($props.isEn ? "Complete Your Information" : "完善企业信息"), 1),
|
|
25214
25252
|
createElementVNode("div", _hoisted_4$6, [
|
|
25215
|
-
_cache[
|
|
25253
|
+
_cache[18] || (_cache[18] = createElementVNode("img", {
|
|
25216
25254
|
src: "https://resources.jctrans.com/res/era/pc/img/icon_gantan.png",
|
|
25217
25255
|
alt: ""
|
|
25218
25256
|
}, null, -1)),
|
|
@@ -25245,7 +25283,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25245
25283
|
placeholder: $props.isEn ? "Location(City)" : "请输入公司所在城市",
|
|
25246
25284
|
onSelect: $options.handleSelectCity
|
|
25247
25285
|
}, {
|
|
25248
|
-
prefix: withCtx(() => [..._cache[
|
|
25286
|
+
prefix: withCtx(() => [..._cache[19] || (_cache[19] = [
|
|
25249
25287
|
createElementVNode("i", { class: "icon-auth-location" }, null, -1)
|
|
25250
25288
|
])]),
|
|
25251
25289
|
_: 1
|
|
@@ -25276,7 +25314,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25276
25314
|
"onUpdate:existStatus": $options.handleCompanyExistStatus,
|
|
25277
25315
|
onChange: $options.handleChangeCompany
|
|
25278
25316
|
}, {
|
|
25279
|
-
prefix: withCtx(() => [..._cache[
|
|
25317
|
+
prefix: withCtx(() => [..._cache[20] || (_cache[20] = [
|
|
25280
25318
|
createElementVNode("i", { class: "icon-auth-company" }, null, -1)
|
|
25281
25319
|
])]),
|
|
25282
25320
|
_: 1
|
|
@@ -25327,25 +25365,45 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25327
25365
|
]),
|
|
25328
25366
|
createElementVNode("div", _hoisted_19$1, toDisplayString($props.isEn ? $data.resistCompanyInfo.countryNameEn : $data.resistCompanyInfo.countryNameCn) + " / " + toDisplayString($props.isEn ? $data.resistCompanyInfo.cityNameEn : $data.resistCompanyInfo.cityNameCn), 1)
|
|
25329
25367
|
]),
|
|
25330
|
-
|
|
25331
|
-
prop:
|
|
25332
|
-
class: "name-input-item"
|
|
25368
|
+
$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
25369
|
+
prop: "nameCn",
|
|
25370
|
+
class: "name-input-item",
|
|
25371
|
+
key: "nameCn-" + $data.formKey
|
|
25333
25372
|
}, {
|
|
25334
25373
|
default: withCtx(() => [
|
|
25335
25374
|
createVNode(_component_JcFloatInput, {
|
|
25336
|
-
modelValue: $data.form
|
|
25337
|
-
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form
|
|
25338
|
-
label: $
|
|
25375
|
+
modelValue: $data.form.nameCn,
|
|
25376
|
+
"onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => $data.form.nameCn = $event),
|
|
25377
|
+
label: $props.isEn ? "Your Full Name in Chinese" : "您的中文名称",
|
|
25339
25378
|
placeholder: $props.isEn ? "Please enter your name to prove your identity" : "请输入您的姓名,以证明您的身份"
|
|
25340
25379
|
}, {
|
|
25341
|
-
prefix: withCtx(() => [..._cache[
|
|
25380
|
+
prefix: withCtx(() => [..._cache[21] || (_cache[21] = [
|
|
25342
25381
|
createElementVNode("i", { class: "icon-auth-user" }, null, -1)
|
|
25343
25382
|
])]),
|
|
25344
25383
|
_: 1
|
|
25345
25384
|
}, 8, ["modelValue", "label", "placeholder"])
|
|
25346
25385
|
]),
|
|
25347
25386
|
_: 1
|
|
25348
|
-
},
|
|
25387
|
+
})) : (openBlock(), createBlock(_component_el_form_item, {
|
|
25388
|
+
prop: "nameEn",
|
|
25389
|
+
class: "name-input-item",
|
|
25390
|
+
key: "nameEn-" + $data.formKey
|
|
25391
|
+
}, {
|
|
25392
|
+
default: withCtx(() => [
|
|
25393
|
+
createVNode(_component_JcFloatInput, {
|
|
25394
|
+
modelValue: $data.form.nameEn,
|
|
25395
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => $data.form.nameEn = $event),
|
|
25396
|
+
label: $props.isEn ? "Your Full Name in English" : "您的名称",
|
|
25397
|
+
placeholder: $props.isEn ? "Please enter your name to prove your identity" : "请输入您的姓名,以证明您的身份"
|
|
25398
|
+
}, {
|
|
25399
|
+
prefix: withCtx(() => [..._cache[22] || (_cache[22] = [
|
|
25400
|
+
createElementVNode("i", { class: "icon-auth-user" }, null, -1)
|
|
25401
|
+
])]),
|
|
25402
|
+
_: 1
|
|
25403
|
+
}, 8, ["modelValue", "label", "placeholder"])
|
|
25404
|
+
]),
|
|
25405
|
+
_: 1
|
|
25406
|
+
}))
|
|
25349
25407
|
], 64)),
|
|
25350
25408
|
$options.isShowMobileCode ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [
|
|
25351
25409
|
createVNode(_component_el_form_item, {
|
|
@@ -25362,16 +25420,16 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25362
25420
|
default: withCtx(() => [
|
|
25363
25421
|
createVNode(_component_GoogleInput, {
|
|
25364
25422
|
modelValue: $data.form.phone,
|
|
25365
|
-
"onUpdate:modelValue": _cache[
|
|
25423
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => $data.form.phone = $event),
|
|
25366
25424
|
placeholder: $props.isEn ? "Cell Phone Number" : "手机号码",
|
|
25367
25425
|
label: $props.isEn ? "Cell Phone Number" : "手机号码",
|
|
25368
25426
|
clearable: "",
|
|
25369
25427
|
autocomplete: "off",
|
|
25370
|
-
onBlur: _cache[
|
|
25428
|
+
onBlur: _cache[11] || (_cache[11] = ($event) => $options.validateField("phone")),
|
|
25371
25429
|
maxlength: "15"
|
|
25372
25430
|
}, {
|
|
25373
25431
|
prefix: withCtx(() => [
|
|
25374
|
-
_cache[
|
|
25432
|
+
_cache[23] || (_cache[23] = createElementVNode("i", { class: "icon-auth-phone" }, null, -1)),
|
|
25375
25433
|
createVNode(_component_el_form_item, {
|
|
25376
25434
|
prop: "areaCode",
|
|
25377
25435
|
class: "tel-areacode",
|
|
@@ -25380,9 +25438,9 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25380
25438
|
default: withCtx(() => [
|
|
25381
25439
|
createVNode(_component_el_select, {
|
|
25382
25440
|
modelValue: $data.form.areaCode,
|
|
25383
|
-
"onUpdate:modelValue": _cache[
|
|
25441
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => $data.form.areaCode = $event),
|
|
25384
25442
|
placeholder: $props.isEn ? "Code" : "区号",
|
|
25385
|
-
onChange: _cache[
|
|
25443
|
+
onChange: _cache[9] || (_cache[9] = ($event) => $options.validateField("areaCode")),
|
|
25386
25444
|
"popper-class": `jc-area-code-select-wrapper`
|
|
25387
25445
|
}, {
|
|
25388
25446
|
default: withCtx(() => [
|
|
@@ -25412,16 +25470,16 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25412
25470
|
default: withCtx(() => [
|
|
25413
25471
|
createVNode(_component_CodeInput, {
|
|
25414
25472
|
modelValue: $data.form.mobileCode,
|
|
25415
|
-
"onUpdate:modelValue": _cache[
|
|
25473
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => $data.form.mobileCode = $event),
|
|
25416
25474
|
label: $options.codeInputLabel,
|
|
25417
25475
|
placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
|
|
25418
25476
|
ready: $data.mobileCodeReady,
|
|
25419
25477
|
"is-en": $props.isEn,
|
|
25420
25478
|
"show-icon": "",
|
|
25421
25479
|
"form-type-color": "4",
|
|
25422
|
-
onSend: _cache[
|
|
25480
|
+
onSend: _cache[13] || (_cache[13] = (data) => $options.handleGetCode(data, "mobile"))
|
|
25423
25481
|
}, {
|
|
25424
|
-
prefix: withCtx(() => [..._cache[
|
|
25482
|
+
prefix: withCtx(() => [..._cache[24] || (_cache[24] = [
|
|
25425
25483
|
createElementVNode("i", { class: "icon-verify" }, null, -1)
|
|
25426
25484
|
])]),
|
|
25427
25485
|
_: 1
|
|
@@ -25438,12 +25496,12 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25438
25496
|
default: withCtx(() => [
|
|
25439
25497
|
createVNode(_component_JcFloatInput, {
|
|
25440
25498
|
modelValue: $data.form.email,
|
|
25441
|
-
"onUpdate:modelValue": _cache[
|
|
25499
|
+
"onUpdate:modelValue": _cache[14] || (_cache[14] = ($event) => $data.form.email = $event),
|
|
25442
25500
|
label: $props.isEn ? "Business Email Address" : "企业邮箱",
|
|
25443
25501
|
placeholder: $props.isEn ? "Business Email Address, QQ Mail is not available" : "请输入您的企业邮箱,暂不支持QQ邮箱",
|
|
25444
|
-
onBlur: _cache[
|
|
25502
|
+
onBlur: _cache[15] || (_cache[15] = ($event) => $options.validateField("email"))
|
|
25445
25503
|
}, {
|
|
25446
|
-
prefix: withCtx(() => [..._cache[
|
|
25504
|
+
prefix: withCtx(() => [..._cache[25] || (_cache[25] = [
|
|
25447
25505
|
createElementVNode("i", { class: "icon-auth-email" }, null, -1)
|
|
25448
25506
|
])]),
|
|
25449
25507
|
_: 1
|
|
@@ -25455,16 +25513,16 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25455
25513
|
default: withCtx(() => [
|
|
25456
25514
|
createVNode(_component_CodeInput, {
|
|
25457
25515
|
modelValue: $data.form.emailCode,
|
|
25458
|
-
"onUpdate:modelValue": _cache[
|
|
25516
|
+
"onUpdate:modelValue": _cache[16] || (_cache[16] = ($event) => $data.form.emailCode = $event),
|
|
25459
25517
|
label: $options.codeInputLabel,
|
|
25460
25518
|
placeholder: $props.isEn ? "Enter 4 Verification Code" : "请输入4位数字验证码",
|
|
25461
25519
|
ready: $data.emailCodeReady,
|
|
25462
25520
|
"is-en": $props.isEn,
|
|
25463
25521
|
"show-icon": "",
|
|
25464
25522
|
"form-type-color": "4",
|
|
25465
|
-
onSend: _cache[
|
|
25523
|
+
onSend: _cache[17] || (_cache[17] = (data) => $options.handleGetCode(data, "email"))
|
|
25466
25524
|
}, {
|
|
25467
|
-
prefix: withCtx(() => [..._cache[
|
|
25525
|
+
prefix: withCtx(() => [..._cache[26] || (_cache[26] = [
|
|
25468
25526
|
createElementVNode("i", { class: "icon-verify" }, null, -1)
|
|
25469
25527
|
])]),
|
|
25470
25528
|
_: 1
|
|
@@ -25489,7 +25547,7 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
25489
25547
|
}, 8, ["model", "rules"])
|
|
25490
25548
|
]);
|
|
25491
25549
|
}
|
|
25492
|
-
const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-
|
|
25550
|
+
const CompleteInfoForm = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1], ["__scopeId", "data-v-388cd5f0"]]);
|
|
25493
25551
|
const _hoisted_1$7 = { class: "auth-footer-box" };
|
|
25494
25552
|
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
25495
25553
|
__name: "FooterBox",
|
|
@@ -26480,13 +26538,21 @@ const _sfc_main$3 = {
|
|
|
26480
26538
|
GoogleInput: GoogleInput$1,
|
|
26481
26539
|
ApplyJoinBtn
|
|
26482
26540
|
},
|
|
26483
|
-
props: {
|
|
26541
|
+
props: {
|
|
26542
|
+
isEn: Boolean,
|
|
26543
|
+
appId: { type: String, default: "ERA" },
|
|
26544
|
+
registerType: { type: String, default: "normal" }
|
|
26545
|
+
},
|
|
26484
26546
|
emits: [
|
|
26485
26547
|
"bind-third-party",
|
|
26486
26548
|
"register",
|
|
26487
26549
|
"register-success",
|
|
26488
26550
|
"need-complete",
|
|
26489
|
-
"register-step-change"
|
|
26551
|
+
"register-step-change",
|
|
26552
|
+
// GIO 埋点 emit
|
|
26553
|
+
"register-next-step",
|
|
26554
|
+
"verify-code-sent",
|
|
26555
|
+
"verify-code-expired"
|
|
26490
26556
|
],
|
|
26491
26557
|
computed: {
|
|
26492
26558
|
// 是否同意用户协议
|
|
@@ -26546,6 +26612,8 @@ const _sfc_main$3 = {
|
|
|
26546
26612
|
companyResistEn: false,
|
|
26547
26613
|
companyResistCn: false,
|
|
26548
26614
|
verifyData: {},
|
|
26615
|
+
// 动态表单项强制重新渲染的 key,切换国家时递增
|
|
26616
|
+
formKey: 0,
|
|
26549
26617
|
registerStep: 1,
|
|
26550
26618
|
step1AccountSnapshot: "",
|
|
26551
26619
|
form: {
|
|
@@ -26710,6 +26778,7 @@ const _sfc_main$3 = {
|
|
|
26710
26778
|
this.$nextTick(() => {
|
|
26711
26779
|
this.$refs.registerFormRef.clearValidate();
|
|
26712
26780
|
});
|
|
26781
|
+
this.$emit("register-next-step", this.registerType);
|
|
26713
26782
|
});
|
|
26714
26783
|
},
|
|
26715
26784
|
/**
|
|
@@ -26860,6 +26929,7 @@ const _sfc_main$3 = {
|
|
|
26860
26929
|
this.form.nameEn = "";
|
|
26861
26930
|
this.form.firstName = "";
|
|
26862
26931
|
this.form.lastName = "";
|
|
26932
|
+
this.formKey++;
|
|
26863
26933
|
}
|
|
26864
26934
|
this.$nextTick(() => {
|
|
26865
26935
|
if (this.form.companyName) {
|
|
@@ -26909,6 +26979,7 @@ const _sfc_main$3 = {
|
|
|
26909
26979
|
}
|
|
26910
26980
|
startTimer();
|
|
26911
26981
|
ElMessage.success(msg);
|
|
26982
|
+
this.$emit("verify-code-sent");
|
|
26912
26983
|
} else {
|
|
26913
26984
|
ElMessage.error(res.data.msg);
|
|
26914
26985
|
}
|
|
@@ -27093,6 +27164,7 @@ const _sfc_main$3 = {
|
|
|
27093
27164
|
const preventDefault = () => {
|
|
27094
27165
|
flowControl.isHandled = true;
|
|
27095
27166
|
};
|
|
27167
|
+
this.$emit("verify-code-expired", false);
|
|
27096
27168
|
this.$emit("register-success", {
|
|
27097
27169
|
user: res.data.data.result,
|
|
27098
27170
|
redirectPath,
|
|
@@ -27112,11 +27184,32 @@ const _sfc_main$3 = {
|
|
|
27112
27184
|
ElMessage.success(
|
|
27113
27185
|
this.isEn ? "Registration successful, pending review" : "注册成功,请等待审核"
|
|
27114
27186
|
);
|
|
27187
|
+
this.$emit("verify-code-expired", false);
|
|
27115
27188
|
}
|
|
27116
27189
|
} else {
|
|
27117
27190
|
this.loading = false;
|
|
27118
27191
|
ElMessage.error(res.data.msg);
|
|
27192
|
+
const subCode = String(res.data.subCode || "");
|
|
27193
|
+
const msg = String(res.data.msg || "");
|
|
27194
|
+
if (/CODE|VERIFY/i.test(subCode) || /验证码|verification code/i.test(msg)) {
|
|
27195
|
+
this.$emit("verify-code-expired", true);
|
|
27196
|
+
}
|
|
27119
27197
|
}
|
|
27198
|
+
},
|
|
27199
|
+
// ===== GIO 埋点:供父组件在关闭时读取的表单字段快照 =====
|
|
27200
|
+
getGioFormSnapshot() {
|
|
27201
|
+
return {
|
|
27202
|
+
hasPhone: !!this.form.phone,
|
|
27203
|
+
hasEmail: !!this.form.email,
|
|
27204
|
+
hasCode: !!this.form.code,
|
|
27205
|
+
hasName: !!(this.form.nameCn || this.form.nameEn || this.form.firstName || this.form.lastName),
|
|
27206
|
+
cityId: this.form.cityId || this.cityId || "",
|
|
27207
|
+
companyName: this.form.companyName || "",
|
|
27208
|
+
sector: this.form.sector || "",
|
|
27209
|
+
agree: !!this.form.agree,
|
|
27210
|
+
useKq: !!this.form.useKq,
|
|
27211
|
+
isJoinCompany: !!this.hasResistCompany
|
|
27212
|
+
};
|
|
27120
27213
|
}
|
|
27121
27214
|
}
|
|
27122
27215
|
};
|
|
@@ -27212,14 +27305,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27212
27305
|
_: 1
|
|
27213
27306
|
}),
|
|
27214
27307
|
$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
27215
|
-
|
|
27216
|
-
|
|
27308
|
+
class: "phone-form-item",
|
|
27309
|
+
key: "phone-wrap-" + $data.formKey
|
|
27217
27310
|
}, {
|
|
27218
27311
|
default: withCtx(() => [
|
|
27219
27312
|
(openBlock(), createBlock(_component_el_form_item, {
|
|
27220
27313
|
prop: "phone",
|
|
27221
27314
|
ref: "phone",
|
|
27222
|
-
key:
|
|
27315
|
+
key: "phone-" + $data.formKey,
|
|
27223
27316
|
class: "tel-mobile",
|
|
27224
27317
|
"inline-message": true
|
|
27225
27318
|
}, {
|
|
@@ -27280,9 +27373,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27280
27373
|
_: 1
|
|
27281
27374
|
})) : createCommentVNode("", true),
|
|
27282
27375
|
!$options.currentCountryIsChina ? (openBlock(), createBlock(_component_el_form_item, {
|
|
27283
|
-
key: 1,
|
|
27284
27376
|
prop: "email",
|
|
27285
|
-
class: "email-form-item"
|
|
27377
|
+
class: "email-form-item",
|
|
27378
|
+
key: "email-" + $data.formKey
|
|
27286
27379
|
}, {
|
|
27287
27380
|
default: withCtx(() => [
|
|
27288
27381
|
createVNode(_component_JcFloatInput, {
|
|
@@ -27556,7 +27649,19 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27556
27649
|
}, 8, ["model", "rules"])
|
|
27557
27650
|
]);
|
|
27558
27651
|
}
|
|
27559
|
-
const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-
|
|
27652
|
+
const ThirdRegisterForm = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["render", _sfc_render], ["__scopeId", "data-v-6304b6b2"]]);
|
|
27653
|
+
function safeTrack(eventName, attrs) {
|
|
27654
|
+
if (!tracker.isInitialized()) return;
|
|
27655
|
+
const clean = {};
|
|
27656
|
+
if (attrs) {
|
|
27657
|
+
for (const [k, v] of Object.entries(attrs)) {
|
|
27658
|
+
if (v !== null && v !== void 0) clean[k] = v;
|
|
27659
|
+
}
|
|
27660
|
+
}
|
|
27661
|
+
tracker.track(eventName, clean);
|
|
27662
|
+
}
|
|
27663
|
+
const GIO_EVENT_REGISTER_NEXT_STEP = "registerNextStepClick";
|
|
27664
|
+
const GIO_EVENT_LOGIN_DIALOG_CLOSE = "loginDialogClose";
|
|
27560
27665
|
function useLoginForm(options) {
|
|
27561
27666
|
const { isEn, loginType } = options;
|
|
27562
27667
|
const loginFormRef = ref();
|
|
@@ -27576,6 +27681,7 @@ function useLoginForm(options) {
|
|
|
27576
27681
|
const codeReady = ref(false);
|
|
27577
27682
|
const loginMethod = ref("email");
|
|
27578
27683
|
const verifyData = ref({});
|
|
27684
|
+
const formKey = ref(0);
|
|
27579
27685
|
const captchaVisible = ref(false);
|
|
27580
27686
|
const mobileUid = ref("");
|
|
27581
27687
|
const emailUid = ref("");
|
|
@@ -27637,6 +27743,7 @@ function useLoginForm(options) {
|
|
|
27637
27743
|
function switchLoginTab(type) {
|
|
27638
27744
|
if (loginType.value === type) return;
|
|
27639
27745
|
loginType.value = type;
|
|
27746
|
+
formKey.value++;
|
|
27640
27747
|
nextTick(() => {
|
|
27641
27748
|
if (!loginFormRef.value) return;
|
|
27642
27749
|
loginFormRef.value.clearValidate();
|
|
@@ -27727,6 +27834,7 @@ function useLoginForm(options) {
|
|
|
27727
27834
|
}
|
|
27728
27835
|
async function handleChangeSubType(type) {
|
|
27729
27836
|
loginMethod.value = type;
|
|
27837
|
+
formKey.value++;
|
|
27730
27838
|
if (type == "mobile") {
|
|
27731
27839
|
if (areaCodeData.value.length === 0) {
|
|
27732
27840
|
await getLocalIpData();
|
|
@@ -27765,6 +27873,7 @@ function useLoginForm(options) {
|
|
|
27765
27873
|
verifyData,
|
|
27766
27874
|
captchaVisible,
|
|
27767
27875
|
loginMethod,
|
|
27876
|
+
formKey,
|
|
27768
27877
|
// 计算属性
|
|
27769
27878
|
computedRules,
|
|
27770
27879
|
// 方法
|
|
@@ -27817,7 +27926,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27817
27926
|
showTestThirdBtn: { type: Boolean, default: false },
|
|
27818
27927
|
baseMode: { default: "login" },
|
|
27819
27928
|
appId: { default: "" },
|
|
27820
|
-
test: { type: Boolean, default: false }
|
|
27929
|
+
test: { type: Boolean, default: false },
|
|
27930
|
+
enableTracking: { type: Boolean, default: true }
|
|
27821
27931
|
},
|
|
27822
27932
|
emits: ["update:visible", "update:baseMode", "open", "mode-change", "auth-dialog-close", "login-success", "register-success"],
|
|
27823
27933
|
setup(__props, { emit: __emit }) {
|
|
@@ -27868,6 +27978,37 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27868
27978
|
const handleRegisterStepChange = (step) => {
|
|
27869
27979
|
registerStep.value = step;
|
|
27870
27980
|
};
|
|
27981
|
+
const registerFormRef = ref(null);
|
|
27982
|
+
const thirdRegisterFormRef = ref(null);
|
|
27983
|
+
const verifyCodeCount = ref(0);
|
|
27984
|
+
const verifyCodeExpired = ref(false);
|
|
27985
|
+
const resolveRegisterType = () => {
|
|
27986
|
+
if (formMode.value === "login") return "login";
|
|
27987
|
+
const t = String(thirdType.value || "").toLowerCase();
|
|
27988
|
+
if (thirdRegisterVisible.value) {
|
|
27989
|
+
if (t === "facebook") return "facebook";
|
|
27990
|
+
if (t === "linkedin") return "linkedin";
|
|
27991
|
+
if (t === "wechat") return "wechat";
|
|
27992
|
+
}
|
|
27993
|
+
if (formMode.value === "register") return "normal";
|
|
27994
|
+
return "normal";
|
|
27995
|
+
};
|
|
27996
|
+
const resolveCloseType = () => {
|
|
27997
|
+
if (_closeReason.value === "login") return "login";
|
|
27998
|
+
if (_closeReason.value === "register") return "register";
|
|
27999
|
+
return "directClose";
|
|
28000
|
+
};
|
|
28001
|
+
const _closeReason = ref("");
|
|
28002
|
+
const handleRegisterNextStep = (registerType) => {
|
|
28003
|
+
if (!props.enableTracking) return;
|
|
28004
|
+
safeTrack(GIO_EVENT_REGISTER_NEXT_STEP, { registerType });
|
|
28005
|
+
};
|
|
28006
|
+
const handleVerifyCodeSent = () => {
|
|
28007
|
+
verifyCodeCount.value += 1;
|
|
28008
|
+
};
|
|
28009
|
+
const handleVerifyCodeExpired = (flag = true) => {
|
|
28010
|
+
verifyCodeExpired.value = flag;
|
|
28011
|
+
};
|
|
27871
28012
|
const resolveAccountType = (type) => {
|
|
27872
28013
|
var _a, _b;
|
|
27873
28014
|
const safeType = String(type || "").toLowerCase();
|
|
@@ -27910,6 +28051,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27910
28051
|
verifyData,
|
|
27911
28052
|
captchaVisible,
|
|
27912
28053
|
computedRules,
|
|
28054
|
+
formKey,
|
|
27913
28055
|
switchLoginTab,
|
|
27914
28056
|
validateField,
|
|
27915
28057
|
handleGetCode,
|
|
@@ -27945,6 +28087,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27945
28087
|
true
|
|
27946
28088
|
);
|
|
27947
28089
|
}
|
|
28090
|
+
_closeReason.value = "login";
|
|
27948
28091
|
currentVisible.value = false;
|
|
27949
28092
|
executeRedirect(loginData);
|
|
27950
28093
|
}
|
|
@@ -27969,6 +28112,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
27969
28112
|
accountType,
|
|
27970
28113
|
mode: "login"
|
|
27971
28114
|
});
|
|
28115
|
+
_closeReason.value = "login";
|
|
27972
28116
|
currentVisible.value = false;
|
|
27973
28117
|
executeRedirect(loginData);
|
|
27974
28118
|
},
|
|
@@ -28055,9 +28199,36 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28055
28199
|
function handleOpen() {
|
|
28056
28200
|
formMode.value = props.baseMode || "login";
|
|
28057
28201
|
_lastEmittedBaseMode.value = formMode.value === "register" ? "register" : "login";
|
|
28202
|
+
verifyCodeCount.value = 0;
|
|
28203
|
+
verifyCodeExpired.value = false;
|
|
28204
|
+
_closeReason.value = "";
|
|
28058
28205
|
emit("open");
|
|
28059
28206
|
}
|
|
28060
28207
|
function handleClose() {
|
|
28208
|
+
var _a, _b, _c, _d;
|
|
28209
|
+
if (props.enableTracking && formMode.value !== "forget-password") {
|
|
28210
|
+
const closeType = resolveCloseType();
|
|
28211
|
+
const registerType = resolveRegisterType();
|
|
28212
|
+
const snapshot = ((_b = (_a = registerFormRef.value) == null ? void 0 : _a.getGioFormSnapshot) == null ? void 0 : _b.call(_a)) || ((_d = (_c = thirdRegisterFormRef.value) == null ? void 0 : _c.getGioFormSnapshot) == null ? void 0 : _d.call(_c)) || null;
|
|
28213
|
+
safeTrack(GIO_EVENT_LOGIN_DIALOG_CLOSE, {
|
|
28214
|
+
closeType,
|
|
28215
|
+
registerType,
|
|
28216
|
+
isJoinCompany: !!(snapshot == null ? void 0 : snapshot.isJoinCompany),
|
|
28217
|
+
verifyCodeCount: verifyCodeCount.value,
|
|
28218
|
+
verifyCodeExpired: verifyCodeExpired.value,
|
|
28219
|
+
...snapshot ? {
|
|
28220
|
+
hasPhone: snapshot.hasPhone,
|
|
28221
|
+
hasEmail: snapshot.hasEmail,
|
|
28222
|
+
hasCode: snapshot.hasCode,
|
|
28223
|
+
hasName: snapshot.hasName,
|
|
28224
|
+
cityId: snapshot.cityId,
|
|
28225
|
+
companyName: snapshot.companyName,
|
|
28226
|
+
sector: snapshot.sector,
|
|
28227
|
+
agree: snapshot.agree,
|
|
28228
|
+
useKq: snapshot.useKq
|
|
28229
|
+
} : {}
|
|
28230
|
+
});
|
|
28231
|
+
}
|
|
28061
28232
|
emit("auth-dialog-close", {
|
|
28062
28233
|
loginType: loginType.value,
|
|
28063
28234
|
formMode: formMode.value
|
|
@@ -28069,6 +28240,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28069
28240
|
resetGioSessionItems();
|
|
28070
28241
|
resetBindRegisterState();
|
|
28071
28242
|
resetThirdPartyState();
|
|
28243
|
+
verifyCodeCount.value = 0;
|
|
28244
|
+
verifyCodeExpired.value = false;
|
|
28245
|
+
_closeReason.value = "";
|
|
28072
28246
|
}
|
|
28073
28247
|
function handleNeedComplete(options = {}) {
|
|
28074
28248
|
const mode2 = (options == null ? void 0 : options.mode) === "register" ? "register" : "login";
|
|
@@ -28098,6 +28272,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28098
28272
|
accountType: resolveAccountTypeByContext(),
|
|
28099
28273
|
mode: "register"
|
|
28100
28274
|
});
|
|
28275
|
+
_closeReason.value = "register";
|
|
28101
28276
|
}
|
|
28102
28277
|
function handleWechatSuccess(payload) {
|
|
28103
28278
|
emit("login-success", {
|
|
@@ -28105,6 +28280,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28105
28280
|
accountType: "WECHAT",
|
|
28106
28281
|
mode: "login"
|
|
28107
28282
|
});
|
|
28283
|
+
_closeReason.value = "login";
|
|
28108
28284
|
}
|
|
28109
28285
|
function handleCompleteSuccess(e) {
|
|
28110
28286
|
var _a;
|
|
@@ -28115,6 +28291,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28115
28291
|
accountType: pendingCompleteEvent.value.accountType,
|
|
28116
28292
|
mode: successMode
|
|
28117
28293
|
});
|
|
28294
|
+
_closeReason.value = successMode === "register" ? "register" : "login";
|
|
28118
28295
|
pendingCompleteEvent.value = null;
|
|
28119
28296
|
}
|
|
28120
28297
|
if (e.redirectPath) {
|
|
@@ -28136,6 +28313,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28136
28313
|
accountType,
|
|
28137
28314
|
mode: "login"
|
|
28138
28315
|
});
|
|
28316
|
+
_closeReason.value = "login";
|
|
28139
28317
|
currentVisible.value = false;
|
|
28140
28318
|
executeRedirect(loginData);
|
|
28141
28319
|
}
|
|
@@ -28315,7 +28493,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28315
28493
|
(openBlock(), createBlock(unref(ElFormItem), {
|
|
28316
28494
|
prop: "phone",
|
|
28317
28495
|
ref: "phone",
|
|
28318
|
-
key:
|
|
28496
|
+
key: "phone-" + unref(formKey),
|
|
28319
28497
|
class: "tel-mobile",
|
|
28320
28498
|
"inline-message": true
|
|
28321
28499
|
}, {
|
|
@@ -28444,14 +28622,20 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28444
28622
|
}, null, 8, ["is-en", "bind-list"])) : createCommentVNode("", true),
|
|
28445
28623
|
unref(thirdRegisterVisible) ? (openBlock(), createBlock(ThirdRegisterForm, {
|
|
28446
28624
|
key: 1,
|
|
28625
|
+
ref_key: "thirdRegisterFormRef",
|
|
28626
|
+
ref: thirdRegisterFormRef,
|
|
28447
28627
|
"is-en": isEn.value,
|
|
28448
28628
|
"app-id": unref(appId),
|
|
28629
|
+
"register-type": resolveRegisterType(),
|
|
28449
28630
|
class: "jc:mt-6",
|
|
28450
28631
|
onBindThirdParty: unref(handleBindThirdParty),
|
|
28451
28632
|
onRegisterSuccess: handleRegisterSuccess,
|
|
28452
28633
|
onNeedComplete: handleRegisterNeedComplete,
|
|
28453
|
-
onRegisterStepChange: handleRegisterStepChange
|
|
28454
|
-
|
|
28634
|
+
onRegisterStepChange: handleRegisterStepChange,
|
|
28635
|
+
onRegisterNextStep: handleRegisterNextStep,
|
|
28636
|
+
onVerifyCodeSent: handleVerifyCodeSent,
|
|
28637
|
+
onVerifyCodeExpired: handleVerifyCodeExpired
|
|
28638
|
+
}, null, 8, ["is-en", "app-id", "register-type", "onBindThirdParty"])) : createCommentVNode("", true)
|
|
28455
28639
|
])) : createCommentVNode("", true),
|
|
28456
28640
|
loginType.value !== "TEST" && loginType.value !== "facebook" && loginType.value !== "linkedin" ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
28457
28641
|
createElementVNode("div", _hoisted_11$1, toDisplayString(isEn.value ? "Sign in with" : "其他登录方式"), 1),
|
|
@@ -28508,12 +28692,17 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28508
28692
|
}, null, 8, ["is-en"])) : formMode.value === "register" ? (openBlock(), createElementBlock("div", _hoisted_13$1, [
|
|
28509
28693
|
createElementVNode("div", _hoisted_14$1, [
|
|
28510
28694
|
createVNode(RegisterForm, {
|
|
28695
|
+
ref_key: "registerFormRef",
|
|
28696
|
+
ref: registerFormRef,
|
|
28511
28697
|
"is-en": isEn.value,
|
|
28512
28698
|
"app-id": unref(appId),
|
|
28513
28699
|
onNeedComplete: handleRegisterNeedComplete,
|
|
28514
28700
|
onRegisterSuccess: handleRegisterSuccess,
|
|
28515
28701
|
onThirdPartyClick: handleThirdClick,
|
|
28516
|
-
onRegisterStepChange: handleRegisterStepChange
|
|
28702
|
+
onRegisterStepChange: handleRegisterStepChange,
|
|
28703
|
+
onRegisterNextStep: handleRegisterNextStep,
|
|
28704
|
+
onVerifyCodeSent: handleVerifyCodeSent,
|
|
28705
|
+
onVerifyCodeExpired: handleVerifyCodeExpired
|
|
28517
28706
|
}, null, 8, ["is-en", "app-id"])
|
|
28518
28707
|
])
|
|
28519
28708
|
])) : formMode.value === "need-complete" ? (openBlock(), createBlock(CompleteInfoForm, {
|
|
@@ -28543,7 +28732,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
28543
28732
|
};
|
|
28544
28733
|
}
|
|
28545
28734
|
});
|
|
28546
|
-
const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
28735
|
+
const index$2 = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-91d3cd82"]]);
|
|
28547
28736
|
const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
28548
28737
|
__proto__: null,
|
|
28549
28738
|
default: index$2
|