@jetthai/cuora 1.1.478 → 1.1.480
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/.github/copilot-instructions.md +64 -57
- package/AGENTS.md +64 -57
- package/AI_PROMPT_SOURCE.md +64 -57
- package/CHANGELOG.md +26 -0
- package/CLAUDE.md +64 -57
- package/GEMINI.md +64 -57
- package/README.md +11 -12
- package/package.json +1 -1
- package/src/api/account.js +0 -1
- package/src/api/activity.js +0 -37
- package/src/api/auth.js +0 -31
- package/src/api/game.js +0 -10
- package/src/api/payment.js +0 -51
- package/src/api/user.js +0 -16
- package/src/index.js +2 -2
- package/src/machine/activity/diamond_shop_activity_cash.js +0 -1
- package/src/machine/activity/fafafa_activity.js +0 -10
- package/src/machine/activity/index.js +0 -12
- package/src/machine/auth.js +1 -60
- package/src/machine/auth_otp_v3.js +0 -3
- package/src/machine/common.js +0 -55
- package/src/machine/deposit/index.js +0 -28
- package/src/machine/deposit/manual_cash.js +0 -8
- package/src/machine/game_info.js +1 -12
- package/src/machine/game_v2_1.js +1 -89
- package/src/machine/inbox.js +0 -12
- package/src/machine/index.js +0 -32
- package/src/machine/reward_cash.js +0 -39
- package/src/machine/user_reset_password.js +0 -13
- package/src/machine/websocket.js +0 -4
- package/src/machine/withdraw/index.js +0 -6
- package/src/request/request.js +4 -28
- package/src/util/constant.js +0 -1
- package/src/util/index.js +1 -4
- package/src/machine/activity/activity.js +0 -209
- package/src/machine/activity/diamond_shop_activity_fc.js +0 -196
- package/src/machine/activity/diamond_shop_activity_vn.js +0 -178
- package/src/machine/activity/invite_friends_activity.js +0 -114
- package/src/machine/activity/mini_game_activity.js +0 -68
- package/src/machine/activity/return_bonus_activity.js +0 -153
- package/src/machine/auth_otp_v2.js +0 -177
- package/src/machine/bank_binding_amb.js +0 -146
- package/src/machine/bonus.js +0 -76
- package/src/machine/deposit/amb.js +0 -93
- package/src/machine/deposit/crypto_bank.js +0 -330
- package/src/machine/deposit/crypto_qrcode.js +0 -148
- package/src/machine/deposit/crypto_way.js +0 -252
- package/src/machine/deposit/deposit_fc.js +0 -272
- package/src/machine/deposit/direct.js +0 -310
- package/src/machine/deposit/float.js +0 -375
- package/src/machine/deposit/krway.js +0 -151
- package/src/machine/deposit/loadcard_vn.js +0 -351
- package/src/machine/deposit/manual_vn.js +0 -458
- package/src/machine/deposit/qrcode_v2.js +0 -338
- package/src/machine/deposit/usdt.js +0 -144
- package/src/machine/deposit/virtual_bank_vn.js +0 -269
- package/src/machine/deposit/vpay.js +0 -368
- package/src/machine/game_hot_new.js +0 -79
- package/src/machine/game_replay.js +0 -46
- package/src/machine/game_search_v2.js +0 -401
- package/src/machine/honor_board.js +0 -132
- package/src/machine/merge.js +0 -57
- package/src/machine/payment_data.js +0 -86
- package/src/machine/promotions.js +0 -170
- package/src/machine/reward.js +0 -255
- package/src/machine/reward_fc.js +0 -98
- package/src/machine/side.js +0 -154
- package/src/machine/side_v2.js +0 -211
- package/src/machine/vip_table.js +0 -57
- package/src/machine/welcome.js +0 -110
- package/src/machine/withdraw/withdraw_crypto_cash.js +0 -327
- package/src/machine/withdraw/withdraw_krway.js +0 -223
- package/src/machine/withdraw/withdraw_manual.js +0 -536
- package/src/util/math.js +0 -4
|
@@ -1,21 +1,15 @@
|
|
|
1
|
-
import activity from './activity.js'
|
|
2
1
|
import activity_cash from './activity_cash.js'
|
|
3
2
|
import continue_deposit_activity from './continue_deposit_activity.js'
|
|
4
3
|
import deposit_activity from './deposit_activity.js'
|
|
5
|
-
import diamond_shop_activity_fc from './diamond_shop_activity_fc.js'
|
|
6
|
-
import diamond_shop_activity_vn from './diamond_shop_activity_vn.js'
|
|
7
4
|
import diamond_shop_activity_cash from './diamond_shop_activity_cash.js'
|
|
8
5
|
import fafafa_activity from './fafafa_activity.js'
|
|
9
|
-
import invite_friends_activity from './invite_friends_activity.js'
|
|
10
6
|
import jackpot from './jackpot.js'
|
|
11
7
|
import friend_invite_friends_activity from './friend_invite_friends_activity.js'
|
|
12
8
|
import ranking_activity from './ranking_activity.js'
|
|
13
|
-
import return_bonus_activity from './return_bonus_activity.js'
|
|
14
9
|
import specify_bets_activity from './specify_bets_activity.js'
|
|
15
10
|
import specify_turnover_activity from './specify_turnover_activity.js'
|
|
16
11
|
import sign_in_activity from './sign_in_activity.js'
|
|
17
12
|
import time_bomb_activity from './time_bomb_activity.js'
|
|
18
|
-
import mini_game_activity from './mini_game_activity.js'
|
|
19
13
|
import roulette_activity_v2 from './roulette_activity_v2.js'
|
|
20
14
|
import sign_in_monthly_activity from './sign_in_monthly_activity.js'
|
|
21
15
|
import otp_verified_activity from './otp_verified_activity.js'
|
|
@@ -24,24 +18,18 @@ import instant_rebate_activity from './instant_rebate_activity.js'
|
|
|
24
18
|
import cash_rain_activity from './cash_rain_activity.js'
|
|
25
19
|
|
|
26
20
|
export default {
|
|
27
|
-
activity,
|
|
28
21
|
activity_cash,
|
|
29
22
|
continue_deposit_activity,
|
|
30
23
|
deposit_activity,
|
|
31
|
-
diamond_shop_activity_fc,
|
|
32
|
-
diamond_shop_activity_vn,
|
|
33
24
|
diamond_shop_activity_cash,
|
|
34
25
|
fafafa_activity,
|
|
35
|
-
invite_friends_activity,
|
|
36
26
|
jackpot,
|
|
37
27
|
friend_invite_friends_activity,
|
|
38
28
|
ranking_activity,
|
|
39
|
-
return_bonus_activity,
|
|
40
29
|
specify_bets_activity,
|
|
41
30
|
specify_turnover_activity,
|
|
42
31
|
sign_in_activity,
|
|
43
32
|
time_bomb_activity,
|
|
44
|
-
mini_game_activity,
|
|
45
33
|
roulette_activity_v2,
|
|
46
34
|
sign_in_monthly_activity,
|
|
47
35
|
otp_verified_activity,
|
package/src/machine/auth.js
CHANGED
|
@@ -10,13 +10,12 @@ import { readParamFromLocation, writeParam, normalize, AC_KEYS, FC_KEYS } from '
|
|
|
10
10
|
export default function (request) {
|
|
11
11
|
const { appSecret, clientId, sentry } = request.config
|
|
12
12
|
const tokenKey = `cuora_${clientId}`
|
|
13
|
-
const userKey = `cuora_tempuser`
|
|
14
13
|
const phoneCountryCode = 'phone_countrycode'
|
|
15
14
|
const accountPhoneKey = 'account_phone'
|
|
16
15
|
const accountEmailKey = 'account_email'
|
|
17
16
|
const accountUsernameKey = 'account_username'
|
|
18
17
|
// loginMethods 的鍵 → setAccount 寫入的 storage key。
|
|
19
|
-
// LOGIN_ID
|
|
18
|
+
// LOGIN_ID 寫的是 accountUsernameKey,在 loginMethods 卻算 'local',此對照無法由 key 名反推。
|
|
20
19
|
const rememberedAccountKeys = [
|
|
21
20
|
['local', accountUsernameKey],
|
|
22
21
|
['phone', accountPhoneKey],
|
|
@@ -79,32 +78,6 @@ export default function (request) {
|
|
|
79
78
|
},
|
|
80
79
|
},
|
|
81
80
|
},
|
|
82
|
-
authenticationGuest: {
|
|
83
|
-
invoke: {
|
|
84
|
-
src: 'authenticateGuest',
|
|
85
|
-
onDone: {
|
|
86
|
-
target: 'authenticated',
|
|
87
|
-
actions: 'setToken',
|
|
88
|
-
},
|
|
89
|
-
onError: {
|
|
90
|
-
target: 'idle',
|
|
91
|
-
actions: 'removeToken',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
},
|
|
95
|
-
authenticationApp: {
|
|
96
|
-
invoke: {
|
|
97
|
-
src: 'authenticateApp',
|
|
98
|
-
onDone: {
|
|
99
|
-
target: 'authenticated',
|
|
100
|
-
actions: ['setToken'],
|
|
101
|
-
},
|
|
102
|
-
onError: {
|
|
103
|
-
target: 'idle',
|
|
104
|
-
actions: 'removeToken',
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
},
|
|
108
81
|
authenticated: {
|
|
109
82
|
invoke: {
|
|
110
83
|
src: 'fetchUserInfo',
|
|
@@ -292,9 +265,6 @@ export default function (request) {
|
|
|
292
265
|
CLEAR: {
|
|
293
266
|
target: '.logout',
|
|
294
267
|
},
|
|
295
|
-
LOGIN_GUEST: {
|
|
296
|
-
target: '.authenticationGuest',
|
|
297
|
-
},
|
|
298
268
|
LOGIN_ID: {
|
|
299
269
|
target: '.authentication',
|
|
300
270
|
actions: ['setReCaptchaToken', 'setLoginId'],
|
|
@@ -307,16 +277,9 @@ export default function (request) {
|
|
|
307
277
|
target: '.authentication',
|
|
308
278
|
actions: ['setReCaptchaToken', 'setLoginEmail'],
|
|
309
279
|
},
|
|
310
|
-
LOGIN_LOCAL: {
|
|
311
|
-
target: '.authentication',
|
|
312
|
-
actions: 'setLoginLocal',
|
|
313
|
-
},
|
|
314
280
|
LOGIN_3PARTY: {
|
|
315
281
|
actions: 'redirectTo3Party',
|
|
316
282
|
},
|
|
317
|
-
LOGIN_APP: {
|
|
318
|
-
target: '.authenticationApp',
|
|
319
|
-
},
|
|
320
283
|
LOGIN_TELEGRAM: {
|
|
321
284
|
target: '.authentication',
|
|
322
285
|
actions: 'setLoginTelegram',
|
|
@@ -402,20 +365,6 @@ export default function (request) {
|
|
|
402
365
|
},
|
|
403
366
|
}
|
|
404
367
|
}),
|
|
405
|
-
setLoginLocal: assign((context, event) => {
|
|
406
|
-
const { username, password } = event.data
|
|
407
|
-
storage.set(userKey, username, {
|
|
408
|
-
path: '/',
|
|
409
|
-
maxAge: 60 * 60 * 24,
|
|
410
|
-
})
|
|
411
|
-
return {
|
|
412
|
-
loginData: {
|
|
413
|
-
provider: 'local',
|
|
414
|
-
username,
|
|
415
|
-
password,
|
|
416
|
-
},
|
|
417
|
-
}
|
|
418
|
-
}),
|
|
419
368
|
setLoginTelegram: assign((context, event) => {
|
|
420
369
|
const { loginType, additionalUserInfo, isSignature, idToken } = event.data
|
|
421
370
|
return {
|
|
@@ -569,19 +518,11 @@ export default function (request) {
|
|
|
569
518
|
}),
|
|
570
519
|
},
|
|
571
520
|
services: {
|
|
572
|
-
authenticateApp: async (context, event) => {
|
|
573
|
-
const { token } = await request.send(auth.loginApp(event.data))
|
|
574
|
-
return token
|
|
575
|
-
},
|
|
576
521
|
authenticate: async (context, event) => {
|
|
577
522
|
const data = { ...context.loginData, reCaptchaToken: context.reCaptchaToken }
|
|
578
523
|
const { token } = await request.send(auth.login(data))
|
|
579
524
|
return token
|
|
580
525
|
},
|
|
581
|
-
authenticateGuest: async (context, event) => {
|
|
582
|
-
const { token } = await request.send(auth.guestLogin())
|
|
583
|
-
return token
|
|
584
|
-
},
|
|
585
526
|
logout: async (context, event) => {
|
|
586
527
|
return await request.send(auth.logout())
|
|
587
528
|
},
|
package/src/machine/common.js
CHANGED
|
@@ -34,8 +34,6 @@ export default function (request) {
|
|
|
34
34
|
broadcastList: null,
|
|
35
35
|
mailBoxInfo: null,
|
|
36
36
|
promotions: [],
|
|
37
|
-
normalBroadcast: null,
|
|
38
|
-
sentNormalBroadcastList: [],
|
|
39
37
|
affiliateCode: null,
|
|
40
38
|
defaultAffiliateCode: null,
|
|
41
39
|
friendCode: null,
|
|
@@ -159,39 +157,6 @@ export default function (request) {
|
|
|
159
157
|
},
|
|
160
158
|
},
|
|
161
159
|
},
|
|
162
|
-
broadcast: {
|
|
163
|
-
initial: 'idle',
|
|
164
|
-
states: {
|
|
165
|
-
idle: {
|
|
166
|
-
on: {
|
|
167
|
-
START_BROADCAST: {
|
|
168
|
-
target: 'picking',
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
|
-
picking: {
|
|
173
|
-
after: {
|
|
174
|
-
5000: {
|
|
175
|
-
target: 'display',
|
|
176
|
-
actions: 'setBroadcast',
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
display: {
|
|
181
|
-
after: {
|
|
182
|
-
5000: {
|
|
183
|
-
target: 'picking',
|
|
184
|
-
},
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
on: {
|
|
189
|
-
RESET_BROADCAST: {
|
|
190
|
-
target: '.idle',
|
|
191
|
-
actions: 'resetBroadcast',
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
160
|
},
|
|
196
161
|
},
|
|
197
162
|
{
|
|
@@ -306,26 +271,6 @@ export default function (request) {
|
|
|
306
271
|
}
|
|
307
272
|
return { broadcastList, mailBoxInfo }
|
|
308
273
|
}),
|
|
309
|
-
setBroadcast: assign((context, event) => {
|
|
310
|
-
const { broadcastList, sentNormalBroadcastList, normalBroadcast } = context
|
|
311
|
-
let sentNormalList = sentNormalBroadcastList
|
|
312
|
-
if (normalBroadcast) {
|
|
313
|
-
sentNormalList = [...sentNormalBroadcastList, normalBroadcast]
|
|
314
|
-
}
|
|
315
|
-
const nextNormalBroadcast = broadcastList?.broadcasts?.find((broadcast) => {
|
|
316
|
-
return broadcast.type === '0' && !sentNormalList.some((item) => item.broadcast_id === broadcast.broadcast_id)
|
|
317
|
-
})
|
|
318
|
-
return {
|
|
319
|
-
normalBroadcast: nextNormalBroadcast,
|
|
320
|
-
sentNormalBroadcastList: sentNormalList,
|
|
321
|
-
}
|
|
322
|
-
}),
|
|
323
|
-
resetBroadcast: assign((context, event) => {
|
|
324
|
-
return {
|
|
325
|
-
normalBroadcast: null,
|
|
326
|
-
sentNormalBroadcastList: [],
|
|
327
|
-
}
|
|
328
|
-
}),
|
|
329
274
|
resetByEnterGame: assign((context, event) => {
|
|
330
275
|
return {
|
|
331
276
|
isPlaying: true,
|
|
@@ -1,49 +1,21 @@
|
|
|
1
|
-
import manual_vn from './manual_vn.js'
|
|
2
|
-
import loadcard_vn from './loadcard_vn.js'
|
|
3
|
-
import qrcode_v2 from './qrcode_v2.js'
|
|
4
|
-
import deposit_fc from './deposit_fc.js'
|
|
5
|
-
import direct from './direct.js'
|
|
6
|
-
import amb from './amb.js'
|
|
7
|
-
import float from './float.js'
|
|
8
|
-
import vpay from './vpay.js'
|
|
9
|
-
import krway from './krway.js'
|
|
10
|
-
import usdt from './usdt.js'
|
|
11
1
|
import manual_cash from './manual_cash.js'
|
|
12
2
|
import qrcode_cash from './qrcode_cash.js'
|
|
13
3
|
import usdt_cash from './usdt_cash.js'
|
|
14
4
|
import direct_cash from './direct_cash.js'
|
|
15
5
|
import loadcard_cash from './loadcard_cash.js'
|
|
16
|
-
import crypto_bank from './crypto_bank.js'
|
|
17
|
-
import crypto_qrcode from './crypto_qrcode.js'
|
|
18
|
-
import crypto_way from './crypto_way.js'
|
|
19
6
|
import crypto_bank_cash from './crypto_bank_cash.js'
|
|
20
7
|
import crypto_qrcode_cash from './crypto_qrcode_cash.js'
|
|
21
8
|
import crypto_way_cash from './crypto_way_cash.js'
|
|
22
|
-
import virtual_bank_vn from './virtual_bank_vn.js'
|
|
23
9
|
import virtual_bank_cash from './virtual_bank_cash.js'
|
|
24
10
|
|
|
25
11
|
export default {
|
|
26
|
-
manual_vn,
|
|
27
|
-
loadcard_vn,
|
|
28
|
-
qrcode_v2,
|
|
29
|
-
deposit_fc,
|
|
30
|
-
direct,
|
|
31
|
-
amb,
|
|
32
|
-
float,
|
|
33
|
-
vpay,
|
|
34
|
-
usdt,
|
|
35
|
-
krway,
|
|
36
12
|
manual_cash,
|
|
37
13
|
qrcode_cash,
|
|
38
14
|
usdt_cash,
|
|
39
15
|
direct_cash,
|
|
40
16
|
loadcard_cash,
|
|
41
|
-
crypto_bank,
|
|
42
|
-
crypto_qrcode,
|
|
43
|
-
crypto_way,
|
|
44
17
|
crypto_bank_cash,
|
|
45
18
|
crypto_qrcode_cash,
|
|
46
19
|
crypto_way_cash,
|
|
47
|
-
virtual_bank_vn,
|
|
48
20
|
virtual_bank_cash,
|
|
49
21
|
}
|
|
@@ -88,9 +88,6 @@ export default function (request, context) {
|
|
|
88
88
|
INPUT_USER_ACCOUNT_BRANCH_NAME: {
|
|
89
89
|
actions: 'setUserAccountBranchName',
|
|
90
90
|
},
|
|
91
|
-
INPUT_USER_ACCOUNT_BRANCH_CODE: {
|
|
92
|
-
actions: 'setUserAccountBranchCode',
|
|
93
|
-
},
|
|
94
91
|
INPUT_USER_ACCOUNT_NUMBER: {
|
|
95
92
|
actions: 'setUserAccountNumber',
|
|
96
93
|
},
|
|
@@ -240,11 +237,6 @@ export default function (request, context) {
|
|
|
240
237
|
userAccountBranchName: event.data,
|
|
241
238
|
}
|
|
242
239
|
}),
|
|
243
|
-
setUserAccountBranchCode: assign((context, event) => {
|
|
244
|
-
return {
|
|
245
|
-
userAccountBranchCode: event.data,
|
|
246
|
-
}
|
|
247
|
-
}),
|
|
248
240
|
setUserAccountNumber: assign((context, event) => {
|
|
249
241
|
return {
|
|
250
242
|
userAccountNumber: event.data,
|
package/src/machine/game_info.js
CHANGED
|
@@ -24,13 +24,7 @@ export default function (request, context) {
|
|
|
24
24
|
},
|
|
25
25
|
},
|
|
26
26
|
},
|
|
27
|
-
idle: {
|
|
28
|
-
// on: {
|
|
29
|
-
// SET_GAME_CODE: {
|
|
30
|
-
// actions: 'setGameCode',
|
|
31
|
-
// },
|
|
32
|
-
// },
|
|
33
|
-
},
|
|
27
|
+
idle: {},
|
|
34
28
|
},
|
|
35
29
|
},
|
|
36
30
|
{
|
|
@@ -40,11 +34,6 @@ export default function (request, context) {
|
|
|
40
34
|
gameInfo: event.data.data,
|
|
41
35
|
}
|
|
42
36
|
}),
|
|
43
|
-
// setGameCode: assign((context, event) => {
|
|
44
|
-
// return {
|
|
45
|
-
// gameCode: event.data.data,
|
|
46
|
-
// }
|
|
47
|
-
// }),
|
|
48
37
|
},
|
|
49
38
|
services: {
|
|
50
39
|
// 取得遊戲資訊
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -12,7 +12,6 @@ export default function (request) {
|
|
|
12
12
|
type: 'parallel',
|
|
13
13
|
context: {
|
|
14
14
|
base: '/',
|
|
15
|
-
batch: null,
|
|
16
15
|
loadable: false,
|
|
17
16
|
isLastPage: false,
|
|
18
17
|
pageLoading: true,
|
|
@@ -65,9 +64,6 @@ export default function (request) {
|
|
|
65
64
|
SET_STATIC_DATA: {
|
|
66
65
|
actions: 'setStaticData',
|
|
67
66
|
},
|
|
68
|
-
SET_ADDITION_ENABLE: {
|
|
69
|
-
actions: 'setAdditionEnable',
|
|
70
|
-
},
|
|
71
67
|
LOAD: {
|
|
72
68
|
target: 'routing',
|
|
73
69
|
actions: 'setLoadable',
|
|
@@ -81,9 +77,6 @@ export default function (request) {
|
|
|
81
77
|
cond: 'isDifferentRoom',
|
|
82
78
|
actions: ['setRoom', 'resetContent'],
|
|
83
79
|
},
|
|
84
|
-
BATCH: {
|
|
85
|
-
target: 'batchFetching',
|
|
86
|
-
},
|
|
87
80
|
ENTER_GAME: {
|
|
88
81
|
target: 'connecting',
|
|
89
82
|
actions: ['setGameInfo', 'setLang', 'setEntry', 'setWalletType'],
|
|
@@ -101,18 +94,6 @@ export default function (request) {
|
|
|
101
94
|
},
|
|
102
95
|
},
|
|
103
96
|
},
|
|
104
|
-
batchFetching: {
|
|
105
|
-
invoke: {
|
|
106
|
-
src: 'batchFetch',
|
|
107
|
-
onDone: {
|
|
108
|
-
target: 'idle',
|
|
109
|
-
actions: 'setBatch',
|
|
110
|
-
},
|
|
111
|
-
onError: {
|
|
112
|
-
target: 'idle',
|
|
113
|
-
},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
97
|
loading: {
|
|
117
98
|
entry: 'increaseIndex',
|
|
118
99
|
invoke: {
|
|
@@ -230,7 +211,7 @@ export default function (request) {
|
|
|
230
211
|
actions: ['setSwitch', 'setLang', 'setEntry', 'setWalletType'],
|
|
231
212
|
},
|
|
232
213
|
ENTER_GAME_PAUSE: {
|
|
233
|
-
actions: ['setIsPlaying', 'resetContent'
|
|
214
|
+
actions: ['setIsPlaying', 'resetContent'],
|
|
234
215
|
},
|
|
235
216
|
ENTER_GAME: {
|
|
236
217
|
target: 'connecting',
|
|
@@ -344,11 +325,6 @@ export default function (request) {
|
|
|
344
325
|
staticData: event.data,
|
|
345
326
|
}
|
|
346
327
|
}),
|
|
347
|
-
setAdditionEnable: assign((context, event) => {
|
|
348
|
-
return {
|
|
349
|
-
additionEnable: event.data,
|
|
350
|
-
}
|
|
351
|
-
}),
|
|
352
328
|
setLoadable: assign((context, event) => {
|
|
353
329
|
return {
|
|
354
330
|
loadable: event.data,
|
|
@@ -366,11 +342,6 @@ export default function (request) {
|
|
|
366
342
|
room: event.data,
|
|
367
343
|
}
|
|
368
344
|
}),
|
|
369
|
-
setBatch: assign((context, event) => {
|
|
370
|
-
return {
|
|
371
|
-
batch: event.data,
|
|
372
|
-
}
|
|
373
|
-
}),
|
|
374
345
|
resetContent: assign((context, event) => {
|
|
375
346
|
return {
|
|
376
347
|
loadable: false,
|
|
@@ -510,65 +481,6 @@ export default function (request) {
|
|
|
510
481
|
},
|
|
511
482
|
},
|
|
512
483
|
services: {
|
|
513
|
-
batchFetch: async (context, event) => {
|
|
514
|
-
const { room, index, additionEnable, staticData } = context
|
|
515
|
-
let requestChain = null
|
|
516
|
-
if (!request.getToken()) {
|
|
517
|
-
// 如果沒 token ,id 列表去 static 找
|
|
518
|
-
const list = event.data.list.map((targetCategory, b) => {
|
|
519
|
-
return {
|
|
520
|
-
id: targetCategory.id,
|
|
521
|
-
i18n: targetCategory.i18n,
|
|
522
|
-
downLine: staticData
|
|
523
|
-
.find((item) => item.category === targetCategory.id)
|
|
524
|
-
.info.filter((item) => item.isGame)
|
|
525
|
-
.slice(0, 20),
|
|
526
|
-
}
|
|
527
|
-
})
|
|
528
|
-
return list.filter((item) => item.downLine.length > 0).slice(0, 6)
|
|
529
|
-
} else if (additionEnable) {
|
|
530
|
-
// [防呆] 確保有 categoryId
|
|
531
|
-
const hasCategoryId = !!room?.categoryId
|
|
532
|
-
const param = hasCategoryId ? { categoryId: room.categoryId, index, appSecret } : null
|
|
533
|
-
// [防呆] 確保有 categoryId
|
|
534
|
-
requestChain = event.data.list
|
|
535
|
-
.filter((category) => category?.id != null)
|
|
536
|
-
.map((category) =>
|
|
537
|
-
request
|
|
538
|
-
.send(
|
|
539
|
-
api.getListCategory({
|
|
540
|
-
categoryId: category.id,
|
|
541
|
-
index: 0,
|
|
542
|
-
appSecret,
|
|
543
|
-
})
|
|
544
|
-
)
|
|
545
|
-
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
|
546
|
-
)
|
|
547
|
-
const promises = [...requestChain]
|
|
548
|
-
if (hasCategoryId) {
|
|
549
|
-
promises.push(request.send(api.getListAddition(param)))
|
|
550
|
-
}
|
|
551
|
-
const result = await Promise.all(promises)
|
|
552
|
-
return result.filter((item) => item.downLine?.length > 0).slice(0, 6)
|
|
553
|
-
} else {
|
|
554
|
-
// [防呆] 確保有 categoryId
|
|
555
|
-
requestChain = event.data.list
|
|
556
|
-
.filter((category) => category?.id != null)
|
|
557
|
-
.map((category) =>
|
|
558
|
-
request
|
|
559
|
-
.send(
|
|
560
|
-
api.getListCategory({
|
|
561
|
-
categoryId: category.id,
|
|
562
|
-
index: 0,
|
|
563
|
-
appSecret,
|
|
564
|
-
})
|
|
565
|
-
)
|
|
566
|
-
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
|
567
|
-
)
|
|
568
|
-
const result = await Promise.all([...requestChain])
|
|
569
|
-
return result.filter((item) => item.downLine.length > 0).slice(0, 6)
|
|
570
|
-
}
|
|
571
|
-
},
|
|
572
484
|
getPageContent: async (context, event) => {
|
|
573
485
|
const { room, index, additionEnable, staticData } = context
|
|
574
486
|
// [防呆] 確保有 categoryId
|
package/src/machine/inbox.js
CHANGED
|
@@ -223,10 +223,6 @@ export default function (request) {
|
|
|
223
223
|
PRESET_TAB: {
|
|
224
224
|
actions: ['setCurrentTab', 'hideMessage'],
|
|
225
225
|
},
|
|
226
|
-
RESET: {
|
|
227
|
-
target: '.loading',
|
|
228
|
-
actions: 'reset',
|
|
229
|
-
},
|
|
230
226
|
INQUIRY_ACCOUNT: {
|
|
231
227
|
target: '.inquiring',
|
|
232
228
|
actions: 'resetPage',
|
|
@@ -283,14 +279,6 @@ export default function (request) {
|
|
|
283
279
|
const lang = event.data.locale || context.lang || 'en-US'
|
|
284
280
|
return { lang }
|
|
285
281
|
}),
|
|
286
|
-
reset: assign((context, event) => {
|
|
287
|
-
return {
|
|
288
|
-
currentTab: null,
|
|
289
|
-
inbox: {},
|
|
290
|
-
messageDetail: null,
|
|
291
|
-
currentMessage: null,
|
|
292
|
-
}
|
|
293
|
-
}),
|
|
294
282
|
resetPage: assign((context, event) => {
|
|
295
283
|
const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
|
|
296
284
|
inbox[currentTab].page = -1
|
package/src/machine/index.js
CHANGED
|
@@ -1,42 +1,26 @@
|
|
|
1
1
|
import activity from './activity/index.js'
|
|
2
2
|
import auth from './auth.js'
|
|
3
|
-
import welcome from './welcome.js'
|
|
4
3
|
import common from './common.js'
|
|
5
4
|
import error from './error.js'
|
|
6
5
|
import game_v2_1 from './game_v2_1.js'
|
|
7
6
|
import game_favorite_v2 from './game_favorite_v2.js'
|
|
8
7
|
import game_search_cash from './game_search_cash.js'
|
|
9
|
-
import game_search_v2 from './game_search_v2.js'
|
|
10
|
-
import game_hot_new from './game_hot_new.js'
|
|
11
8
|
import game_info from './game_info.js'
|
|
12
|
-
import game_replay from './game_replay.js'
|
|
13
9
|
import game_betslip from './game_betslip.js'
|
|
14
10
|
import inbox from './inbox.js'
|
|
15
|
-
import merge from './merge.js'
|
|
16
|
-
import payment_data from './payment_data.js'
|
|
17
|
-
import reward_fc from './reward_fc.js'
|
|
18
|
-
import reward from './reward.js'
|
|
19
11
|
import reward_cash from './reward_cash.js'
|
|
20
12
|
import setting from './setting.js'
|
|
21
|
-
import side from './side.js'
|
|
22
|
-
import side_v2 from './side_v2.js'
|
|
23
13
|
import side_cash from './side_cash.js'
|
|
24
14
|
import user_info from './user_info.js'
|
|
25
15
|
import user_sign_up from './user_sign_up.js'
|
|
26
16
|
import user_reset_password from './user_reset_password.js'
|
|
27
17
|
import bank_binding from './bank_binding.js'
|
|
28
|
-
import bank_binding_amb from './bank_binding_amb.js'
|
|
29
18
|
import withdraw from './withdraw/index.js'
|
|
30
19
|
import deposit from './deposit/index.js'
|
|
31
|
-
import bonus from './bonus.js'
|
|
32
20
|
import leaderboard from './leaderboard.js'
|
|
33
|
-
import auth_otp_v2 from './auth_otp_v2.js'
|
|
34
21
|
import auth_otp_v3 from './auth_otp_v3.js'
|
|
35
|
-
import vip_table from './vip_table.js'
|
|
36
|
-
import promotions from './promotions.js'
|
|
37
22
|
import roulette_v2 from './roulette_v2.js'
|
|
38
23
|
import honor_board_cash from './honor_board_cash.js'
|
|
39
|
-
import honor_board from './honor_board.js'
|
|
40
24
|
import user_photo from './user_photo.js'
|
|
41
25
|
import navbar from './navbar.js'
|
|
42
26
|
import websocket from './websocket.js'
|
|
@@ -45,42 +29,26 @@ import ranking from './ranking.js'
|
|
|
45
29
|
export default {
|
|
46
30
|
...activity,
|
|
47
31
|
auth,
|
|
48
|
-
welcome,
|
|
49
32
|
common,
|
|
50
33
|
error,
|
|
51
34
|
game_favorite_v2,
|
|
52
35
|
game_search_cash,
|
|
53
|
-
game_search_v2,
|
|
54
|
-
game_hot_new,
|
|
55
36
|
game_info,
|
|
56
|
-
game_replay,
|
|
57
37
|
game_betslip,
|
|
58
38
|
inbox,
|
|
59
|
-
merge,
|
|
60
|
-
payment_data,
|
|
61
|
-
reward,
|
|
62
39
|
reward_cash,
|
|
63
|
-
reward_fc,
|
|
64
40
|
setting,
|
|
65
|
-
side,
|
|
66
|
-
side_v2,
|
|
67
41
|
side_cash,
|
|
68
42
|
game_v2_1,
|
|
69
43
|
user_info,
|
|
70
44
|
user_sign_up,
|
|
71
45
|
user_reset_password,
|
|
72
46
|
bank_binding,
|
|
73
|
-
bank_binding_amb,
|
|
74
47
|
...deposit,
|
|
75
|
-
bonus,
|
|
76
48
|
leaderboard,
|
|
77
|
-
auth_otp_v2,
|
|
78
49
|
auth_otp_v3,
|
|
79
|
-
vip_table,
|
|
80
|
-
promotions,
|
|
81
50
|
roulette_v2,
|
|
82
51
|
honor_board_cash,
|
|
83
|
-
honor_board,
|
|
84
52
|
user_photo,
|
|
85
53
|
navbar,
|
|
86
54
|
...withdraw,
|
|
@@ -63,10 +63,6 @@ export default function (request, context) {
|
|
|
63
63
|
states: {
|
|
64
64
|
idle: {
|
|
65
65
|
on: {
|
|
66
|
-
FETCH_WITHDRAW_RULE: {
|
|
67
|
-
target: 'fetching',
|
|
68
|
-
actions: 'setRewardData',
|
|
69
|
-
},
|
|
70
66
|
FETCH_OTHER_REWARD: {
|
|
71
67
|
target: 'fetchingOtherReward',
|
|
72
68
|
actions: 'setOrderColumn',
|
|
@@ -84,18 +80,6 @@ export default function (request, context) {
|
|
|
84
80
|
},
|
|
85
81
|
},
|
|
86
82
|
},
|
|
87
|
-
fetching: {
|
|
88
|
-
invoke: {
|
|
89
|
-
src: 'fetchWithdrawRulePreview',
|
|
90
|
-
onDone: {
|
|
91
|
-
target: 'pending',
|
|
92
|
-
actions: 'setWithdrawRulePreview',
|
|
93
|
-
},
|
|
94
|
-
onError: {
|
|
95
|
-
target: 'idle',
|
|
96
|
-
},
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
83
|
fetchingOtherReward: {
|
|
100
84
|
invoke: {
|
|
101
85
|
src: 'fetchOtherRewardList',
|
|
@@ -180,13 +164,6 @@ export default function (request, context) {
|
|
|
180
164
|
otherRewardList: event.data[0]?.data,
|
|
181
165
|
}
|
|
182
166
|
}),
|
|
183
|
-
setRewardData: assign((context, event) => {
|
|
184
|
-
const { activityNo, receiveNo } = event.data
|
|
185
|
-
return {
|
|
186
|
-
activityNo,
|
|
187
|
-
receiveNo,
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
167
|
setCallback: assign((context, event) => {
|
|
191
168
|
return {
|
|
192
169
|
callback: event.data?.callback || (() => {}),
|
|
@@ -200,11 +177,6 @@ export default function (request, context) {
|
|
|
200
177
|
doCallback: (context, event) => {
|
|
201
178
|
context.callback()
|
|
202
179
|
},
|
|
203
|
-
setWithdrawRulePreview: assign((context, event) => {
|
|
204
|
-
return {
|
|
205
|
-
withdrawRule: event.data,
|
|
206
|
-
}
|
|
207
|
-
}),
|
|
208
180
|
setLang: assign((context, event) => {
|
|
209
181
|
const lang = event.data.locale || context.lang || 'en-US'
|
|
210
182
|
return { lang }
|
|
@@ -250,17 +222,6 @@ export default function (request, context) {
|
|
|
250
222
|
const [otherRewardList] = await Promise.all([getOtherRewardAPI])
|
|
251
223
|
return [otherRewardList]
|
|
252
224
|
},
|
|
253
|
-
fetchWithdrawRulePreview: async (context, event) => {
|
|
254
|
-
const { receiveNo } = context
|
|
255
|
-
const data = await request.send(
|
|
256
|
-
payment.getWithdrawRulePreview({
|
|
257
|
-
applyType: 'activity',
|
|
258
|
-
applyNo: receiveNo,
|
|
259
|
-
amount: null,
|
|
260
|
-
})
|
|
261
|
-
)
|
|
262
|
-
return data
|
|
263
|
-
},
|
|
264
225
|
receiveReward: async (context, event) => {
|
|
265
226
|
const { activityNo, receiveNo, attended } = event.data
|
|
266
227
|
// Number("")-> 0 / Number(" ") -> 0 需要收到實際的數字才傳給後端
|