p500-acount 1.0.4 → 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.
- package/lib/p500.acount.es.js +930 -655
- package/lib/p500.acount.umd.js +1 -1
- package/lib/style.css +1 -1
- package/package.json +1 -1
package/lib/p500.acount.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createI18n as
|
|
2
|
-
import { createElementBlock as d, openBlock as
|
|
3
|
-
import
|
|
4
|
-
var
|
|
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(
|
|
13
|
-
localStorage.setItem(
|
|
12
|
+
setStorageSync(e, t) {
|
|
13
|
+
localStorage.setItem(e, JSON.stringify(t));
|
|
14
14
|
},
|
|
15
15
|
/*获取缓存数据*/
|
|
16
|
-
getStorageSync(
|
|
17
|
-
return JSON.parse(localStorage.getItem(
|
|
16
|
+
getStorageSync(e) {
|
|
17
|
+
return JSON.parse(localStorage.getItem(e));
|
|
18
18
|
},
|
|
19
19
|
/*移除缓存数据*/
|
|
20
|
-
removeStorageSync(
|
|
21
|
-
localStorage.removeItem(
|
|
20
|
+
removeStorageSync(e) {
|
|
21
|
+
localStorage.removeItem(e);
|
|
22
22
|
},
|
|
23
23
|
/*请求*/
|
|
24
|
-
request: (
|
|
25
|
-
|
|
26
|
-
method:
|
|
27
|
-
headers:
|
|
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:
|
|
30
|
-
}).then((
|
|
31
|
-
var n,
|
|
32
|
-
return (n =
|
|
33
|
-
}).then((
|
|
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 =
|
|
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 = (
|
|
42
|
-
const
|
|
43
|
-
uni.setStorageSync(
|
|
44
|
-
},
|
|
45
|
-
const
|
|
46
|
-
if (
|
|
47
|
-
const { data: n, _timeout:
|
|
48
|
-
if (!
|
|
49
|
-
return
|
|
50
|
-
if (+/* @__PURE__ */ new Date() <=
|
|
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(
|
|
52
|
+
uni.removeStorageSync(e);
|
|
53
53
|
}
|
|
54
54
|
return null;
|
|
55
|
-
},
|
|
56
|
-
const
|
|
57
|
-
method:
|
|
58
|
-
data:
|
|
59
|
-
header:
|
|
60
|
-
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,
|
|
63
|
-
|
|
64
|
-
if (
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
const { statusCode:
|
|
68
|
-
if (
|
|
69
|
-
return
|
|
70
|
-
i({ message:
|
|
71
|
-
},
|
|
72
|
-
const r =
|
|
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
|
|
74
|
+
return t.complete(), o(r);
|
|
75
75
|
}
|
|
76
|
-
uni.request(
|
|
77
|
-
}).then(n).catch((
|
|
78
|
-
o &&
|
|
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
|
-
|
|
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(
|
|
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:
|
|
99
|
+
lang: M[t].serviceLang,
|
|
99
100
|
// 接口所需语言标识
|
|
100
|
-
DevicePlatform:
|
|
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
|
|
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
|
-
|
|
117
|
-
return
|
|
123
|
+
/*获取后台配置信息*/
|
|
124
|
+
getConfig() {
|
|
125
|
+
return $ || ($ = w(this.assignOption({
|
|
118
126
|
url: "home/getConfig",
|
|
119
127
|
cache: !0
|
|
120
|
-
}))
|
|
128
|
+
}))), $;
|
|
121
129
|
}
|
|
122
130
|
/*获取默认邀请码*/
|
|
123
131
|
getDefaultInviteCode() {
|
|
124
|
-
return
|
|
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
|
|
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(
|
|
146
|
+
checkCaptcha(t) {
|
|
139
147
|
return new Promise((n) => {
|
|
140
|
-
|
|
148
|
+
w(this.assignOption({
|
|
141
149
|
url: "captcha/behavior/check",
|
|
142
150
|
method: "POST",
|
|
143
151
|
loading: !1,
|
|
144
|
-
data:
|
|
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((
|
|
160
|
+
return new Promise((t) => {
|
|
153
161
|
if (this.publicKey)
|
|
154
|
-
return
|
|
155
|
-
|
|
156
|
-
this.publicKey = 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
|
-
|
|
166
|
+
t(null);
|
|
159
167
|
});
|
|
160
168
|
});
|
|
161
169
|
}
|
|
162
170
|
/*登录*/
|
|
163
|
-
login(
|
|
164
|
-
return
|
|
171
|
+
login(t) {
|
|
172
|
+
return w(this.assignOption({ url: "login", method: "POST", data: t }));
|
|
165
173
|
}
|
|
166
174
|
/*注册*/
|
|
167
|
-
register(
|
|
168
|
-
return
|
|
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
|
|
172
|
-
register:
|
|
173
|
-
login:
|
|
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:
|
|
176
|
-
pwdPh:
|
|
177
|
-
confirmPwdPh:
|
|
178
|
-
inviteCodePh:
|
|
179
|
-
required:
|
|
191
|
+
loginNamePh: H,
|
|
192
|
+
pwdPh: Y,
|
|
193
|
+
confirmPwdPh: G,
|
|
194
|
+
inviteCodePh: J,
|
|
195
|
+
required: Q,
|
|
180
196
|
rnRequired: Z,
|
|
181
|
-
userEr:
|
|
182
|
-
loginNameEr:
|
|
183
|
-
pwdEr:
|
|
184
|
-
confirmPwdEr:
|
|
185
|
-
remember:
|
|
186
|
-
forgetPwd:
|
|
187
|
-
toRegister:
|
|
188
|
-
captchaTitle:
|
|
189
|
-
captchaCheckSuccess:
|
|
190
|
-
captchaCheckFail:
|
|
191
|
-
captchaMoveText:
|
|
192
|
-
popupTitle:
|
|
193
|
-
confirmText:
|
|
194
|
-
pact1:
|
|
195
|
-
pact2:
|
|
196
|
-
pactTitle:
|
|
197
|
-
hasUserName:
|
|
198
|
-
goLogin:
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
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:
|
|
293
|
-
}),
|
|
294
|
-
const n =
|
|
295
|
-
for (const [
|
|
296
|
-
n[
|
|
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
|
-
},
|
|
326
|
+
}, dn = {
|
|
299
327
|
name: "paBanner",
|
|
300
|
-
inject: ["api"],
|
|
301
|
-
emits: ["bannerClick"],
|
|
328
|
+
inject: ["api", "emitUpward"],
|
|
302
329
|
data() {
|
|
303
330
|
return {
|
|
304
|
-
skeletonImg:
|
|
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((
|
|
330
|
-
this.list =
|
|
331
|
-
}).catch((
|
|
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(
|
|
346
|
-
const
|
|
347
|
-
let
|
|
348
|
-
return
|
|
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(
|
|
352
|
-
const
|
|
353
|
-
this.startSliding(), this.currentIndex =
|
|
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(
|
|
367
|
-
let
|
|
368
|
-
if ("pageX" in
|
|
369
|
-
return Math.round(
|
|
370
|
-
let n =
|
|
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
|
|
373
|
-
return "pageX" in
|
|
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(
|
|
379
|
-
const
|
|
380
|
-
if (this.stopAutoPlay(), this.startX =
|
|
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(
|
|
388
|
-
|
|
389
|
-
const
|
|
390
|
-
this.moveWidth =
|
|
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(
|
|
394
|
-
const { moveWidth:
|
|
395
|
-
if (Math.abs(
|
|
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(
|
|
403
|
-
if (
|
|
404
|
-
return /^http/.test(
|
|
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
|
-
},
|
|
408
|
-
function
|
|
409
|
-
return
|
|
410
|
-
|
|
411
|
-
|
|
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,
|
|
415
|
-
|
|
441
|
+
}, null, 8, gn),
|
|
442
|
+
s("div", {
|
|
416
443
|
class: "pa-carousel",
|
|
417
|
-
onTouchstart:
|
|
418
|
-
onTouchmove:
|
|
419
|
-
onTouchend:
|
|
420
|
-
onMousedown:
|
|
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
|
-
|
|
449
|
+
s("div", {
|
|
423
450
|
class: "pa-banner-track",
|
|
424
|
-
style:
|
|
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
|
-
(
|
|
430
|
-
key:
|
|
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: (
|
|
433
|
-
style:
|
|
459
|
+
onClick: (v) => i.handlerClick(r.href),
|
|
460
|
+
style: _({
|
|
434
461
|
backgroundImage: `url(${r.url})`,
|
|
435
|
-
transform: `translateX(${i.getItemOffset(
|
|
462
|
+
transform: `translateX(${i.getItemOffset(u)}%)`
|
|
436
463
|
})
|
|
437
|
-
}, null, 12,
|
|
464
|
+
}, null, 12, pn))), 128))
|
|
438
465
|
], 4),
|
|
439
|
-
|
|
440
|
-
(
|
|
441
|
-
key:
|
|
442
|
-
class:
|
|
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
|
|
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
|
-
},
|
|
491
|
+
}, bn = { class: "pa-dialog" }, Cn = {
|
|
465
492
|
key: 0,
|
|
466
493
|
class: "pa-message"
|
|
467
|
-
},
|
|
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
|
-
},
|
|
471
|
-
|
|
497
|
+
}, Tn = /* @__PURE__ */ s("div", { class: "pa-loading-bg" }, null, -1), Ln = [
|
|
498
|
+
Tn
|
|
472
499
|
];
|
|
473
|
-
function
|
|
474
|
-
return
|
|
475
|
-
n.type ? (
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
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
|
-
|
|
481
|
-
|
|
507
|
+
s("div", Sn, [
|
|
508
|
+
s("div", {
|
|
482
509
|
class: "pa-message-btn",
|
|
483
|
-
onClick:
|
|
484
|
-
},
|
|
510
|
+
onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", n.modelValue - 1))
|
|
511
|
+
}, h(i.$t("confirmText")), 1)
|
|
485
512
|
])
|
|
486
|
-
])) : (
|
|
513
|
+
])) : (l(), d("div", $n, Ln))
|
|
487
514
|
], 512)), [
|
|
488
|
-
[
|
|
515
|
+
[P, n.modelValue >= 1]
|
|
489
516
|
]);
|
|
490
517
|
}
|
|
491
|
-
const
|
|
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(
|
|
555
|
+
handleInput(e) {
|
|
529
556
|
var n;
|
|
530
|
-
const
|
|
531
|
-
this.$emit("update:modelValue",
|
|
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:
|
|
537
|
-
if (!
|
|
563
|
+
const { rule: e, modelValue: t } = this;
|
|
564
|
+
if (!e)
|
|
538
565
|
return !0;
|
|
539
|
-
const n = t
|
|
566
|
+
const n = e(t) || "";
|
|
540
567
|
return this.errorMsg = n, !n;
|
|
541
568
|
}
|
|
542
569
|
}
|
|
543
|
-
},
|
|
544
|
-
function
|
|
545
|
-
return
|
|
546
|
-
|
|
547
|
-
n.prefixIcon ? (
|
|
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:
|
|
550
|
-
}, null, 2)) :
|
|
551
|
-
|
|
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:
|
|
558
|
-
onFocusOnce:
|
|
559
|
-
}, null, 40,
|
|
560
|
-
n.type == "password" && n.modelValue ? (
|
|
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:
|
|
563
|
-
onClick:
|
|
564
|
-
}, null, 2)) :
|
|
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
|
-
|
|
567
|
-
class:
|
|
568
|
-
},
|
|
593
|
+
s("p", {
|
|
594
|
+
class: b(["pa-form-item--error", { active: o.errorMsg }])
|
|
595
|
+
}, h(o.errorMsg), 3)
|
|
569
596
|
]);
|
|
570
597
|
}
|
|
571
|
-
const
|
|
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
|
-
},
|
|
578
|
-
function
|
|
579
|
-
return
|
|
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:
|
|
608
|
+
onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", !n.modelValue))
|
|
582
609
|
}, [
|
|
583
|
-
|
|
584
|
-
class:
|
|
610
|
+
s("div", {
|
|
611
|
+
class: b(["pa-checkbox--input", { active: n.modelValue }])
|
|
585
612
|
}, [
|
|
586
|
-
|
|
587
|
-
[
|
|
613
|
+
y(s("i", Un, null, 512), [
|
|
614
|
+
[P, n.modelValue]
|
|
588
615
|
])
|
|
589
616
|
], 2),
|
|
590
|
-
|
|
617
|
+
x(e.$slots, "default")
|
|
591
618
|
]);
|
|
592
619
|
}
|
|
593
|
-
const
|
|
594
|
-
const n =
|
|
595
|
-
for (const [
|
|
596
|
-
n[
|
|
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
|
-
},
|
|
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(
|
|
659
|
-
|
|
685
|
+
handler(e) {
|
|
686
|
+
e && this.generate();
|
|
660
687
|
}
|
|
661
688
|
}
|
|
662
689
|
},
|
|
663
690
|
methods: {
|
|
664
691
|
/*生成验证器*/
|
|
665
692
|
generate() {
|
|
666
|
-
var
|
|
667
|
-
this.imgSrc = "", this.generateFun && (this.showLoading = !0, this.checkStatus = null, this.genError = !1, (
|
|
668
|
-
const { captcha: n = {}, id:
|
|
669
|
-
this.imgSrc = n.backgroundImage, this.tempImgSrc = n.templateImage, o.id =
|
|
670
|
-
}).catch((
|
|
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((
|
|
699
|
+
}).finally((t) => {
|
|
673
700
|
this.showLoading = !1;
|
|
674
701
|
}));
|
|
675
702
|
},
|
|
676
703
|
/*验证*/
|
|
677
704
|
check() {
|
|
678
|
-
var
|
|
679
|
-
this.checkFun && (this.showLoading = !0, (
|
|
680
|
-
this.showLoading = !1, this.moveWidth = 0, this.checkStatus =
|
|
681
|
-
|
|
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(
|
|
691
|
-
if (
|
|
717
|
+
getCurrentCoordinate(e) {
|
|
718
|
+
if (e.pageX !== null && e.pageX !== void 0)
|
|
692
719
|
return {
|
|
693
|
-
x: Math.round(
|
|
694
|
-
y: Math.round(
|
|
720
|
+
x: Math.round(e.pageX),
|
|
721
|
+
y: Math.round(e.pageY)
|
|
695
722
|
};
|
|
696
|
-
let
|
|
697
|
-
return
|
|
698
|
-
x: Math.round(
|
|
699
|
-
y: Math.round(
|
|
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(
|
|
702
|
-
y: Math.round(
|
|
728
|
+
x: Math.round(t[0].clientX),
|
|
729
|
+
y: Math.round(t[0].clientY)
|
|
703
730
|
};
|
|
704
731
|
},
|
|
705
732
|
/*Start*/
|
|
706
|
-
onStart(
|
|
733
|
+
onStart(e) {
|
|
707
734
|
if (this.showLoading || this.checkStatus)
|
|
708
735
|
return;
|
|
709
|
-
const
|
|
710
|
-
if (this.startX = n, this.startY =
|
|
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
|
-
}),
|
|
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(
|
|
749
|
+
onMove(e) {
|
|
723
750
|
if (this.showLoading || this.checkStatus)
|
|
724
751
|
return;
|
|
725
|
-
|
|
726
|
-
const
|
|
727
|
-
let
|
|
728
|
-
|
|
729
|
-
x:
|
|
730
|
-
y:
|
|
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
|
-
}),
|
|
760
|
+
}), p = Math.min(Math.max(p, 0), v), this.moveWidth = p;
|
|
734
761
|
},
|
|
735
762
|
/*End*/
|
|
736
|
-
onEnd(
|
|
763
|
+
onEnd(e) {
|
|
737
764
|
if (this.showLoading || this.checkStatus)
|
|
738
765
|
return;
|
|
739
|
-
const
|
|
740
|
-
let n =
|
|
741
|
-
const { startX: o, startY: i } = this, { startTime: r, trackList:
|
|
742
|
-
if (
|
|
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:
|
|
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(),
|
|
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
|
-
},
|
|
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
|
-
},
|
|
785
|
+
}, Zn = { class: "check-tip-inner" }, eo = { class: "tip-txt" }, to = {
|
|
759
786
|
key: 2,
|
|
760
787
|
class: "big-flash"
|
|
761
|
-
},
|
|
762
|
-
function
|
|
763
|
-
return
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
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:
|
|
796
|
+
onClick: t[0] || (t[0] = (r) => e.$emit("update:modelValue", !1))
|
|
770
797
|
})
|
|
771
798
|
]),
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
799
|
+
s("div", Kn, [
|
|
800
|
+
s("div", Hn, [
|
|
801
|
+
y(s("i", {
|
|
775
802
|
class: "font-icon flash",
|
|
776
|
-
onClick:
|
|
803
|
+
onClick: t[1] || (t[1] = (...r) => i.generate && i.generate(...r))
|
|
777
804
|
}, null, 512), [
|
|
778
|
-
[
|
|
805
|
+
[P, !(o.showLoading || o.checkStatus || o.genError)]
|
|
779
806
|
])
|
|
780
807
|
]),
|
|
781
|
-
|
|
782
|
-
|
|
808
|
+
y(s("div", Yn, t[7] || (t[7] = [
|
|
809
|
+
s("i", { class: "loading" }, null, -1)
|
|
783
810
|
]), 512), [
|
|
784
|
-
[
|
|
811
|
+
[P, o.showLoading]
|
|
785
812
|
]),
|
|
786
|
-
o.imgSrc ? (
|
|
787
|
-
|
|
813
|
+
o.imgSrc ? (l(), d(S, { key: 0 }, [
|
|
814
|
+
s("img", {
|
|
788
815
|
class: "captcha-img",
|
|
789
816
|
src: o.imgSrc
|
|
790
|
-
}, null, 8,
|
|
791
|
-
|
|
817
|
+
}, null, 8, Gn),
|
|
818
|
+
s("div", {
|
|
792
819
|
class: "temp-img-box",
|
|
793
|
-
style:
|
|
820
|
+
style: _(`transform: translate(${o.moveWidth}px, 0);`)
|
|
794
821
|
}, [
|
|
795
|
-
|
|
822
|
+
s("img", {
|
|
796
823
|
class: "temp-img",
|
|
797
824
|
src: o.tempImgSrc
|
|
798
|
-
}, null, 8,
|
|
825
|
+
}, null, 8, Jn)
|
|
799
826
|
], 4)
|
|
800
|
-
], 64)) :
|
|
801
|
-
o.checkStatus ? (
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
class:
|
|
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
|
-
|
|
833
|
+
s("p", eo, h(o.checkStatus == "success" ? n.textData.checkSuccess || "验证通过" : n.textData.checkFail || "验证失败,请重新尝试"), 1)
|
|
807
834
|
])
|
|
808
|
-
])) :
|
|
809
|
-
o.genError ? (
|
|
810
|
-
|
|
835
|
+
])) : f("", !0),
|
|
836
|
+
o.genError ? (l(), d("div", to, [
|
|
837
|
+
s("i", {
|
|
811
838
|
class: "font-icon flash",
|
|
812
|
-
onClick:
|
|
839
|
+
onClick: t[2] || (t[2] = (...r) => i.generate && i.generate(...r))
|
|
813
840
|
})
|
|
814
|
-
])) :
|
|
841
|
+
])) : f("", !0)
|
|
815
842
|
]),
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
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:
|
|
847
|
+
style: _(`width: ${o.moveWidth}px`)
|
|
821
848
|
}, null, 4),
|
|
822
|
-
|
|
849
|
+
s("div", {
|
|
823
850
|
class: "move-btn-box",
|
|
824
|
-
onTouchstart:
|
|
825
|
-
onTouchmove:
|
|
826
|
-
onTouchend:
|
|
827
|
-
onMousedown:
|
|
828
|
-
},
|
|
829
|
-
|
|
830
|
-
|
|
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
|
-
|
|
834
|
-
|
|
860
|
+
s("div", oo, [
|
|
861
|
+
s("p", io, h(n.textData.moveText || "向右滑动"), 1)
|
|
835
862
|
])
|
|
836
863
|
])
|
|
837
864
|
])
|
|
838
865
|
], 512)), [
|
|
839
|
-
[
|
|
866
|
+
[P, n.modelValue]
|
|
840
867
|
]);
|
|
841
868
|
}
|
|
842
|
-
const
|
|
869
|
+
const ao = /* @__PURE__ */ On(Bn, [["render", so]]), ro = {
|
|
843
870
|
name: "paBehaviorCaptcha",
|
|
844
871
|
inject: ["$t", "api"],
|
|
845
872
|
components: {
|
|
846
|
-
BehaviorCaptcha:
|
|
873
|
+
BehaviorCaptcha: ao
|
|
847
874
|
},
|
|
848
875
|
computed: {
|
|
849
876
|
captchaTextData() {
|
|
850
|
-
const { $t:
|
|
877
|
+
const { $t: e } = this;
|
|
851
878
|
return {
|
|
852
|
-
title:
|
|
853
|
-
checkSuccess:
|
|
854
|
-
checkFail:
|
|
855
|
-
moveText:
|
|
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(
|
|
866
|
-
return this.api.checkCaptcha(
|
|
892
|
+
checkFun(e) {
|
|
893
|
+
return this.api.checkCaptcha(e);
|
|
867
894
|
}
|
|
868
895
|
}
|
|
869
896
|
};
|
|
870
|
-
function
|
|
871
|
-
const r =
|
|
872
|
-
return
|
|
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
|
|
879
|
-
|
|
880
|
-
|
|
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:
|
|
888
|
-
acountCheckbox:
|
|
889
|
-
acountBehaviorCaptcha:
|
|
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
|
|
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) =>
|
|
903
|
-
password: (i) =>
|
|
904
|
-
cfmPassword: (i) =>
|
|
905
|
-
inviteCodeTop: (i) => this._inviteCodeRequired ? i ? "" :
|
|
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:
|
|
916
|
-
return
|
|
917
|
-
const
|
|
918
|
-
return
|
|
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(
|
|
923
|
-
|
|
1068
|
+
submitHandler(e) {
|
|
1069
|
+
e !== !1 && this.validateAll() && (this.showCaptcha = !0);
|
|
924
1070
|
},
|
|
925
1071
|
/*加密参数*/
|
|
926
|
-
getEncryptionData(
|
|
927
|
-
return this.api.getPublicKey().then((
|
|
928
|
-
if (!
|
|
1072
|
+
getEncryptionData(e) {
|
|
1073
|
+
return this.api.getPublicKey().then((t) => {
|
|
1074
|
+
if (!t)
|
|
929
1075
|
return Promise.reject();
|
|
930
|
-
const n = new
|
|
931
|
-
n.setPublicKey(
|
|
932
|
-
const
|
|
933
|
-
for (let r in
|
|
934
|
-
|
|
935
|
-
return
|
|
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
|
-
},
|
|
940
|
-
mixins: [
|
|
941
|
-
|
|
942
|
-
props: {
|
|
943
|
-
showToggleLink: Boolean,
|
|
944
|
-
region: String
|
|
945
|
-
},
|
|
1085
|
+
}, bo = {
|
|
1086
|
+
mixins: [V],
|
|
1087
|
+
props: ["showToggleLink", "region", "quickLogin"],
|
|
946
1088
|
data() {
|
|
947
|
-
const
|
|
1089
|
+
const e = uni.getStorageSync("remember_username");
|
|
948
1090
|
return {
|
|
949
1091
|
isLogin: !0,
|
|
950
1092
|
//标记为login页面,mixins中要用
|
|
951
|
-
remember: !!
|
|
1093
|
+
remember: !!e,
|
|
952
1094
|
//是否记住账号
|
|
953
1095
|
formData: {
|
|
954
|
-
loginName:
|
|
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:
|
|
964
|
-
const
|
|
965
|
-
this.getEncryptionData(
|
|
966
|
-
n.account = n.loginName, delete n.loginName, this.api.login(n).then((
|
|
967
|
-
this.remember ? uni.setStorageSync("remember_username", this.formData.loginName) : uni.removeStorageSync("remember_username"), this
|
|
968
|
-
}).catch((
|
|
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
|
-
},
|
|
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),
|
|
1121
|
+
}, null, -1), Po = /* @__PURE__ */ s("input", {
|
|
980
1122
|
type: "text",
|
|
981
1123
|
autocomplete: "off",
|
|
982
1124
|
class: "pa-hidden-input"
|
|
983
|
-
}, null, -1),
|
|
984
|
-
key:
|
|
1125
|
+
}, null, -1), _o = { class: "pa-form-footer-actions" }, So = {
|
|
1126
|
+
key: 1,
|
|
985
1127
|
class: "pa-toggle-link"
|
|
986
1128
|
};
|
|
987
|
-
function
|
|
988
|
-
const r =
|
|
989
|
-
return
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
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":
|
|
995
|
-
rule:
|
|
996
|
-
placeholder:
|
|
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
|
-
|
|
1141
|
+
m(r, {
|
|
1000
1142
|
modelValue: o.formData.password,
|
|
1001
|
-
"onUpdate:modelValue":
|
|
1002
|
-
rule:
|
|
1003
|
-
placeholder:
|
|
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
|
-
|
|
1008
|
-
|
|
1149
|
+
s("div", _o, [
|
|
1150
|
+
m(u, {
|
|
1009
1151
|
class: "pa-remeber-me",
|
|
1010
1152
|
modelValue: o.remember,
|
|
1011
|
-
"onUpdate:modelValue":
|
|
1153
|
+
"onUpdate:modelValue": t[2] || (t[2] = (c) => o.remember = c)
|
|
1012
1154
|
}, {
|
|
1013
|
-
default:
|
|
1014
|
-
N(
|
|
1155
|
+
default: E(() => [
|
|
1156
|
+
N(h(e.$t("remember")), 1)
|
|
1015
1157
|
]),
|
|
1016
1158
|
_: 1
|
|
1017
1159
|
}, 8, ["modelValue"]),
|
|
1018
|
-
|
|
1160
|
+
s("div", {
|
|
1019
1161
|
class: "pa-forget-pwd",
|
|
1020
|
-
onClick:
|
|
1021
|
-
},
|
|
1162
|
+
onClick: t[3] || (t[3] = (c) => e.emitUpward("forgetPwd"))
|
|
1163
|
+
}, h(e.$t("forgetPwd")), 1)
|
|
1022
1164
|
]),
|
|
1023
|
-
|
|
1165
|
+
s("div", {
|
|
1024
1166
|
class: "pa-form-btn",
|
|
1025
|
-
onClick:
|
|
1026
|
-
},
|
|
1027
|
-
n.
|
|
1028
|
-
|
|
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:
|
|
1031
|
-
},
|
|
1032
|
-
])) :
|
|
1033
|
-
p
|
|
1034
|
-
modelValue:
|
|
1035
|
-
"onUpdate:modelValue":
|
|
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
|
|
1041
|
-
mixins: [
|
|
1042
|
-
|
|
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
|
|
1078
|
-
return this._inviteCodeRequired ?
|
|
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() {
|
|
@@ -1086,8 +1222,8 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
|
|
|
1086
1222
|
watch: {
|
|
1087
1223
|
inviteCode: {
|
|
1088
1224
|
immediate: !0,
|
|
1089
|
-
handler(
|
|
1090
|
-
this.formData.inviteCodeTop =
|
|
1225
|
+
handler(e) {
|
|
1226
|
+
this.formData.inviteCodeTop = e;
|
|
1091
1227
|
}
|
|
1092
1228
|
}
|
|
1093
1229
|
},
|
|
@@ -1097,12 +1233,15 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
|
|
|
1097
1233
|
methods: {
|
|
1098
1234
|
/*邀请码相关处理*/
|
|
1099
1235
|
inviteCodeHandler() {
|
|
1100
|
-
new Promise((
|
|
1236
|
+
new Promise((t) => {
|
|
1101
1237
|
if (this._inviteCodeRequired !== void 0)
|
|
1102
|
-
return
|
|
1103
|
-
this.api.
|
|
1104
|
-
|
|
1105
|
-
|
|
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) => {
|
|
1106
1245
|
this.serviceInviteCode = (n == null ? void 0 : n.inviteCode) || "";
|
|
1107
1246
|
}).catch((n) => {
|
|
1108
1247
|
});
|
|
@@ -1110,135 +1249,263 @@ const so = /* @__PURE__ */ C(Zn, [["render", io]]), ao = {
|
|
|
1110
1249
|
},
|
|
1111
1250
|
/*阅读注册规则协议*/
|
|
1112
1251
|
readPact() {
|
|
1113
|
-
this.showPactPopup = !0, this
|
|
1252
|
+
this.showPactPopup = !0, this.emitUpward("pact");
|
|
1114
1253
|
},
|
|
1115
1254
|
/*提交登录*/
|
|
1116
|
-
submit({ id:
|
|
1117
|
-
const
|
|
1118
|
-
this.getEncryptionData(
|
|
1119
|
-
!this._inviteCodeRequired && this.serviceInviteCode && !n.inviteCodeTop && (n.inviteCodeTop = this.serviceInviteCode), this.api.register(n).then((
|
|
1120
|
-
this
|
|
1121
|
-
}).catch((
|
|
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) => {
|
|
1122
1261
|
});
|
|
1123
1262
|
}).catch((n) => {
|
|
1124
1263
|
});
|
|
1125
1264
|
}
|
|
1126
1265
|
}
|
|
1127
|
-
},
|
|
1266
|
+
}, Vo = { class: "pa-form" }, Io = /* @__PURE__ */ s("input", {
|
|
1128
1267
|
type: "password",
|
|
1129
1268
|
autocomplete: "off",
|
|
1130
1269
|
class: "pa-hidden-input"
|
|
1131
|
-
}, null, -1),
|
|
1270
|
+
}, null, -1), Do = /* @__PURE__ */ s("input", {
|
|
1132
1271
|
type: "text",
|
|
1133
1272
|
autocomplete: "off",
|
|
1134
1273
|
class: "pa-hidden-input"
|
|
1135
|
-
}, null, -1),
|
|
1136
|
-
key: 0,
|
|
1137
|
-
class: "pa-toggle-link"
|
|
1138
|
-
}, mo = {
|
|
1274
|
+
}, null, -1), Ao = { class: "pa-form-footer-actions" }, Eo = {
|
|
1139
1275
|
key: 1,
|
|
1276
|
+
class: "pa-toggle-link"
|
|
1277
|
+
}, qo = {
|
|
1278
|
+
key: 2,
|
|
1140
1279
|
class: "pa-pact-popup"
|
|
1141
|
-
},
|
|
1142
|
-
|
|
1143
|
-
],
|
|
1144
|
-
function
|
|
1145
|
-
const r =
|
|
1146
|
-
return
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
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, {
|
|
1150
1289
|
modelValue: o.formData.loginName,
|
|
1151
|
-
"onUpdate:modelValue":
|
|
1152
|
-
rule:
|
|
1153
|
-
placeholder:
|
|
1290
|
+
"onUpdate:modelValue": t[0] || (t[0] = (c) => o.formData.loginName = c),
|
|
1291
|
+
rule: e.formRule.loginName,
|
|
1292
|
+
placeholder: e.$t("userPh"),
|
|
1154
1293
|
prefixIcon: "icon-user"
|
|
1155
1294
|
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1156
|
-
|
|
1295
|
+
m(r, {
|
|
1157
1296
|
modelValue: o.formData.password,
|
|
1158
|
-
"onUpdate:modelValue":
|
|
1159
|
-
rule:
|
|
1160
|
-
placeholder:
|
|
1297
|
+
"onUpdate:modelValue": t[1] || (t[1] = (c) => o.formData.password = c),
|
|
1298
|
+
rule: e.formRule.password,
|
|
1299
|
+
placeholder: e.$t("pwdPh"),
|
|
1161
1300
|
prefixIcon: "icon-password",
|
|
1162
1301
|
type: "password"
|
|
1163
1302
|
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1164
|
-
|
|
1303
|
+
m(r, {
|
|
1165
1304
|
modelValue: o.formData.cfmPassword,
|
|
1166
|
-
"onUpdate:modelValue":
|
|
1167
|
-
rule:
|
|
1168
|
-
placeholder:
|
|
1305
|
+
"onUpdate:modelValue": t[2] || (t[2] = (c) => o.formData.cfmPassword = c),
|
|
1306
|
+
rule: e.formRule.cfmPassword,
|
|
1307
|
+
placeholder: e.$t("confirmPwdPh"),
|
|
1169
1308
|
prefixIcon: "icon-password",
|
|
1170
1309
|
type: "password"
|
|
1171
1310
|
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1172
|
-
|
|
1311
|
+
m(r, {
|
|
1173
1312
|
modelValue: o.formData.inviteCodeTop,
|
|
1174
|
-
"onUpdate:modelValue":
|
|
1175
|
-
rule:
|
|
1313
|
+
"onUpdate:modelValue": t[3] || (t[3] = (c) => o.formData.inviteCodeTop = c),
|
|
1314
|
+
rule: e.formRule.inviteCodeTop,
|
|
1176
1315
|
placeholder: i.inviteCodePh,
|
|
1177
1316
|
disabled: !!n.inviteCode,
|
|
1178
1317
|
prefixIcon: "icon-invite"
|
|
1179
1318
|
}, null, 8, ["modelValue", "rule", "placeholder", "disabled"]),
|
|
1180
|
-
|
|
1181
|
-
|
|
1319
|
+
s("div", Ao, [
|
|
1320
|
+
m(u, {
|
|
1182
1321
|
class: "pa-remeber-me",
|
|
1183
1322
|
modelValue: o.agreePact,
|
|
1184
|
-
"onUpdate:modelValue":
|
|
1323
|
+
"onUpdate:modelValue": t[5] || (t[5] = (c) => o.agreePact = c)
|
|
1185
1324
|
}, {
|
|
1186
|
-
default:
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1325
|
+
default: E(() => [
|
|
1326
|
+
s("div", null, [
|
|
1327
|
+
s("span", null, h(e.$t("pact1")), 1),
|
|
1328
|
+
s("span", {
|
|
1190
1329
|
class: "pa-underline-text",
|
|
1191
|
-
onClick:
|
|
1192
|
-
},
|
|
1330
|
+
onClick: t[4] || (t[4] = U((...c) => i.readPact && i.readPact(...c), ["stop"]))
|
|
1331
|
+
}, h(e.$t("pact2")), 1)
|
|
1193
1332
|
])
|
|
1194
1333
|
]),
|
|
1195
1334
|
_: 1
|
|
1196
1335
|
}, 8, ["modelValue"])
|
|
1197
1336
|
]),
|
|
1198
|
-
|
|
1199
|
-
class:
|
|
1200
|
-
onClick:
|
|
1201
|
-
},
|
|
1202
|
-
n.
|
|
1203
|
-
|
|
1204
|
-
|
|
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", {
|
|
1205
1345
|
class: "pa-text-btn",
|
|
1206
|
-
onClick:
|
|
1207
|
-
},
|
|
1208
|
-
])) :
|
|
1209
|
-
p
|
|
1210
|
-
modelValue:
|
|
1211
|
-
"onUpdate:modelValue":
|
|
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),
|
|
1212
1352
|
onSuccess: i.submit
|
|
1213
1353
|
}, null, 8, ["modelValue", "onSuccess"]),
|
|
1214
|
-
n.insideShowPact && o.showPactPopup && i.pactSrc ? (
|
|
1215
|
-
|
|
1216
|
-
|
|
1354
|
+
n.insideShowPact && o.showPactPopup && i.pactSrc ? (l(), d("div", qo, [
|
|
1355
|
+
s("div", xo, [
|
|
1356
|
+
s("div", {
|
|
1217
1357
|
class: "pa-back-button",
|
|
1218
|
-
onClick:
|
|
1219
|
-
},
|
|
1220
|
-
|
|
1358
|
+
onClick: t[9] || (t[9] = (c) => o.showPactPopup = !1)
|
|
1359
|
+
}, No),
|
|
1360
|
+
s("p", Uo, h(e.$t("pactTitle")), 1)
|
|
1221
1361
|
]),
|
|
1222
|
-
|
|
1362
|
+
s("iframe", {
|
|
1223
1363
|
class: "pa-pact-iframe",
|
|
1224
1364
|
src: i.pactSrc
|
|
1225
|
-
}, null, 8,
|
|
1226
|
-
])) :
|
|
1365
|
+
}, null, 8, Fo)
|
|
1366
|
+
])) : f("", !0)
|
|
1227
1367
|
]);
|
|
1228
1368
|
}
|
|
1229
|
-
const
|
|
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 = {
|
|
1230
1493
|
name: "P500Acount",
|
|
1231
|
-
emits: ["back", "pact", "bannerClick", "forgetPwd", "toggleLinkClick", "loginSuccess", "registerSuccess"],
|
|
1494
|
+
emits: ["back", "pact", "bannerClick", "forgetPwd", "toggleLinkClick", "loginSuccess", "registerSuccess", "appQuickLogin", "quickLoginSuccess"],
|
|
1232
1495
|
components: {
|
|
1233
|
-
acountBanner:
|
|
1234
|
-
acountDialog:
|
|
1235
|
-
|
|
1236
|
-
|
|
1496
|
+
acountBanner: kn,
|
|
1497
|
+
acountDialog: In,
|
|
1498
|
+
acountForm: jo,
|
|
1499
|
+
acountBind: ei
|
|
1237
1500
|
},
|
|
1238
1501
|
provide() {
|
|
1239
1502
|
return {
|
|
1240
|
-
$t:
|
|
1241
|
-
api:
|
|
1503
|
+
$t: T.global.t,
|
|
1504
|
+
api: L,
|
|
1505
|
+
// 向上层组件发射事件(可被任意后代注入使用)
|
|
1506
|
+
emitUpward: (e, t) => this.$emit(e, t),
|
|
1507
|
+
// 授权成功方法
|
|
1508
|
+
authSuccess: this.authSuccess
|
|
1242
1509
|
};
|
|
1243
1510
|
},
|
|
1244
1511
|
props: {
|
|
@@ -1281,23 +1548,31 @@ const Co = /* @__PURE__ */ C(ao, [["render", wo]]), $ = Yt(), I = new X(), Po =
|
|
|
1281
1548
|
showToggleLink: {
|
|
1282
1549
|
type: Boolean,
|
|
1283
1550
|
default: !0
|
|
1551
|
+
},
|
|
1552
|
+
quickLogin: {
|
|
1553
|
+
type: Boolean,
|
|
1554
|
+
default: !0
|
|
1284
1555
|
}
|
|
1285
1556
|
},
|
|
1286
1557
|
created() {
|
|
1287
|
-
|
|
1288
|
-
const { showLoading:
|
|
1289
|
-
|
|
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 });
|
|
1290
1561
|
},
|
|
1291
1562
|
data() {
|
|
1292
1563
|
return {
|
|
1293
|
-
i18n:
|
|
1564
|
+
i18n: T,
|
|
1294
1565
|
//国际化对象
|
|
1295
1566
|
dialogCount: 0,
|
|
1296
1567
|
//是否显示dialog. >0时显示
|
|
1297
1568
|
dialogType: 0,
|
|
1298
1569
|
//dialog类型.0:loading;1:message
|
|
1299
|
-
dialogMsg: ""
|
|
1570
|
+
dialogMsg: "",
|
|
1300
1571
|
//dialog msg内容
|
|
1572
|
+
showBind: !1,
|
|
1573
|
+
//是否显示绑定表单
|
|
1574
|
+
tgData: {}
|
|
1575
|
+
//tg用户数据 - showBind=true时,绑定表单提交时需要使用
|
|
1301
1576
|
};
|
|
1302
1577
|
},
|
|
1303
1578
|
methods: {
|
|
@@ -1310,88 +1585,88 @@ const Co = /* @__PURE__ */ C(ao, [["render", wo]]), $ = Yt(), I = new X(), Po =
|
|
|
1310
1585
|
this.dialogCount--;
|
|
1311
1586
|
},
|
|
1312
1587
|
/*显示消息框*/
|
|
1313
|
-
showMessage(
|
|
1314
|
-
this.dialogType = 1, this.dialogCount++, this.dialogMsg =
|
|
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
|
+
});
|
|
1315
1604
|
}
|
|
1316
1605
|
}
|
|
1317
|
-
},
|
|
1606
|
+
}, ni = { class: "pa-acount" }, oi = {
|
|
1318
1607
|
key: 0,
|
|
1319
1608
|
class: "pa-acount-page"
|
|
1320
|
-
},
|
|
1321
|
-
|
|
1322
|
-
],
|
|
1323
|
-
function
|
|
1324
|
-
const r =
|
|
1325
|
-
return
|
|
1326
|
-
n.page ? (
|
|
1327
|
-
n.showBackBtn ? (
|
|
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", {
|
|
1328
1617
|
key: 0,
|
|
1329
1618
|
class: "pa-back-button",
|
|
1330
|
-
onClick:
|
|
1331
|
-
},
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
class:
|
|
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"])
|
|
1335
1624
|
}, null, 2)
|
|
1336
1625
|
]),
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
n.type == "login" ? (u(), P(h, {
|
|
1343
|
-
key: 0,
|
|
1344
|
-
showToggleLink: n.showToggleLink,
|
|
1345
|
-
region: n.region,
|
|
1346
|
-
onForgetPwd: e[2] || (e[2] = (l) => t.$emit("forgetPwd", l)),
|
|
1347
|
-
onToggleLinkClick: e[3] || (e[3] = (l) => t.$emit("toggleLinkClick", l)),
|
|
1348
|
-
onLoginSuccess: e[4] || (e[4] = (l) => t.$emit("loginSuccess", l))
|
|
1349
|
-
}, null, 8, ["showToggleLink", "region"])) : n.type == "register" ? (u(), P(g, {
|
|
1350
|
-
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,
|
|
1351
1631
|
region: n.region,
|
|
1632
|
+
showToggleLink: n.showToggleLink,
|
|
1633
|
+
quickLogin: n.quickLogin,
|
|
1352
1634
|
inviteCode: n.inviteCode,
|
|
1353
1635
|
inviteCodeRequired: n.inviteCodeRequired,
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
onToggleLinkClick: e[5] || (e[5] = (l) => t.$emit("toggleLinkClick", l)),
|
|
1357
|
-
onPact: e[6] || (e[6] = (l) => t.$emit("pact", l)),
|
|
1358
|
-
onRegisterSuccess: e[7] || (e[7] = (l) => t.$emit("registerSuccess", l))
|
|
1359
|
-
}, null, 8, ["region", "inviteCode", "inviteCodeRequired", "showToggleLink", "insideShowPact"])) : v("", !0)
|
|
1636
|
+
insideShowPact: n.insideShowPact
|
|
1637
|
+
}, null, 8, ["type", "region", "showToggleLink", "quickLogin", "inviteCode", "inviteCodeRequired", "insideShowPact"])
|
|
1360
1638
|
])
|
|
1361
|
-
])) : (
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
}, null, 8, ["region", "inviteCode", "inviteCodeRequired", "showToggleLink", "insideShowPact"])) : v("", !0)
|
|
1380
|
-
], 64)),
|
|
1381
|
-
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, {
|
|
1382
1657
|
modelValue: o.dialogCount,
|
|
1383
|
-
"onUpdate:modelValue":
|
|
1658
|
+
"onUpdate:modelValue": t[2] || (t[2] = (c) => o.dialogCount = c),
|
|
1384
1659
|
type: o.dialogType,
|
|
1385
1660
|
message: o.dialogMsg
|
|
1386
1661
|
}, null, 8, ["modelValue", "type", "message"])
|
|
1387
1662
|
]);
|
|
1388
1663
|
}
|
|
1389
|
-
const
|
|
1390
|
-
install: (
|
|
1391
|
-
|
|
1664
|
+
const A = /* @__PURE__ */ k(ti, [["render", li]]), mi = {
|
|
1665
|
+
install: (e) => {
|
|
1666
|
+
e.component(A.name, A);
|
|
1392
1667
|
}
|
|
1393
1668
|
};
|
|
1394
1669
|
export {
|
|
1395
|
-
|
|
1396
|
-
|
|
1670
|
+
A as P500Acount,
|
|
1671
|
+
mi as default
|
|
1397
1672
|
};
|