p500-acount 1.0.3 → 1.0.5

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.
@@ -1,7 +1,7 @@
1
- import { createI18n as R } from "vue-i18n";
2
- import { createElementBlock as d, openBlock as u, createElementVNode as a, normalizeStyle as S, Fragment as T, renderList as E, normalizeClass as w, withDirectives as b, toDisplayString as m, vShow as y, createCommentVNode as v, renderSlot as D, resolveComponent as f, createBlock as P, mergeProps as x, createVNode as p, withCtx as _, createTextVNode as N, withModifiers as M } from "vue";
3
- import q from "jsencrypt";
4
- var F = { zh: { serviceLang: "zh_CN", mobileReg: "^0[1-9]\\d{8}$" }, vi: { serviceLang: "vi_VN", mobileReg: "^0[1-9]\\d{8}$" }, id: { serviceLang: "id_ID", mobileReg: "^08\\d{8,11}$" } };
1
+ import { createI18n as q } from "vue-i18n";
2
+ import { createElementBlock as d, openBlock as l, createElementVNode as s, normalizeStyle as _, Fragment as S, renderList as D, normalizeClass as b, withDirectives as y, toDisplayString as h, vShow as P, createCommentVNode as f, renderSlot as x, resolveComponent as g, createBlock as C, mergeProps as R, createVNode as m, withCtx as E, createTextVNode as N, withModifiers as U } from "vue";
3
+ import F from "jsencrypt";
4
+ var M = { zh: { serviceLang: "zh_CN", mobileReg: "^0[1-9]\\d{8}$" }, vi: { serviceLang: "vi_VN", mobileReg: "^0[1-9]\\d{8}$" }, id: { serviceLang: "id_ID", mobileReg: "^08\\d{8,11}$" } };
5
5
  const O = typeof uni < "u" && uni.request;
6
6
  if (!O)
