p500-acount 1.0.0
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/README.md +4 -0
- package/dist/assets/index-CTD-5s4G.css +1 -0
- package/dist/assets/index-Ec41SW6G.js +17 -0
- package/dist/vi.ico +0 -0
- package/lib/p500.acount.es.js +1375 -0
- package/lib/p500.acount.umd.js +1 -0
- package/lib/style.css +1 -0
- package/lib/vi.ico +0 -0
- package/package.json +33 -0
|
@@ -0,0 +1,1375 @@
|
|
|
1
|
+
import { createI18n as x } from "vue-i18n";
|
|
2
|
+
import { createElementBlock as u, openBlock as l, createElementVNode as a, normalizeStyle as y, Fragment as S, renderList as I, normalizeClass as w, withDirectives as b, toDisplayString as h, vShow as P, createCommentVNode as v, renderSlot as D, resolveComponent as f, createBlock as T, mergeProps as R, createVNode as g, withCtx as V, createTextVNode as N, withModifiers as M } from "vue";
|
|
3
|
+
import F from "jsencrypt";
|
|
4
|
+
var q = { 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
|
+
const O = typeof uni < "u" && uni.request;
|
|
6
|
+
if (!O)
|
|
7
|
+
try {
|
|
8
|
+
window.uni = {
|
|
9
|
+
// 标记这是一个模拟的 uni 对象
|
|
10
|
+
__IS_MY_UNI_POLYFILL__: !0,
|
|
11
|
+
/*缓存数据*/
|
|
12
|
+
setStorageSync(t, e) {
|
|
13
|
+
localStorage.setItem(t, JSON.stringify(e));
|
|
14
|
+
},
|
|
15
|
+
/*获取缓存数据*/
|
|
16
|
+
getStorageSync(t) {
|
|
17
|
+
return JSON.parse(localStorage.getItem(t));
|
|
18
|
+
},
|
|
19
|
+
/*移除缓存数据*/
|
|
20
|
+
removeStorageSync(t) {
|
|
21
|
+
localStorage.removeItem(t);
|
|
22
|
+
},
|
|
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,
|
|
28
|
+
//真正的uni.request需要的是header, 而fetch需要的是headers
|
|
29
|
+
body: t.body
|
|
30
|
+
}).then((e) => {
|
|
31
|
+
var n, i;
|
|
32
|
+
return (n = t.complete) == null || n.call(t), e.ok ? e.json() : (i = t.fail) == null ? void 0 : i.call(t, { message: `HTTP error! Status: ${e.status}` });
|
|
33
|
+
}).then((e) => {
|
|
34
|
+
var n;
|
|
35
|
+
(n = t.success) == null || n.call(t, { statusCode: 200, data: e });
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
} catch {
|
|
40
|
+
}
|
|
41
|
+
const B = (t, e, n = 10) => {
|
|
42
|
+
const i = { data: e, _timeout: +/* @__PURE__ */ new Date() + n * 60 * 1e3 };
|
|
43
|
+
uni.setStorageSync(t, i);
|
|
44
|
+
}, U = (t) => {
|
|
45
|
+
const e = uni.getStorageSync(t);
|
|
46
|
+
if (e) {
|
|
47
|
+
const { data: n, _timeout: i } = e;
|
|
48
|
+
if (!i)
|
|
49
|
+
return e;
|
|
50
|
+
if (+/* @__PURE__ */ new Date() <= i)
|
|
51
|
+
return n;
|
|
52
|
+
uni.removeStorageSync(t);
|
|
53
|
+
}
|
|
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
|
|
61
|
+
};
|
|
62
|
+
return new Promise((n, i) => {
|
|
63
|
+
t.dialog.showLoading(), new Promise((o, s) => {
|
|
64
|
+
if (e.fail = s, e.complete = () => {
|
|
65
|
+
t.dialog.hideLoading();
|
|
66
|
+
}, e.success = (r) => {
|
|
67
|
+
const { statusCode: m, data: p = {} } = r, { message: c, code: d } = p, _ = p.data;
|
|
68
|
+
if (m == 200)
|
|
69
|
+
return d && d != 200 ? s({ message: c, code: d }) : (t.cache && B(t.url, _), o(_));
|
|
70
|
+
s({ message: c });
|
|
71
|
+
}, t.cache) {
|
|
72
|
+
const r = U(t.url);
|
|
73
|
+
if (r)
|
|
74
|
+
return e.complete(), o(r);
|
|
75
|
+
}
|
|
76
|
+
uni.request(e);
|
|
77
|
+
}).then(n).catch(({ message: o = "" }) => {
|
|
78
|
+
o && t.dialog.showMessage(o), i();
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
class X {
|
|
83
|
+
/**
|
|
84
|
+
* @param {String} region 区域标识
|
|
85
|
+
* @param {String} apiDomain 接口请求域名。APP内使用时需要
|
|
86
|
+
* @param {Number} devicePlatform 客户端类型标识
|
|
87
|
+
* @param {Object} dialog 弹框方法对象
|
|
88
|
+
*/
|
|
89
|
+
setOptions(e, n, i, o) {
|
|
90
|
+
this.normalOption = {
|
|
91
|
+
dialog: o,
|
|
92
|
+
method: "GET",
|
|
93
|
+
urlPrefix: `${n}/soccer/`,
|
|
94
|
+
header: {
|
|
95
|
+
"Content-Type": "application/json",
|
|
96
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
97
|
+
lang: q[e].serviceLang,
|
|
98
|
+
// 接口所需语言标识
|
|
99
|
+
DevicePlatform: i || (/mobile|nokia|iphone|ipad|android|samsung|htc|blackberry|webos|ipod/i.test(navigator.userAgent) ? 2 : 1),
|
|
100
|
+
appver: "spread",
|
|
101
|
+
Authorization: ""
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
/*获取Banner数据*/
|
|
106
|
+
getBannerList() {
|
|
107
|
+
return k(Object.assign({}, this.normalOption, {
|
|
108
|
+
url: "home/advertising",
|
|
109
|
+
method: "POST",
|
|
110
|
+
cache: !0,
|
|
111
|
+
data: { location: 2, type: 2 }
|
|
112
|
+
}));
|
|
113
|
+
}
|
|
114
|
+
/*获取邀请码是否必填*/
|
|
115
|
+
getInviteCodeRequired() {
|
|
116
|
+
return k(Object.assign({}, this.normalOption, {
|
|
117
|
+
url: "home/getConfig",
|
|
118
|
+
cache: !0
|
|
119
|
+
})).then((e) => (e == null ? void 0 : e.invitationRequired) == "1");
|
|
120
|
+
}
|
|
121
|
+
/*获取默认邀请码*/
|
|
122
|
+
getDefaultInviteCode() {
|
|
123
|
+
return k(Object.assign({}, this.normalOption, {
|
|
124
|
+
url: "leaflet/agentInviteCode",
|
|
125
|
+
cache: !0
|
|
126
|
+
}));
|
|
127
|
+
}
|
|
128
|
+
/*生成验证码*/
|
|
129
|
+
generateCaptcha() {
|
|
130
|
+
return k(Object.assign({}, this.normalOption, {
|
|
131
|
+
url: "captcha/behavior/gen",
|
|
132
|
+
method: "POST"
|
|
133
|
+
}));
|
|
134
|
+
}
|
|
135
|
+
/*校验验证码*/
|
|
136
|
+
checkCaptcha(e) {
|
|
137
|
+
return new Promise((n) => {
|
|
138
|
+
k(Object.assign({}, this.normalOption, {
|
|
139
|
+
url: "captcha/behavior/check",
|
|
140
|
+
method: "POST",
|
|
141
|
+
data: e
|
|
142
|
+
})).then(n).catch(() => {
|
|
143
|
+
n(null);
|
|
144
|
+
});
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/*获取公钥*/
|
|
148
|
+
getPublicKey() {
|
|
149
|
+
return new Promise((e) => {
|
|
150
|
+
if (this.publicKey)
|
|
151
|
+
return e(this.publicKey);
|
|
152
|
+
k(Object.assign({}, this.normalOption, { url: "getPublicKey" })).then((n) => {
|
|
153
|
+
this.publicKey = n, e(n);
|
|
154
|
+
}).catch((n) => {
|
|
155
|
+
e(null);
|
|
156
|
+
});
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/*登录*/
|
|
160
|
+
login(e) {
|
|
161
|
+
return k(Object.assign({}, this.normalOption, { url: "login", method: "POST", data: e }));
|
|
162
|
+
}
|
|
163
|
+
/*注册*/
|
|
164
|
+
register(e) {
|
|
165
|
+
return k(Object.assign({}, this.normalOption, { url: "register", method: "POST", data: e }));
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
const j = "Signup", W = "Login", K = "Enter username", z = "Enter username or mobile no.", Y = "Pasword", H = "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", se = "Forget password?", ie = "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 = {
|
|
169
|
+
register: j,
|
|
170
|
+
login: W,
|
|
171
|
+
userPh: K,
|
|
172
|
+
loginNamePh: z,
|
|
173
|
+
pwdPh: Y,
|
|
174
|
+
confirmPwdPh: H,
|
|
175
|
+
inviteCodePh: G,
|
|
176
|
+
required: J,
|
|
177
|
+
rnRequired: Z,
|
|
178
|
+
userEr: Q,
|
|
179
|
+
loginNameEr: ee,
|
|
180
|
+
pwdEr: te,
|
|
181
|
+
confirmPwdEr: ne,
|
|
182
|
+
remember: oe,
|
|
183
|
+
forgetPwd: se,
|
|
184
|
+
toRegister: ie,
|
|
185
|
+
captchaTitle: ae,
|
|
186
|
+
captchaCheckSuccess: re,
|
|
187
|
+
captchaCheckFail: ce,
|
|
188
|
+
captchaMoveText: le,
|
|
189
|
+
popupTitle: ue,
|
|
190
|
+
confirmText: de,
|
|
191
|
+
pact1: he,
|
|
192
|
+
pact2: me,
|
|
193
|
+
pactTitle: ge,
|
|
194
|
+
hasUserName: pe,
|
|
195
|
+
goLogin: fe
|
|
196
|
+
}, ke = "注册", we = "登录", Ce = "请输入用户名", be = "请输入账号或手机号", Pe = "请输入密码", ye = "请确认密码", $e = "请输入邀请码", Se = "(必填)", Te = "(非必填)", _e = "请输入8~16位英文及数字组合", Ie = "请输入用户名或手机号码", Le = "请输入8~16个英文或数字", Ee = "确认密码输入错误", Ve = "记住账号", Ae = "忘记密码?", xe = "立即注册", De = "请拖动滑块完成拼图", Re = "验证通过", Ne = "验证失败,请重新尝试", Me = "向右滑动", Fe = "温馨提示", qe = "确认", Oe = "我已满18岁并且已阅读", Be = "《规则条款》", Ue = "规则条款", Xe = "已有账号,", je = "立即登录", We = {
|
|
197
|
+
register: ke,
|
|
198
|
+
login: we,
|
|
199
|
+
userPh: Ce,
|
|
200
|
+
loginNamePh: be,
|
|
201
|
+
pwdPh: Pe,
|
|
202
|
+
confirmPwdPh: ye,
|
|
203
|
+
inviteCodePh: $e,
|
|
204
|
+
required: Se,
|
|
205
|
+
rnRequired: Te,
|
|
206
|
+
userEr: _e,
|
|
207
|
+
loginNameEr: Ie,
|
|
208
|
+
pwdEr: Le,
|
|
209
|
+
confirmPwdEr: Ee,
|
|
210
|
+
remember: Ve,
|
|
211
|
+
forgetPwd: Ae,
|
|
212
|
+
toRegister: xe,
|
|
213
|
+
captchaTitle: De,
|
|
214
|
+
captchaCheckSuccess: Re,
|
|
215
|
+
captchaCheckFail: Ne,
|
|
216
|
+
captchaMoveText: Me,
|
|
217
|
+
popupTitle: Fe,
|
|
218
|
+
confirmText: qe,
|
|
219
|
+
pact1: Oe,
|
|
220
|
+
pact2: Be,
|
|
221
|
+
pactTitle: Ue,
|
|
222
|
+
hasUserName: Xe,
|
|
223
|
+
goLogin: je
|
|
224
|
+
}, Ke = "Đăng ký", ze = "Đăng nhập", Ye = "Vui lòng nhập tên đăng nhập", He = "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ố", st = "Xác nhận mật khẩu sai", it = "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 = {
|
|
225
|
+
register: Ke,
|
|
226
|
+
login: ze,
|
|
227
|
+
userPh: Ye,
|
|
228
|
+
loginNamePh: He,
|
|
229
|
+
pwdPh: Ge,
|
|
230
|
+
confirmPwdPh: Je,
|
|
231
|
+
inviteCodePh: Ze,
|
|
232
|
+
required: Qe,
|
|
233
|
+
rnRequired: et,
|
|
234
|
+
userEr: tt,
|
|
235
|
+
loginNameEr: nt,
|
|
236
|
+
pwdEr: ot,
|
|
237
|
+
confirmPwdEr: st,
|
|
238
|
+
remember: it,
|
|
239
|
+
forgetPwd: at,
|
|
240
|
+
toRegister: rt,
|
|
241
|
+
captchaTitle: ct,
|
|
242
|
+
captchaCheckSuccess: lt,
|
|
243
|
+
captchaCheckFail: ut,
|
|
244
|
+
captchaMoveText: dt,
|
|
245
|
+
popupTitle: ht,
|
|
246
|
+
confirmText: mt,
|
|
247
|
+
pact1: gt,
|
|
248
|
+
pact2: pt,
|
|
249
|
+
pactTitle: ft,
|
|
250
|
+
hasUserName: vt,
|
|
251
|
+
goLogin: kt
|
|
252
|
+
}, Ct = "Daftar", bt = "Masuk", Pt = "Ketik Username", yt = "Username atau Nomor WA", $t = "Sandi", St = "Konfirmasi Sandi", Tt = "Kode Undangan ", _t = "(Wajib)", It = "(opsional)", Lt = "8 - 16 Digit Kombinasi Huruf Dan Angka", Et = "Username atau Nomor WA", Vt = "8 - 16 Digit Kombinasi Huruf Dan Angka", At = "Sandi Salah!", xt = "Ingat", Dt = "Lupa Sandi?", Rt = "Daftar", Nt = "Silakan tarik slider untuk menyelesaikan puzzle", Mt = "Verifikasi berhasil", Ft = "Verifikasi gagal, coba lagi", qt = "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 = {
|
|
253
|
+
register: Ct,
|
|
254
|
+
login: bt,
|
|
255
|
+
userPh: Pt,
|
|
256
|
+
loginNamePh: yt,
|
|
257
|
+
pwdPh: $t,
|
|
258
|
+
confirmPwdPh: St,
|
|
259
|
+
inviteCodePh: Tt,
|
|
260
|
+
required: _t,
|
|
261
|
+
rnRequired: It,
|
|
262
|
+
userEr: Lt,
|
|
263
|
+
loginNameEr: Et,
|
|
264
|
+
pwdEr: Vt,
|
|
265
|
+
confirmPwdEr: At,
|
|
266
|
+
remember: xt,
|
|
267
|
+
forgetPwd: Dt,
|
|
268
|
+
toRegister: Rt,
|
|
269
|
+
captchaTitle: Nt,
|
|
270
|
+
captchaCheckSuccess: Mt,
|
|
271
|
+
captchaCheckFail: Ft,
|
|
272
|
+
captchaMoveText: qt,
|
|
273
|
+
popupTitle: Ot,
|
|
274
|
+
confirmText: Bt,
|
|
275
|
+
pact1: Ut,
|
|
276
|
+
pact2: Xt,
|
|
277
|
+
pactTitle: jt,
|
|
278
|
+
hasUserName: Wt,
|
|
279
|
+
goLogin: Kt
|
|
280
|
+
}, Yt = {
|
|
281
|
+
en: ve,
|
|
282
|
+
zh: We,
|
|
283
|
+
vi: wt,
|
|
284
|
+
id: zt
|
|
285
|
+
}, Ht = () => x({
|
|
286
|
+
locale: "vi",
|
|
287
|
+
// 用户提供的语言
|
|
288
|
+
fallbackLocale: "en",
|
|
289
|
+
messages: Yt
|
|
290
|
+
}), Gt = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAg0AAACoAQMAAABZmE+jAAAAA1BMVEUAAACnej3aAAAAAXRSTlMAQObYZgAAACJJREFUaN7twTEBAAAAwiD7p7bGDmAAAAAAAAAAAAAAQN4BK/gAAcTOpHoAAAAASUVORK5CYII=", C = (t, e) => {
|
|
291
|
+
const n = t.__vccOpts || t;
|
|
292
|
+
for (const [i, o] of e)
|
|
293
|
+
n[i] = o;
|
|
294
|
+
return n;
|
|
295
|
+
}, Jt = {
|
|
296
|
+
name: "paBanner",
|
|
297
|
+
inject: ["api"],
|
|
298
|
+
emits: ["bannerClick"],
|
|
299
|
+
data() {
|
|
300
|
+
return {
|
|
301
|
+
skeletonImg: Gt,
|
|
302
|
+
//占位图片
|
|
303
|
+
isUni: !uni.__IS_MY_UNI_POLYFILL__,
|
|
304
|
+
//是否为uni环境
|
|
305
|
+
currentIndex: 0,
|
|
306
|
+
//当前显示轮博下标
|
|
307
|
+
isSliding: !1,
|
|
308
|
+
//是否正在轮博中
|
|
309
|
+
startX: 0,
|
|
310
|
+
//记录移动起始位置
|
|
311
|
+
moveWidth: 0,
|
|
312
|
+
//移动的宽度
|
|
313
|
+
timer: null,
|
|
314
|
+
//自动轮博定时器
|
|
315
|
+
list: []
|
|
316
|
+
//banner数据
|
|
317
|
+
};
|
|
318
|
+
},
|
|
319
|
+
created() {
|
|
320
|
+
this.getBannerList();
|
|
321
|
+
},
|
|
322
|
+
beforeUnmount() {
|
|
323
|
+
this.stopAutoPlay();
|
|
324
|
+
},
|
|
325
|
+
methods: {
|
|
326
|
+
/*获取banner数据*/
|
|
327
|
+
getBannerList() {
|
|
328
|
+
this.api.getBannerList().then((t) => {
|
|
329
|
+
this.list = t, this.$nextTick(this.startAutoPlay);
|
|
330
|
+
}).catch((t) => {
|
|
331
|
+
});
|
|
332
|
+
},
|
|
333
|
+
/*开启自动轮播*/
|
|
334
|
+
startAutoPlay() {
|
|
335
|
+
this.timer = setInterval(() => {
|
|
336
|
+
this.slide(1);
|
|
337
|
+
}, 3e3);
|
|
338
|
+
},
|
|
339
|
+
/*停止自动轮播*/
|
|
340
|
+
stopAutoPlay() {
|
|
341
|
+
clearInterval(this.timer);
|
|
342
|
+
},
|
|
343
|
+
/*获取轮博项的偏移值*/
|
|
344
|
+
getItemOffset(t) {
|
|
345
|
+
const e = t - this.currentIndex, n = this.list.length * 100;
|
|
346
|
+
let i = t * 100;
|
|
347
|
+
return e > 1 && (i -= n), e < -1 && (i += n), i;
|
|
348
|
+
},
|
|
349
|
+
/*轮博切换*/
|
|
350
|
+
slide(t) {
|
|
351
|
+
const e = this.currentIndex + t, n = this.list.length - 1, i = e < 0 ? n : e > n ? 0 : e;
|
|
352
|
+
this.startSliding(), this.currentIndex = i;
|
|
353
|
+
},
|
|
354
|
+
/*轮播标记处理*/
|
|
355
|
+
startSliding() {
|
|
356
|
+
this.isSliding = !0, setTimeout(() => {
|
|
357
|
+
this.isSliding = !1;
|
|
358
|
+
}, 500);
|
|
359
|
+
},
|
|
360
|
+
/**
|
|
361
|
+
* 获取事件中的当前X坐标
|
|
362
|
+
* @param event 事件
|
|
363
|
+
* @returns X坐标
|
|
364
|
+
*/
|
|
365
|
+
getCurrentCoordinate(t) {
|
|
366
|
+
let e = t.originalEvent || t;
|
|
367
|
+
if ("pageX" in e)
|
|
368
|
+
return Math.round(e.pageX);
|
|
369
|
+
let n = e.changedTouches || e.targetTouches || [];
|
|
370
|
+
if (n.length > 0) {
|
|
371
|
+
const i = n[0];
|
|
372
|
+
return "pageX" in i ? Math.round(i.pageX) : Math.round(i.clientX);
|
|
373
|
+
}
|
|
374
|
+
return 0;
|
|
375
|
+
},
|
|
376
|
+
/*Start*/
|
|
377
|
+
onStart(t) {
|
|
378
|
+
const e = this.getCurrentCoordinate(t);
|
|
379
|
+
if (this.startX = e, t.type == "mousedown")
|
|
380
|
+
try {
|
|
381
|
+
document.addEventListener("mousemove", this.onMove), document.addEventListener("mouseup", this.onEnd);
|
|
382
|
+
} catch {
|
|
383
|
+
}
|
|
384
|
+
},
|
|
385
|
+
/*Move*/
|
|
386
|
+
onMove(t) {
|
|
387
|
+
t == null || t.preventDefault(), t.touches && t.touches.length > 0 && (t = t.touches[0]);
|
|
388
|
+
const e = this.getCurrentCoordinate(t), n = this.startX, i = e - n;
|
|
389
|
+
this.moveWidth = i;
|
|
390
|
+
},
|
|
391
|
+
/*End*/
|
|
392
|
+
onEnd(t) {
|
|
393
|
+
const { moveWidth: e } = this;
|
|
394
|
+
if (Math.abs(e) > 120 ? this.slide(e > 0 ? -1 : 1) : this.startSliding(), this.moveWidth = 0, t.type == "mouseup")
|
|
395
|
+
try {
|
|
396
|
+
document.removeEventListener("mousemove", this.onMove), document.removeEventListener("mouseup", this.onEnd);
|
|
397
|
+
} catch {
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
/*处理banner点击*/
|
|
401
|
+
handlerClick(t) {
|
|
402
|
+
if (t)
|
|
403
|
+
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 });
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}, Zt = { class: "pa-banner" }, Qt = { class: "pa-banner-inner" }, en = ["src"], tn = ["src"], nn = ["onClick"], on = { class: "pa-ndicators" };
|
|
407
|
+
function sn(t, e, n, i, o, s) {
|
|
408
|
+
return l(), u("div", Zt, [
|
|
409
|
+
a("div", Qt, [
|
|
410
|
+
o.isUni ? (l(), u("image", {
|
|
411
|
+
key: 0,
|
|
412
|
+
class: "pa-banner-skeleton",
|
|
413
|
+
src: o.skeletonImg,
|
|
414
|
+
mode: "widthFix"
|
|
415
|
+
}, null, 8, en)) : (l(), u("img", {
|
|
416
|
+
key: 1,
|
|
417
|
+
class: "pa-banner-skeleton",
|
|
418
|
+
src: o.skeletonImg
|
|
419
|
+
}, null, 8, tn)),
|
|
420
|
+
a("div", {
|
|
421
|
+
class: "pa-carousel",
|
|
422
|
+
onTouchstart: e[0] || (e[0] = (...r) => s.onStart && s.onStart(...r)),
|
|
423
|
+
onTouchmove: e[1] || (e[1] = (...r) => s.onMove && s.onMove(...r)),
|
|
424
|
+
onTouchend: e[2] || (e[2] = (...r) => s.onEnd && s.onEnd(...r)),
|
|
425
|
+
onMousedown: e[3] || (e[3] = (...r) => s.onStart && s.onStart(...r))
|
|
426
|
+
}, [
|
|
427
|
+
a("div", {
|
|
428
|
+
class: "pa-banner-track",
|
|
429
|
+
style: y({
|
|
430
|
+
transform: `translateX(calc(-${o.currentIndex * 100}% + ${o.moveWidth}px))`,
|
|
431
|
+
transitionDuration: o.isSliding ? "500ms" : "0ms"
|
|
432
|
+
})
|
|
433
|
+
}, [
|
|
434
|
+
(l(!0), u(S, null, I(o.list, (r, m) => (l(), u("div", {
|
|
435
|
+
key: m,
|
|
436
|
+
class: "pa-banner-item",
|
|
437
|
+
onClick: (p) => s.handlerClick(r.href),
|
|
438
|
+
style: y({
|
|
439
|
+
backgroundImage: `url(${r.url})`,
|
|
440
|
+
transform: `translateX(${s.getItemOffset(m)}%)`
|
|
441
|
+
})
|
|
442
|
+
}, null, 12, nn))), 128))
|
|
443
|
+
], 4),
|
|
444
|
+
a("div", on, [
|
|
445
|
+
(l(!0), u(S, null, I(o.list, (r, m) => (l(), u("div", {
|
|
446
|
+
key: m,
|
|
447
|
+
class: w(["pa-indicator", { active: m === o.currentIndex }])
|
|
448
|
+
}, null, 2))), 128))
|
|
449
|
+
])
|
|
450
|
+
], 32)
|
|
451
|
+
])
|
|
452
|
+
]);
|
|
453
|
+
}
|
|
454
|
+
const an = /* @__PURE__ */ C(Jt, [["render", sn]]), rn = {
|
|
455
|
+
name: "paDialog",
|
|
456
|
+
inject: ["$t"],
|
|
457
|
+
emits: ["update:modelValue"],
|
|
458
|
+
props: {
|
|
459
|
+
modelValue: Number,
|
|
460
|
+
//是否显示弹框>=1显示
|
|
461
|
+
type: {
|
|
462
|
+
//dialog类型. 0:loading;1:message
|
|
463
|
+
type: Number,
|
|
464
|
+
default: 0
|
|
465
|
+
},
|
|
466
|
+
message: String
|
|
467
|
+
//消息内容
|
|
468
|
+
}
|
|
469
|
+
}, cn = { class: "pa-dialog" }, ln = {
|
|
470
|
+
key: 0,
|
|
471
|
+
class: "pa-message"
|
|
472
|
+
}, un = { class: "pa-message-title" }, dn = { class: "pa-message-box" }, hn = { class: "pa-message-contx" }, mn = { class: "pa-message-btnbox" }, gn = {
|
|
473
|
+
key: 1,
|
|
474
|
+
class: "pa-loading"
|
|
475
|
+
}, pn = /* @__PURE__ */ a("div", { class: "pa-loading-bg" }, null, -1), fn = [
|
|
476
|
+
pn
|
|
477
|
+
];
|
|
478
|
+
function vn(t, e, n, i, o, s) {
|
|
479
|
+
return b((l(), u("div", cn, [
|
|
480
|
+
n.type ? (l(), u("div", ln, [
|
|
481
|
+
a("p", un, h(s.$t("popupTitle")), 1),
|
|
482
|
+
a("div", dn, [
|
|
483
|
+
a("p", hn, h(n.message), 1)
|
|
484
|
+
]),
|
|
485
|
+
a("div", mn, [
|
|
486
|
+
a("div", {
|
|
487
|
+
class: "pa-message-btn",
|
|
488
|
+
onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", n.modelValue - 1))
|
|
489
|
+
}, h(s.$t("confirmText")), 1)
|
|
490
|
+
])
|
|
491
|
+
])) : (l(), u("div", gn, fn))
|
|
492
|
+
], 512)), [
|
|
493
|
+
[P, n.modelValue >= 1]
|
|
494
|
+
]);
|
|
495
|
+
}
|
|
496
|
+
const kn = /* @__PURE__ */ C(rn, [["render", vn]]), wn = {
|
|
497
|
+
name: "paFormItem",
|
|
498
|
+
emits: ["update:modelValue"],
|
|
499
|
+
inject: ["paForm"],
|
|
500
|
+
props: {
|
|
501
|
+
modelValue: String,
|
|
502
|
+
//组件值
|
|
503
|
+
rule: Function,
|
|
504
|
+
//验证方法
|
|
505
|
+
type: String,
|
|
506
|
+
//input 类型
|
|
507
|
+
placeholder: String,
|
|
508
|
+
//input提示
|
|
509
|
+
disabled: Boolean,
|
|
510
|
+
//是否禁用
|
|
511
|
+
prefixIcon: String
|
|
512
|
+
//输入框头部图标
|
|
513
|
+
},
|
|
514
|
+
data() {
|
|
515
|
+
return {
|
|
516
|
+
realType: this.type == "password" ? "text" : this.type || "text",
|
|
517
|
+
//密码框默认状态设为文本框
|
|
518
|
+
errorMsg: "",
|
|
519
|
+
//验证提示
|
|
520
|
+
showPassword: !1
|
|
521
|
+
//是否显示密码
|
|
522
|
+
};
|
|
523
|
+
},
|
|
524
|
+
created() {
|
|
525
|
+
this.paForm.childrens.push(this);
|
|
526
|
+
},
|
|
527
|
+
methods: {
|
|
528
|
+
handlerFocus() {
|
|
529
|
+
this.$nextTick(() => {
|
|
530
|
+
this.type != this.realType && (this.realType = this.type);
|
|
531
|
+
});
|
|
532
|
+
},
|
|
533
|
+
handleInput(t) {
|
|
534
|
+
var n;
|
|
535
|
+
const e = ((((n = t.detail) == null ? void 0 : n.value) ?? t.target.value) || "").trim();
|
|
536
|
+
this.$emit("update:modelValue", e), this.$nextTick(() => {
|
|
537
|
+
this.validate();
|
|
538
|
+
});
|
|
539
|
+
},
|
|
540
|
+
validate() {
|
|
541
|
+
const { rule: t, modelValue: e } = this;
|
|
542
|
+
if (!t)
|
|
543
|
+
return !0;
|
|
544
|
+
const n = t(e) || "";
|
|
545
|
+
return this.errorMsg = n, !n;
|
|
546
|
+
}
|
|
547
|
+
}
|
|
548
|
+
}, Cn = { class: "pa-form-item" }, bn = { class: "pa-input-content" }, Pn = ["placeholder", "disabled", "value", "type"];
|
|
549
|
+
function yn(t, e, n, i, o, s) {
|
|
550
|
+
return l(), u("div", Cn, [
|
|
551
|
+
a("div", bn, [
|
|
552
|
+
n.prefixIcon ? (l(), u("i", {
|
|
553
|
+
key: 0,
|
|
554
|
+
class: w(["iconfont pa-prefix-icon", n.prefixIcon])
|
|
555
|
+
}, null, 2)) : v("", !0),
|
|
556
|
+
a("input", {
|
|
557
|
+
class: "pa-form-item--input",
|
|
558
|
+
placeholder: n.placeholder,
|
|
559
|
+
disabled: n.disabled,
|
|
560
|
+
value: n.modelValue,
|
|
561
|
+
type: o.showPassword ? "text" : o.realType,
|
|
562
|
+
onInput: e[0] || (e[0] = (...r) => s.handleInput && s.handleInput(...r)),
|
|
563
|
+
onFocusOnce: e[1] || (e[1] = (...r) => s.handlerFocus && s.handlerFocus(...r))
|
|
564
|
+
}, null, 40, Pn),
|
|
565
|
+
n.type == "password" && n.modelValue ? (l(), u("i", {
|
|
566
|
+
key: 1,
|
|
567
|
+
class: w(["iconfont", o.showPassword ? "icon-eye-slash-filled" : "icon-eye-filled"]),
|
|
568
|
+
onClick: e[2] || (e[2] = (r) => o.showPassword = !o.showPassword)
|
|
569
|
+
}, null, 2)) : v("", !0)
|
|
570
|
+
]),
|
|
571
|
+
a("p", {
|
|
572
|
+
class: w(["pa-form-item--error", { active: o.errorMsg }])
|
|
573
|
+
}, h(o.errorMsg), 3)
|
|
574
|
+
]);
|
|
575
|
+
}
|
|
576
|
+
const $n = /* @__PURE__ */ C(wn, [["render", yn]]), Sn = {
|
|
577
|
+
name: "paCheckbox",
|
|
578
|
+
emits: ["update:modelValue"],
|
|
579
|
+
props: {
|
|
580
|
+
modelValue: Boolean
|
|
581
|
+
}
|
|
582
|
+
}, Tn = { class: "iconfont icon-checked" };
|
|
583
|
+
function _n(t, e, n, i, o, s) {
|
|
584
|
+
return l(), u("div", {
|
|
585
|
+
class: "pa-checkbox",
|
|
586
|
+
onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", !n.modelValue))
|
|
587
|
+
}, [
|
|
588
|
+
a("div", {
|
|
589
|
+
class: w(["pa-checkbox--input", { active: n.modelValue }])
|
|
590
|
+
}, [
|
|
591
|
+
b(a("i", Tn, null, 512), [
|
|
592
|
+
[P, n.modelValue]
|
|
593
|
+
])
|
|
594
|
+
], 2),
|
|
595
|
+
D(t.$slots, "default")
|
|
596
|
+
]);
|
|
597
|
+
}
|
|
598
|
+
const In = /* @__PURE__ */ C(Sn, [["render", _n]]), Ln = (t, e) => {
|
|
599
|
+
const n = t.__vccOpts || t;
|
|
600
|
+
for (const [i, o] of e)
|
|
601
|
+
n[i] = o;
|
|
602
|
+
return n;
|
|
603
|
+
}, En = {
|
|
604
|
+
name: "BehaviorCaptcha",
|
|
605
|
+
emits: ["update:modelValue", "success"],
|
|
606
|
+
props: {
|
|
607
|
+
modelValue: {
|
|
608
|
+
type: Boolean,
|
|
609
|
+
default: !1
|
|
610
|
+
},
|
|
611
|
+
textData: {
|
|
612
|
+
type: Object,
|
|
613
|
+
default() {
|
|
614
|
+
return {};
|
|
615
|
+
}
|
|
616
|
+
},
|
|
617
|
+
generateFun: {
|
|
618
|
+
type: Function,
|
|
619
|
+
required: !0
|
|
620
|
+
},
|
|
621
|
+
checkFun: {
|
|
622
|
+
type: Function,
|
|
623
|
+
required: !0
|
|
624
|
+
}
|
|
625
|
+
},
|
|
626
|
+
data() {
|
|
627
|
+
return {
|
|
628
|
+
showLoading: !1,
|
|
629
|
+
//是否显示loading
|
|
630
|
+
imgSrc: "",
|
|
631
|
+
// 图片地址,后台接口返回
|
|
632
|
+
tempImgSrc: "",
|
|
633
|
+
//缺口图片,后台接口返回
|
|
634
|
+
checkStatus: null,
|
|
635
|
+
//验证状态
|
|
636
|
+
genError: !1,
|
|
637
|
+
//创建验证码失败
|
|
638
|
+
// 拖拽属性
|
|
639
|
+
startX: 0,
|
|
640
|
+
startY: 0,
|
|
641
|
+
moveWidth: 0,
|
|
642
|
+
//移动的宽度
|
|
643
|
+
checkParams: {
|
|
644
|
+
id: "",
|
|
645
|
+
//验证标识,generate 接口返回
|
|
646
|
+
track: {
|
|
647
|
+
bgImageHeight: 180,
|
|
648
|
+
bgImageWidth: 300,
|
|
649
|
+
startTime: null,
|
|
650
|
+
//验证器前端初始化时间
|
|
651
|
+
stopTime: null,
|
|
652
|
+
//验证器前端初提交验证时间
|
|
653
|
+
templateImageHeight: void 0,
|
|
654
|
+
templateImageWidth: void 0,
|
|
655
|
+
trackList: []
|
|
656
|
+
}
|
|
657
|
+
}
|
|
658
|
+
};
|
|
659
|
+
},
|
|
660
|
+
watch: {
|
|
661
|
+
modelValue: {
|
|
662
|
+
immediate: !0,
|
|
663
|
+
handler(t) {
|
|
664
|
+
t && this.generate();
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
},
|
|
668
|
+
methods: {
|
|
669
|
+
/*生成验证器*/
|
|
670
|
+
generate() {
|
|
671
|
+
var t;
|
|
672
|
+
this.imgSrc = "", this.generateFun && (this.showLoading = !0, this.checkStatus = null, this.genError = !1, (t = this.generateFun) == null || t.call(this).then((e) => {
|
|
673
|
+
const { captcha: n = {}, id: i } = e, { checkParams: o } = this;
|
|
674
|
+
this.imgSrc = n.backgroundImage, this.tempImgSrc = n.templateImage, o.id = i, o.track.startTime = /* @__PURE__ */ new Date(), o.track.trackList = [];
|
|
675
|
+
}).catch((e) => {
|
|
676
|
+
this.genError = !0;
|
|
677
|
+
}).finally((e) => {
|
|
678
|
+
this.showLoading = !1;
|
|
679
|
+
}));
|
|
680
|
+
},
|
|
681
|
+
/*验证*/
|
|
682
|
+
check() {
|
|
683
|
+
var t;
|
|
684
|
+
this.checkFun && (this.showLoading = !0, (t = this.checkFun) == null || t.call(this, this.checkParams).then((e) => {
|
|
685
|
+
this.showLoading = !1, this.moveWidth = 0, this.checkStatus = e ? "success" : "fail", setTimeout(() => {
|
|
686
|
+
e ? (this.$emit("update:modelValue", !1), this.$emit("success", e)) : this.generate();
|
|
687
|
+
}, 1500);
|
|
688
|
+
}));
|
|
689
|
+
},
|
|
690
|
+
/**
|
|
691
|
+
* 获取当前坐标
|
|
692
|
+
* @param event 事件
|
|
693
|
+
* @returns {{x: number, y: number}}
|
|
694
|
+
*/
|
|
695
|
+
getCurrentCoordinate(t) {
|
|
696
|
+
if (t.pageX !== null && t.pageX !== void 0)
|
|
697
|
+
return {
|
|
698
|
+
x: Math.round(t.pageX),
|
|
699
|
+
y: Math.round(t.pageY)
|
|
700
|
+
};
|
|
701
|
+
let e;
|
|
702
|
+
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 ? {
|
|
703
|
+
x: Math.round(e[0].pageX),
|
|
704
|
+
y: Math.round(e[0].pageY)
|
|
705
|
+
} : {
|
|
706
|
+
x: Math.round(e[0].clientX),
|
|
707
|
+
y: Math.round(e[0].clientY)
|
|
708
|
+
};
|
|
709
|
+
},
|
|
710
|
+
/*Start*/
|
|
711
|
+
onStart(t) {
|
|
712
|
+
if (this.showLoading || this.checkStatus)
|
|
713
|
+
return;
|
|
714
|
+
const e = this.getCurrentCoordinate(t), n = e.x, i = e.y, { startTime: o, trackList: s } = this.checkParams.track;
|
|
715
|
+
if (this.startX = n, this.startY = i, s.push({
|
|
716
|
+
x: 0,
|
|
717
|
+
y: 0,
|
|
718
|
+
type: "down",
|
|
719
|
+
t: (/* @__PURE__ */ new Date()).getTime() - o.getTime()
|
|
720
|
+
}), t.type == "mousedown")
|
|
721
|
+
try {
|
|
722
|
+
document.addEventListener("mousemove", this.onMove), document.addEventListener("mouseup", this.onEnd);
|
|
723
|
+
} catch {
|
|
724
|
+
}
|
|
725
|
+
},
|
|
726
|
+
/*Move*/
|
|
727
|
+
onMove(t) {
|
|
728
|
+
if (this.showLoading || this.checkStatus)
|
|
729
|
+
return;
|
|
730
|
+
t == null || t.preventDefault(), t.touches && t.touches.length > 0 && (t = t.touches[0]);
|
|
731
|
+
const e = this.getCurrentCoordinate(t), n = e.x, i = e.y, { startX: o, startY: s } = this, { startTime: r, trackList: m } = this.checkParams.track, p = 245;
|
|
732
|
+
let c = n - o, d = i - s;
|
|
733
|
+
m.push({
|
|
734
|
+
x: c,
|
|
735
|
+
y: d,
|
|
736
|
+
type: "move",
|
|
737
|
+
t: (/* @__PURE__ */ new Date()).getTime() - r.getTime()
|
|
738
|
+
}), c = Math.min(Math.max(c, 0), p), this.moveWidth = c;
|
|
739
|
+
},
|
|
740
|
+
/*End*/
|
|
741
|
+
onEnd(t) {
|
|
742
|
+
if (this.showLoading || this.checkStatus)
|
|
743
|
+
return;
|
|
744
|
+
const e = this.getCurrentCoordinate(t);
|
|
745
|
+
let n = e.x, i = e.y;
|
|
746
|
+
const { startX: o, startY: s } = this, { startTime: r, trackList: m } = this.checkParams.track;
|
|
747
|
+
if (m.push({
|
|
748
|
+
x: n - o,
|
|
749
|
+
y: i - s,
|
|
750
|
+
type: "up",
|
|
751
|
+
t: (/* @__PURE__ */ new Date()).getTime() - r.getTime()
|
|
752
|
+
}), this.checkParams.track.stopTime = /* @__PURE__ */ new Date(), t.type == "mouseup")
|
|
753
|
+
try {
|
|
754
|
+
document.removeEventListener("mousemove", this.onMove), document.removeEventListener("mouseup", this.onEnd);
|
|
755
|
+
} catch {
|
|
756
|
+
}
|
|
757
|
+
this.check();
|
|
758
|
+
}
|
|
759
|
+
}
|
|
760
|
+
}, Vn = { class: "behavior-captcha" }, An = { class: "content" }, xn = { class: "captcha-topbox" }, Dn = { class: "title" }, Rn = { class: "captcha-imgbox" }, Nn = { class: "flash-box" }, Mn = { class: "loading-box" }, Fn = ["src"], qn = ["src"], On = {
|
|
761
|
+
key: 1,
|
|
762
|
+
class: "check-tip"
|
|
763
|
+
}, Bn = { class: "check-tip-inner" }, Un = { class: "tip-txt" }, Xn = {
|
|
764
|
+
key: 2,
|
|
765
|
+
class: "big-flash"
|
|
766
|
+
}, jn = { class: "captcha-movebox" }, Wn = { class: "move-bg" }, Kn = { class: "move-txt" };
|
|
767
|
+
function zn(t, e, n, i, o, s) {
|
|
768
|
+
return b((l(), u("div", Vn, [
|
|
769
|
+
a("div", An, [
|
|
770
|
+
a("div", xn, [
|
|
771
|
+
a("p", Dn, h(n.textData.title || "请拖动滑块完成拼图"), 1),
|
|
772
|
+
a("i", {
|
|
773
|
+
class: "font-icon close",
|
|
774
|
+
onClick: e[0] || (e[0] = (r) => t.$emit("update:modelValue", !1))
|
|
775
|
+
})
|
|
776
|
+
]),
|
|
777
|
+
a("div", Rn, [
|
|
778
|
+
a("div", Nn, [
|
|
779
|
+
b(a("i", {
|
|
780
|
+
class: "font-icon flash",
|
|
781
|
+
onClick: e[1] || (e[1] = (...r) => s.generate && s.generate(...r))
|
|
782
|
+
}, null, 512), [
|
|
783
|
+
[P, !(o.showLoading || o.checkStatus || o.genError)]
|
|
784
|
+
])
|
|
785
|
+
]),
|
|
786
|
+
b(a("div", Mn, e[7] || (e[7] = [
|
|
787
|
+
a("i", { class: "loading" }, null, -1)
|
|
788
|
+
]), 512), [
|
|
789
|
+
[P, o.showLoading]
|
|
790
|
+
]),
|
|
791
|
+
o.imgSrc ? (l(), u(S, { key: 0 }, [
|
|
792
|
+
a("img", {
|
|
793
|
+
class: "captcha-img",
|
|
794
|
+
src: o.imgSrc
|
|
795
|
+
}, null, 8, Fn),
|
|
796
|
+
a("div", {
|
|
797
|
+
class: "temp-img-box",
|
|
798
|
+
style: y(`transform: translate(${o.moveWidth}px, 0);`)
|
|
799
|
+
}, [
|
|
800
|
+
a("img", {
|
|
801
|
+
class: "temp-img",
|
|
802
|
+
src: o.tempImgSrc
|
|
803
|
+
}, null, 8, qn)
|
|
804
|
+
], 4)
|
|
805
|
+
], 64)) : v("", !0),
|
|
806
|
+
o.checkStatus ? (l(), u("div", On, [
|
|
807
|
+
a("div", Bn, [
|
|
808
|
+
a("i", {
|
|
809
|
+
class: w(["font-icon", o.checkStatus])
|
|
810
|
+
}, null, 2),
|
|
811
|
+
a("p", Un, h(o.checkStatus == "success" ? n.textData.checkSuccess || "验证通过" : n.textData.checkFail || "验证失败,请重新尝试"), 1)
|
|
812
|
+
])
|
|
813
|
+
])) : v("", !0),
|
|
814
|
+
o.genError ? (l(), u("div", Xn, [
|
|
815
|
+
a("i", {
|
|
816
|
+
class: "font-icon flash",
|
|
817
|
+
onClick: e[2] || (e[2] = (...r) => s.generate && s.generate(...r))
|
|
818
|
+
})
|
|
819
|
+
])) : v("", !0)
|
|
820
|
+
]),
|
|
821
|
+
a("div", jn, [
|
|
822
|
+
e[9] || (e[9] = a("div", { class: "move-shadow" }, null, -1)),
|
|
823
|
+
a("div", {
|
|
824
|
+
class: "move-mask",
|
|
825
|
+
style: y(`width: ${o.moveWidth}px`)
|
|
826
|
+
}, null, 4),
|
|
827
|
+
a("div", {
|
|
828
|
+
class: "move-btn-box",
|
|
829
|
+
onTouchstart: e[3] || (e[3] = (...r) => s.onStart && s.onStart(...r)),
|
|
830
|
+
onTouchmove: e[4] || (e[4] = (...r) => s.onMove && s.onMove(...r)),
|
|
831
|
+
onTouchend: e[5] || (e[5] = (...r) => s.onEnd && s.onEnd(...r)),
|
|
832
|
+
onMousedown: e[6] || (e[6] = (...r) => s.onStart && s.onStart(...r))
|
|
833
|
+
}, e[8] || (e[8] = [
|
|
834
|
+
a("div", { class: "move-btn" }, [
|
|
835
|
+
a("i", { class: "font-icon right" })
|
|
836
|
+
], -1)
|
|
837
|
+
]), 32),
|
|
838
|
+
a("div", Wn, [
|
|
839
|
+
a("p", Kn, h(n.textData.moveText || "向右滑动"), 1)
|
|
840
|
+
])
|
|
841
|
+
])
|
|
842
|
+
])
|
|
843
|
+
], 512)), [
|
|
844
|
+
[P, n.modelValue]
|
|
845
|
+
]);
|
|
846
|
+
}
|
|
847
|
+
const Yn = /* @__PURE__ */ Ln(En, [["render", zn]]), Hn = {
|
|
848
|
+
name: "paBehaviorCaptcha",
|
|
849
|
+
inject: ["$t", "api"],
|
|
850
|
+
components: {
|
|
851
|
+
BehaviorCaptcha: Yn
|
|
852
|
+
},
|
|
853
|
+
computed: {
|
|
854
|
+
captchaTextData() {
|
|
855
|
+
const { $t: t } = this;
|
|
856
|
+
return {
|
|
857
|
+
title: t("captchaTitle"),
|
|
858
|
+
checkSuccess: t("captchaCheckSuccess"),
|
|
859
|
+
checkFail: t("captchaCheckFail"),
|
|
860
|
+
moveText: t("captchaMoveText")
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
},
|
|
864
|
+
methods: {
|
|
865
|
+
/*生成验证码*/
|
|
866
|
+
generateFun() {
|
|
867
|
+
return this.api.generateCaptcha();
|
|
868
|
+
},
|
|
869
|
+
/*校验验证码*/
|
|
870
|
+
checkFun(t) {
|
|
871
|
+
return this.api.checkCaptcha(t);
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
};
|
|
875
|
+
function Gn(t, e, n, i, o, s) {
|
|
876
|
+
const r = f("behavior-captcha");
|
|
877
|
+
return l(), T(r, R(t.$attrs, {
|
|
878
|
+
textData: s.captchaTextData,
|
|
879
|
+
generateFun: s.generateFun,
|
|
880
|
+
checkFun: s.checkFun
|
|
881
|
+
}), null, 16, ["textData", "generateFun", "checkFun"]);
|
|
882
|
+
}
|
|
883
|
+
const Jn = /* @__PURE__ */ C(Hn, [["render", Gn]]);
|
|
884
|
+
var Zn = { 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}$" } };
|
|
885
|
+
const A = {
|
|
886
|
+
name: "myFormBox",
|
|
887
|
+
inject: ["$t", "api"],
|
|
888
|
+
provide() {
|
|
889
|
+
return { paForm: this };
|
|
890
|
+
},
|
|
891
|
+
components: {
|
|
892
|
+
acountFormItem: $n,
|
|
893
|
+
acountCheckbox: In,
|
|
894
|
+
acountBehaviorCaptcha: Jn
|
|
895
|
+
},
|
|
896
|
+
data() {
|
|
897
|
+
return {
|
|
898
|
+
showCaptcha: !1
|
|
899
|
+
//是否显示行为验证码
|
|
900
|
+
};
|
|
901
|
+
},
|
|
902
|
+
computed: {
|
|
903
|
+
// 验证规则
|
|
904
|
+
formRule() {
|
|
905
|
+
const t = /^[a-zA-Z][a-zA-Z0-9]{7,15}$/, e = /^[a-zA-Z0-9]{8,16}$/, n = new RegExp(Zn[this.region].mobileReg), { $t: i, isLogin: o } = this;
|
|
906
|
+
return {
|
|
907
|
+
loginName: (s) => t.test(s) || o && n.test(s) ? "" : i(o ? "loginNameEr" : "userEr"),
|
|
908
|
+
password: (s) => e.test(s) ? "" : i("pwdEr"),
|
|
909
|
+
cfmPassword: (s) => e.test(s) && s == this.formData.password ? "" : i("confirmPwdEr"),
|
|
910
|
+
inviteCodeTop: (s) => this._inviteCodeRequired ? s ? "" : i("inviteCodePh") : ""
|
|
911
|
+
};
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
created() {
|
|
915
|
+
this.childrens = [];
|
|
916
|
+
},
|
|
917
|
+
methods: {
|
|
918
|
+
/*验证所有文本框*/
|
|
919
|
+
validateAll() {
|
|
920
|
+
const { childrens: t } = this;
|
|
921
|
+
return t.reduce((e, n) => {
|
|
922
|
+
const i = n.validate();
|
|
923
|
+
return e && i;
|
|
924
|
+
}, !0);
|
|
925
|
+
},
|
|
926
|
+
/*提交按钮点击处理*/
|
|
927
|
+
submitHandler(t) {
|
|
928
|
+
t !== !1 && this.validateAll() && (this.showCaptcha = !0);
|
|
929
|
+
},
|
|
930
|
+
/*加密参数*/
|
|
931
|
+
getEncryptionData(t) {
|
|
932
|
+
return this.api.getPublicKey().then((e) => {
|
|
933
|
+
if (!e)
|
|
934
|
+
return Promise.reject();
|
|
935
|
+
const n = new F();
|
|
936
|
+
n.setPublicKey(e);
|
|
937
|
+
const i = Object.assign({}, t), o = /^loginname$/i, s = /password|phone/i;
|
|
938
|
+
for (let r in i)
|
|
939
|
+
i.hasOwnProperty(r) && (o.test(r) ? i[r] = n.encrypt(i[r].toLowerCase()) : s.test(r) && (i[r] = n.encrypt(i[r])));
|
|
940
|
+
return i;
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}, Qn = {
|
|
945
|
+
mixins: [A],
|
|
946
|
+
emits: ["forgetPwd", "toggleLinkClick", "loginSuccess"],
|
|
947
|
+
props: {
|
|
948
|
+
showToggleLink: Boolean,
|
|
949
|
+
region: String
|
|
950
|
+
},
|
|
951
|
+
data() {
|
|
952
|
+
const t = uni.getStorageSync("remember_username");
|
|
953
|
+
return {
|
|
954
|
+
isLogin: !0,
|
|
955
|
+
//标记为login页面,mixins中要用
|
|
956
|
+
remember: !!t,
|
|
957
|
+
//是否记住账号
|
|
958
|
+
formData: {
|
|
959
|
+
loginName: t,
|
|
960
|
+
//用户名
|
|
961
|
+
password: ""
|
|
962
|
+
//密码
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
},
|
|
966
|
+
methods: {
|
|
967
|
+
/*提交登录*/
|
|
968
|
+
submit({ id: t }) {
|
|
969
|
+
const e = Object.assign({ captchaId: t }, this.formData);
|
|
970
|
+
this.getEncryptionData(e).then((n) => {
|
|
971
|
+
n.account = n.loginName, delete n.loginName, this.api.login(n).then((i) => {
|
|
972
|
+
this.remember ? uni.setStorageSync("remember_username", this.formData.loginName) : uni.removeStorageSync("remember_username"), this.$emit("loginSuccess", i);
|
|
973
|
+
}).catch((i) => {
|
|
974
|
+
this.formData.password = "";
|
|
975
|
+
});
|
|
976
|
+
}).catch((n) => {
|
|
977
|
+
});
|
|
978
|
+
}
|
|
979
|
+
}
|
|
980
|
+
}, eo = { class: "pa-form" }, to = /* @__PURE__ */ a("input", {
|
|
981
|
+
type: "password",
|
|
982
|
+
autocomplete: "off",
|
|
983
|
+
class: "pa-hidden-input"
|
|
984
|
+
}, null, -1), no = /* @__PURE__ */ a("input", {
|
|
985
|
+
type: "text",
|
|
986
|
+
autocomplete: "off",
|
|
987
|
+
class: "pa-hidden-input"
|
|
988
|
+
}, null, -1), oo = { class: "pa-form-footer-actions" }, so = {
|
|
989
|
+
key: 0,
|
|
990
|
+
class: "pa-toggle-link"
|
|
991
|
+
};
|
|
992
|
+
function io(t, e, n, i, o, s) {
|
|
993
|
+
const r = f("acount-form-item"), m = f("acount-checkbox"), p = f("acount-behavior-captcha");
|
|
994
|
+
return l(), u("div", eo, [
|
|
995
|
+
to,
|
|
996
|
+
no,
|
|
997
|
+
g(r, {
|
|
998
|
+
modelValue: o.formData.loginName,
|
|
999
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => o.formData.loginName = c),
|
|
1000
|
+
rule: t.formRule.loginName,
|
|
1001
|
+
placeholder: t.$t("loginNamePh"),
|
|
1002
|
+
prefixIcon: "icon-user"
|
|
1003
|
+
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1004
|
+
g(r, {
|
|
1005
|
+
modelValue: o.formData.password,
|
|
1006
|
+
"onUpdate:modelValue": e[1] || (e[1] = (c) => o.formData.password = c),
|
|
1007
|
+
rule: t.formRule.password,
|
|
1008
|
+
placeholder: t.$t("pwdPh"),
|
|
1009
|
+
prefixIcon: "icon-password",
|
|
1010
|
+
type: "password"
|
|
1011
|
+
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1012
|
+
a("div", oo, [
|
|
1013
|
+
g(m, {
|
|
1014
|
+
class: "pa-remeber-me",
|
|
1015
|
+
modelValue: o.remember,
|
|
1016
|
+
"onUpdate:modelValue": e[2] || (e[2] = (c) => o.remember = c)
|
|
1017
|
+
}, {
|
|
1018
|
+
default: V(() => [
|
|
1019
|
+
N(h(t.$t("remember")), 1)
|
|
1020
|
+
]),
|
|
1021
|
+
_: 1
|
|
1022
|
+
}, 8, ["modelValue"]),
|
|
1023
|
+
a("div", {
|
|
1024
|
+
class: "pa-forget-pwd",
|
|
1025
|
+
onClick: e[3] || (e[3] = (c) => t.$emit("forgetPwd"))
|
|
1026
|
+
}, h(t.$t("forgetPwd")), 1)
|
|
1027
|
+
]),
|
|
1028
|
+
a("div", {
|
|
1029
|
+
class: "pa-form-btn",
|
|
1030
|
+
onClick: e[4] || (e[4] = (...c) => t.submitHandler && t.submitHandler(...c))
|
|
1031
|
+
}, h(t.$t("login")), 1),
|
|
1032
|
+
n.showToggleLink ? (l(), u("div", so, [
|
|
1033
|
+
a("p", {
|
|
1034
|
+
class: "pa-text-btn",
|
|
1035
|
+
onClick: e[5] || (e[5] = (c) => t.$emit("toggleLinkClick"))
|
|
1036
|
+
}, h(t.$t("toRegister")), 1)
|
|
1037
|
+
])) : v("", !0),
|
|
1038
|
+
g(p, {
|
|
1039
|
+
modelValue: t.showCaptcha,
|
|
1040
|
+
"onUpdate:modelValue": e[6] || (e[6] = (c) => t.showCaptcha = c),
|
|
1041
|
+
onSuccess: s.submit
|
|
1042
|
+
}, null, 8, ["modelValue", "onSuccess"])
|
|
1043
|
+
]);
|
|
1044
|
+
}
|
|
1045
|
+
const ao = /* @__PURE__ */ C(Qn, [["render", io]]), ro = {
|
|
1046
|
+
mixins: [A],
|
|
1047
|
+
emits: ["toggleLinkClick", "pact", "registerSuccess"],
|
|
1048
|
+
props: {
|
|
1049
|
+
inviteCode: String,
|
|
1050
|
+
inviteCodeRequired: Boolean,
|
|
1051
|
+
insideShowPact: Boolean,
|
|
1052
|
+
showToggleLink: Boolean,
|
|
1053
|
+
region: String
|
|
1054
|
+
},
|
|
1055
|
+
data() {
|
|
1056
|
+
return {
|
|
1057
|
+
isLogin: !1,
|
|
1058
|
+
//标记是否为login页面,mixins中要用
|
|
1059
|
+
agreePact: !1,
|
|
1060
|
+
//是否同意注册协议
|
|
1061
|
+
_inviteCodeRequired: this.inviteCodeRequired,
|
|
1062
|
+
//邀请码是否必填
|
|
1063
|
+
serviceInviteCode: "",
|
|
1064
|
+
//后台配置的默认邀请码
|
|
1065
|
+
showPactPopup: !1,
|
|
1066
|
+
//是否显示规则协议条款弹框。insideShowPact=true时才会使用
|
|
1067
|
+
formData: {
|
|
1068
|
+
loginName: "",
|
|
1069
|
+
//用户名
|
|
1070
|
+
password: "",
|
|
1071
|
+
//密码
|
|
1072
|
+
cfmPassword: "",
|
|
1073
|
+
//确认密码
|
|
1074
|
+
inviteCodeTop: ""
|
|
1075
|
+
//邀请码
|
|
1076
|
+
}
|
|
1077
|
+
};
|
|
1078
|
+
},
|
|
1079
|
+
computed: {
|
|
1080
|
+
// 邀请码输入框提示信息内容
|
|
1081
|
+
inviteCodePh() {
|
|
1082
|
+
const t = this.$t("inviteCodePh");
|
|
1083
|
+
return this._inviteCodeRequired ? t + this.$t("required") : this.serviceInviteCode || t + this.$t("rnRequired");
|
|
1084
|
+
},
|
|
1085
|
+
//规则协议弹框内嵌url。insideShowPact=true时才会使用
|
|
1086
|
+
pactSrc() {
|
|
1087
|
+
if (!(!this.insideShowPact || !VITE_VIEW_CONFIG.webDomain))
|
|
1088
|
+
return VITE_VIEW_CONFIG.webDomain + "/#/pages/help/terms?qryStr=eyJmcm9tIjoiaWZyYW1lIn0";
|
|
1089
|
+
}
|
|
1090
|
+
},
|
|
1091
|
+
created() {
|
|
1092
|
+
this.inviteCodeHandler();
|
|
1093
|
+
},
|
|
1094
|
+
methods: {
|
|
1095
|
+
/*邀请码相关处理*/
|
|
1096
|
+
inviteCodeHandler() {
|
|
1097
|
+
this.inviteCode && (this.formData.inviteCodeTop = this.inviteCode), new Promise((e) => {
|
|
1098
|
+
if (this._inviteCodeRequired !== void 0)
|
|
1099
|
+
return e(this._inviteCodeRequired);
|
|
1100
|
+
this.api.getInviteCodeRequired().then(e).catch(e);
|
|
1101
|
+
}).then((e) => {
|
|
1102
|
+
e = typeof e == "boolean" ? e : !1, this._inviteCodeRequired = e, !(this.inviteCode || e) && this.api.getDefaultInviteCode().then((n) => {
|
|
1103
|
+
this.serviceInviteCode = (n == null ? void 0 : n.inviteCode) || "";
|
|
1104
|
+
}).catch((n) => {
|
|
1105
|
+
});
|
|
1106
|
+
});
|
|
1107
|
+
},
|
|
1108
|
+
/*阅读注册规则协议*/
|
|
1109
|
+
readPact() {
|
|
1110
|
+
this.showPactPopup = !0, this.$emit("pact");
|
|
1111
|
+
},
|
|
1112
|
+
/*提交登录*/
|
|
1113
|
+
submit({ id: t }) {
|
|
1114
|
+
const e = Object.assign({ captchaId: t }, this.formData);
|
|
1115
|
+
this.getEncryptionData(e).then((n) => {
|
|
1116
|
+
!this._inviteCodeRequired && this.serviceInviteCode && !n.inviteCodeTop && (n.inviteCodeTop = this.serviceInviteCode), this.api.register(n).then((i) => {
|
|
1117
|
+
this.$emit("registerSuccess", i);
|
|
1118
|
+
}).catch((i) => {
|
|
1119
|
+
});
|
|
1120
|
+
}).catch((n) => {
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
}, co = { class: "pa-form" }, lo = /* @__PURE__ */ a("input", {
|
|
1125
|
+
type: "password",
|
|
1126
|
+
autocomplete: "off",
|
|
1127
|
+
class: "pa-hidden-input"
|
|
1128
|
+
}, null, -1), uo = /* @__PURE__ */ a("input", {
|
|
1129
|
+
type: "text",
|
|
1130
|
+
autocomplete: "off",
|
|
1131
|
+
class: "pa-hidden-input"
|
|
1132
|
+
}, null, -1), ho = { class: "pa-form-footer-actions" }, mo = {
|
|
1133
|
+
key: 0,
|
|
1134
|
+
class: "pa-toggle-link"
|
|
1135
|
+
}, go = {
|
|
1136
|
+
key: 1,
|
|
1137
|
+
class: "pa-pact-popup"
|
|
1138
|
+
}, po = { class: "pa-pact-popup-head" }, fo = /* @__PURE__ */ a("i", { class: "iconfont icon-back" }, null, -1), vo = [
|
|
1139
|
+
fo
|
|
1140
|
+
], ko = { class: "pa-pact-popup-title" }, wo = ["src"];
|
|
1141
|
+
function Co(t, e, n, i, o, s) {
|
|
1142
|
+
const r = f("acount-form-item"), m = f("acount-checkbox"), p = f("acount-behavior-captcha");
|
|
1143
|
+
return l(), u("div", co, [
|
|
1144
|
+
lo,
|
|
1145
|
+
uo,
|
|
1146
|
+
g(r, {
|
|
1147
|
+
modelValue: o.formData.loginName,
|
|
1148
|
+
"onUpdate:modelValue": e[0] || (e[0] = (c) => o.formData.loginName = c),
|
|
1149
|
+
rule: t.formRule.loginName,
|
|
1150
|
+
placeholder: t.$t("userPh"),
|
|
1151
|
+
prefixIcon: "icon-user"
|
|
1152
|
+
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1153
|
+
g(r, {
|
|
1154
|
+
modelValue: o.formData.password,
|
|
1155
|
+
"onUpdate:modelValue": e[1] || (e[1] = (c) => o.formData.password = c),
|
|
1156
|
+
rule: t.formRule.password,
|
|
1157
|
+
placeholder: t.$t("pwdPh"),
|
|
1158
|
+
prefixIcon: "icon-password",
|
|
1159
|
+
type: "password"
|
|
1160
|
+
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1161
|
+
g(r, {
|
|
1162
|
+
modelValue: o.formData.cfmPassword,
|
|
1163
|
+
"onUpdate:modelValue": e[2] || (e[2] = (c) => o.formData.cfmPassword = c),
|
|
1164
|
+
rule: t.formRule.cfmPassword,
|
|
1165
|
+
placeholder: t.$t("confirmPwdPh"),
|
|
1166
|
+
prefixIcon: "icon-password",
|
|
1167
|
+
type: "password"
|
|
1168
|
+
}, null, 8, ["modelValue", "rule", "placeholder"]),
|
|
1169
|
+
g(r, {
|
|
1170
|
+
modelValue: o.formData.inviteCodeTop,
|
|
1171
|
+
"onUpdate:modelValue": e[3] || (e[3] = (c) => o.formData.inviteCodeTop = c),
|
|
1172
|
+
rule: t.formRule.inviteCodeTop,
|
|
1173
|
+
placeholder: s.inviteCodePh,
|
|
1174
|
+
disabled: !!n.inviteCode,
|
|
1175
|
+
prefixIcon: "icon-invite"
|
|
1176
|
+
}, null, 8, ["modelValue", "rule", "placeholder", "disabled"]),
|
|
1177
|
+
a("div", ho, [
|
|
1178
|
+
g(m, {
|
|
1179
|
+
class: "pa-remeber-me",
|
|
1180
|
+
modelValue: o.agreePact,
|
|
1181
|
+
"onUpdate:modelValue": e[5] || (e[5] = (c) => o.agreePact = c)
|
|
1182
|
+
}, {
|
|
1183
|
+
default: V(() => [
|
|
1184
|
+
a("div", null, [
|
|
1185
|
+
a("span", null, h(t.$t("pact1")), 1),
|
|
1186
|
+
a("span", {
|
|
1187
|
+
class: "pa-underline-text",
|
|
1188
|
+
onClick: e[4] || (e[4] = M((...c) => s.readPact && s.readPact(...c), ["stop"]))
|
|
1189
|
+
}, h(t.$t("pact2")), 1)
|
|
1190
|
+
])
|
|
1191
|
+
]),
|
|
1192
|
+
_: 1
|
|
1193
|
+
}, 8, ["modelValue"])
|
|
1194
|
+
]),
|
|
1195
|
+
a("div", {
|
|
1196
|
+
class: w(["pa-form-btn", { disabled: !o.agreePact }]),
|
|
1197
|
+
onClick: e[6] || (e[6] = (c) => t.submitHandler(o.agreePact))
|
|
1198
|
+
}, h(t.$t("register")), 3),
|
|
1199
|
+
n.showToggleLink ? (l(), u("div", mo, [
|
|
1200
|
+
a("span", null, h(t.$t("hasUserName")), 1),
|
|
1201
|
+
a("span", {
|
|
1202
|
+
class: "pa-text-btn",
|
|
1203
|
+
onClick: e[7] || (e[7] = (c) => t.$emit("toggleLinkClick"))
|
|
1204
|
+
}, h(t.$t("goLogin")), 1)
|
|
1205
|
+
])) : v("", !0),
|
|
1206
|
+
g(p, {
|
|
1207
|
+
modelValue: t.showCaptcha,
|
|
1208
|
+
"onUpdate:modelValue": e[8] || (e[8] = (c) => t.showCaptcha = c),
|
|
1209
|
+
onSuccess: s.submit
|
|
1210
|
+
}, null, 8, ["modelValue", "onSuccess"]),
|
|
1211
|
+
n.insideShowPact && o.showPactPopup && s.pactSrc ? (l(), u("div", go, [
|
|
1212
|
+
a("div", po, [
|
|
1213
|
+
a("div", {
|
|
1214
|
+
class: "pa-back-button",
|
|
1215
|
+
onClick: e[9] || (e[9] = (c) => o.showPactPopup = !1)
|
|
1216
|
+
}, vo),
|
|
1217
|
+
a("p", ko, h(t.$t("pactTitle")), 1)
|
|
1218
|
+
]),
|
|
1219
|
+
a("iframe", {
|
|
1220
|
+
class: "pa-pact-iframe",
|
|
1221
|
+
src: s.pactSrc
|
|
1222
|
+
}, null, 8, wo)
|
|
1223
|
+
])) : v("", !0)
|
|
1224
|
+
]);
|
|
1225
|
+
}
|
|
1226
|
+
const bo = /* @__PURE__ */ C(ro, [["render", Co]]), $ = Ht(), L = new X(), Po = {
|
|
1227
|
+
name: "P500Acount",
|
|
1228
|
+
emits: ["back", "pact", "bannerClick", "forgetPwd", "toggleLinkClick", "loginSuccess", "registerSuccess"],
|
|
1229
|
+
components: {
|
|
1230
|
+
acountBanner: an,
|
|
1231
|
+
acountDialog: kn,
|
|
1232
|
+
acountLoginForm: ao,
|
|
1233
|
+
acountRegisterForm: bo
|
|
1234
|
+
},
|
|
1235
|
+
provide() {
|
|
1236
|
+
return {
|
|
1237
|
+
$t: $.global.t,
|
|
1238
|
+
api: L
|
|
1239
|
+
};
|
|
1240
|
+
},
|
|
1241
|
+
props: {
|
|
1242
|
+
page: {
|
|
1243
|
+
//是否为页面显示
|
|
1244
|
+
type: Boolean,
|
|
1245
|
+
default: !0
|
|
1246
|
+
},
|
|
1247
|
+
type: {
|
|
1248
|
+
type: String,
|
|
1249
|
+
default: "register"
|
|
1250
|
+
},
|
|
1251
|
+
region: {
|
|
1252
|
+
type: String,
|
|
1253
|
+
default: "vi"
|
|
1254
|
+
},
|
|
1255
|
+
apiDomain: {
|
|
1256
|
+
type: String,
|
|
1257
|
+
default: ""
|
|
1258
|
+
},
|
|
1259
|
+
inviteCode: {
|
|
1260
|
+
type: String,
|
|
1261
|
+
default: ""
|
|
1262
|
+
},
|
|
1263
|
+
inviteCodeRequired: {
|
|
1264
|
+
type: Boolean,
|
|
1265
|
+
default: void 0
|
|
1266
|
+
},
|
|
1267
|
+
devicePlatform: {
|
|
1268
|
+
type: Number
|
|
1269
|
+
},
|
|
1270
|
+
insideShowPact: {
|
|
1271
|
+
type: Boolean,
|
|
1272
|
+
default: !0
|
|
1273
|
+
},
|
|
1274
|
+
showBackBtn: {
|
|
1275
|
+
type: Boolean,
|
|
1276
|
+
default: !0
|
|
1277
|
+
},
|
|
1278
|
+
showToggleLink: {
|
|
1279
|
+
type: Boolean,
|
|
1280
|
+
default: !0
|
|
1281
|
+
}
|
|
1282
|
+
},
|
|
1283
|
+
created() {
|
|
1284
|
+
$.global.locale = this.region;
|
|
1285
|
+
const { showLoading: t, hideLoading: e, showMessage: n } = this;
|
|
1286
|
+
L.setOptions(this.region, this.apiDomain, this.devicePlatform, { showLoading: t, hideLoading: e, showMessage: n });
|
|
1287
|
+
},
|
|
1288
|
+
data() {
|
|
1289
|
+
return {
|
|
1290
|
+
pageTitle: $.global.t(this.type),
|
|
1291
|
+
//页面标题
|
|
1292
|
+
dialogCount: 0,
|
|
1293
|
+
//是否显示dialog. >0时显示
|
|
1294
|
+
dialogType: 0,
|
|
1295
|
+
//dialog类型.0:loading;1:message
|
|
1296
|
+
dialogMsg: ""
|
|
1297
|
+
//dialog msg内容
|
|
1298
|
+
};
|
|
1299
|
+
},
|
|
1300
|
+
methods: {
|
|
1301
|
+
/*显示loading*/
|
|
1302
|
+
showLoading() {
|
|
1303
|
+
this.dialogType = 0, this.dialogCount++;
|
|
1304
|
+
},
|
|
1305
|
+
/*关闭loading*/
|
|
1306
|
+
hideLoading() {
|
|
1307
|
+
this.dialogCount--;
|
|
1308
|
+
},
|
|
1309
|
+
/*显示消息框*/
|
|
1310
|
+
showMessage(t) {
|
|
1311
|
+
this.dialogType = 1, this.dialogCount++, this.dialogMsg = t;
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
}, yo = { class: "pa-acount" }, $o = {
|
|
1315
|
+
key: 0,
|
|
1316
|
+
class: "pa-acount-page"
|
|
1317
|
+
}, So = /* @__PURE__ */ a("i", { class: "iconfont icon-back" }, null, -1), To = [
|
|
1318
|
+
So
|
|
1319
|
+
], _o = { class: "pa-logo-box" }, Io = { class: "pa-pageform" }, Lo = { class: "pa-page-title" };
|
|
1320
|
+
function Eo(t, e, n, i, o, s) {
|
|
1321
|
+
const r = f("acount-banner"), m = f("acount-login-form"), p = f("acount-register-form"), c = f("acount-dialog");
|
|
1322
|
+
return l(), u("div", yo, [
|
|
1323
|
+
n.page ? (l(), u("div", $o, [
|
|
1324
|
+
n.showBackBtn ? (l(), u("div", {
|
|
1325
|
+
key: 0,
|
|
1326
|
+
class: "pa-back-button",
|
|
1327
|
+
onClick: e[0] || (e[0] = (d) => t.$emit("back"))
|
|
1328
|
+
}, To)) : v("", !0),
|
|
1329
|
+
a("div", _o, [
|
|
1330
|
+
a("i", {
|
|
1331
|
+
class: w(["pa-logo", n.region + "_logo"])
|
|
1332
|
+
}, null, 2)
|
|
1333
|
+
]),
|
|
1334
|
+
g(r, {
|
|
1335
|
+
onBannerClick: e[1] || (e[1] = (d) => t.$emit("bannerClick", d))
|
|
1336
|
+
}),
|
|
1337
|
+
a("div", Io, [
|
|
1338
|
+
a("div", Lo, h(o.pageTitle), 1),
|
|
1339
|
+
n.type == "login" ? (l(), T(m, {
|
|
1340
|
+
key: 0,
|
|
1341
|
+
showToggleLink: n.showToggleLink,
|
|
1342
|
+
region: n.region,
|
|
1343
|
+
onForgetPwd: e[2] || (e[2] = (d) => t.$emit("forgetPwd", d)),
|
|
1344
|
+
onToggleLinkClick: e[3] || (e[3] = (d) => t.$emit("toggleLinkClick", d)),
|
|
1345
|
+
onLoginSuccess: e[4] || (e[4] = (d) => t.$emit("loginSuccess", d))
|
|
1346
|
+
}, null, 8, ["showToggleLink", "region"])) : n.type == "register" ? (l(), T(p, {
|
|
1347
|
+
key: 1,
|
|
1348
|
+
region: n.region,
|
|
1349
|
+
inviteCode: n.inviteCode,
|
|
1350
|
+
inviteCodeRequired: n.inviteCodeRequired,
|
|
1351
|
+
showToggleLink: n.showToggleLink,
|
|
1352
|
+
insideShowPact: n.insideShowPact,
|
|
1353
|
+
onToggleLinkClick: e[5] || (e[5] = (d) => t.$emit("toggleLinkClick", d)),
|
|
1354
|
+
onPact: e[6] || (e[6] = (d) => t.$emit("pact", d)),
|
|
1355
|
+
onRegisterSuccess: e[7] || (e[7] = (d) => t.$emit("registerSuccess", d))
|
|
1356
|
+
}, null, 8, ["region", "inviteCode", "inviteCodeRequired", "showToggleLink", "insideShowPact"])) : v("", !0)
|
|
1357
|
+
])
|
|
1358
|
+
])) : v("", !0),
|
|
1359
|
+
g(c, {
|
|
1360
|
+
modelValue: o.dialogCount,
|
|
1361
|
+
"onUpdate:modelValue": e[8] || (e[8] = (d) => o.dialogCount = d),
|
|
1362
|
+
type: o.dialogType,
|
|
1363
|
+
message: o.dialogMsg
|
|
1364
|
+
}, null, 8, ["modelValue", "type", "message"])
|
|
1365
|
+
]);
|
|
1366
|
+
}
|
|
1367
|
+
const E = /* @__PURE__ */ C(Po, [["render", Eo]]), Do = {
|
|
1368
|
+
install: (t) => {
|
|
1369
|
+
t.component(E.name, E);
|
|
1370
|
+
}
|
|
1371
|
+
};
|
|
1372
|
+
export {
|
|
1373
|
+
E as P500Acount,
|
|
1374
|
+
Do as default
|
|
1375
|
+
};
|