7
7
  try {
@@ -9,84 +9,85 @@ if (!O)
9
9
  // 标记这是一个模拟的 uni 对象
10
10
  __IS_MY_UNI_POLYFILL__: !0,
11
11
  /*缓存数据*/
12
- setStorageSync(t, e) {
13
- localStorage.setItem(t, JSON.stringify(e));
12
+ setStorageSync(e, t) {
13
+ localStorage.setItem(e, JSON.stringify(t));
14
14
  },
15
15
  /*获取缓存数据*/
16
- getStorageSync(t) {
17
- return JSON.parse(localStorage.getItem(t));
16
+ getStorageSync(e) {
17
+ return JSON.parse(localStorage.getItem(e));
18
18
  },
19
19
  /*移除缓存数据*/
20
- removeStorageSync(t) {
21
- localStorage.removeItem(t);
20
+ removeStorageSync(e) {
21
+ localStorage.removeItem(e);
22
22
  },
23
23
  /*请求*/
24
- request: (t) => {
25
- t.data && (t.method == "GET" ? t.url += `?${new URLSearchParams(t.data).toString()}` : t.body = JSON.stringify(t.data)), fetch(t.url, {
26
- method: t.method,
27
- headers: t.header,
24
+ request: (e) => {
25
+ e.data && (e.method == "GET" ? e.url += `?${new URLSearchParams(e.data).toString()}` : e.body = JSON.stringify(e.data)), fetch(e.url, {
26
+ method: e.method,
27
+ headers: e.header,
28
28
  //真正的uni.request需要的是header, 而fetch需要的是headers
29
- body: t.body
30
- }).then((e) => {
31
- var n, s;
32
- return (n = t.complete) == null || n.call(t), e.ok ? e.json() : (s = t.fail) == null ? void 0 : s.call(t, { message: `HTTP error! Status: ${e.status}` });
33
- }).then((e) => {
29
+ body: e.body
30
+ }).then((t) => {
31
+ var n, a;
32
+ return (n = e.complete) == null || n.call(e), t.ok ? t.json() : (a = e.fail) == null ? void 0 : a.call(e, { message: `HTTP error! Status: ${t.status}` });
33
+ }).then((t) => {
34
34
  var n;
35
- (n = t.success) == null || n.call(t, { statusCode: 200, data: e });
35
+ (n = e.success) == null || n.call(e, { statusCode: 200, data: t });
36
36
  });
37
37
  }
38
38
  };
39
39
  } catch {
40
40
  }
41
- const B = (t, e, n = 10) => {
42
- const s = { data: e, _timeout: +/* @__PURE__ */ new Date() + n * 60 * 1e3 };
43
- uni.setStorageSync(t, s);
44
- }, U = (t) => {
45
- const e = uni.getStorageSync(t);
46
- if (e) {
47
- const { data: n, _timeout: s } = e;
48
- if (!s)
49
- return e;
50
- if (+/* @__PURE__ */ new Date() <= s)
41
+ const B = (e, t, n = 10) => {
42
+ const a = { data: t, _timeout: +/* @__PURE__ */ new Date() + n * 60 * 1e3 };
43
+ uni.setStorageSync(e, a);
44
+ }, X = (e) => {
45
+ const t = uni.getStorageSync(e);
46
+ if (t) {
47
+ const { data: n, _timeout: a } = t;
48
+ if (!a)
49
+ return t;
50
+ if (+/* @__PURE__ */ new Date() <= a)
51
51
  return n;
52
- uni.removeStorageSync(t);
52
+ uni.removeStorageSync(e);
53
53
  }
54
54
  return null;
55
- }, k = (t) => {
56
- const e = {
57
- method: t.method,
58
- data: t.data,
59
- header: t.header,
60
- url: t.urlPrefix + t.url
55
+ }, w = (e) => {
56
+ const t = {
57
+ method: e.method,
58
+ data: e.data,
59
+ header: e.header,
60
+ url: e.urlPrefix + e.url
61
61
  };
62
- return new Promise((n, s) => {
63
- t.loading !== !1 && t.dialog.showLoading(), new Promise((o, i) => {
64
- if (e.fail = i, e.complete = () => {
65
- t.loading !== !1 && t.dialog.hideLoading();
66
- }, e.success = (r) => {
67
- const { statusCode: h, data: g = {} } = r, { message: c, code: l } = g, L = g.data;
68
- if (h == 200)
69
- return l && l != 200 ? i({ message: c, code: l }) : (t.cache && B(t.url, L), o(L));
70
- i({ message: c });
71
- }, t.cache) {
72
- const r = U(t.url);
62
+ return new Promise((n, a) => {
63
+ e.loading !== !1 && e.dialog.showLoading(), new Promise((o, i) => {
64
+ if (t.fail = i, t.complete = () => {
65
+ e.loading !== !1 && e.dialog.hideLoading();
66
+ }, t.success = (r) => {
67
+ const { statusCode: u, data: v = {} } = r, { message: p, code: c } = v, I = v.data;
68
+ if (u == 200)
69
+ return c && c != 200 ? i({ message: p, code: c }) : (e.cache && B(e.url, I), o(I));
70
+ i({ message: p });
71
+ }, e.cache) {
72
+ const r = X(e.url);
73
73
  if (r)
74
- return e.complete(), o(r);
74
+ return t.complete(), o(r);
75
75
  }
76
- uni.request(e);
77
- }).then(n).catch(({ message: o = "" }) => {
78
- o && t.dialog.showMessage(o), s();
76
+ uni.request(t);
77
+ }).then(n).catch((o) => {
78
+ o.message && e.dialog.showMessage(o.message), a(o);
79
79
  });
80
80
  });
81
81
  };
82
- class X {
82
+ let $;
83
+ class j {
83
84
  /**
84
85
  * @param {String} region 区域标识
85
86
  * @param {String} apiDomain 接口请求域名。APP内使用时需要
86
87
  * @param {Number} devicePlatform 客户端类型标识
87
88
  * @param {Object} dialog 弹框方法对象
88
89
  */
89
- setOptions(e, n, s, o) {
90
+ setOptions(t, n, a, o) {
90
91
  const i = typeof navigator < "u" ? navigator.userAgent : "";
91
92
  this.normalOption = {
92
93
  dialog: o,
@@ -95,53 +96,60 @@ class X {
95
96
  header: {
96
97
  "Content-Type": "application/json",
97
98
  "X-Requested-With": "XMLHttpRequest",
98
- lang: F[e].serviceLang,
99
+ lang: M[t].serviceLang,
99
100
  // 接口所需语言标识
100
- DevicePlatform: s || (/mobile|nokia|iphone|ipad|android|samsung|htc|blackberry|webos|ipod/i.test(i) ? 2 : 1),
101
+ DevicePlatform: a || (/mobile|nokia|iphone|ipad|android|samsung|htc|blackberry|webos|ipod/i.test(i) ? 2 : 1),
101
102
  appver: "spread",
102
103
  Authorization: ""
103
104
  }
104
105
  };
105
106
  }
107
+ /**
108
+ * 合并请求参数
109
+ * @param {Object} option 自定义参数
110
+ */
111
+ assignOption(t) {
112
+ return Object.assign({}, this.normalOption, t);
113
+ }
106
114
  /*获取Banner数据*/
107
115
  getBannerList() {
108
- return k(Object.assign({}, this.normalOption, {
116
+ return w(this.assignOption({
109
117
  url: "home/advertising",
110
118
  method: "POST",
111
119
  cache: !0,
112
120
  data: { location: 2, type: 2 }
113
121
  }));
114
122
  }
115
- /*获取邀请码是否必填*/
116
- getInviteCodeRequired() {
117
- return k(Object.assign({}, this.normalOption, {
123
+ /*获取后台配置信息*/
124
+ getConfig() {
125
+ return $ || ($ = w(this.assignOption({
118
126
  url: "home/getConfig",
119
127
  cache: !0
120
- })).then((e) => (e == null ? void 0 : e.invitationRequired) == "1");
128
+ }))), $;
121
129
  }
122
130
  /*获取默认邀请码*/
123
131
  getDefaultInviteCode() {
124
- return k(Object.assign({}, this.normalOption, {
132
+ return w(this.assignOption({
125
133
  url: "leaflet/agentInviteCode",
126
134
  cache: !0
127
135
  }));
128
136
  }
129
137
  /*生成验证码*/
130
138
  generateCaptcha() {
131
- return k(Object.assign({}, this.normalOption, {
139
+ return w(this.assignOption({
132
140
  url: "captcha/behavior/gen",
133
141
  method: "POST",
134
142
  loading: !1
135
143
  }));
136
144
  }
137
145
  /*校验验证码*/
138
- checkCaptcha(e) {
146
+ checkCaptcha(t) {
139
147
  return new Promise((n) => {
140
- k(Object.assign({}, this.normalOption, {
148
+ w(this.assignOption({
141
149
  url: "captcha/behavior/check",
142
150
  method: "POST",
143
151
  loading: !1,
144
- data: e
152
+ data: t
145
153
  })).then(n).catch(() => {
146
154
  n(null);
147
155
  });
@@ -149,159 +157,178 @@ class X {
149
157
  }
150
158
  /*获取公钥*/
151
159
  getPublicKey() {
152
- return new Promise((e) => {
160
+ return new Promise((t) => {
153
161
  if (this.publicKey)
154
- return e(this.publicKey);
155
- k(Object.assign({}, this.normalOption, { url: "getPublicKey" })).then((n) => {
156
- this.publicKey = n, e(n);
162
+ return t(this.publicKey);
163
+ w(this.assignOption({ url: "getPublicKey" })).then((n) => {
164
+ this.publicKey = n, t(n);
157
165
  }).catch((n) => {
158
- e(null);
166
+ t(null);
159
167
  });
160
168
  });
161
169
  }
162
170
  /*登录*/
163
- login(e) {
164
- return k(Object.assign({}, this.normalOption, { url: "login", method: "POST", data: e }));
171
+ login(t) {
172
+ return w(this.assignOption({ url: "login", method: "POST", data: t }));
165
173
  }
166
174
  /*注册*/
167
- register(e) {
168
- return k(Object.assign({}, this.normalOption, { url: "register", method: "POST", data: e }));
175
+ register(t) {
176
+ return w(this.assignOption({ url: "register", method: "POST", data: t }));
177
+ }
178
+ /*Telegram授权登录*/
179
+ telegramAuthLogin(t) {
180
+ return w(this.assignOption({ url: "telegramAuthLogin", method: "POST", data: t }));
181
+ }
182
+ /*绑定用户*/
183
+ bindUser(t) {
184
+ return w(this.assignOption({ url: "telegramBindingOrRegister", method: "POST", data: t }));
169
185
  }
170
186
  }
171
- const j = "Signup", W = "Login", K = "Enter username", z = "Enter username or mobile no.", H = "Pasword", Y = "Confirm password", G = "Enter invitation code ", J = "(Required)", Z = "(Non- Required)", Q = "Username must be 8–16 letters or numbers.", ee = "Username or mobile", te = "Enter 8-16 characters of letters or numbers", ne = "Incorrect password", oe = "Remember", ie = "Forget password?", se = "Signup", ae = "Please drag the slider to complete the puzzle", re = "Verification passed", ce = "Verification failed, please try again", le = "Swipe right", ue = "Tips", de = "Confirm", he = "I am 18 and above and I have read and agreed to the ", me = "term and conditions", ge = "Term", pe = "Account ready, ", fe = "login now", ve = {
172
- register: j,
173
- login: W,
187
+ const W = "Signup", z = "Login", K = "Enter username", H = "Enter username or mobile no.", Y = "Pasword", G = "Confirm password", J = "Enter invitation code ", Q = "(Required)", Z = "(Non- Required)", ee = "Username must be 8–16 letters or numbers.", te = "Username or mobile", ne = "Enter 8-16 characters of letters or numbers", oe = "Incorrect password", ie = "Remember", se = "Forget password?", ae = "Signup", re = "Please drag the slider to complete the puzzle", ce = "Verification passed", le = "Verification failed, please try again", ue = "Swipe right", de = "Tips", he = "Confirm", me = "I am 18 and above and I have read and agreed to the ", ge = "term and conditions", pe = "Term", fe = "Account ready, ", ve = "login now", ke = "Quick Login", we = "Please bind your username", be = "Reminder: Make sure to remember your username and password for future login.", Ce = {
188
+ register: W,
189
+ login: z,
174
190
  userPh: K,
175
- loginNamePh: z,
176
- pwdPh: H,
177
- confirmPwdPh: Y,
178
- inviteCodePh: G,
179
- required: J,
191
+ loginNamePh: H,
192
+ pwdPh: Y,
193
+ confirmPwdPh: G,
194
+ inviteCodePh: J,
195
+ required: Q,
180
196
  rnRequired: Z,
181
- userEr: Q,
182
- loginNameEr: ee,
183
- pwdEr: te,
184
- confirmPwdEr: ne,
185
- remember: oe,
186
- forgetPwd: ie,
187
- toRegister: se,
188
- captchaTitle: ae,
189
- captchaCheckSuccess: re,
190
- captchaCheckFail: ce,
191
- captchaMoveText: le,
192
- popupTitle: ue,
193
- confirmText: de,
194
- pact1: he,
195
- pact2: me,
196
- pactTitle: ge,
197
- hasUserName: pe,
198
- goLogin: fe
199
- }, ke = "注册", we = "登录", Ce = "请输入用户名", Pe = "请输入账号或手机号", be = "请输入密码", ye = "请确认密码", Se = "请输入邀请码", Te = "(必填)", $e = "(非必填)", Le = "请输入8~16位英文及数字组合", Ee = "请输入用户名或手机号码", Ie = "请输入8~16个英文或数字", Ve = "确认密码输入错误", _e = "记住账号", Ae = "忘记密码?", Re = "立即注册", De = "请拖动滑块完成拼图", xe = "验证通过", Ne = "验证失败,请重新尝试", Me = "向右滑动", qe = "温馨提示", Fe = "确认", Oe = "我已满18岁并且已阅读", Be = "《规则条款》", Ue = "规则条款", Xe = "已有账号,", je = "立即登录", We = {
200
- register: ke,
201
- login: we,
202
- userPh: Ce,
203
- loginNamePh: Pe,
204
- pwdPh: be,
205
- confirmPwdPh: ye,
206
- inviteCodePh: Se,
207
- required: Te,
208
- rnRequired: $e,
209
- userEr: Le,
210
- loginNameEr: Ee,
211
- pwdEr: Ie,
212
- confirmPwdEr: Ve,
213
- remember: _e,
214
- forgetPwd: Ae,
215
- toRegister: Re,
216
- captchaTitle: De,
217
- captchaCheckSuccess: xe,
218
- captchaCheckFail: Ne,
219
- captchaMoveText: Me,
220
- popupTitle: qe,
221
- confirmText: Fe,
222
- pact1: Oe,
223
- pact2: Be,
224
- pactTitle: Ue,
225
- hasUserName: Xe,
226
- goLogin: je
227
- }, Ke = "Đăng ký", ze = "Đăng nhập", He = "Vui lòng nhập tên đăng nhập", Ye = "Vui lòng nhập tên đăng nhập hoặc sđt", Ge = "Vui lòng nhập mật khẩu", Je = "Vui lòng xác nhận mật khẩu", Ze = "Vui lòng nhập mã mời ", Qe = "(Bắt buộc)", et = "(không bắt buộc)", tt = "Vui lòng nhập 8 đến 16 ký tự chữ và số", nt = "Vui lòng nhập tên đăng nhập hoặc sđt", ot = "Vui lòng nhập 8~16 kỹ tự chữ và số", it = "Xác nhận mật khẩu sai", st = "Ghi nhớ", at = "Quên mật khẩu?", rt = "Đăng ký ngay", ct = "Vui lòng kéo thanh trượt để hoàn thành câu đố", lt = "Xác minh đã được thông qua", ut = "Xác minh không thành công, vui lòng thử lại", dt = "Vuốt sang phải", ht = "Lời nhắc", mt = "Xác nhận", gt = "Tôi trên 18 tuổi và đã đọc ", pt = "Điều khoản và điều kiện", ft = "Các điều khoản và điều kiện", vt = "Đã có tài khoản,", kt = "đăng nhập ngay", wt = {
228
- register: Ke,
229
- login: ze,
230
- userPh: He,
231
- loginNamePh: Ye,
232
- pwdPh: Ge,
233
- confirmPwdPh: Je,
234
- inviteCodePh: Ze,
235
- required: Qe,
236
- rnRequired: et,
237
- userEr: tt,
238
- loginNameEr: nt,
239
- pwdEr: ot,
240
- confirmPwdEr: it,
241
- remember: st,
242
- forgetPwd: at,
243
- toRegister: rt,
244
- captchaTitle: ct,
245
- captchaCheckSuccess: lt,
246
- captchaCheckFail: ut,
247
- captchaMoveText: dt,
248
- popupTitle: ht,
249
- confirmText: mt,
250
- pact1: gt,
251
- pact2: pt,
252
- pactTitle: ft,
253
- hasUserName: vt,
254
- goLogin: kt
255
- }, Ct = "Daftar", Pt = "Masuk", bt = "Ketik Username", yt = "Username atau Nomor WA", St = "Sandi", Tt = "Konfirmasi Sandi", $t = "Kode Undangan ", Lt = "(Wajib)", Et = "(opsional)", It = "8 - 16 Digit Kombinasi Huruf Dan Angka", Vt = "Username atau Nomor WA", _t = "8 - 16 Digit Kombinasi Huruf Dan Angka", At = "Sandi Salah!", Rt = "Ingat", Dt = "Lupa Sandi?", xt = "Daftar", Nt = "Silakan tarik slider untuk menyelesaikan puzzle", Mt = "Verifikasi berhasil", qt = "Verifikasi gagal, coba lagi", Ft = "Geser ke kanan", Ot = "Perhatian!", Bt = "Konfirmasi", Ut = "Saya Berumur Diatas 18 Tahun Dan Membaca ", Xt = "S&K Berlaku", jt = "Syarat & Ketentuan", Wt = "Akun Aktif, ", Kt = "Login Sekarang", zt = {
256
- register: Ct,
257
- login: Pt,
258
- userPh: bt,
259
- loginNamePh: yt,
260
- pwdPh: St,
261
- confirmPwdPh: Tt,
262
- inviteCodePh: $t,
263
- required: Lt,
264
- rnRequired: Et,
265
- userEr: It,
266
- loginNameEr: Vt,
267
- pwdEr: _t,
268
- confirmPwdEr: At,
269
- remember: Rt,
270
- forgetPwd: Dt,
271
- toRegister: xt,
272
- captchaTitle: Nt,
273
- captchaCheckSuccess: Mt,
274
- captchaCheckFail: qt,
275
- captchaMoveText: Ft,
276
- popupTitle: Ot,
277
- confirmText: Bt,
278
- pact1: Ut,
279
- pact2: Xt,
280
- pactTitle: jt,
281
- hasUserName: Wt,
282
- goLogin: Kt
283
- }, Ht = {
284
- en: ve,
285
- zh: We,
286
- vi: wt,
287
- id: zt
288
- }, Yt = () => R({
197
+ userEr: ee,
198
+ loginNameEr: te,
199
+ pwdEr: ne,
200
+ confirmPwdEr: oe,
201
+ remember: ie,
202
+ forgetPwd: se,
203
+ toRegister: ae,
204
+ captchaTitle: re,
205
+ captchaCheckSuccess: ce,
206
+ captchaCheckFail: le,
207
+ captchaMoveText: ue,
208
+ popupTitle: de,
209
+ confirmText: he,
210
+ pact1: me,
211
+ pact2: ge,
212
+ pactTitle: pe,
213
+ hasUserName: fe,
214
+ goLogin: ve,
215
+ quickLogin: ke,
216
+ bindUsername: we,
217
+ wxtip: be
218
+ }, ye = "注册", Pe = "登录", _e = "请输入用户名", Se = "请输入账号或手机号", $e = "请输入密码", Te = "请确认密码", Le = "请输入邀请码", Ve = "(必填)", Ie = "(非必填)", De = "请输入8~16位英文及数字组合", Ae = "请输入用户名或手机号码", Ee = "请输入8~16个英文或数字", qe = "确认密码输入错误", xe = "记住账号", Re = "忘记密码?", Ne = "立即注册", Ue = "请拖动滑块完成拼图", Fe = "验证通过", Me = "验证失败,请重新尝试", Oe = "向右滑动", Be = "温馨提示", Xe = "确认", je = "我已满18岁并且已阅读", We = "《规则条款》", ze = "规则条款", Ke = "已有账号,", He = "立即登录", Ye = "快速登录", Ge = "请绑定用户名", Je = "温馨提示:请务必牢记您的用户名和密码,以便用于账号密码登录", Qe = {
219
+ register: ye,
220
+ login: Pe,
221
+ userPh: _e,
222
+ loginNamePh: Se,
223
+ pwdPh: $e,
224
+ confirmPwdPh: Te,
225
+ inviteCodePh: Le,
226
+ required: Ve,
227
+ rnRequired: Ie,
228
+ userEr: De,
229
+ loginNameEr: Ae,
230
+ pwdEr: Ee,
231
+ confirmPwdEr: qe,
232
+ remember: xe,
233
+ forgetPwd: Re,
234
+ toRegister: Ne,
235
+ captchaTitle: Ue,
236
+ captchaCheckSuccess: Fe,
237
+ captchaCheckFail: Me,
238
+ captchaMoveText: Oe,
239
+ popupTitle: Be,
240
+ confirmText: Xe,
241
+ pact1: je,
242
+ pact2: We,
243
+ pactTitle: ze,
244
+ hasUserName: Ke,
245
+ goLogin: He,
246
+ quickLogin: Ye,
247
+ bindUsername: Ge,
248
+ wxtip: Je
249
+ }, Ze = "Đăng ký", et = "Đăng nhập", tt = "Vui lòng nhập tên đăng nhập", nt = "Vui lòng nhập tên đăng nhập hoặc sđt", ot = "Vui lòng nhập mật khẩu", it = "Vui lòng xác nhận mật khẩu", st = "Vui lòng nhập mã mời ", at = "(Bắt buộc)", rt = "(không bắt buộc)", ct = "Vui lòng nhập 8 đến 16 ký tự chữ và số", lt = "Vui lòng nhập tên đăng nhập hoặc sđt", ut = "Vui lòng nhập 8~16 kỹ tự chữ và số", dt = "Xác nhận mật khẩu sai", ht = "Ghi nhớ", mt = "Quên mật khẩu?", gt = "Đăng ký ngay", pt = "Vui lòng kéo thanh trượt để hoàn thành câu đố", ft = "Xác minh đã được thông qua", vt = "Xác minh không thành công, vui lòng thử lại", kt = "Vuốt sang phải", wt = "Lời nhắc", bt = "Xác nhận", Ct = "Tôi trên 18 tuổi và đã đọc ", yt = "Điều khoản và điều kiện", Pt = "Các điều khoản và điều kiện", _t = "Đã có tài khoản,", St = "đăng nhập ngay", $t = "Đăng nhập nhanh", Tt = "Liên kết tên người dùng", Lt = "Lưu ý : Vui lòng ghi nhớ tên người dùng và mật khẩu của bạn để sử dụng cho đăng nhập bằng tài khoản và mật khẩu.", Vt = {
250
+ register: Ze,
251
+ login: et,
252
+ userPh: tt,
253
+ loginNamePh: nt,
254
+ pwdPh: ot,
255
+ confirmPwdPh: it,
256
+ inviteCodePh: st,
257
+ required: at,
258
+ rnRequired: rt,
259
+ userEr: ct,
260
+ loginNameEr: lt,
261
+ pwdEr: ut,
262
+ confirmPwdEr: dt,
263
+ remember: ht,
264
+ forgetPwd: mt,
265
+ toRegister: gt,
266
+ captchaTitle: pt,
267
+ captchaCheckSuccess: ft,
268
+ captchaCheckFail: vt,
269
+ captchaMoveText: kt,
270
+ popupTitle: wt,
271
+ confirmText: bt,
272
+ pact1: Ct,
273
+ pact2: yt,
274
+ pactTitle: Pt,
275
+ hasUserName: _t,
276
+ goLogin: St,
277
+ quickLogin: $t,
278
+ bindUsername: Tt,
279
+ wxtip: Lt
280
+ }, It = "Daftar", Dt = "Masuk", At = "Ketik Username", Et = "Username atau Nomor WA", qt = "Sandi", xt = "Konfirmasi Sandi", Rt = "Kode Undangan ", Nt = "(Wajib)", Ut = "(opsional)", Ft = "8 - 16 Digit Kombinasi Huruf Dan Angka", Mt = "Username atau Nomor WA", Ot = "8 - 16 Digit Kombinasi Huruf Dan Angka", Bt = "Sandi Salah!", Xt = "Ingat", jt = "Lupa Sandi?", Wt = "Daftar", zt = "Silakan tarik slider untuk menyelesaikan puzzle", Kt = "Verifikasi berhasil", Ht = "Verifikasi gagal, coba lagi", Yt = "Geser ke kanan", Gt = "Perhatian!", Jt = "Konfirmasi", Qt = "Saya Berumur Diatas 18 Tahun Dan Membaca ", Zt = "S&K Berlaku", en = "Syarat & Ketentuan", tn = "Akun Aktif, ", nn = "Login Sekarang", on = "Login Sekarang", sn = "Ikat nama pengguna", an = "Notifikasi: Pastikan anda mengingat Username dan kata sandi  untuk login berikutnya.", rn = {
281
+ register: It,
282
+ login: Dt,
283
+ userPh: At,
284
+ loginNamePh: Et,
285
+ pwdPh: qt,
286
+ confirmPwdPh: xt,
287
+ inviteCodePh: Rt,
288
+ required: Nt,
289
+ rnRequired: Ut,
290
+ userEr: Ft,
291
+ loginNameEr: Mt,
292
+ pwdEr: Ot,
293
+ confirmPwdEr: Bt,
294
+ remember: Xt,
295
+ forgetPwd: jt,
296
+ toRegister: Wt,
297
+ captchaTitle: zt,
298
+ captchaCheckSuccess: Kt,
299
+ captchaCheckFail: Ht,
300
+ captchaMoveText: Yt,
301
+ popupTitle: Gt,
302
+ confirmText: Jt,
303
+ pact1: Qt,
304
+ pact2: Zt,
305
+ pactTitle: en,
306
+ hasUserName: tn,
307
+ goLogin: nn,
308
+ quickLogin: on,
309
+ bindUsername: sn,
310
+ wxtip: an
311
+ }, cn = {
312
+ en: Ce,
313
+ zh: Qe,
314
+ vi: Vt,
315
+ id: rn
316
+ }, ln = () => q({
289
317
  locale: "vi",
290
318
  // 用户提供的语言
291
319
  fallbackLocale: "en",
292
- messages: Ht
293
- }), Gt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAg0AAACoAQMAAABZmE+jAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAACJJREFUaN7twTEBAAAAwiD7p7bGDmAAAAAAAAAAAAAAQN4BK/gAAcTOpHoAAAAASUVORK5CYII=", C = (t, e) => {
294
- const n = t.__vccOpts || t;
295
- for (const [s, o] of e)
296
- n[s] = o;
320
+ messages: cn
321
+ }), un = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAg0AAACoAQMAAABZmE+jAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAACJJREFUaN7twTEBAAAAwiD7p7bGDmAAAAAAAAAAAAAAQN4BK/gAAcTOpHoAAAAASUVORK5CYII=", k = (e, t) => {
322
+ const n = e.__vccOpts || e;
323
+ for (const [a, o] of t)
324
+ n[a] = o;
297
325
  return n;
298
- }, Jt = {
326
+ }, dn = {
299
327
  name: "paBanner",
300
- inject: ["api"],
301
- emits: ["bannerClick"],
328
+ inject: ["api", "emitUpward"],
302
329
  data() {
303
330
  return {
304
- skeletonImg: Gt,
331
+ skeletonImg: un,
305
332
  //占位图片
306
333
  currentIndex: 0,
307
334
  //当前显示轮博下标
@@ -326,9 +353,9 @@ const j = "Signup", W = "Login", K = "Enter username", z = "Enter username or mo
326
353
  methods: {
327
354
  /*获取banner数据*/
328
355
  getBannerList() {
329
- this.api.getBannerList().then((t) => {
330
- this.list = t, this.$nextTick(this.startAutoPlay);
331
- }).catch((t) => {
356
+ this.api.getBannerList().then((e) => {
357
+ this.list = e, this.$nextTick(this.startAutoPlay);
358
+ }).catch((e) => {
332
359
  });
333
360
  },
334
361
  /*开启自动轮播*/
@@ -342,15 +369,15 @@ const j = "Signup", W = "Login", K = "Enter username", z = "Enter username or mo
342
369
  clearInterval(this.timer), this.timer = null;
343
370
  },
344
371
  /*获取轮博项的偏移值*/
345
- getItemOffset(t) {
346
- const e = t - this.currentIndex, n = this.list.length * 100;
347
- let s = t * 100;
348
- return e > 1 && (s -= n), e < -1 && (s += n), s;
372
+ getItemOffset(e) {
373
+ const t = e - this.currentIndex, n = this.list.length * 100;
374
+ let a = e * 100;
375
+ return t > 1 && (a -= n), t < -1 && (a += n), a;
349
376
  },
350
377
  /*轮博切换*/
351
- slide(t) {
352
- const e = this.currentIndex + t, n = this.list.length - 1, s = e < 0 ? n : e > n ? 0 : e;
353
- this.startSliding(), this.currentIndex = s;
378
+ slide(e) {
379
+ const t = this.currentIndex + e, n = this.list.length - 1, a = t < 0 ? n : t > n ? 0 : t;
380
+ this.startSliding(), this.currentIndex = a;
354
381
  },
355
382
  /*轮播标记处理*/
356
383
  startSliding() {
@@ -363,90 +390,90 @@ const j = "Signup", W = "Login", K = "Enter username", z = "Enter username or mo
363
390
  * @param event 事件
364
391
  * @returns X坐标
365
392
  */
366
- getCurrentCoordinate(t) {
367
- let e = t.originalEvent || t;
368
- if ("pageX" in e)
369
- return Math.round(e.pageX);
370
- let n = e.changedTouches || e.targetTouches || [];
393
+ getCurrentCoordinate(e) {
394
+ let t = e.originalEvent || e;
395
+ if ("pageX" in t)
396
+ return Math.round(t.pageX);
397
+ let n = t.changedTouches || t.targetTouches || [];
371
398
  if (n.length > 0) {
372
- const s = n[0];
373
- return "pageX" in s ? Math.round(s.pageX) : Math.round(s.clientX);
399
+ const a = n[0];
400
+ return "pageX" in a ? Math.round(a.pageX) : Math.round(a.clientX);
374
401
  }
375
402
  return 0;
376
403
  },
377
404
  /*Start*/
378
- onStart(t) {
379
- const e = this.getCurrentCoordinate(t);
380
- if (this.stopAutoPlay(), this.startX = e, t.type == "mousedown")
405
+ onStart(e) {
406
+ const t = this.getCurrentCoordinate(e);
407
+ if (this.stopAutoPlay(), this.startX = t, e.type == "mousedown")
381
408
  try {
382
409
  document.addEventListener("mousemove", this.onMove), document.addEventListener("mouseup", this.onEnd);
383
410
  } catch {
384
411
  }
385
412
  },
386
413
  /*Move*/
387
- onMove(t) {
388
- t == null || t.preventDefault(), t.touches && t.touches.length > 0 && (t = t.touches[0]);
389
- const e = this.getCurrentCoordinate(t), n = this.startX, s = e - n;
390
- this.moveWidth = s;
414
+ onMove(e) {
415
+ e == null || e.preventDefault(), e.touches && e.touches.length > 0 && (e = e.touches[0]);
416
+ const t = this.getCurrentCoordinate(e), n = this.startX, a = t - n;
417
+ this.moveWidth = a;
391
418
  },
392
419
  /*End*/
393
- onEnd(t) {
394
- const { moveWidth: e } = this;
395
- if (Math.abs(e) > 120 ? this.slide(e > 0 ? -1 : 1) : this.startSliding(), this.moveWidth = 0, t.type == "mouseup")
420
+ onEnd(e) {
421
+ const { moveWidth: t } = this;
422
+ if (Math.abs(t) > 120 ? this.slide(t > 0 ? -1 : 1) : this.startSliding(), this.moveWidth = 0, e.type == "mouseup")
396
423
  try {
397
424
  document.removeEventListener("mousemove", this.onMove), document.removeEventListener("mouseup", this.onEnd);
398
425
  } catch {
399
426
  }
400
427
  },
401
428
  /*处理banner点击*/
402
- handlerClick(t) {
403
- if (t)
404
- return /^http/.test(t) ? this.$emit("bannerClick", { type: "third", url: t }) : /^promotion\//.test(t) ? this.$emit("bannerClick", { type: "promo", promoId: t.split("/")[1] }) : this.$emit("bannerClick", { type: "router", routerName: t });
429
+ handlerClick(e) {
430
+ if (e)
431
+ return /^http/.test(e) ? this.emitUpward("bannerClick", { type: "third", url: e }) : /^promotion\//.test(e) ? this.emitUpward("bannerClick", { type: "promo", promoId: e.split("/")[1] }) : this.emitUpward("bannerClick", { type: "router", routerName: e });
405
432
  }
406
433
  }
407
- }, Zt = { class: "pa-banner" }, Qt = { class: "pa-banner-inner" }, en = ["src"], tn = ["onClick"], nn = { class: "pa-ndicators" };
408
- function on(t, e, n, s, o, i) {
409
- return u(), d("div", Zt, [
410
- a("div", Qt, [
411
- a("img", {
434
+ }, hn = { class: "pa-banner" }, mn = { class: "pa-banner-inner" }, gn = ["src"], pn = ["onClick"], fn = { class: "pa-ndicators" };
435
+ function vn(e, t, n, a, o, i) {
436
+ return l(), d("div", hn, [
437
+ s("div", mn, [
438
+ s("img", {
412
439
  class: "pa-banner-skeleton",
413
440
  src: o.skeletonImg
414
- }, null, 8, en),
415
- a("div", {
441
+ }, null, 8, gn),
442
+ s("div", {
416
443
  class: "pa-carousel",
417
- onTouchstart: e[0] || (e[0] = (...r) => i.onStart && i.onStart(...r)),
418
- onTouchmove: e[1] || (e[1] = (...r) => i.onMove && i.onMove(...r)),
419
- onTouchend: e[2] || (e[2] = (...r) => i.onEnd && i.onEnd(...r)),
420
- onMousedown: e[3] || (e[3] = (...r) => i.onStart && i.onStart(...r))
444
+ onTouchstart: t[0] || (t[0] = (...r) => i.onStart && i.onStart(...r)),
445
+ onTouchmove: t[1] || (t[1] = (...r) => i.onMove && i.onMove(...r)),
446
+ onTouchend: t[2] || (t[2] = (...r) => i.onEnd && i.onEnd(...r)),
447
+ onMousedown: t[3] || (t[3] = (...r) => i.onStart && i.onStart(...r))
421
448
  }, [
422
- a("div", {
449
+ s("div", {
423
450
  class: "pa-banner-track",
424
- style: S({
451
+ style: _({
425
452
  transform: `translateX(calc(-${o.currentIndex * 100}% + ${o.moveWidth}px))`,
426
453
  transitionDuration: o.isSliding ? "500ms" : "0ms"
427
454
  })
428
455
  }, [
429
- (u(!0), d(T, null, E(o.list, (r, h) => (u(), d("div", {
430
- key: h,
456
+ (l(!0), d(S, null, D(o.list, (r, u) => (l(), d("div", {
457
+ key: u,
431
458
  class: "pa-banner-item",
432
- onClick: (g) => i.handlerClick(r.href),
433
- style: S({
459
+ onClick: (v) => i.handlerClick(r.href),
460
+ style: _({
434
461
  backgroundImage: `url(${r.url})`,
435
- transform: `translateX(${i.getItemOffset(h)}%)`
462
+ transform: `translateX(${i.getItemOffset(u)}%)`
436
463
  })
437
- }, null, 12, tn))), 128))
464
+ }, null, 12, pn))), 128))
438
465
  ], 4),
439
- a("div", nn, [
440
- (u(!0), d(T, null, E(o.list, (r, h) => (u(), d("div", {
441
- key: h,
442
- class: w(["pa-indicator", { active: h === o.currentIndex }])
466
+ s("div", fn, [
467
+ (l(!0), d(S, null, D(o.list, (r, u) => (l(), d("div", {
468
+ key: u,
469
+ class: b(["pa-indicator", { active: u === o.currentIndex }])
443
470
  }, null, 2))), 128))
444
471
  ])
445
472
  ], 32)
446
473
  ])
447
474
  ]);
448
475
  }
449
- const sn = /* @__PURE__ */ C(Jt, [["render", on]]), an = {
476
+ const kn = /* @__PURE__ */ k(dn, [["render", vn]]), wn = {
450
477
  name: "paDialog",
451
478
  inject: ["$t"],
452
479
  emits: ["update:modelValue"],
@@ -461,34 +488,34 @@ const sn = /* @__PURE__ */ C(Jt, [["render", on]]), an = {
461
488
  message: String
462
489
  //消息内容
463
490
  }
464
- }, rn = { class: "pa-dialog" }, cn = {
491
+ }, bn = { class: "pa-dialog" }, Cn = {
465
492
  key: 0,
466
493
  class: "pa-message"
467
- }, ln = { class: "pa-message-title" }, un = { class: "pa-message-box" }, dn = { class: "pa-message-contx" }, hn = { class: "pa-message-btnbox" }, mn = {
494
+ }, yn = { class: "pa-message-title" }, Pn = { class: "pa-message-box" }, _n = { class: "pa-message-contx" }, Sn = { class: "pa-message-btnbox" }, $n = {
468
495
  key: 1,
469
496
  class: "pa-loading"
470
- }, gn = /* @__PURE__ */ a("div", { class: "pa-loading-bg" }, null, -1), pn = [
471
- gn
497
+ }, Tn = /* @__PURE__ */ s("div", { class: "pa-loading-bg" }, null, -1), Ln = [
498
+ Tn
472
499
  ];
473
- function fn(t, e, n, s, o, i) {
474
- return b((u(), d("div", rn, [
475
- n.type ? (u(), d("div", cn, [
476
- a("p", ln, m(i.$t("popupTitle")), 1),
477
- a("div", un, [
478
- a("p", dn, m(n.message), 1)
500
+ function Vn(e, t, n, a, o, i) {
501
+ return y((l(), d("div", bn, [
502
+ n.type ? (l(), d("div", Cn, [
503
+ s("p", yn, h(i.$t("popupTitle")), 1),
504
+ s("div", Pn, [
505
+ s("p", _n, h(n.message), 1)
479
506
  ]),
480
- a("div", hn, [
481
- a("div", {
507
+ s("div", Sn, [
508
+ s("div", {
482
509
  class: "pa-message-btn",
483
- onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", n.modelValue - 1))
484
- }, m(i.$t("confirmText")), 1)
510
+ onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", n.modelValue - 1))
511
+ }, h(i.$t("confirmText")), 1)
485
512
  ])
486
- ])) : (u(), d("div", mn, pn))
513
+ ])) : (l(), d("div", $n, Ln))
487
514
  ], 512)), [
488
- [y, n.modelValue >= 1]
515
+ [P, n.modelValue >= 1]
489
516
  ]);
490
517
  }
491
- const vn = /* @__PURE__ */ C(an, [["render", fn]]), kn = {
518
+ const In = /* @__PURE__ */ k(wn, [["render", Vn]]), Dn = {
492
519
  name: "paFormItem",
493
520
  emits: ["update:modelValue"],
494
521
  inject: ["paForm"],
@@ -525,77 +552,77 @@ const vn = /* @__PURE__ */ C(an, [["render", fn]]), kn = {
525
552
  this.type != this.realType && (this.realType = this.type);
526
553
  });
527
554
  },
528
- handleInput(t) {
555
+ handleInput(e) {
529
556
  var n;
530
- const e = ((((n = t.detail) == null ? void 0 : n.value) ?? t.target.value) || "").trim();
531
- this.$emit("update:modelValue", e), this.$nextTick(() => {
557
+ const t = ((((n = e.detail) == null ? void 0 : n.value) ?? e.target.value) || "").trim();
558
+ this.$emit("update:modelValue", t), this.$nextTick(() => {
532
559
  this.validate();
533
560
  });
534
561
  },
535
562
  validate() {
536
- const { rule: t, modelValue: e } = this;
537
- if (!t)
563
+ const { rule: e, modelValue: t } = this;
564
+ if (!e)
538
565
  return !0;
539
- const n = t(e) || "";
566
+ const n = e(t) || "";
540
567
  return this.errorMsg = n, !n;
541
568
  }
542
569
  }
543
- }, wn = { class: "pa-form-item" }, Cn = { class: "pa-input-content" }, Pn = ["placeholder", "disabled", "value", "type"];
544
- function bn(t, e, n, s, o, i) {
545
- return u(), d("div", wn, [
546
- a("div", Cn, [
547
- n.prefixIcon ? (u(), d("i", {
570
+ }, An = { class: "pa-form-item" }, En = { class: "pa-input-content" }, qn = ["placeholder", "disabled", "value", "type"];
571
+ function xn(e, t, n, a, o, i) {
572
+ return l(), d("div", An, [
573
+ s("div", En, [
574
+ n.prefixIcon ? (l(), d("i", {
548
575
  key: 0,
549
- class: w(["iconfont pa-prefix-icon", n.prefixIcon])
550
- }, null, 2)) : v("", !0),
551
- a("input", {
576
+ class: b(["iconfont pa-prefix-icon", n.prefixIcon])
577
+ }, null, 2)) : f("", !0),
578
+ s("input", {
552
579
  class: "pa-form-item--input",
553
580
  placeholder: n.placeholder,
554
581
  disabled: n.disabled,
555
582
  value: n.modelValue,
556
583
  type: o.showPassword ? "text" : o.realType,
557
- onInput: e[0] || (e[0] = (...r) => i.handleInput && i.handleInput(...r)),
558
- onFocusOnce: e[1] || (e[1] = (...r) => i.handlerFocus && i.handlerFocus(...r))
559
- }, null, 40, Pn),
560
- n.type == "password" && n.modelValue ? (u(), d("i", {
584
+ onInput: t[0] || (t[0] = (...r) => i.handleInput && i.handleInput(...r)),
585
+ onFocusOnce: t[1] || (t[1] = (...r) => i.handlerFocus && i.handlerFocus(...r))
586
+ }, null, 40, qn),
587
+ n.type == "password" && n.modelValue ? (l(), d("i", {
561
588
  key: 1,
562
- class: w(["iconfont", o.showPassword ? "icon-eye-slash-filled" : "icon-eye-filled"]),
563
- onClick: e[2] || (e[2] = (r) => o.showPassword = !o.showPassword)
564
- }, null, 2)) : v("", !0)
589
+ class: b(["iconfont", o.showPassword ? "icon-eye-slash-filled" : "icon-eye-filled"]),
590
+ onClick: t[2] || (t[2] = (r) => o.showPassword = !o.showPassword)
591
+ }, null, 2)) : f("", !0)
565
592
  ]),
566
- a("p", {
567
- class: w(["pa-form-item--error", { active: o.errorMsg }])
568
- }, m(o.errorMsg), 3)
593
+ s("p", {
594
+ class: b(["pa-form-item--error", { active: o.errorMsg }])
595
+ }, h(o.errorMsg), 3)
569
596
  ]);
570
597
  }
571
- const yn = /* @__PURE__ */ C(kn, [["render", bn]]), Sn = {
598
+ const Rn = /* @__PURE__ */ k(Dn, [["render", xn]]), Nn = {
572
599
  name: "paCheckbox",
573
600
  emits: ["update:modelValue"],
574
601
  props: {
575
602
  modelValue: Boolean
576
603
  }
577
- }, Tn = { class: "iconfont icon-checked" };
578
- function $n(t, e, n, s, o, i) {
579
- return u(), d("div", {
604
+ }, Un = { class: "iconfont icon-checked" };
605
+ function Fn(e, t, n, a, o, i) {
606
+ return l(), d("div", {
580
607
  class: "pa-checkbox",
581
- onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", !n.modelValue))
608
+ onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", !n.modelValue))
582
609
  }, [
583
- a("div", {
584
- class: w(["pa-checkbox--input", { active: n.modelValue }])
610
+ s("div", {
611
+ class: b(["pa-checkbox--input", { active: n.modelValue }])
585
612
  }, [
586
- b(a("i", Tn, null, 512), [
587
- [y, n.modelValue]
613
+ y(s("i", Un, null, 512), [
614
+ [P, n.modelValue]
588
615
  ])
589
616
  ], 2),
590
- D(t.$slots, "default")
617
+ x(e.$slots, "default")
591
618
  ]);
592
619
  }
593
- const Ln = /* @__PURE__ */ C(Sn, [["render", $n]]), En = (t, e) => {
594
- const n = t.__vccOpts || t;
595
- for (const [s, o] of e)
596
- n[s] = o;
620
+ const Mn = /* @__PURE__ */ k(Nn, [["render", Fn]]), On = (e, t) => {
621
+ const n = e.__vccOpts || e;
622
+ for (const [a, o] of t)
623
+ n[a] = o;
597
624
  return n;
598
- }, In = {
625
+ }, Bn = {
599
626
  name: "BehaviorCaptcha",
600
627
  emits: ["update:modelValue", "success"],
601
628
  props: {
@@ -655,30 +682,30 @@ const Ln = /* @__PURE__ */ C(Sn, [["render", $n]]), En = (t, e) => {
655
682
  watch: {
656
683
  modelValue: {
657
684
  immediate: !0,
658
- handler(t) {
659
- t && this.generate();
685
+ handler(e) {
686
+ e && this.generate();
660
687
  }
661
688
  }
662
689
  },
663
690
  methods: {
664
691
  /*生成验证器*/
665
692
  generate() {
666
- var t;
667
- this.imgSrc = "", this.generateFun && (this.showLoading = !0, this.checkStatus = null, this.genError = !1, (t = this.generateFun) == null || t.call(this).then((e) => {
668
- const { captcha: n = {}, id: s } = e, { checkParams: o } = this;
669
- this.imgSrc = n.backgroundImage, this.tempImgSrc = n.templateImage, o.id = s, o.track.startTime = /* @__PURE__ */ new Date(), o.track.trackList = [];
670
- }).catch((e) => {
693
+ var e;
694
+ this.imgSrc = "", this.generateFun && (this.showLoading = !0, this.checkStatus = null, this.genError = !1, (e = this.generateFun) == null || e.call(this).then((t) => {
695
+ const { captcha: n = {}, id: a } = t, { checkParams: o } = this;
696
+ this.imgSrc = n.backgroundImage, this.tempImgSrc = n.templateImage, o.id = a, o.track.startTime = /* @__PURE__ */ new Date(), o.track.trackList = [];
697
+ }).catch((t) => {
671
698
  this.genError = !0;
672
- }).finally((e) => {
699
+ }).finally((t) => {
673
700
  this.showLoading = !1;
674
701
  }));
675
702
  },
676
703
  /*验证*/
677
704
  check() {
678
- var t;
679
- this.checkFun && (this.showLoading = !0, (t = this.checkFun) == null || t.call(this, this.checkParams).then((e) => {
680
- this.showLoading = !1, this.moveWidth = 0, this.checkStatus = e ? "success" : "fail", setTimeout(() => {
681
- e ? (this.$emit("update:modelValue", !1), this.$emit("success", e)) : this.generate();
705
+ var e;
706
+ this.checkFun && (this.showLoading = !0, (e = this.checkFun) == null || e.call(this, this.checkParams).then((t) => {
707
+ this.showLoading = !1, this.moveWidth = 0, this.checkStatus = t ? "success" : "fail", setTimeout(() => {
708
+ t ? (this.$emit("update:modelValue", !1), this.$emit("success", t)) : this.generate();
682
709
  }, 1500);
683
710
  }));
684
711
  },
@@ -687,64 +714,64 @@ const Ln = /* @__PURE__ */ C(Sn, [["render", $n]]), En = (t, e) => {
687
714
  * @param event 事件
688
715
  * @returns {{x: number, y: number}}
689
716
  */
690
- getCurrentCoordinate(t) {
691
- if (t.pageX !== null && t.pageX !== void 0)
717
+ getCurrentCoordinate(e) {
718
+ if (e.pageX !== null && e.pageX !== void 0)
692
719
  return {
693
- x: Math.round(t.pageX),
694
- y: Math.round(t.pageY)
720
+ x: Math.round(e.pageX),
721
+ y: Math.round(e.pageY)
695
722
  };
696
- let e;
697
- return t.changedTouches ? e = t.changedTouches : t.targetTouches ? e = t.targetTouches : t.originalEvent && t.originalEvent.targetTouches && (e = t.originalEvent.targetTouches), e[0].pageX !== null && e[0].pageX !== void 0 ? {
698
- x: Math.round(e[0].pageX),
699
- y: Math.round(e[0].pageY)
723
+ let t;
724
+ return e.changedTouches ? t = e.changedTouches : e.targetTouches ? t = e.targetTouches : e.originalEvent && e.originalEvent.targetTouches && (t = e.originalEvent.targetTouches), t[0].pageX !== null && t[0].pageX !== void 0 ? {
725
+ x: Math.round(t[0].pageX),
726
+ y: Math.round(t[0].pageY)
700
727
  } : {
701
- x: Math.round(e[0].clientX),
702
- y: Math.round(e[0].clientY)
728
+ x: Math.round(t[0].clientX),
729
+ y: Math.round(t[0].clientY)
703
730
  };
704
731
  },
705
732
  /*Start*/
706
- onStart(t) {
733
+ onStart(e) {
707
734
  if (this.showLoading || this.checkStatus)
708
735
  return;
709
- const e = this.getCurrentCoordinate(t), n = e.x, s = e.y, { startTime: o, trackList: i } = this.checkParams.track;
710
- if (this.startX = n, this.startY = s, i.push({
736
+ const t = this.getCurrentCoordinate(e), n = t.x, a = t.y, { startTime: o, trackList: i } = this.checkParams.track;
737
+ if (this.startX = n, this.startY = a, i.push({
711
738
  x: 0,
712
739
  y: 0,
713
740
  type: "down",
714
741
  t: (/* @__PURE__ */ new Date()).getTime() - o.getTime()
715
- }), t.type == "mousedown")
742
+ }), e.type == "mousedown")
716
743
  try {
717
744
  document.addEventListener("mousemove", this.onMove), document.addEventListener("mouseup", this.onEnd);
718
745
  } catch {
719
746
  }
720
747
  },
721
748
  /*Move*/
722
- onMove(t) {
749
+ onMove(e) {
723
750
  if (this.showLoading || this.checkStatus)
724
751
  return;
725
- t == null || t.preventDefault(), t.touches && t.touches.length > 0 && (t = t.touches[0]);
726
- const e = this.getCurrentCoordinate(t), n = e.x, s = e.y, { startX: o, startY: i } = this, { startTime: r, trackList: h } = this.checkParams.track, g = 245;
727
- let c = n - o, l = s - i;
728
- h.push({
729
- x: c,
730
- y: l,
752
+ e == null || e.preventDefault(), e.touches && e.touches.length > 0 && (e = e.touches[0]);
753
+ const t = this.getCurrentCoordinate(e), n = t.x, a = t.y, { startX: o, startY: i } = this, { startTime: r, trackList: u } = this.checkParams.track, v = 245;
754
+ let p = n - o, c = a - i;
755
+ u.push({
756
+ x: p,
757
+ y: c,
731
758
  type: "move",
732
759
  t: (/* @__PURE__ */ new Date()).getTime() - r.getTime()
733
- }), c = Math.min(Math.max(c, 0), g), this.moveWidth = c;
760
+ }), p = Math.min(Math.max(p, 0), v), this.moveWidth = p;
734
761
  },
735
762
  /*End*/
736
- onEnd(t) {
763
+ onEnd(e) {
737
764
  if (this.showLoading || this.checkStatus)
738
765
  return;
739
- const e = this.getCurrentCoordinate(t);
740
- let n = e.x, s = e.y;
741
- const { startX: o, startY: i } = this, { startTime: r, trackList: h } = this.checkParams.track;
742
- if (h.push({
766
+ const t = this.getCurrentCoordinate(e);
767
+ let n = t.x, a = t.y;
768
+ const { startX: o, startY: i } = this, { startTime: r, trackList: u } = this.checkParams.track;
769
+ if (u.push({
743
770
  x: n - o,
744
- y: s - i,
771
+ y: a - i,
745
772
  type: "up",
746
773
  t: (/* @__PURE__ */ new Date()).getTime() - r.getTime()
747
- }), this.checkParams.track.stopTime = /* @__PURE__ */ new Date(), t.type == "mouseup")
774
+ }), this.checkParams.track.stopTime = /* @__PURE__ */ new Date(), e.type == "mouseup")
748
775
  try {
749
776
  document.removeEventListener("mousemove", this.onMove), document.removeEventListener("mouseup", this.onEnd);
750
777
  } catch {
@@ -752,107 +779,107 @@ const Ln = /* @__PURE__ */ C(Sn, [["render", $n]]), En = (t, e) => {
752
779
  this.check();
753
780
  }
754
781
  }
755
- }, Vn = { class: "behavior-captcha" }, _n = { class: "content" }, An = { class: "captcha-topbox" }, Rn = { class: "title" }, Dn = { class: "captcha-imgbox" }, xn = { class: "flash-box" }, Nn = { class: "loading-box" }, Mn = ["src"], qn = ["src"], Fn = {
782
+ }, Xn = { class: "behavior-captcha" }, jn = { class: "content" }, Wn = { class: "captcha-topbox" }, zn = { class: "title" }, Kn = { class: "captcha-imgbox" }, Hn = { class: "flash-box" }, Yn = { class: "loading-box" }, Gn = ["src"], Jn = ["src"], Qn = {
756
783
  key: 1,
757
784
  class: "check-tip"
758
- }, On = { class: "check-tip-inner" }, Bn = { class: "tip-txt" }, Un = {
785
+ }, Zn = { class: "check-tip-inner" }, eo = { class: "tip-txt" }, to = {
759
786
  key: 2,
760
787
  class: "big-flash"
761
- }, Xn = { class: "captcha-movebox" }, jn = { class: "move-bg" }, Wn = { class: "move-txt" };
762
- function Kn(t, e, n, s, o, i) {
763
- return b((u(), d("div", Vn, [
764
- a("div", _n, [
765
- a("div", An, [
766
- a("p", Rn, m(n.textData.title || "请拖动滑块完成拼图"), 1),
767
- a("i", {
788
+ }, no = { class: "captcha-movebox" }, oo = { class: "move-bg" }, io = { class: "move-txt" };
789
+ function so(e, t, n, a, o, i) {
790
+ return y((l(), d("div", Xn, [
791
+ s("div", jn, [
792
+ s("div", Wn, [
793
+ s("p", zn, h(n.textData.title || "请拖动滑块完成拼图"), 1),
794
+ s("i", {
768
795
  class: "font-icon close",
769
- onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", !1))
796
+ onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", !1))
770
797
  })
771
798
  ]),
772
- a("div", Dn, [
773
- a("div", xn, [
774
- b(a("i", {
799
+ s("div", Kn, [
800
+ s("div", Hn, [
801
+ y(s("i", {
775
802
  class: "font-icon flash",
776
- onClick: e[1] || (e[1] = (...r) => i.generate && i.generate(...r))
803
+ onClick: t[1] || (t[1] = (...r) => i.generate && i.generate(...r))
777
804
  }, null, 512), [
778
- [y, !(o.showLoading || o.checkStatus || o.genError)]
805
+ [P, !(o.showLoading || o.checkStatus || o.genError)]
779
806
  ])
780
807
  ]),
781
- b(a("div", Nn, e[7] || (e[7] = [
782
- a("i", { class: "loading" }, null, -1)
808
+ y(s("div", Yn, t[7] || (t[7] = [
809
+ s("i", { class: "loading" }, null, -1)
783
810
  ]), 512), [
784
- [y, o.showLoading]
811
+ [P, o.showLoading]
785
812
  ]),
786
- o.imgSrc ? (u(), d(T, { key: 0 }, [
787
- a("img", {
813
+ o.imgSrc ? (l(), d(S, { key: 0 }, [
814
+ s("img", {
788
815
  class: "captcha-img",
789
816
  src: o.imgSrc
790
- }, null, 8, Mn),
791
- a("div", {
817
+ }, null, 8, Gn),
818
+ s("div", {
792
819
  class: "temp-img-box",
793
- style: S(`transform: translate(${o.moveWidth}px, 0);`)
820
+ style: _(`transform: translate(${o.moveWidth}px, 0);`)
794
821
  }, [
795
- a("img", {
822
+ s("img", {
796
823
  class: "temp-img",
797
824
  src: o.tempImgSrc
798
- }, null, 8, qn)
825
+ }, null, 8, Jn)
799
826
  ], 4)
800
- ], 64)) : v("", !0),
801
- o.checkStatus ? (u(), d("div", Fn, [
802
- a("div", On, [
803
- a("i", {
804
- class: w(["font-icon", o.checkStatus])
827
+ ], 64)) : f("", !0),
828
+ o.checkStatus ? (l(), d("div", Qn, [
829
+ s("div", Zn, [
830
+ s("i", {
831
+ class: b(["font-icon", o.checkStatus])
805
832
  }, null, 2),
806
- a("p", Bn, m(o.checkStatus == "success" ? n.textData.checkSuccess || "验证通过" : n.textData.checkFail || "验证失败,请重新尝试"), 1)
833
+ s("p", eo, h(o.checkStatus == "success" ? n.textData.checkSuccess || "验证通过" : n.textData.checkFail || "验证失败,请重新尝试"), 1)
807
834
  ])
808
- ])) : v("", !0),
809
- o.genError ? (u(), d("div", Un, [
810
- a("i", {
835
+ ])) : f("", !0),
836
+ o.genError ? (l(), d("div", to, [
837
+ s("i", {
811
838
  class: "font-icon flash",
812
- onClick: e[2] || (e[2] = (...r) => i.generate && i.generate(...r))
839
+ onClick: t[2] || (t[2] = (...r) => i.generate && i.generate(...r))
813
840
  })
814
- ])) : v("", !0)
841
+ ])) : f("", !0)
815
842
  ]),
816
- a("div", Xn, [
817
- e[9] || (e[9] = a("div", { class: "move-shadow" }, null, -1)),
818
- a("div", {
843
+ s("div", no, [
844
+ t[9] || (t[9] = s("div", { class: "move-shadow" }, null, -1)),
845
+ s("div", {
819
846
  class: "move-mask",
820
- style: S(`width: ${o.moveWidth}px`)
847
+ style: _(`width: ${o.moveWidth}px`)
821
848
  }, null, 4),
822
- a("div", {
849
+ s("div", {
823
850
  class: "move-btn-box",
824
- onTouchstart: e[3] || (e[3] = (...r) => i.onStart && i.onStart(...r)),
825
- onTouchmove: e[4] || (e[4] = (...r) => i.onMove && i.onMove(...r)),
826
- onTouchend: e[5] || (e[5] = (...r) => i.onEnd && i.onEnd(...r)),
827
- onMousedown: e[6] || (e[6] = (...r) => i.onStart && i.onStart(...r))
828
- }, e[8] || (e[8] = [
829
- a("div", { class: "move-btn" }, [
830
- a("i", { class: "font-icon right" })
851
+ onTouchstart: t[3] || (t[3] = (...r) => i.onStart && i.onStart(...r)),
852
+ onTouchmove: t[4] || (t[4] = (...r) => i.onMove && i.onMove(...r)),
853
+ onTouchend: t[5] || (t[5] = (...r) => i.onEnd && i.onEnd(...r)),
854
+ onMousedown: t[6] || (t[6] = (...r) => i.onStart && i.onStart(...r))
855
+ }, t[8] || (t[8] = [
856
+ s("div", { class: "move-btn" }, [
857
+ s("i", { class: "font-icon right" })
831
858
  ], -1)
832
859
  ]), 32),
833
- a("div", jn, [
834
- a("p", Wn, m(n.textData.moveText || "向右滑动"), 1)
860
+ s("div", oo, [
861
+ s("p", io, h(n.textData.moveText || "向右滑动"), 1)
835
862
  ])
836
863
  ])
837
864
  ])
838
865
  ], 512)), [
839
- [y, n.modelValue]
866
+ [P, n.modelValue]
840
867
  ]);
841
868
  }
842
- const zn = /* @__PURE__ */ En(In, [["render", Kn]]), Hn = {
869
+ const ao = /* @__PURE__ */ On(Bn, [["render", so]]), ro = {
843
870
  name: "paBehaviorCaptcha",
844
871
  inject: ["$t", "api"],
845
872
  components: {
846
- BehaviorCaptcha: zn
873
+ BehaviorCaptcha: ao
847
874
  },
848
875
  computed: {
849
876
  captchaTextData() {
850
- const { $t: t } = this;
877
+ const { $t: e } = this;
851
878
  return {
852
- title: t("captchaTitle"),
853
- checkSuccess: t("captchaCheckSuccess"),
854
- checkFail: t("captchaCheckFail"),
855
- moveText: t("captchaMoveText")
879
+ title: e("captchaTitle"),
880
+ checkSuccess: e("captchaCheckSuccess"),
881
+ checkFail: e("captchaCheckFail"),
882
+ moveText: e("captchaMoveText")
856
883
  };
857
884
  }
858
885
  },
@@ -862,31 +889,150 @@ const zn = /* @__PURE__ */ En(In, [["render", Kn]]), Hn = {
862
889
  return this.api.generateCaptcha();
863
890
  },
864
891
  /*校验验证码*/
865
- checkFun(t) {
866
- return this.api.checkCaptcha(t);
892
+ checkFun(e) {
893
+ return this.api.checkCaptcha(e);
867
894
  }
868
895
  }
869
896
  };
870
- function Yn(t, e, n, s, o, i) {
871
- const r = f("behavior-captcha");
872
- return u(), P(r, x(t.$attrs, {
897
+ function co(e, t, n, a, o, i) {
898
+ const r = g("behavior-captcha");
899
+ return l(), C(r, R(e.$attrs, {
873
900
  textData: i.captchaTextData,
874
901
  generateFun: i.generateFun,
875
902
  checkFun: i.checkFun
876
903
  }), null, 16, ["textData", "generateFun", "checkFun"]);
877
904
  }
878
- const Gn = /* @__PURE__ */ C(Hn, [["render", Yn]]);
879
- var Jn = { zh: { serviceLang: "zh_CN", mobileReg: "^0[1-9]\\d{8}$" }, vi: { serviceLang: "vi_VN", mobileReg: "^0[1-9]\\d{8}$" }, id: { serviceLang: "id_ID", mobileReg: "^08\\d{8,11}$" } };
880
- const A = {
905
+ const lo = /* @__PURE__ */ k(ro, [["render", co]]), uo = {
906
+ name: "paTgLogin",
907
+ inject: ["$t", "api", "emitUpward", "authSuccess"],
908
+ emits: ["appQuickLogin"],
909
+ data() {
910
+ return {
911
+ isApp: typeof window > "u",
912
+ //是否在APP中使用
913
+ useDialog: !1,
914
+ //是否用弹框的形式打开授权
915
+ config: null
916
+ //后台配置数据
917
+ };
918
+ },
919
+ computed: {
920
+ // iframe src地址
921
+ iframeSrc() {
922
+ try {
923
+ const { tgAuthDomain: e, tgBotId: t } = this.config;
924
+ return `${e}/static/html/tgauth.html?iframe=1&botId=${t}&tgAutgOrigin=${encodeURIComponent(location.origin)}`;
925
+ } catch {
926
+ return "";
927
+ }
928
+ }
929
+ },
930
+ created() {
931
+ this.init();
932
+ },
933
+ unmounted() {
934
+ try {
935
+ this.useDialog && window.removeEventListener("message", this.resultListenerForDialog);
936
+ } catch {
937
+ }
938
+ },
939
+ methods: {
940
+ /*初始化*/
941
+ init() {
942
+ var r;
943
+ if (this.isApp) {
944
+ this.getConfig();
945
+ return;
946
+ }
947
+ const e = this.getWindow(), t = e.location ?? {}, n = t.hash, a = /[#\?\&]tgAuthResult=([A-Za-z0-9\-_=]*)$/, o = n.match(a);
948
+ if (o) {
949
+ t.hash = n.replace(a, "");
950
+ const u = this.formatResult(o[1] || "");
951
+ u && this.authSuccess(u);
952
+ }
953
+ this.getConfig();
954
+ const i = e.innerWidth >= 580;
955
+ if (this.useDialog = i, i) {
956
+ (r = e.addEventListener) == null || r.call(e, "message", this.resultListenerForDialog);
957
+ return;
958
+ }
959
+ },
960
+ /*获取window对象*/
961
+ getWindow() {
962
+ try {
963
+ return window || {};
964
+ } catch {
965
+ return {};
966
+ }
967
+ },
968
+ /*格式化数据*/
969
+ formatResult(e) {
970
+ try {
971
+ e = e.replace(/-/g, "+").replace(/_/g, "/");
972
+ const t = e.length % 4;
973
+ return t > 1 && (e += new Array(5 - t).join("=")), JSON.parse(window.atob(e));
974
+ } catch {
975
+ return !1;
976
+ }
977
+ },
978
+ /*获取后台配置数据*/
979
+ getConfig() {
980
+ this.api.getConfig().then((e) => {
981
+ this.config = e;
982
+ });
983
+ },
984
+ /*弹框形式打开时,监听来自iframe里的message*/
985
+ resultListenerForDialog(e) {
986
+ var t;
987
+ e.origin == ((t = this.config) == null ? void 0 : t.tgAuthDomain) && this.authSuccess(e.data);
988
+ },
989
+ /*tg快捷登录按钮点击*/
990
+ tgLoginHandler() {
991
+ const { tgAuthDomain: e, tgBotId: t } = this.config;
992
+ if (this.isApp)
993
+ this.emitUpward("appQuickLogin", { tgAuthDomain: e, tgBotId: t });
994
+ else
995
+ try {
996
+ const n = `${e}/static/html/tgauth.html?rpl=1&botId=${t}&returnTo=${encodeURIComponent(location.href)}`;
997
+ window.location.replace(n);
998
+ } catch {
999
+ }
1000
+ }
1001
+ }
1002
+ }, ho = { class: "pa-tg-login" }, mo = { class: "pa-quick-box" }, go = { class: "pa-quick-label" }, po = { class: "pa-tg-box" }, fo = ["src"];
1003
+ function vo(e, t, n, a, o, i) {
1004
+ return l(), d("div", ho, [
1005
+ s("div", mo, [
1006
+ s("span", go, h(i.$t("quickLogin")), 1)
1007
+ ]),
1008
+ s("div", po, [
1009
+ o.useDialog ? (l(), d(S, { key: 0 }, [
1010
+ i.iframeSrc ? (l(), d("iframe", {
1011
+ key: 0,
1012
+ class: "pa-iframe-btn",
1013
+ src: i.iframeSrc
1014
+ }, null, 8, fo)) : f("", !0)
1015
+ ], 64)) : (l(), d("i", {
1016
+ key: 1,
1017
+ class: "iconfont icon-tg",
1018
+ onClick: t[0] || (t[0] = (...r) => i.tgLoginHandler && i.tgLoginHandler(...r))
1019
+ }))
1020
+ ])
1021
+ ]);
1022
+ }
1023
+ const ko = /* @__PURE__ */ k(uo, [["render", vo]]);
1024
+ var wo = { zh: { serviceLang: "zh_CN", mobileReg: "^0[1-9]\\d{8}$" }, vi: { serviceLang: "vi_VN", mobileReg: "^0[1-9]\\d{8}$" }, id: { serviceLang: "id_ID", mobileReg: "^08\\d{8,11}$" } };
1025
+ const V = {
881
1026
  name: "myFormBox",
882
- inject: ["$t", "api"],
1027
+ inject: ["$t", "api", "emitUpward"],
883
1028
  provide() {
884
1029
  return { paForm: this };
885
1030
  },
886
1031
  components: {
887
- acountFormItem: yn,
888
- acountCheckbox: Ln,
889
- acountBehaviorCaptcha: Gn
1032
+ acountFormItem: Rn,
1033
+ acountCheckbox: Mn,
1034
+ acountBehaviorCaptcha: lo,
1035
+ acountTgLogin: ko
890
1036
  },
891
1037
  data() {
892
1038
  return {
@@ -897,12 +1043,12 @@ const A = {
897
1043
  computed: {
898
1044
  // 验证规则
899
1045
  formRule() {
900
- const t = /^[a-zA-Z][a-zA-Z0-9]{7,15}$/, e = /^[a-zA-Z0-9]{8,16}$/, n = new RegExp(Jn[this.region].mobileReg), { $t: s, isLogin: o } = this;
1046
+ const e = /^[a-zA-Z][a-zA-Z0-9]{7,15}$/, t = /^[a-zA-Z0-9]{8,16}$/, n = new RegExp(wo[this.region].mobileReg), { $t: a, isLogin: o } = this;
901
1047
  return {
902
- loginName: (i) => t.test(i) || o && n.test(i) ? "" : s(o ? "loginNameEr" : "userEr"),
903
- password: (i) => e.test(i) ? "" : s("pwdEr"),
904
- cfmPassword: (i) => e.test(i) && i == this.formData.password ? "" : s("confirmPwdEr"),
905
- inviteCodeTop: (i) => this._inviteCodeRequired ? i ? "" : s("inviteCodePh") : ""
1048
+ loginName: (i) => e.test(i) || o && n.test(i) ? "" : a(o ? "loginNameEr" : "userEr"),
1049
+ password: (i) => t.test(i) ? "" : a("pwdEr"),
1050
+ cfmPassword: (i) => t.test(i) && i == this.formData.password ? "" : a("confirmPwdEr"),
1051
+ inviteCodeTop: (i) => this._inviteCodeRequired ? i ? "" : a("inviteCodePh") : ""
906
1052
  };
907
1053
  }
908
1054
  },
@@ -912,46 +1058,42 @@ const A = {
912
1058
  methods: {
913
1059
  /*验证所有文本框*/
914
1060
  validateAll() {
915
- const { childrens: t } = this;
916
- return t.reduce((e, n) => {
917
- const s = n.validate();
918
- return e && s;
1061
+ const { childrens: e } = this;
1062
+ return e.reduce((t, n) => {
1063
+ const a = n.validate();
1064
+ return t && a;
919
1065
  }, !0);
920
1066
  },
921
1067
  /*提交按钮点击处理*/
922
- submitHandler(t) {
923
- t !== !1 && this.validateAll() && (this.showCaptcha = !0);
1068
+ submitHandler(e) {
1069
+ e !== !1 && this.validateAll() && (this.showCaptcha = !0);
924
1070
  },
925
1071
  /*加密参数*/
926
- getEncryptionData(t) {
927
- return this.api.getPublicKey().then((e) => {
928
- if (!e)
1072
+ getEncryptionData(e) {
1073
+ return this.api.getPublicKey().then((t) => {
1074
+ if (!t)
929
1075
  return Promise.reject();
930
- const n = new q();
931
- n.setPublicKey(e);
932
- const s = Object.assign({}, t), o = /^loginname$/i, i = /password|phone/i;
933
- for (let r in s)
934
- s.hasOwnProperty(r) && (o.test(r) ? s[r] = n.encrypt(s[r].toLowerCase()) : i.test(r) && (s[r] = n.encrypt(s[r])));
935
- return s;
1076
+ const n = new F();
1077
+ n.setPublicKey(t);
1078
+ const a = Object.assign({}, e), o = /^loginname$/i, i = /password|phone/i;
1079
+ for (let r in a)
1080
+ a.hasOwnProperty(r) && (o.test(r) ? a[r] = n.encrypt(a[r].toLowerCase()) : i.test(r) && (a[r] = n.encrypt(a[r])));
1081
+ return a;
936
1082
  });
937
1083
  }
938
1084
  }
939
- }, Zn = {
940
- mixins: [A],
941
- emits: ["forgetPwd", "toggleLinkClick", "loginSuccess"],
942
- props: {
943
- showToggleLink: Boolean,
944
- region: String
945
- },
1085
+ }, bo = {
1086
+ mixins: [V],
1087
+ props: ["showToggleLink", "region", "quickLogin"],
946
1088
  data() {
947
- const t = uni.getStorageSync("remember_username");
1089
+ const e = uni.getStorageSync("remember_username");
948
1090
  return {
949
1091
  isLogin: !0,
950
1092
  //标记为login页面,mixins中要用
951
- remember: !!t,
1093
+ remember: !!e,
952
1094
  //是否记住账号
953
1095
  formData: {
954
- loginName: t,
1096
+ loginName: e,
955
1097
  //用户名
956
1098
  password: ""
957
1099
  //密码
@@ -960,93 +1102,87 @@ const A = {
960
1102
  },
961
1103
  methods: {
962
1104
  /*提交登录*/
963
- submit({ id: t }) {
964
- const e = Object.assign({ captchaId: t }, this.formData);
965
- this.getEncryptionData(e).then((n) => {
966
- n.account = n.loginName, delete n.loginName, this.api.login(n).then((s) => {
967
- this.remember ? uni.setStorageSync("remember_username", this.formData.loginName) : uni.removeStorageSync("remember_username"), this.$emit("loginSuccess", s);
968
- }).catch((s) => {
1105
+ submit({ id: e }) {
1106
+ const t = Object.assign({ captchaId: e }, this.formData);
1107
+ this.getEncryptionData(t).then((n) => {
1108
+ n.account = n.loginName, delete n.loginName, this.api.login(n).then((a) => {
1109
+ this.remember ? uni.setStorageSync("remember_username", this.formData.loginName) : uni.removeStorageSync("remember_username"), this.emitUpward("loginSuccess", a);
1110
+ }).catch((a) => {
969
1111
  this.formData.password = "";
970
1112
  });
971
1113
  }).catch((n) => {
972
1114
  });
973
1115
  }
974
1116
  }
975
- }, Qn = { class: "pa-form" }, eo = /* @__PURE__ */ a("input", {
1117
+ }, Co = { class: "pa-form" }, yo = /* @__PURE__ */ s("input", {
976
1118
  type: "password",
977
1119
  autocomplete: "off",
978
1120
  class: "pa-hidden-input"
979
- }, null, -1), to = /* @__PURE__ */ a("input", {
1121
+ }, null, -1), Po = /* @__PURE__ */ s("input", {
980
1122
  type: "text",
981
1123
  autocomplete: "off",
982
1124
  class: "pa-hidden-input"
983
- }, null, -1), no = { class: "pa-form-footer-actions" }, oo = {
984
- key: 0,
1125
+ }, null, -1), _o = { class: "pa-form-footer-actions" }, So = {
1126
+ key: 1,
985
1127
  class: "pa-toggle-link"
986
1128
  };
987
- function io(t, e, n, s, o, i) {
988
- const r = f("acount-form-item"), h = f("acount-checkbox"), g = f("acount-behavior-captcha");
989
- return u(), d("div", Qn, [
990
- eo,
991
- to,
992
- p(r, {
1129
+ function $o(e, t, n, a, o, i) {
1130
+ const r = g("acount-form-item"), u = g("acount-checkbox"), v = g("acount-tg-login"), p = g("acount-behavior-captcha");
1131
+ return l(), d("div", Co, [
1132
+ yo,
1133
+ Po,
1134
+ m(r, {
993
1135
  modelValue: o.formData.loginName,
994
- "onUpdate:modelValue": e[0] || (e[0] = (c) => o.formData.loginName = c),
995
- rule: t.formRule.loginName,
996
- placeholder: t.$t("loginNamePh"),
1136
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => o.formData.loginName = c),
1137
+ rule: e.formRule.loginName,
1138
+ placeholder: e.$t("loginNamePh"),
997
1139
  prefixIcon: "icon-user"
998
1140
  }, null, 8, ["modelValue", "rule", "placeholder"]),
999
- p(r, {
1141
+ m(r, {
1000
1142
  modelValue: o.formData.password,
1001
- "onUpdate:modelValue": e[1] || (e[1] = (c) => o.formData.password = c),
1002
- rule: t.formRule.password,
1003
- placeholder: t.$t("pwdPh"),
1143
+ "onUpdate:modelValue": t[1] || (t[1] = (c) => o.formData.password = c),
1144
+ rule: e.formRule.password,
1145
+ placeholder: e.$t("pwdPh"),
1004
1146
  prefixIcon: "icon-password",
1005
1147
  type: "password"
1006
1148
  }, null, 8, ["modelValue", "rule", "placeholder"]),
1007
- a("div", no, [
1008
- p(h, {
1149
+ s("div", _o, [
1150
+ m(u, {
1009
1151
  class: "pa-remeber-me",
1010
1152
  modelValue: o.remember,
1011
- "onUpdate:modelValue": e[2] || (e[2] = (c) => o.remember = c)
1153
+ "onUpdate:modelValue": t[2] || (t[2] = (c) => o.remember = c)
1012
1154
  }, {
1013
- default: _(() => [
1014
- N(m(t.$t("remember")), 1)
1155
+ default: E(() => [
1156
+ N(h(e.$t("remember")), 1)
1015
1157
  ]),
1016
1158
  _: 1
1017
1159
  }, 8, ["modelValue"]),
1018
- a("div", {
1160
+ s("div", {
1019
1161
  class: "pa-forget-pwd",
1020
- onClick: e[3] || (e[3] = (c) => t.$emit("forgetPwd"))
1021
- }, m(t.$t("forgetPwd")), 1)
1162
+ onClick: t[3] || (t[3] = (c) => e.emitUpward("forgetPwd"))
1163
+ }, h(e.$t("forgetPwd")), 1)
1022
1164
  ]),
1023
- a("div", {
1165
+ s("div", {
1024
1166
  class: "pa-form-btn",
1025
- onClick: e[4] || (e[4] = (...c) => t.submitHandler && t.submitHandler(...c))
1026
- }, m(t.$t("login")), 1),
1027
- n.showToggleLink ? (u(), d("div", oo, [
1028
- a("p", {
1167
+ onClick: t[4] || (t[4] = (...c) => e.submitHandler && e.submitHandler(...c))
1168
+ }, h(e.$t("login")), 1),
1169
+ n.quickLogin ? (l(), C(v, { key: 0 })) : f("", !0),
1170
+ n.showToggleLink ? (l(), d("div", So, [
1171
+ s("p", {
1029
1172
  class: "pa-text-btn",
1030
- onClick: e[5] || (e[5] = (c) => t.$emit("toggleLinkClick"))
1031
- }, m(t.$t("toRegister")), 1)
1032
- ])) : v("", !0),
1033
- p(g, {
1034
- modelValue: t.showCaptcha,
1035
- "onUpdate:modelValue": e[6] || (e[6] = (c) => t.showCaptcha = c),
1173
+ onClick: t[5] || (t[5] = (c) => e.emitUpward("toggleLinkClick"))
1174
+ }, h(e.$t("toRegister")), 1)
1175
+ ])) : f("", !0),
1176
+ m(p, {
1177
+ modelValue: e.showCaptcha,
1178
+ "onUpdate:modelValue": t[6] || (t[6] = (c) => e.showCaptcha = c),
1036
1179
  onSuccess: i.submit
1037
1180
  }, null, 8, ["modelValue", "onSuccess"])
1038
1181
  ]);
1039
1182
  }
1040
- const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
1041
- mixins: [A],
1042
- emits: ["toggleLinkClick", "pact", "registerSuccess"],
1043
- props: {
1044
- inviteCode: String,
1045
- inviteCodeRequired: Boolean,
1046
- insideShowPact: Boolean,
1047
- showToggleLink: Boolean,
1048
- region: String
1049
- },
1183
+ const To = /* @__PURE__ */ k(bo, [["render", $o]]), Lo = {
1184
+ mixins: [V],
1185
+ props: ["inviteCode", "inviteCodeRequired", "insideShowPact", "showToggleLink", "region", "quickLogin"],
1050
1186
  data() {
1051
1187
  return {
1052
1188
  isLogin: !1,
@@ -1074,8 +1210,8 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
1074
1210
  computed: {
1075
1211
  // 邀请码输入框提示信息内容
1076
1212
  inviteCodePh() {
1077
- const t = this.$t("inviteCodePh");
1078
- return this._inviteCodeRequired ? t + this.$t("required") : this.serviceInviteCode || t + this.$t("rnRequired");
1213
+ const e = this.$t("inviteCodePh");
1214
+ return this._inviteCodeRequired ? e + this.$t("required") : this.serviceInviteCode || e + this.$t("rnRequired");
1079
1215
  },
1080
1216
  //规则协议弹框内嵌url。insideShowPact=true时才会使用
1081
1217
  pactSrc() {
@@ -1083,18 +1219,29 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
1083
1219
  return VITE_VIEW_CONFIG.webDomain + "/#/pages/help/terms?qryStr=eyJmcm9tIjoiaWZyYW1lIn0";
1084
1220
  }
1085
1221
  },
1222
+ watch: {
1223
+ inviteCode: {
1224
+ immediate: !0,
1225
+ handler(e) {
1226
+ this.formData.inviteCodeTop = e;
1227
+ }
1228
+ }
1229
+ },
1086
1230
  created() {
1087
1231
  this.inviteCodeHandler();
1088
1232
  },
1089
1233
  methods: {
1090
1234
  /*邀请码相关处理*/
1091
1235
  inviteCodeHandler() {
1092
- this.inviteCode && (this.formData.inviteCodeTop = this.inviteCode), new Promise((e) => {
1236
+ new Promise((t) => {
1093
1237
  if (this._inviteCodeRequired !== void 0)
1094
- return e(this._inviteCodeRequired);
1095
- this.api.getInviteCodeRequired().then(e).catch(e);
1096
- }).then((e) => {
1097
- e = typeof e == "boolean" ? e : !1, this._inviteCodeRequired = e, !(this.inviteCode || e) && this.api.getDefaultInviteCode().then((n) => {
1238
+ return t(this._inviteCodeRequired);
1239
+ this.api.getConfig().then((n) => {
1240
+ const a = (n == null ? void 0 : n.invitationRequired) == "1";
1241
+ t(a);
1242
+ }).catch(t);
1243
+ }).then((t) => {
1244
+ t = typeof t == "boolean" ? t : !1, this._inviteCodeRequired = t, !(this.inviteCode || t) && this.api.getDefaultInviteCode().then((n) => {
1098
1245
  this.serviceInviteCode = (n == null ? void 0 : n.inviteCode) || "";
1099
1246
  }).catch((n) => {
1100
1247
  });
@@ -1102,135 +1249,263 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
1102
1249
  },
1103
1250
  /*阅读注册规则协议*/
1104
1251
  readPact() {
1105
- this.showPactPopup = !0, this.$emit("pact");
1252
+ this.showPactPopup = !0, this.emitUpward("pact");
1106
1253
  },
1107
1254
  /*提交登录*/
1108
- submit({ id: t }) {
1109
- const e = Object.assign({ captchaId: t }, this.formData);
1110
- this.getEncryptionData(e).then((n) => {
1111
- !this._inviteCodeRequired && this.serviceInviteCode && !n.inviteCodeTop && (n.inviteCodeTop = this.serviceInviteCode), this.api.register(n).then((s) => {
1112
- this.$emit("registerSuccess", s);
1113
- }).catch((s) => {
1255
+ submit({ id: e }) {
1256
+ const t = Object.assign({ captchaId: e }, this.formData);
1257
+ this.getEncryptionData(t).then((n) => {
1258
+ !this._inviteCodeRequired && this.serviceInviteCode && !n.inviteCodeTop && (n.inviteCodeTop = this.serviceInviteCode), this.api.register(n).then((a) => {
1259
+ this.emitUpward("registerSuccess", a);
1260
+ }).catch((a) => {
1114
1261
  });
1115
1262
  }).catch((n) => {
1116
1263
  });
1117
1264
  }
1118
1265
  }
1119
- }, ro = { class: "pa-form" }, co = /* @__PURE__ */ a("input", {
1266
+ }, Vo = { class: "pa-form" }, Io = /* @__PURE__ */ s("input", {
1120
1267
  type: "password",
1121
1268
  autocomplete: "off",
1122
1269
  class: "pa-hidden-input"
1123
- }, null, -1), lo = /* @__PURE__ */ a("input", {
1270
+ }, null, -1), Do = /* @__PURE__ */ s("input", {
1124
1271
  type: "text",
1125
1272
  autocomplete: "off",
1126
1273
  class: "pa-hidden-input"
1127
- }, null, -1), uo = { class: "pa-form-footer-actions" }, ho = {
1128
- key: 0,
1129
- class: "pa-toggle-link"
1130
- }, mo = {
1274
+ }, null, -1), Ao = { class: "pa-form-footer-actions" }, Eo = {
1131
1275
  key: 1,
1276
+ class: "pa-toggle-link"
1277
+ }, qo = {
1278
+ key: 2,
1132
1279
  class: "pa-pact-popup"
1133
- }, go = { class: "pa-pact-popup-head" }, po = /* @__PURE__ */ a("i", { class: "iconfont icon-back" }, null, -1), fo = [
1134
- po
1135
- ], vo = { class: "pa-pact-popup-title" }, ko = ["src"];
1136
- function wo(t, e, n, s, o, i) {
1137
- const r = f("acount-form-item"), h = f("acount-checkbox"), g = f("acount-behavior-captcha");
1138
- return u(), d("div", ro, [
1139
- co,
1140
- lo,
1141
- p(r, {
1280
+ }, xo = { class: "pa-pact-popup-head" }, Ro = /* @__PURE__ */ s("i", { class: "iconfont icon-back" }, null, -1), No = [
1281
+ Ro
1282
+ ], Uo = { class: "pa-pact-popup-title" }, Fo = ["src"];
1283
+ function Mo(e, t, n, a, o, i) {
1284
+ const r = g("acount-form-item"), u = g("acount-checkbox"), v = g("acount-tg-login"), p = g("acount-behavior-captcha");
1285
+ return l(), d("div", Vo, [
1286
+ Io,
1287
+ Do,
1288
+ m(r, {
1142
1289
  modelValue: o.formData.loginName,
1143
- "onUpdate:modelValue": e[0] || (e[0] = (c) => o.formData.loginName = c),
1144
- rule: t.formRule.loginName,
1145
- placeholder: t.$t("userPh"),
1290
+ "onUpdate:modelValue": t[0] || (t[0] = (c) => o.formData.loginName = c),
1291
+ rule: e.formRule.loginName,
1292
+ placeholder: e.$t("userPh"),
1146
1293
  prefixIcon: "icon-user"
1147
1294
  }, null, 8, ["modelValue", "rule", "placeholder"]),
1148
- p(r, {
1295
+ m(r, {
1149
1296
  modelValue: o.formData.password,
1150
- "onUpdate:modelValue": e[1] || (e[1] = (c) => o.formData.password = c),
1151
- rule: t.formRule.password,
1152
- placeholder: t.$t("pwdPh"),
1297
+ "onUpdate:modelValue": t[1] || (t[1] = (c) => o.formData.password = c),
1298
+ rule: e.formRule.password,
1299
+ placeholder: e.$t("pwdPh"),
1153
1300
  prefixIcon: "icon-password",
1154
1301
  type: "password"
1155
1302
  }, null, 8, ["modelValue", "rule", "placeholder"]),
1156
- p(r, {
1303
+ m(r, {
1157
1304
  modelValue: o.formData.cfmPassword,
1158
- "onUpdate:modelValue": e[2] || (e[2] = (c) => o.formData.cfmPassword = c),
1159
- rule: t.formRule.cfmPassword,
1160
- placeholder: t.$t("confirmPwdPh"),
1305
+ "onUpdate:modelValue": t[2] || (t[2] = (c) => o.formData.cfmPassword = c),
1306
+ rule: e.formRule.cfmPassword,
1307
+ placeholder: e.$t("confirmPwdPh"),
1161
1308
  prefixIcon: "icon-password",
1162
1309
  type: "password"
1163
1310
  }, null, 8, ["modelValue", "rule", "placeholder"]),
1164
- p(r, {
1311
+ m(r, {
1165
1312
  modelValue: o.formData.inviteCodeTop,
1166
- "onUpdate:modelValue": e[3] || (e[3] = (c) => o.formData.inviteCodeTop = c),
1167
- rule: t.formRule.inviteCodeTop,
1313
+ "onUpdate:modelValue": t[3] || (t[3] = (c) => o.formData.inviteCodeTop = c),
1314
+ rule: e.formRule.inviteCodeTop,
1168
1315
  placeholder: i.inviteCodePh,
1169
1316
  disabled: !!n.inviteCode,
1170
1317
  prefixIcon: "icon-invite"
1171
1318
  }, null, 8, ["modelValue", "rule", "placeholder", "disabled"]),
1172
- a("div", uo, [
1173
- p(h, {
1319
+ s("div", Ao, [
1320
+ m(u, {
1174
1321
  class: "pa-remeber-me",
1175
1322
  modelValue: o.agreePact,
1176
- "onUpdate:modelValue": e[5] || (e[5] = (c) => o.agreePact = c)
1323
+ "onUpdate:modelValue": t[5] || (t[5] = (c) => o.agreePact = c)
1177
1324
  }, {
1178
- default: _(() => [
1179
- a("div", null, [
1180
- a("span", null, m(t.$t("pact1")), 1),
1181
- a("span", {
1325
+ default: E(() => [
1326
+ s("div", null, [
1327
+ s("span", null, h(e.$t("pact1")), 1),
1328
+ s("span", {
1182
1329
  class: "pa-underline-text",
1183
- onClick: e[4] || (e[4] = M((...c) => i.readPact && i.readPact(...c), ["stop"]))
1184
- }, m(t.$t("pact2")), 1)
1330
+ onClick: t[4] || (t[4] = U((...c) => i.readPact && i.readPact(...c), ["stop"]))
1331
+ }, h(e.$t("pact2")), 1)
1185
1332
  ])
1186
1333
  ]),
1187
1334
  _: 1
1188
1335
  }, 8, ["modelValue"])
1189
1336
  ]),
1190
- a("div", {
1191
- class: w(["pa-form-btn", { disabled: !o.agreePact }]),
1192
- onClick: e[6] || (e[6] = (c) => t.submitHandler(o.agreePact))
1193
- }, m(t.$t("register")), 3),
1194
- n.showToggleLink ? (u(), d("div", ho, [
1195
- a("span", null, m(t.$t("hasUserName")), 1),
1196
- a("span", {
1337
+ s("div", {
1338
+ class: b(["pa-form-btn", { disabled: !o.agreePact }]),
1339
+ onClick: t[6] || (t[6] = (c) => e.submitHandler(o.agreePact))
1340
+ }, h(e.$t("register")), 3),
1341
+ n.quickLogin ? (l(), C(v, { key: 0 })) : f("", !0),
1342
+ n.showToggleLink ? (l(), d("div", Eo, [
1343
+ s("span", null, h(e.$t("hasUserName")), 1),
1344
+ s("span", {
1197
1345
  class: "pa-text-btn",
1198
- onClick: e[7] || (e[7] = (c) => t.$emit("toggleLinkClick"))
1199
- }, m(t.$t("goLogin")), 1)
1200
- ])) : v("", !0),
1201
- p(g, {
1202
- modelValue: t.showCaptcha,
1203
- "onUpdate:modelValue": e[8] || (e[8] = (c) => t.showCaptcha = c),
1346
+ onClick: t[7] || (t[7] = (c) => e.emitUpward("toggleLinkClick"))
1347
+ }, h(e.$t("goLogin")), 1)
1348
+ ])) : f("", !0),
1349
+ m(p, {
1350
+ modelValue: e.showCaptcha,
1351
+ "onUpdate:modelValue": t[8] || (t[8] = (c) => e.showCaptcha = c),
1204
1352
  onSuccess: i.submit
1205
1353
  }, null, 8, ["modelValue", "onSuccess"]),
1206
- n.insideShowPact && o.showPactPopup && i.pactSrc ? (u(), d("div", mo, [
1207
- a("div", go, [
1208
- a("div", {
1354
+ n.insideShowPact && o.showPactPopup && i.pactSrc ? (l(), d("div", qo, [
1355
+ s("div", xo, [
1356
+ s("div", {
1209
1357
  class: "pa-back-button",
1210
- onClick: e[9] || (e[9] = (c) => o.showPactPopup = !1)
1211
- }, fo),
1212
- a("p", vo, m(t.$t("pactTitle")), 1)
1358
+ onClick: t[9] || (t[9] = (c) => o.showPactPopup = !1)
1359
+ }, No),
1360
+ s("p", Uo, h(e.$t("pactTitle")), 1)
1213
1361
  ]),
1214
- a("iframe", {
1362
+ s("iframe", {
1215
1363
  class: "pa-pact-iframe",
1216
1364
  src: i.pactSrc
1217
- }, null, 8, ko)
1218
- ])) : v("", !0)
1365
+ }, null, 8, Fo)
1366
+ ])) : f("", !0)
1219
1367
  ]);
1220
1368
  }
1221
- const Co = /* @__PURE__ */ C(ao, [["render", wo]]), $ = Yt(), I = new X(), Po = {
1369
+ const Oo = /* @__PURE__ */ k(Lo, [["render", Mo]]), Bo = {
1370
+ name: "paForm",
1371
+ components: {
1372
+ acountLoginForm: To,
1373
+ acountRegisterForm: Oo
1374
+ },
1375
+ props: ["type", "region", "showToggleLink", "inviteCode", "inviteCodeRequired", "insideShowPact", "quickLogin"]
1376
+ };
1377
+ function Xo(e, t, n, a, o, i) {
1378
+ const r = g("acount-login-form"), u = g("acount-register-form");
1379
+ return n.type == "login" ? (l(), C(r, {
1380
+ key: 0,
1381
+ region: n.region,
1382
+ quickLogin: n.quickLogin,
1383
+ showToggleLink: n.showToggleLink
1384
+ }, null, 8, ["region", "quickLogin", "showToggleLink"])) : n.type == "register" ? (l(), C(u, {
1385
+ key: 1,
1386
+ region: n.region,
1387
+ quickLogin: n.quickLogin,
1388
+ showToggleLink: n.showToggleLink,
1389
+ inviteCode: n.inviteCode,
1390
+ inviteCodeRequired: n.inviteCodeRequired,
1391
+ insideShowPact: n.insideShowPact
1392
+ }, null, 8, ["region", "quickLogin", "showToggleLink", "inviteCode", "inviteCodeRequired", "insideShowPact"])) : f("", !0);
1393
+ }
1394
+ const jo = /* @__PURE__ */ k(Bo, [["render", Xo]]), Wo = {
1395
+ name: "paBindPage",
1396
+ emits: ["update:modelValue"],
1397
+ mixins: [V],
1398
+ props: {
1399
+ modelValue: {
1400
+ type: Boolean,
1401
+ default: !1
1402
+ },
1403
+ tgData: {
1404
+ type: Object,
1405
+ required: !0
1406
+ },
1407
+ region: String,
1408
+ inviteCode: String
1409
+ },
1410
+ data() {
1411
+ return {
1412
+ isLogin: !1,
1413
+ //标记是否为login页面,mixins中要用
1414
+ formData: {
1415
+ loginName: "",
1416
+ //用户名
1417
+ password: "",
1418
+ //密码
1419
+ cfmPassword: "",
1420
+ //确认密码
1421
+ inviteCodeTop: this.inviteCode
1422
+ //邀请码
1423
+ }
1424
+ };
1425
+ },
1426
+ methods: {
1427
+ /*提交*/
1428
+ submit() {
1429
+ this.validateAll() && this.getEncryptionData(this.formData).then((e) => {
1430
+ this.api.bindUser({ ...e, telegramRequest: { ...this.tgData } }).then((t) => {
1431
+ this.emitUpward("quickLoginSuccess", t);
1432
+ });
1433
+ });
1434
+ }
1435
+ }
1436
+ }, zo = /* @__PURE__ */ s("i", { class: "iconfont icon-back" }, null, -1), Ko = [
1437
+ zo
1438
+ ], Ho = { class: "pa-bind-form" }, Yo = { class: "pa-page-title pa-bind-title" }, Go = /* @__PURE__ */ s("input", {
1439
+ type: "password",
1440
+ autocomplete: "off",
1441
+ class: "pa-hidden-input"
1442
+ }, null, -1), Jo = /* @__PURE__ */ s("input", {
1443
+ type: "text",
1444
+ autocomplete: "off",
1445
+ class: "pa-hidden-input"
1446
+ }, null, -1), Qo = { class: "pa-wxtip" };
1447
+ function Zo(e, t, n, a, o, i) {
1448
+ const r = g("acount-form-item");
1449
+ return l(), d("div", {
1450
+ class: "pa-bind-page",
1451
+ style: _(n.modelValue ? "transform: translate(0);" : "")
1452
+ }, [
1453
+ s("div", {
1454
+ class: "pa-back-button",
1455
+ onClick: t[0] || (t[0] = (u) => e.$emit("update:modelValue", !1))
1456
+ }, Ko),
1457
+ s("div", Ho, [
1458
+ s("div", Yo, h(e.$t("bindUsername")), 1),
1459
+ Go,
1460
+ Jo,
1461
+ m(r, {
1462
+ modelValue: o.formData.loginName,
1463
+ "onUpdate:modelValue": t[1] || (t[1] = (u) => o.formData.loginName = u),
1464
+ rule: e.formRule.loginName,
1465
+ placeholder: e.$t("userPh"),
1466
+ prefixIcon: "icon-user"
1467
+ }, null, 8, ["modelValue", "rule", "placeholder"]),
1468
+ m(r, {
1469
+ modelValue: o.formData.password,
1470
+ "onUpdate:modelValue": t[2] || (t[2] = (u) => o.formData.password = u),
1471
+ rule: e.formRule.password,
1472
+ placeholder: e.$t("pwdPh"),
1473
+ prefixIcon: "icon-password",
1474
+ type: "password"
1475
+ }, null, 8, ["modelValue", "rule", "placeholder"]),
1476
+ m(r, {
1477
+ modelValue: o.formData.cfmPassword,
1478
+ "onUpdate:modelValue": t[3] || (t[3] = (u) => o.formData.cfmPassword = u),
1479
+ rule: e.formRule.cfmPassword,
1480
+ placeholder: e.$t("confirmPwdPh"),
1481
+ prefixIcon: "icon-password",
1482
+ type: "password"
1483
+ }, null, 8, ["modelValue", "rule", "placeholder"]),
1484
+ s("div", Qo, h(e.$t("wxtip")), 1),
1485
+ s("div", {
1486
+ class: "pa-form-btn",
1487
+ onClick: t[4] || (t[4] = (...u) => i.submit && i.submit(...u))
1488
+ }, h(e.$t("goLogin")), 1)
1489
+ ])
1490
+ ], 4);
1491
+ }
1492
+ const ei = /* @__PURE__ */ k(Wo, [["render", Zo]]), T = ln(), L = new j(), ti = {
1222
1493
  name: "P500Acount",
1223
- emits: ["back", "pact", "bannerClick", "forgetPwd", "toggleLinkClick", "loginSuccess", "registerSuccess"],
1494
+ emits: ["back", "pact", "bannerClick", "forgetPwd", "toggleLinkClick", "loginSuccess", "registerSuccess", "appQuickLogin", "quickLoginSuccess"],
1224
1495
  components: {
1225
- acountBanner: sn,
1226
- acountDialog: vn,
1227
- acountLoginForm: so,
1228
- acountRegisterForm: Co
1496
+ acountBanner: kn,
1497
+ acountDialog: In,
1498
+ acountForm: jo,
1499
+ acountBind: ei
1229
1500
  },
1230
1501
  provide() {
1231
1502
  return {
1232
- $t: $.global.t,
1233
- api: I
1503
+ $t: T.global.t,
1504
+ api: L,
1505
+ // 向上层组件发射事件(可被任意后代注入使用)
1506
+ emitUpward: (e, t) => this.$emit(e, t),
1507
+ // 授权成功方法
1508
+ authSuccess: this.authSuccess
1234
1509
  };
1235
1510
  },
1236
1511
  props: {
@@ -1273,23 +1548,31 @@ const Co = /* @__PURE__ */ C(ao, [["render", wo]]), $ = Yt(), I = new X(), Po =
1273
1548
  showToggleLink: {
1274
1549
  type: Boolean,
1275
1550
  default: !0
1551
+ },
1552
+ quickLogin: {
1553
+ type: Boolean,
1554
+ default: !0
1276
1555
  }
1277
1556
  },
1278
1557
  created() {
1279
- $.global.locale = this.region;
1280
- const { showLoading: t, hideLoading: e, showMessage: n } = this;
1281
- I.setOptions(this.region, this.apiDomain, this.devicePlatform, { showLoading: t, hideLoading: e, showMessage: n });
1558
+ T.global.locale = this.region;
1559
+ const { showLoading: e, hideLoading: t, showMessage: n } = this;
1560
+ L.setOptions(this.region, this.apiDomain, this.devicePlatform, { showLoading: e, hideLoading: t, showMessage: n });
1282
1561
  },
1283
1562
  data() {
1284
1563
  return {
1285
- i18n: $,
1564
+ i18n: T,
1286
1565
  //国际化对象
1287
1566
  dialogCount: 0,
1288
1567
  //是否显示dialog. >0时显示
1289
1568
  dialogType: 0,
1290
1569
  //dialog类型.0:loading;1:message
1291
- dialogMsg: ""
1570
+ dialogMsg: "",
1292
1571
  //dialog msg内容
1572
+ showBind: !1,
1573
+ //是否显示绑定表单
1574
+ tgData: {}
1575
+ //tg用户数据 - showBind=true时,绑定表单提交时需要使用
1293
1576
  };
1294
1577
  },
1295
1578
  methods: {
@@ -1302,88 +1585,88 @@ const Co = /* @__PURE__ */ C(ao, [["render", wo]]), $ = Yt(), I = new X(), Po =
1302
1585
  this.dialogCount--;
1303
1586
  },
1304
1587
  /*显示消息框*/
1305
- showMessage(t) {
1306
- this.dialogType = 1, this.dialogCount++, this.dialogMsg = t;
1588
+ showMessage(e) {
1589
+ this.dialogType = 1, this.dialogCount++, this.dialogMsg = e;
1590
+ },
1591
+ /*快捷登录授权成功*/
1592
+ authSuccess(e) {
1593
+ const t = Object.fromEntries(Object.entries(e).map(([n, a]) => [
1594
+ n.replace(/_([a-z])/g, (o, i) => i.toUpperCase()),
1595
+ a
1596
+ ]));
1597
+ L.telegramAuthLogin(t).then((n) => {
1598
+ this.$emit("quickLoginSuccess", n);
1599
+ }).catch((n) => {
1600
+ (n == null ? void 0 : n.code) === 3240099 && this.$nextTick(() => {
1601
+ this.tgData = t, this.showBind = !0;
1602
+ });
1603
+ });
1307
1604
  }
1308
1605
  }
1309
- }, bo = { class: "pa-acount" }, yo = {
1606
+ }, ni = { class: "pa-acount" }, oi = {
1310
1607
  key: 0,
1311
1608
  class: "pa-acount-page"
1312
- }, So = /* @__PURE__ */ a("i", { class: "iconfont icon-back" }, null, -1), To = [
1313
- So
1314
- ], $o = { class: "pa-logo-box" }, Lo = { class: "pa-pageform" }, Eo = { class: "pa-page-title" };
1315
- function Io(t, e, n, s, o, i) {
1316
- const r = f("acount-banner"), h = f("acount-login-form"), g = f("acount-register-form"), c = f("acount-dialog");
1317
- return u(), d("div", bo, [
1318
- n.page ? (u(), d("div", yo, [
1319
- n.showBackBtn ? (u(), d("div", {
1609
+ }, ii = /* @__PURE__ */ s("i", { class: "iconfont icon-back" }, null, -1), si = [
1610
+ ii
1611
+ ], ai = { class: "pa-logo-box" }, ri = { class: "pa-pageform" }, ci = { class: "pa-page-title" };
1612
+ function li(e, t, n, a, o, i) {
1613
+ const r = g("acount-banner"), u = g("acount-form"), v = g("acount-bind"), p = g("acount-dialog");
1614
+ return l(), d("div", ni, [
1615
+ n.page ? (l(), d("div", oi, [
1616
+ n.showBackBtn ? (l(), d("div", {
1320
1617
  key: 0,
1321
1618
  class: "pa-back-button",
1322
- onClick: e[0] || (e[0] = (l) => t.$emit("back"))
1323
- }, To)) : v("", !0),
1324
- a("div", $o, [
1325
- a("i", {
1326
- class: w(["pa-logo", n.region + "_logo"])
1619
+ onClick: t[0] || (t[0] = (c) => e.$emit("back"))
1620
+ }, si)) : f("", !0),
1621
+ s("div", ai, [
1622
+ s("i", {
1623
+ class: b(["pa-logo", n.region + "_logo"])
1327
1624
  }, null, 2)
1328
1625
  ]),
1329
- p(r, {
1330
- onBannerClick: e[1] || (e[1] = (l) => t.$emit("bannerClick", l))
1331
- }),
1332
- a("div", Lo, [
1333
- a("div", Eo, m(o.i18n.global.t(n.type)), 1),
1334
- n.type == "login" ? (u(), P(h, {
1335
- key: 0,
1336
- showToggleLink: n.showToggleLink,
1337
- region: n.region,
1338
- onForgetPwd: e[2] || (e[2] = (l) => t.$emit("forgetPwd", l)),
1339
- onToggleLinkClick: e[3] || (e[3] = (l) => t.$emit("toggleLinkClick", l)),
1340
- onLoginSuccess: e[4] || (e[4] = (l) => t.$emit("loginSuccess", l))
1341
- }, null, 8, ["showToggleLink", "region"])) : n.type == "register" ? (u(), P(g, {
1342
- key: 1,
1626
+ m(r),
1627
+ s("div", ri, [
1628
+ s("div", ci, h(o.i18n.global.t(n.type)), 1),
1629
+ m(u, {
1630
+ type: n.type,
1343
1631
  region: n.region,
1632
+ showToggleLink: n.showToggleLink,
1633
+ quickLogin: n.quickLogin,
1344
1634
  inviteCode: n.inviteCode,
1345
1635
  inviteCodeRequired: n.inviteCodeRequired,
1346
- showToggleLink: n.showToggleLink,
1347
- insideShowPact: n.insideShowPact,
1348
- onToggleLinkClick: e[5] || (e[5] = (l) => t.$emit("toggleLinkClick", l)),
1349
- onPact: e[6] || (e[6] = (l) => t.$emit("pact", l)),
1350
- onRegisterSuccess: e[7] || (e[7] = (l) => t.$emit("registerSuccess", l))
1351
- }, null, 8, ["region", "inviteCode", "inviteCodeRequired", "showToggleLink", "insideShowPact"])) : v("", !0)
1636
+ insideShowPact: n.insideShowPact
1637
+ }, null, 8, ["type", "region", "showToggleLink", "quickLogin", "inviteCode", "inviteCodeRequired", "insideShowPact"])
1352
1638
  ])
1353
- ])) : (u(), d(T, { key: 1 }, [
1354
- n.type == "login" ? (u(), P(h, {
1355
- key: 0,
1356
- showToggleLink: n.showToggleLink,
1357
- region: n.region,
1358
- onForgetPwd: e[8] || (e[8] = (l) => t.$emit("forgetPwd", l)),
1359
- onToggleLinkClick: e[9] || (e[9] = (l) => t.$emit("toggleLinkClick", l)),
1360
- onLoginSuccess: e[10] || (e[10] = (l) => t.$emit("loginSuccess", l))
1361
- }, null, 8, ["showToggleLink", "region"])) : n.type == "register" ? (u(), P(g, {
1362
- key: 1,
1363
- region: n.region,
1364
- inviteCode: n.inviteCode,
1365
- inviteCodeRequired: n.inviteCodeRequired,
1366
- showToggleLink: n.showToggleLink,
1367
- insideShowPact: n.insideShowPact,
1368
- onToggleLinkClick: e[11] || (e[11] = (l) => t.$emit("toggleLinkClick", l)),
1369
- onPact: e[12] || (e[12] = (l) => t.$emit("pact", l)),
1370
- onRegisterSuccess: e[13] || (e[13] = (l) => t.$emit("registerSuccess", l))
1371
- }, null, 8, ["region", "inviteCode", "inviteCodeRequired", "showToggleLink", "insideShowPact"])) : v("", !0)
1372
- ], 64)),
1373
- p(c, {
1639
+ ])) : (l(), C(u, {
1640
+ key: 1,
1641
+ type: n.type,
1642
+ region: n.region,
1643
+ showToggleLink: n.showToggleLink,
1644
+ quickLogin: n.quickLogin,
1645
+ inviteCode: n.inviteCode,
1646
+ inviteCodeRequired: n.inviteCodeRequired,
1647
+ insideShowPact: n.insideShowPact
1648
+ }, null, 8, ["type", "region", "showToggleLink", "quickLogin", "inviteCode", "inviteCodeRequired", "insideShowPact"])),
1649
+ m(v, {
1650
+ modelValue: o.showBind,
1651
+ "onUpdate:modelValue": t[1] || (t[1] = (c) => o.showBind = c),
1652
+ region: n.region,
1653
+ inviteCode: n.inviteCode,
1654
+ tgData: o.tgData
1655
+ }, null, 8, ["modelValue", "region", "inviteCode", "tgData"]),
1656
+ m(p, {
1374
1657
  modelValue: o.dialogCount,
1375
- "onUpdate:modelValue": e[14] || (e[14] = (l) => o.dialogCount = l),
1658
+ "onUpdate:modelValue": t[2] || (t[2] = (c) => o.dialogCount = c),
1376
1659
  type: o.dialogType,
1377
1660
  message: o.dialogMsg
1378
1661
  }, null, 8, ["modelValue", "type", "message"])
1379
1662
  ]);
1380
1663
  }
1381
- const V = /* @__PURE__ */ C(Po, [["render", Io]]), Ro = {
1382
- install: (t) => {
1383
- t.component(V.name, V);
1664
+ const A = /* @__PURE__ */ k(ti, [["render", li]]), mi = {
1665
+ install: (e) => {
1666
+ e.component(A.name, A);
1384
1667
  }
1385
1668
  };
1386
1669
  export {
1387
- V as P500Acount,
1388
- Ro as default
1670
+ A as P500Acount,
1671
+ mi as default
1389
1672
  };