@jetthai/cuora 1.1.373-qa-3 → 1.1.373
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/CHANGELOG.md +0 -26
- package/package.json +1 -1
- package/src/api/activity.js +2 -3
- package/src/api/auth.js +2 -2
- package/src/api/common.js +1 -1
- package/src/api/game.js +10 -10
- package/src/api/payment.js +5 -5
- package/src/api/ranking.js +6 -6
- package/src/api/user.js +9 -14
- package/src/machine/common.js +3 -2
- package/src/machine/deposit/amb.js +1 -1
- package/src/machine/deposit/deposit_fc.js +3 -10
- package/src/machine/deposit/direct.js +4 -11
- package/src/machine/deposit/direct_cash.js +4 -11
- package/src/machine/deposit/float.js +4 -11
- package/src/machine/deposit/loadcard_cash.js +3 -10
- package/src/machine/deposit/loadcard_vn.js +3 -10
- package/src/machine/deposit/manual_cash.js +4 -11
- package/src/machine/deposit/manual_vn.js +3 -10
- package/src/machine/deposit/qrcode_cash.js +3 -10
- package/src/machine/deposit/qrcode_v2.js +3 -10
- package/src/machine/deposit/virtual_bank_cash.js +3 -10
- package/src/machine/deposit/virtual_bank_vn.js +3 -10
- package/src/machine/deposit/vpay.js +4 -11
- package/src/machine/game_search_cash.js +4 -4
- package/src/machine/game_search_v2.js +9 -9
- package/src/machine/game_v2_1.js +3 -8
- package/src/machine/honor_board_cash.js +1 -1
- package/src/machine/ranking.js +3 -4
- package/src/machine/side_cash.js +2 -3
- package/src/machine/side_v2.js +2 -3
- package/src/machine/user_reset_password.js +4 -5
- package/src/machine/vip_table.js +4 -11
- package/src/request/request.js +7 -216
package/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
-
### [1.1.373-qa-3](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-2...v1.1.373-qa-3) (2025-08-26)
|
|
6
|
-
|
|
7
|
-
### [1.1.373-qa-2](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-1...v1.1.373-qa-2) (2025-08-25)
|
|
8
|
-
|
|
9
|
-
### [1.1.373-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.373...v1.1.373-qa-1) (2025-08-22)
|
|
10
|
-
|
|
11
5
|
### [1.1.373](https://github.com/jetthai/cuora-module/compare/v1.1.372...v1.1.373) (2025-08-13)
|
|
12
6
|
|
|
13
7
|
### [1.1.372](https://github.com/jetthai/cuora-module/compare/v1.1.371...v1.1.372) (2025-08-12)
|
|
@@ -22,18 +16,8 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
22
16
|
|
|
23
17
|
### [1.1.367](https://github.com/jetthai/cuora-module/compare/v1.1.366...v1.1.367) (2025-07-22)
|
|
24
18
|
|
|
25
|
-
### [1.1.366-v2api-2](https://github.com/jetthai/cuora-module/compare/v1.1.366-v2api-1...v1.1.366-v2api-2) (2025-07-18)
|
|
26
|
-
|
|
27
|
-
### [1.1.366-v2api-1](https://github.com/jetthai/cuora-module/compare/v1.1.366...v1.1.366-v2api-1) (2025-07-18)
|
|
28
|
-
|
|
29
19
|
### [1.1.366](https://github.com/jetthai/cuora-module/compare/v1.1.365...v1.1.366) (2025-07-18)
|
|
30
20
|
|
|
31
|
-
### [1.1.365-v2api-3](https://github.com/jetthai/cuora-module/compare/v1.1.365-v2api-2...v1.1.365-v2api-3) (2025-07-18)
|
|
32
|
-
|
|
33
|
-
### [1.1.365-v2api-2](https://github.com/jetthai/cuora-module/compare/v1.1.365-v2api-1...v1.1.365-v2api-2) (2025-07-17)
|
|
34
|
-
|
|
35
|
-
### [1.1.365-v2api-1](https://github.com/jetthai/cuora-module/compare/v1.1.365...v1.1.365-v2api-1) (2025-07-17)
|
|
36
|
-
|
|
37
21
|
### [1.1.365](https://github.com/jetthai/cuora-module/compare/v1.1.364...v1.1.365) (2025-07-08)
|
|
38
22
|
|
|
39
23
|
### [1.1.364](https://github.com/jetthai/cuora-module/compare/v1.1.363...v1.1.364) (2025-06-23)
|
|
@@ -42,28 +26,18 @@ All notable changes to this project will be documented in this file. See [standa
|
|
|
42
26
|
|
|
43
27
|
### [1.1.362](https://github.com/jetthai/cuora-module/compare/v1.1.361...v1.1.362) (2025-06-20)
|
|
44
28
|
|
|
45
|
-
### [1.1.361-v2api-1](https://github.com/jetthai/cuora-module/compare/v1.1.361...v1.1.361-v2api-1) (2025-06-05)
|
|
46
|
-
|
|
47
29
|
### [1.1.361](https://github.com/jetthai/cuora-module/compare/v1.1.360...v1.1.361) (2025-06-03)
|
|
48
30
|
|
|
49
31
|
### [1.1.360](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.360) (2025-06-03)
|
|
50
32
|
|
|
51
|
-
### [1.1.358-apiv2-2](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.358-apiv2-2) (2025-05-27)
|
|
52
|
-
|
|
53
33
|
### [1.1.359](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.359) (2025-05-23)
|
|
54
34
|
|
|
55
|
-
### [1.1.358-apiv2-1](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.358-apiv2-1) (2025-05-09)
|
|
56
|
-
|
|
57
35
|
### [1.1.358](https://github.com/jetthai/cuora-module/compare/v1.1.357...v1.1.358) (2025-05-09)
|
|
58
36
|
|
|
59
37
|
### [1.1.357](https://github.com/jetthai/cuora-module/compare/v1.1.356...v1.1.357) (2025-05-06)
|
|
60
38
|
|
|
61
39
|
### [1.1.356](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.356) (2025-04-29)
|
|
62
40
|
|
|
63
|
-
### [1.1.355-apiv2-2](https://github.com/jetthai/cuora-module/compare/v1.1.355-apiv2-1...v1.1.355-apiv2-2) (2025-05-07)
|
|
64
|
-
|
|
65
|
-
### [1.1.355-apiv2-1](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-apiv2-1) (2025-05-05)
|
|
66
|
-
|
|
67
41
|
### [1.1.355](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.355) (2025-04-22)
|
|
68
42
|
|
|
69
43
|
### [1.1.354](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.354) (2025-04-14)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -29,10 +29,9 @@ export default {
|
|
|
29
29
|
method: 'get',
|
|
30
30
|
params: { activityNo, appSecret },
|
|
31
31
|
}),
|
|
32
|
-
getActivityRanking: (
|
|
32
|
+
getActivityRanking: () => ({
|
|
33
33
|
url: 'activities/activity/ranking',
|
|
34
34
|
method: 'get',
|
|
35
|
-
params: { appSecret },
|
|
36
35
|
isPublic: true,
|
|
37
36
|
}),
|
|
38
37
|
getAchievements: ({ limit, page, appSecret }) => ({
|
|
@@ -84,7 +83,7 @@ export default {
|
|
|
84
83
|
settleAmount: (data) => ({ url: 'activities/exchange/diamond/settle', method: 'post', params: data }),
|
|
85
84
|
exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
|
|
86
85
|
collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
|
|
87
|
-
getVipTable: (
|
|
86
|
+
getVipTable: () => ({ url: 'activities/viptable', method: 'get' }),
|
|
88
87
|
getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
|
|
89
88
|
exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
|
|
90
89
|
url: 'activities/exchange/diamond',
|
package/src/api/auth.js
CHANGED
|
@@ -54,10 +54,10 @@ export default {
|
|
|
54
54
|
method: 'post',
|
|
55
55
|
params: { provider, countryCode, phone, email },
|
|
56
56
|
}),
|
|
57
|
-
checkAccount: ({ account, nick_name, strategy
|
|
57
|
+
checkAccount: ({ account, nick_name, strategy }) => ({
|
|
58
58
|
url: 'checkAccount',
|
|
59
59
|
method: 'post',
|
|
60
|
-
params: { account, nick_name, strategy
|
|
60
|
+
params: { account, nick_name, strategy },
|
|
61
61
|
isPublic: true,
|
|
62
62
|
}),
|
|
63
63
|
}
|
package/src/api/common.js
CHANGED
|
@@ -2,7 +2,7 @@ export default {
|
|
|
2
2
|
getConfig: ({ appSecret }) => ({ url: 'getConfig', method: 'get', params: { appSecret }, isPublic: true }),
|
|
3
3
|
getLayoutConfig: ({ appSecret }) => ({ url: 'getQuickLayout', method: 'get', params: { appSecret }, isPublic: true }),
|
|
4
4
|
feeds: ({ appSecret }) => ({ url: 'feeds', method: 'get', params: { appSecret }, isPublic: true }),
|
|
5
|
-
broadcast: () => ({ url: 'broadcast', method: 'get',
|
|
5
|
+
broadcast: () => ({ url: 'broadcast', method: 'get', isPublic: true }),
|
|
6
6
|
getAnnouncements: ({ appSecret }) => ({ url: 'getAnnouncements', params: { appSecret }, method: 'get', isPublic: true }),
|
|
7
7
|
getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
|
|
8
8
|
getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
|
package/src/api/game.js
CHANGED
|
@@ -57,30 +57,30 @@ export default {
|
|
|
57
57
|
url: 'game/history/options',
|
|
58
58
|
method: 'get',
|
|
59
59
|
}),
|
|
60
|
-
getListRoot: ({ timestamp
|
|
60
|
+
getListRoot: ({ timestamp } = {}) => ({
|
|
61
61
|
url: 'game/list/v3/root',
|
|
62
62
|
method: 'get',
|
|
63
|
-
params: { timestamp
|
|
63
|
+
params: { timestamp },
|
|
64
64
|
}),
|
|
65
|
-
getListCategory: ({ categoryId, timestamp, index
|
|
65
|
+
getListCategory: ({ categoryId, timestamp, index }) => ({
|
|
66
66
|
url: 'game/list/v3/category',
|
|
67
67
|
method: 'get',
|
|
68
|
-
params: { categoryId, timestamp, index
|
|
68
|
+
params: { categoryId, timestamp, index },
|
|
69
69
|
}),
|
|
70
|
-
getListAddition: ({ categoryId, timestamp, index
|
|
70
|
+
getListAddition: ({ categoryId, timestamp, index }) => ({
|
|
71
71
|
url: 'game/list/v3/addition',
|
|
72
72
|
method: 'get',
|
|
73
|
-
params: { categoryId, timestamp, index
|
|
73
|
+
params: { categoryId, timestamp, index },
|
|
74
74
|
}),
|
|
75
|
-
getListCategoryByRange: ({ categoryId, timestamp, end
|
|
75
|
+
getListCategoryByRange: ({ categoryId, timestamp, end }) => ({
|
|
76
76
|
url: 'game/list/v3/categoryByRange',
|
|
77
77
|
method: 'get',
|
|
78
|
-
params: { categoryId, timestamp, end
|
|
78
|
+
params: { categoryId, timestamp, end },
|
|
79
79
|
}),
|
|
80
|
-
getListAdditionByRange: ({ categoryId, timestamp, end
|
|
80
|
+
getListAdditionByRange: ({ categoryId, timestamp, end }) => ({
|
|
81
81
|
url: 'game/list/v3/additionByRange',
|
|
82
82
|
method: 'get',
|
|
83
|
-
params: { categoryId, timestamp, end
|
|
83
|
+
params: { categoryId, timestamp, end },
|
|
84
84
|
}),
|
|
85
85
|
getListMyFavorite: ({ timestamp } = {}) => ({
|
|
86
86
|
url: 'game/list/v3/myFavorite',
|
package/src/api/payment.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
getPaymentHistory: (returnDays) => ({ url: 'payment/v2/history', method: 'post', params: { returnDays } }),
|
|
3
|
-
getSpotMarket: () => ({ url: 'payment/
|
|
3
|
+
getSpotMarket: () => ({ url: 'payment/spotmarket', method: 'get' }),
|
|
4
4
|
getTransactionHistory: (payload) => ({
|
|
5
5
|
url: 'payment/v2/transactionHistory',
|
|
6
6
|
method: 'post',
|
|
@@ -8,7 +8,7 @@ export default {
|
|
|
8
8
|
}),
|
|
9
9
|
getTransactionHistoryOptions: () => ({ url: 'payment/v2/category/options', method: 'get' }),
|
|
10
10
|
getPaymentInfo: () => ({ url: `payment/v2/paymentInfo`, method: 'get' }),
|
|
11
|
-
getBindingPaymentInfo: () => ({ url: `payment/
|
|
11
|
+
getBindingPaymentInfo: () => ({ url: `payment/getBindingPaymentInfo`, method: 'get' }),
|
|
12
12
|
updatePaymentInfo: ({
|
|
13
13
|
bankCode,
|
|
14
14
|
branch,
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
}),
|
|
59
59
|
getBankList: (paymentMethod) => ({ url: `payment/v2/${paymentMethod}/getBankList`, method: 'get' }),
|
|
60
60
|
getBindingBankList: ({ appSecret }) => ({ url: 'payment/v2/getBindingBankList', method: 'get', params: { appSecret }, isPublic: true }),
|
|
61
|
-
getBindingPaymentList: ({ appSecret }) => ({ url: 'payment/
|
|
61
|
+
getBindingPaymentList: ({ appSecret }) => ({ url: 'payment/getBindingPaymentList', method: 'get', params: { appSecret }, isPublic: true }),
|
|
62
62
|
getWithdrawBankList: () => ({ url: 'payment/v2/getWithdrawBankList', method: 'get' }),
|
|
63
63
|
makeTransaction: ({ type, payload, paymentMethod }) => ({
|
|
64
64
|
url: `payment/v2/${paymentMethod}/transaction`,
|
|
@@ -68,7 +68,7 @@ export default {
|
|
|
68
68
|
...payload,
|
|
69
69
|
},
|
|
70
70
|
}),
|
|
71
|
-
checkTransaction: (paymentMethod) => ({ url: `payment
|
|
71
|
+
checkTransaction: (paymentMethod) => ({ url: `payment/${paymentMethod}/checkTransaction`, method: 'post' }),
|
|
72
72
|
setBonusSetting: ({ bonus }) => ({ url: 'payment/v2/setting', method: 'post', params: { bonus } }),
|
|
73
73
|
getCurrentWithdrawRule: () => ({ url: 'payment/v2/getCurrentWithdrawRule', method: 'get' }),
|
|
74
74
|
getDoubleWalletWithdrawRule: ({ walletType }) => ({
|
|
@@ -81,7 +81,7 @@ export default {
|
|
|
81
81
|
method: 'post',
|
|
82
82
|
params: { exchangeType, cryptoNetwork, targetAddress },
|
|
83
83
|
}),
|
|
84
|
-
mergeWallet: () => ({ url: 'payment/
|
|
84
|
+
mergeWallet: () => ({ url: 'payment/mergeWallet', method: 'post' }),
|
|
85
85
|
getPaymentDetail: ({ transferType } = {}) => ({
|
|
86
86
|
url: 'payment/v2/paymentDetail',
|
|
87
87
|
method: 'post',
|
package/src/api/ranking.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
// 未登入排名資料
|
|
3
|
-
getTournament: ({ activityNo, cycle, round, site
|
|
3
|
+
getTournament: ({ activityNo, cycle, round, site }) => ({
|
|
4
4
|
url: 'tournament/detail',
|
|
5
5
|
method: 'post',
|
|
6
|
-
params: { activityNo, cycle, round, site
|
|
6
|
+
params: { activityNo, cycle, round, site },
|
|
7
7
|
isPublic: true,
|
|
8
8
|
}),
|
|
9
9
|
// 登入後排名預設期數資料
|
|
10
|
-
getRankingOptions: ({ activityNo
|
|
10
|
+
getRankingOptions: ({ activityNo }) => ({
|
|
11
11
|
url: 'ranking/detail/option',
|
|
12
12
|
method: 'get',
|
|
13
|
-
params: { activityNo
|
|
13
|
+
params: { activityNo },
|
|
14
14
|
isPublic: true,
|
|
15
15
|
}),
|
|
16
16
|
// 登入後排名資料
|
|
@@ -19,9 +19,9 @@ export default {
|
|
|
19
19
|
method: 'post',
|
|
20
20
|
params: { activityNo, cycle, round },
|
|
21
21
|
}),
|
|
22
|
-
getRankingGames: ({ activityNo
|
|
22
|
+
getRankingGames: ({ activityNo }) => ({
|
|
23
23
|
url: 'hot-game/ranking',
|
|
24
24
|
method: 'get',
|
|
25
|
-
params: { activityNo
|
|
25
|
+
params: { activityNo },
|
|
26
26
|
}),
|
|
27
27
|
}
|
package/src/api/user.js
CHANGED
|
@@ -21,33 +21,28 @@ export default {
|
|
|
21
21
|
getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
|
|
22
22
|
postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
|
|
23
23
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
25
|
+
passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }),
|
|
26
26
|
verify: () => ({ url: 'verify', method: 'post' }),
|
|
27
27
|
acknowledge: ({ requestId, code }) => ({ url: 'acknowledge', method: 'post', params: { requestId, code } }),
|
|
28
|
-
passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email
|
|
28
|
+
passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email }) => ({
|
|
29
29
|
url: 'recovery/v2/initiate',
|
|
30
30
|
method: 'post',
|
|
31
|
-
params: { provider, username, countryCode, phone, email
|
|
31
|
+
params: { provider, username, countryCode, phone, email },
|
|
32
32
|
isPublic: true,
|
|
33
33
|
}),
|
|
34
|
-
passwordV2Acknowledge: ({ requestId, target, code
|
|
34
|
+
passwordV2Acknowledge: ({ requestId, target, code }) => ({
|
|
35
35
|
url: 'recovery/v2/acknowledge',
|
|
36
36
|
method: 'post',
|
|
37
|
-
params: { requestId, target, code
|
|
38
|
-
isPublic: true,
|
|
39
|
-
}),
|
|
40
|
-
// passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }), 平台版和現金網未使用
|
|
41
|
-
passwordV2ResetOtp: ({ requestId, target }) => ({
|
|
42
|
-
url: 'recovery/v2/reset',
|
|
43
|
-
method: 'post',
|
|
44
|
-
params: { requestId, target, appSecret },
|
|
37
|
+
params: { requestId, target, code },
|
|
45
38
|
isPublic: true,
|
|
46
39
|
}),
|
|
40
|
+
passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }),
|
|
41
|
+
passwordV2ResetOtp: ({ requestId, target }) => ({ url: 'recovery/v2/reset', method: 'post', params: { requestId, target }, isPublic: true }),
|
|
47
42
|
passwordV2Change: ({ requestId, target, newPassword }) => ({
|
|
48
43
|
url: 'recovery/v2/changePassword',
|
|
49
44
|
method: 'post',
|
|
50
|
-
params: { requestId, target, newPassword
|
|
45
|
+
params: { requestId, target, newPassword },
|
|
51
46
|
isPublic: true,
|
|
52
47
|
}),
|
|
53
48
|
verifyV2Initiate: ({ strategy }) => ({
|
package/src/machine/common.js
CHANGED
|
@@ -293,13 +293,14 @@ export default function (request) {
|
|
|
293
293
|
return { announcementList: { data } }
|
|
294
294
|
}),
|
|
295
295
|
setFeeds: assign((context, event) => {
|
|
296
|
-
const { broadcastList, mailBoxInfo } = event.data
|
|
296
|
+
const { announcementList, broadcastList, mailBoxInfo } = event.data
|
|
297
297
|
const { siteConfig } = context
|
|
298
|
+
const promotions = announcementList?.announcements?.filter?.((item) => item.category === 3) || []
|
|
298
299
|
const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
|
|
299
300
|
if (!customerMessageEnable) {
|
|
300
301
|
mailBoxInfo.rows -= mailBoxInfo.detailRows?.CUSTOMER || 0
|
|
301
302
|
}
|
|
302
|
-
return { broadcastList, mailBoxInfo }
|
|
303
|
+
return { broadcastList, mailBoxInfo, promotions }
|
|
303
304
|
}),
|
|
304
305
|
setBroadcast: assign((context, event) => {
|
|
305
306
|
const { broadcastList, sentNormalBroadcastList, normalBroadcast } = context
|
|
@@ -63,7 +63,7 @@ export default function (request) {
|
|
|
63
63
|
houseAccountName: houseAccount.accountName,
|
|
64
64
|
houseAccountNumber: houseAccount.accountNumber,
|
|
65
65
|
houseBankName: houseAccount.bankName,
|
|
66
|
-
bankList
|
|
66
|
+
bankList,
|
|
67
67
|
}
|
|
68
68
|
}),
|
|
69
69
|
},
|
|
@@ -180,15 +180,8 @@ export default function (request) {
|
|
|
180
180
|
return properties
|
|
181
181
|
}),
|
|
182
182
|
setCalculatedResult: assign((context, event) => {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
return {
|
|
186
|
-
calculatedResult: data,
|
|
187
|
-
}
|
|
188
|
-
} else {
|
|
189
|
-
return {
|
|
190
|
-
calculatedResult: event.data,
|
|
191
|
-
}
|
|
183
|
+
return {
|
|
184
|
+
calculatedResult: event.data,
|
|
192
185
|
}
|
|
193
186
|
}),
|
|
194
187
|
setSubmittedResult: assign((context, event) => {
|
|
@@ -240,7 +233,7 @@ export default function (request) {
|
|
|
240
233
|
return await request.send(
|
|
241
234
|
payment.getDepositExpectedResult({
|
|
242
235
|
method: currentCrypto.method,
|
|
243
|
-
amount:
|
|
236
|
+
amount: currentAmount,
|
|
244
237
|
cryptoCurrency: currentCrypto.channel,
|
|
245
238
|
})
|
|
246
239
|
)
|
|
@@ -197,7 +197,7 @@ export default function (request) {
|
|
|
197
197
|
}
|
|
198
198
|
}),
|
|
199
199
|
setBanks: assign((context, event) => {
|
|
200
|
-
const banks = event.data
|
|
200
|
+
const banks = event.data
|
|
201
201
|
return {
|
|
202
202
|
banks,
|
|
203
203
|
selectedBank: banks[0],
|
|
@@ -220,15 +220,8 @@ export default function (request) {
|
|
|
220
220
|
}
|
|
221
221
|
}),
|
|
222
222
|
setCalculation: assign((context, event) => {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
return {
|
|
226
|
-
calculation: data,
|
|
227
|
-
}
|
|
228
|
-
} else {
|
|
229
|
-
return {
|
|
230
|
-
calculation: event.data,
|
|
231
|
-
}
|
|
223
|
+
return {
|
|
224
|
+
calculation: event.data,
|
|
232
225
|
}
|
|
233
226
|
}),
|
|
234
227
|
clearCalculation: assign((context, event) => {
|
|
@@ -287,7 +280,7 @@ export default function (request) {
|
|
|
287
280
|
return await request.send(
|
|
288
281
|
payment.getDepositExpectedResult({
|
|
289
282
|
method: currentMethod,
|
|
290
|
-
amount
|
|
283
|
+
amount,
|
|
291
284
|
promotionsNo: promotion?.activityNo,
|
|
292
285
|
})
|
|
293
286
|
)
|
|
@@ -119,7 +119,7 @@ export default function (request, context) {
|
|
|
119
119
|
}),
|
|
120
120
|
setBanks: assign((context, event) => {
|
|
121
121
|
const { selectedDirect, bankMap } = context
|
|
122
|
-
const userBanks = event.data
|
|
122
|
+
const userBanks = event.data
|
|
123
123
|
|
|
124
124
|
if (selectedDirect)
|
|
125
125
|
return {
|
|
@@ -144,15 +144,8 @@ export default function (request, context) {
|
|
|
144
144
|
}
|
|
145
145
|
}),
|
|
146
146
|
setCalculation: assign((context, event) => {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
return {
|
|
150
|
-
calculation: data,
|
|
151
|
-
}
|
|
152
|
-
} else {
|
|
153
|
-
return {
|
|
154
|
-
calculation: event.data,
|
|
155
|
-
}
|
|
147
|
+
return {
|
|
148
|
+
calculation: event.data,
|
|
156
149
|
}
|
|
157
150
|
}),
|
|
158
151
|
clearCalculation: assign((context, event) => {
|
|
@@ -202,7 +195,7 @@ export default function (request, context) {
|
|
|
202
195
|
return await request.send(
|
|
203
196
|
payment.getDepositExpectedResult({
|
|
204
197
|
method: selectedDirect.method,
|
|
205
|
-
amount:
|
|
198
|
+
amount: selectedAmount,
|
|
206
199
|
promotionsNo: promotion?.promotionsNo,
|
|
207
200
|
})
|
|
208
201
|
)
|
|
@@ -276,7 +276,7 @@ export default function (request) {
|
|
|
276
276
|
options: optional,
|
|
277
277
|
minimum,
|
|
278
278
|
maximum,
|
|
279
|
-
bankList
|
|
279
|
+
bankList,
|
|
280
280
|
grandTotalEnable,
|
|
281
281
|
}
|
|
282
282
|
}),
|
|
@@ -292,15 +292,8 @@ export default function (request) {
|
|
|
292
292
|
}
|
|
293
293
|
}),
|
|
294
294
|
setCalculation: assign((context, event) => {
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
return {
|
|
298
|
-
calculation: data,
|
|
299
|
-
}
|
|
300
|
-
} else {
|
|
301
|
-
return {
|
|
302
|
-
calculation: event.data,
|
|
303
|
-
}
|
|
295
|
+
return {
|
|
296
|
+
calculation: event.data,
|
|
304
297
|
}
|
|
305
298
|
}),
|
|
306
299
|
clearCalculation: assign((context, event) => {
|
|
@@ -362,7 +355,7 @@ export default function (request) {
|
|
|
362
355
|
return await request.send(
|
|
363
356
|
payment.getDepositExpectedResult({
|
|
364
357
|
method,
|
|
365
|
-
amount
|
|
358
|
+
amount,
|
|
366
359
|
promotionsNo: promotion?.activityNo,
|
|
367
360
|
})
|
|
368
361
|
)
|
|
@@ -151,15 +151,8 @@ export default function (request, context) {
|
|
|
151
151
|
return { selectedAmount: event.data }
|
|
152
152
|
}),
|
|
153
153
|
setCalculation: assign((context, event) => {
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
return {
|
|
157
|
-
calculation: data,
|
|
158
|
-
}
|
|
159
|
-
} else {
|
|
160
|
-
return {
|
|
161
|
-
calculation: event.data,
|
|
162
|
-
}
|
|
154
|
+
return {
|
|
155
|
+
calculation: event.data,
|
|
163
156
|
}
|
|
164
157
|
}),
|
|
165
158
|
clearCalculation: assign((context, event) => {
|
|
@@ -190,7 +183,7 @@ export default function (request, context) {
|
|
|
190
183
|
return await request.send(
|
|
191
184
|
payment.getDepositExpectedResult({
|
|
192
185
|
method: selectedLoadcard.method,
|
|
193
|
-
amount:
|
|
186
|
+
amount: selectedAmount,
|
|
194
187
|
promotionsNo: promotion?.promotionsNo,
|
|
195
188
|
})
|
|
196
189
|
)
|
|
@@ -265,15 +265,8 @@ export default function (request) {
|
|
|
265
265
|
return { selectedAmount: event.data }
|
|
266
266
|
}),
|
|
267
267
|
setCalculation: assign((context, event) => {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
return {
|
|
271
|
-
calculation: data,
|
|
272
|
-
}
|
|
273
|
-
} else {
|
|
274
|
-
return {
|
|
275
|
-
calculation: event.data,
|
|
276
|
-
}
|
|
268
|
+
return {
|
|
269
|
+
calculation: event.data,
|
|
277
270
|
}
|
|
278
271
|
}),
|
|
279
272
|
clearCalculation: assign((context, event) => {
|
|
@@ -326,7 +319,7 @@ export default function (request) {
|
|
|
326
319
|
return await request.send(
|
|
327
320
|
payment.getDepositExpectedResult({
|
|
328
321
|
method: currentMethod,
|
|
329
|
-
amount:
|
|
322
|
+
amount: selectedAmount,
|
|
330
323
|
promotionsNo: promotion?.activityNo,
|
|
331
324
|
})
|
|
332
325
|
)
|
|
@@ -150,7 +150,7 @@ export default function (request, context) {
|
|
|
150
150
|
setInitData: assign((context, event) => {
|
|
151
151
|
const { currentPayment, bankList, bindingPaymentInfo, processing } = event.data
|
|
152
152
|
const userBankLsit = bindingPaymentInfo.bankList || []
|
|
153
|
-
const allBankList = bankList
|
|
153
|
+
const allBankList = bankList || []
|
|
154
154
|
|
|
155
155
|
const houseBanks = currentPayment.banks.map((bank) => {
|
|
156
156
|
const foundBank = allBankList.find((item) => item.bankCode === bank.bankName)
|
|
@@ -200,15 +200,8 @@ export default function (request, context) {
|
|
|
200
200
|
return { selectedAmount: event.data }
|
|
201
201
|
}),
|
|
202
202
|
setCalculation: assign((context, event) => {
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
return {
|
|
206
|
-
calculation: data,
|
|
207
|
-
}
|
|
208
|
-
} else {
|
|
209
|
-
return {
|
|
210
|
-
calculation: event.data,
|
|
211
|
-
}
|
|
203
|
+
return {
|
|
204
|
+
calculation: event.data,
|
|
212
205
|
}
|
|
213
206
|
}),
|
|
214
207
|
setProcessing: assign((context, event) => {
|
|
@@ -315,7 +308,7 @@ export default function (request, context) {
|
|
|
315
308
|
return await request.send(
|
|
316
309
|
payment.getDepositExpectedResult({
|
|
317
310
|
method,
|
|
318
|
-
amount:
|
|
311
|
+
amount: selectedAmount,
|
|
319
312
|
promotionsNo: promotion?.promotionsNo,
|
|
320
313
|
})
|
|
321
314
|
)
|
|
@@ -291,15 +291,8 @@ export default function (request) {
|
|
|
291
291
|
}
|
|
292
292
|
}),
|
|
293
293
|
setCalculation: assign((context, event) => {
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
return {
|
|
297
|
-
calculation: data,
|
|
298
|
-
}
|
|
299
|
-
} else {
|
|
300
|
-
return {
|
|
301
|
-
calculation: event.data,
|
|
302
|
-
}
|
|
294
|
+
return {
|
|
295
|
+
calculation: event.data,
|
|
303
296
|
}
|
|
304
297
|
}),
|
|
305
298
|
setProcessing: assign((context, event) => {
|
|
@@ -409,7 +402,7 @@ export default function (request) {
|
|
|
409
402
|
return await request.send(
|
|
410
403
|
payment.getDepositExpectedResult({
|
|
411
404
|
method,
|
|
412
|
-
amount
|
|
405
|
+
amount,
|
|
413
406
|
promotionsNo: promotion?.activityNo,
|
|
414
407
|
})
|
|
415
408
|
)
|
|
@@ -170,15 +170,8 @@ export default function (request, context) {
|
|
|
170
170
|
return { selectedAmount: event.data }
|
|
171
171
|
}),
|
|
172
172
|
setCalculation: assign((context, event) => {
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
return {
|
|
176
|
-
calculation: data,
|
|
177
|
-
}
|
|
178
|
-
} else {
|
|
179
|
-
return {
|
|
180
|
-
calculation: event.data,
|
|
181
|
-
}
|
|
173
|
+
return {
|
|
174
|
+
calculation: event.data,
|
|
182
175
|
}
|
|
183
176
|
}),
|
|
184
177
|
clearCalculation: assign((context, event) => {
|
|
@@ -203,7 +196,7 @@ export default function (request, context) {
|
|
|
203
196
|
return await request.send(
|
|
204
197
|
payment.getDepositExpectedResult({
|
|
205
198
|
method: selectedQrcode.method,
|
|
206
|
-
amount:
|
|
199
|
+
amount: selectedAmount,
|
|
207
200
|
promotionsNo: promotion?.promotionsNo,
|
|
208
201
|
})
|
|
209
202
|
)
|
|
@@ -260,15 +260,8 @@ export default function (request) {
|
|
|
260
260
|
return { selectedAmount: event.data }
|
|
261
261
|
}),
|
|
262
262
|
setCalculation: assign((context, event) => {
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
return {
|
|
266
|
-
calculation: data,
|
|
267
|
-
}
|
|
268
|
-
} else {
|
|
269
|
-
return {
|
|
270
|
-
calculation: event.data,
|
|
271
|
-
}
|
|
263
|
+
return {
|
|
264
|
+
calculation: event.data,
|
|
272
265
|
}
|
|
273
266
|
}),
|
|
274
267
|
clearCalculation: assign((context, event) => {
|
|
@@ -316,7 +309,7 @@ export default function (request) {
|
|
|
316
309
|
return await request.send(
|
|
317
310
|
payment.getDepositExpectedResult({
|
|
318
311
|
method: currentMethod,
|
|
319
|
-
amount:
|
|
312
|
+
amount: selectedAmount,
|
|
320
313
|
promotionsNo: promotion?.activityNo,
|
|
321
314
|
})
|
|
322
315
|
)
|
|
@@ -128,15 +128,8 @@ export default function (request, context) {
|
|
|
128
128
|
return { selectedAmount: event.data }
|
|
129
129
|
}),
|
|
130
130
|
setCalculation: assign((context, event) => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
return {
|
|
134
|
-
calculation: data,
|
|
135
|
-
}
|
|
136
|
-
} else {
|
|
137
|
-
return {
|
|
138
|
-
calculation: event.data,
|
|
139
|
-
}
|
|
131
|
+
return {
|
|
132
|
+
calculation: event.data,
|
|
140
133
|
}
|
|
141
134
|
}),
|
|
142
135
|
setProcessing: assign((context, event) => {
|
|
@@ -186,7 +179,7 @@ export default function (request, context) {
|
|
|
186
179
|
return await request.send(
|
|
187
180
|
payment.getDepositExpectedResult({
|
|
188
181
|
method,
|
|
189
|
-
amount:
|
|
182
|
+
amount: selectedAmount,
|
|
190
183
|
promotionsNo: promotion?.promotionsNo,
|
|
191
184
|
})
|
|
192
185
|
)
|
|
@@ -190,15 +190,8 @@ export default function (request) {
|
|
|
190
190
|
}
|
|
191
191
|
}),
|
|
192
192
|
setCalculation: assign((context, event) => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
return {
|
|
196
|
-
calculation: data,
|
|
197
|
-
}
|
|
198
|
-
} else {
|
|
199
|
-
return {
|
|
200
|
-
calculation: event.data,
|
|
201
|
-
}
|
|
193
|
+
return {
|
|
194
|
+
calculation: event.data,
|
|
202
195
|
}
|
|
203
196
|
}),
|
|
204
197
|
setProcessing: assign((context, event) => {
|
|
@@ -246,7 +239,7 @@ export default function (request) {
|
|
|
246
239
|
return await request.send(
|
|
247
240
|
payment.getDepositExpectedResult({
|
|
248
241
|
method,
|
|
249
|
-
amount
|
|
242
|
+
amount,
|
|
250
243
|
promotionsNo: promotion?.activityNo,
|
|
251
244
|
})
|
|
252
245
|
)
|
|
@@ -267,7 +267,7 @@ export default function (request) {
|
|
|
267
267
|
options: optional,
|
|
268
268
|
minimum,
|
|
269
269
|
maximum,
|
|
270
|
-
bankList
|
|
270
|
+
bankList,
|
|
271
271
|
grandTotalEnable,
|
|
272
272
|
}
|
|
273
273
|
}),
|
|
@@ -287,15 +287,8 @@ export default function (request) {
|
|
|
287
287
|
return { amount: event.data }
|
|
288
288
|
}),
|
|
289
289
|
setCalculation: assign((context, event) => {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
return {
|
|
293
|
-
calculation: data,
|
|
294
|
-
}
|
|
295
|
-
} else {
|
|
296
|
-
return {
|
|
297
|
-
calculation: event.data,
|
|
298
|
-
}
|
|
290
|
+
return {
|
|
291
|
+
calculation: event.data,
|
|
299
292
|
}
|
|
300
293
|
}),
|
|
301
294
|
clearCalculation: assign((context, event) => {
|
|
@@ -355,7 +348,7 @@ export default function (request) {
|
|
|
355
348
|
return await request.send(
|
|
356
349
|
payment.getDepositExpectedResult({
|
|
357
350
|
method,
|
|
358
|
-
amount
|
|
351
|
+
amount,
|
|
359
352
|
promotionsNo: promotion?.activityNo,
|
|
360
353
|
})
|
|
361
354
|
)
|
|
@@ -27,9 +27,9 @@ export default function (request) {
|
|
|
27
27
|
recentlyGame: [],
|
|
28
28
|
youMayLike: [],
|
|
29
29
|
selectedType: null,
|
|
30
|
-
isYouMayLike:
|
|
31
|
-
isRecentlyGame:
|
|
32
|
-
isRecentlySearch:
|
|
30
|
+
isYouMayLike: null,
|
|
31
|
+
isRecentlyGame: null,
|
|
32
|
+
isRecentlySearch: null,
|
|
33
33
|
},
|
|
34
34
|
states: {
|
|
35
35
|
init: {
|
|
@@ -388,7 +388,7 @@ export default function (request) {
|
|
|
388
388
|
sendMayLikeTrace: async (context, event) => {
|
|
389
389
|
return await request.send(
|
|
390
390
|
game.setGameSearchTrace({
|
|
391
|
-
isYouMayLike:
|
|
391
|
+
isYouMayLike: 1,
|
|
392
392
|
})
|
|
393
393
|
)
|
|
394
394
|
},
|
|
@@ -21,9 +21,9 @@ export default function (request) {
|
|
|
21
21
|
click: null,
|
|
22
22
|
clickDefault: null,
|
|
23
23
|
traceId: null,
|
|
24
|
-
isYouMayLike:
|
|
25
|
-
isRecentlyGame:
|
|
26
|
-
isRecentlySearch:
|
|
24
|
+
isYouMayLike: null,
|
|
25
|
+
isRecentlyGame: null,
|
|
26
|
+
isRecentlySearch: null,
|
|
27
27
|
gameCode: null,
|
|
28
28
|
lang: 'en-US',
|
|
29
29
|
},
|
|
@@ -119,9 +119,9 @@ export default function (request) {
|
|
|
119
119
|
data: {
|
|
120
120
|
tagId: context.tagList[0]?.id,
|
|
121
121
|
traceData: {
|
|
122
|
-
isYouMayLike:
|
|
123
|
-
isRecentlyGame:
|
|
124
|
-
isRecentlySearch:
|
|
122
|
+
isYouMayLike: null,
|
|
123
|
+
isRecentlyGame: null,
|
|
124
|
+
isRecentlySearch: null,
|
|
125
125
|
},
|
|
126
126
|
},
|
|
127
127
|
})),
|
|
@@ -319,9 +319,9 @@ export default function (request) {
|
|
|
319
319
|
tagIndex: null,
|
|
320
320
|
gameCode: null,
|
|
321
321
|
gameCodeIndex: null,
|
|
322
|
-
isYouMayLike:
|
|
323
|
-
isRecentlyGame:
|
|
324
|
-
isRecentlySearch:
|
|
322
|
+
isYouMayLike: null,
|
|
323
|
+
isRecentlyGame: null,
|
|
324
|
+
isRecentlySearch: null,
|
|
325
325
|
query: context.keyword,
|
|
326
326
|
click: null,
|
|
327
327
|
clickDefault: null,
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -5,7 +5,6 @@ import { GAME_SEARCH } from '../util/constant.js'
|
|
|
5
5
|
|
|
6
6
|
// 對應 intersectionObserver 版本
|
|
7
7
|
export default function (request) {
|
|
8
|
-
const { appSecret } = request.config
|
|
9
8
|
return createMachine(
|
|
10
9
|
{
|
|
11
10
|
id: 'game',
|
|
@@ -516,14 +515,13 @@ export default function (request) {
|
|
|
516
515
|
})
|
|
517
516
|
return list.filter((item) => item.downLine.length > 0).slice(0, 6)
|
|
518
517
|
} else if (additionEnable) {
|
|
519
|
-
const param = { categoryId: room.categoryId, index
|
|
518
|
+
const param = { categoryId: room.categoryId, index }
|
|
520
519
|
requestChain = event.data.list.map((category, b) => {
|
|
521
520
|
return request
|
|
522
521
|
.send(
|
|
523
522
|
api.getListCategory({
|
|
524
523
|
categoryId: category.id,
|
|
525
524
|
index: 0,
|
|
526
|
-
appSecret,
|
|
527
525
|
})
|
|
528
526
|
)
|
|
529
527
|
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
|
@@ -537,7 +535,6 @@ export default function (request) {
|
|
|
537
535
|
api.getListCategory({
|
|
538
536
|
categoryId: category.id,
|
|
539
537
|
index: 0,
|
|
540
|
-
appSecret,
|
|
541
538
|
})
|
|
542
539
|
)
|
|
543
540
|
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
|
@@ -561,10 +558,10 @@ export default function (request) {
|
|
|
561
558
|
},
|
|
562
559
|
]
|
|
563
560
|
} else if (additionEnable) {
|
|
564
|
-
const param = { categoryId: room.categoryId, index
|
|
561
|
+
const param = { categoryId: room.categoryId, index }
|
|
565
562
|
return await Promise.all([request.send(api.getListCategory(param)), request.send(api.getListAddition(param))])
|
|
566
563
|
} else {
|
|
567
|
-
const param = { categoryId: room.categoryId, index
|
|
564
|
+
const param = { categoryId: room.categoryId, index }
|
|
568
565
|
return await Promise.all([request.send(api.getListCategory(param))])
|
|
569
566
|
}
|
|
570
567
|
},
|
|
@@ -581,7 +578,6 @@ export default function (request) {
|
|
|
581
578
|
categoryId: room.categoryId,
|
|
582
579
|
end: index,
|
|
583
580
|
timestamp: content.timestamp,
|
|
584
|
-
appSecret,
|
|
585
581
|
})
|
|
586
582
|
),
|
|
587
583
|
request.send(
|
|
@@ -589,7 +585,6 @@ export default function (request) {
|
|
|
589
585
|
categoryId: room.categoryId,
|
|
590
586
|
end: index,
|
|
591
587
|
timestamp: content.timestamp,
|
|
592
|
-
appSecret,
|
|
593
588
|
})
|
|
594
589
|
),
|
|
595
590
|
])
|
|
@@ -80,7 +80,7 @@ export default function (request) {
|
|
|
80
80
|
},
|
|
81
81
|
services: {
|
|
82
82
|
fetchHonorBoardList: async (context, event) => {
|
|
83
|
-
const { data } = await request.send(activity.getHonorBroadcast(
|
|
83
|
+
const { data } = await request.send(activity.getHonorBroadcast(appSecret))
|
|
84
84
|
return data
|
|
85
85
|
},
|
|
86
86
|
},
|
package/src/machine/ranking.js
CHANGED
|
@@ -2,7 +2,6 @@ import { createMachine, assign } from 'xstate'
|
|
|
2
2
|
import ranking from '../api/ranking.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
5
|
const cycleMapping = ['DAILY', 'WEEKLY', 'MONTHLY']
|
|
7
6
|
const limit = { DAILY: 56, WEEKLY: 8, MONTHLY: 2, ALL: 2 }
|
|
8
7
|
|
|
@@ -195,12 +194,12 @@ export default function (request) {
|
|
|
195
194
|
services: {
|
|
196
195
|
fetchTournament: async (context) => {
|
|
197
196
|
const { activityNo, cycle, round, site } = context
|
|
198
|
-
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site
|
|
197
|
+
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site }))
|
|
199
198
|
return data
|
|
200
199
|
},
|
|
201
200
|
fetchRankingOptions: async (context) => {
|
|
202
201
|
const { activityNo } = context
|
|
203
|
-
const { data } = await request.send(ranking.getRankingOptions({ activityNo
|
|
202
|
+
const { data } = await request.send(ranking.getRankingOptions({ activityNo }))
|
|
204
203
|
return data
|
|
205
204
|
},
|
|
206
205
|
fetchRankingDetail: async (context, event) => {
|
|
@@ -210,7 +209,7 @@ export default function (request) {
|
|
|
210
209
|
},
|
|
211
210
|
fetchRankingGames: async (context) => {
|
|
212
211
|
const { activityNo } = context
|
|
213
|
-
const { data } = await request.send(ranking.getRankingGames({ activityNo
|
|
212
|
+
const { data } = await request.send(ranking.getRankingGames({ activityNo }))
|
|
214
213
|
return data
|
|
215
214
|
},
|
|
216
215
|
},
|
package/src/machine/side_cash.js
CHANGED
|
@@ -2,7 +2,6 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import game from '../api/game.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
5
|
return createMachine(
|
|
7
6
|
{
|
|
8
7
|
id: 'side',
|
|
@@ -79,10 +78,10 @@ export default function (request) {
|
|
|
79
78
|
},
|
|
80
79
|
services: {
|
|
81
80
|
getMenu: async (context, event) => {
|
|
82
|
-
return await request.send(game.getListRoot(
|
|
81
|
+
return await request.send(game.getListRoot())
|
|
83
82
|
},
|
|
84
83
|
fetchUpdateMenu: async (context, event) => {
|
|
85
|
-
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp
|
|
84
|
+
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
|
|
86
85
|
},
|
|
87
86
|
},
|
|
88
87
|
}
|
package/src/machine/side_v2.js
CHANGED
|
@@ -2,7 +2,6 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import game from '../api/game.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
5
|
return createMachine(
|
|
7
6
|
{
|
|
8
7
|
id: 'side',
|
|
@@ -161,10 +160,10 @@ export default function (request) {
|
|
|
161
160
|
},
|
|
162
161
|
services: {
|
|
163
162
|
getMenu: async (context, event) => {
|
|
164
|
-
return await request.send(game.getListRoot(
|
|
163
|
+
return await request.send(game.getListRoot())
|
|
165
164
|
},
|
|
166
165
|
fetchUpdateMenu: async (context, event) => {
|
|
167
|
-
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp
|
|
166
|
+
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
|
|
168
167
|
},
|
|
169
168
|
},
|
|
170
169
|
}
|
|
@@ -2,7 +2,6 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import user from '../api/user.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
5
|
return createMachine(
|
|
7
6
|
{
|
|
8
7
|
id: 'user_reset_password',
|
|
@@ -208,20 +207,20 @@ export default function (request) {
|
|
|
208
207
|
services: {
|
|
209
208
|
sendOtp: async (context, event) => {
|
|
210
209
|
const { provider, username, countryCode, phone, email } = context.otpParams
|
|
211
|
-
return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email
|
|
210
|
+
return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email }))
|
|
212
211
|
},
|
|
213
212
|
resetOtp: async (context, event) => {
|
|
214
213
|
const { requestId, target } = context
|
|
215
|
-
return await request.send(user.passwordV2ResetOtp({ requestId, target
|
|
214
|
+
return await request.send(user.passwordV2ResetOtp({ requestId, target }))
|
|
216
215
|
},
|
|
217
216
|
acknowledge: async (context, event) => {
|
|
218
217
|
const { requestId, target } = context
|
|
219
218
|
const code = event.data
|
|
220
|
-
return await request.send(user.passwordV2Acknowledge({ requestId, target, code
|
|
219
|
+
return await request.send(user.passwordV2Acknowledge({ requestId, target, code }))
|
|
221
220
|
},
|
|
222
221
|
change: async (context, event) => {
|
|
223
222
|
const { requestId, target, newPassword } = context
|
|
224
|
-
return await request.send(user.passwordV2Change({ requestId, target, newPassword
|
|
223
|
+
return await request.send(user.passwordV2Change({ requestId, target, newPassword }))
|
|
225
224
|
},
|
|
226
225
|
},
|
|
227
226
|
}
|
package/src/machine/vip_table.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { assign, createMachine } from 'xstate'
|
|
2
2
|
import activity from '../api/activity.js'
|
|
3
3
|
export default function (request) {
|
|
4
|
-
const { appSecret } = request.config
|
|
5
4
|
return createMachine(
|
|
6
5
|
{
|
|
7
6
|
id: 'vip_table',
|
|
@@ -36,20 +35,14 @@ export default function (request) {
|
|
|
36
35
|
},
|
|
37
36
|
services: {
|
|
38
37
|
fetchVipTable: async (context, event) => {
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
if (!result?.viptable) {
|
|
43
|
-
dataList = result.data
|
|
44
|
-
} else {
|
|
45
|
-
dataList = result.viptable?.data
|
|
46
|
-
}
|
|
47
|
-
dataList.map((item) => {
|
|
38
|
+
const { viptable = {} } = await request.send(activity.getVipTable())
|
|
39
|
+
const { data = [] } = viptable
|
|
40
|
+
data.map((item) => {
|
|
48
41
|
item.title = item.title.toLowerCase()
|
|
49
42
|
return item
|
|
50
43
|
})
|
|
51
44
|
|
|
52
|
-
return
|
|
45
|
+
return data
|
|
53
46
|
},
|
|
54
47
|
},
|
|
55
48
|
}
|
package/src/request/request.js
CHANGED
|
@@ -2,139 +2,6 @@ import pickBy from 'lodash/pickBy.js'
|
|
|
2
2
|
import storage from '../util/storage.js'
|
|
3
3
|
|
|
4
4
|
// const pickBy = require('lodash/pickBy')
|
|
5
|
-
const supportVersion2List = [
|
|
6
|
-
// 04-09 Update
|
|
7
|
-
'game/play',
|
|
8
|
-
'game/gameReplay',
|
|
9
|
-
'game/logout',
|
|
10
|
-
'game/list/v3/root',
|
|
11
|
-
'game/list/v3/category',
|
|
12
|
-
'game/list/v3/addition',
|
|
13
|
-
'game/list/v3/categoryByRange',
|
|
14
|
-
'game/list/v3/additionByRange',
|
|
15
|
-
'game/list/v3/myFavorite',
|
|
16
|
-
'game/list/v3/addMyFavorite',
|
|
17
|
-
'game/list/v3/removeMyFavorite',
|
|
18
|
-
'login',
|
|
19
|
-
'callback/:strategy',
|
|
20
|
-
'guestLogin',
|
|
21
|
-
'appLogin',
|
|
22
|
-
'logout',
|
|
23
|
-
'self',
|
|
24
|
-
'register',
|
|
25
|
-
'settings/password',
|
|
26
|
-
'verify',
|
|
27
|
-
'reset',
|
|
28
|
-
'acknowledge',
|
|
29
|
-
'recovery',
|
|
30
|
-
'recovery/abandon',
|
|
31
|
-
'recovery/acknowledge',
|
|
32
|
-
'checkDt',
|
|
33
|
-
'updateDt',
|
|
34
|
-
'checkAC',
|
|
35
|
-
'checkAccount',
|
|
36
|
-
'getAllAvatar',
|
|
37
|
-
'updateUserAvatar',
|
|
38
|
-
'getConfig',
|
|
39
|
-
'getQuickLayout',
|
|
40
|
-
'getNavbarSetting',
|
|
41
|
-
'getAffiliateCode',
|
|
42
|
-
'get-site-config',
|
|
43
|
-
'mailbox/sendMessage',
|
|
44
|
-
'mailbox/getMessageList',
|
|
45
|
-
'mailbox/getMessage',
|
|
46
|
-
'mailbox/updateMessage',
|
|
47
|
-
'mailbox/getMessageTypes',
|
|
48
|
-
// 05-23 Update
|
|
49
|
-
'game/info',
|
|
50
|
-
'recovery/v2/initiate',
|
|
51
|
-
'recovery/v2/acknowledge',
|
|
52
|
-
'recovery/v2/abandon',
|
|
53
|
-
'recovery/v2/reset',
|
|
54
|
-
'recovery/v2/changePassword',
|
|
55
|
-
'account-binding/status',
|
|
56
|
-
'account-binding/bind',
|
|
57
|
-
'account-binding/acknowledge',
|
|
58
|
-
'account-binding/bind-third-party',
|
|
59
|
-
'feeds',
|
|
60
|
-
'broadcast',
|
|
61
|
-
'upload',
|
|
62
|
-
'game/search',
|
|
63
|
-
'game/search/home',
|
|
64
|
-
'game/search/list',
|
|
65
|
-
'game/search/trace',
|
|
66
|
-
'game/history',
|
|
67
|
-
'game/history/detail',
|
|
68
|
-
'payment/v2/bankWallet/promotion/apply',
|
|
69
|
-
'payment/v2/bankWallet/promotion/giveUp',
|
|
70
|
-
'payment/v2/bankWallet/promotion/preview',
|
|
71
|
-
'payment/v2/bankWallet/promotions',
|
|
72
|
-
'payment/v2/bankWallet/restore',
|
|
73
|
-
'payment/v2/callback',
|
|
74
|
-
'payment/v2/convertFreeCredit',
|
|
75
|
-
'payment/v2/getBindingBankList',
|
|
76
|
-
'payment/v2/getBindingPaymentList',
|
|
77
|
-
'payment/v2/getWithdrawBankList',
|
|
78
|
-
'payment/v2/getCurrentWithdrawRule',
|
|
79
|
-
'payment/v2/withdrawCheck',
|
|
80
|
-
'payment/v2/history',
|
|
81
|
-
'payment/v2/mergeWallet',
|
|
82
|
-
'payment/v2/paymentDetail',
|
|
83
|
-
'payment/v2/category/options',
|
|
84
|
-
'payment/v2/paymentInfo',
|
|
85
|
-
'payment/v2/getBindingPaymentInfo',
|
|
86
|
-
'payment/v2/pendingOrder',
|
|
87
|
-
'payment/v2/promotions',
|
|
88
|
-
'payment/v2/spotmarket',
|
|
89
|
-
'payment/v2/transactionHistory',
|
|
90
|
-
'payment/v2/updateUtr',
|
|
91
|
-
'payment/v2/setting',
|
|
92
|
-
'payment/v2/amb/setting',
|
|
93
|
-
'payment/v2/updatePaymentInfo',
|
|
94
|
-
'payment/v2/uploadSlip',
|
|
95
|
-
'payment/v2/withdrawRule',
|
|
96
|
-
'payment/v2/:paymentType/getBankList',
|
|
97
|
-
'payment/v2/:paymentType/transaction',
|
|
98
|
-
'payment/v2/:paymentType/checkTransaction',
|
|
99
|
-
'payment/v2/:paymentType/bonus/preview',
|
|
100
|
-
'payment/v2/:paymentType/expected/result',
|
|
101
|
-
'payment/v2/:paymentType/crypto/expected/result',
|
|
102
|
-
// 05-28 Update
|
|
103
|
-
'all-activities/list',
|
|
104
|
-
'activities/list',
|
|
105
|
-
'activities/rewards',
|
|
106
|
-
'activities/rewardAmount',
|
|
107
|
-
'activities/sentAward',
|
|
108
|
-
'activities/exchange',
|
|
109
|
-
'activities/collect',
|
|
110
|
-
'activities',
|
|
111
|
-
'activities/types',
|
|
112
|
-
'activities/promo',
|
|
113
|
-
'activities/viptable',
|
|
114
|
-
'activities/numbers',
|
|
115
|
-
'activities/honorBroadcast',
|
|
116
|
-
'activities/exchange/diamond/max-amount',
|
|
117
|
-
'activities/exchange/diamond/settle',
|
|
118
|
-
'tournament/detail',
|
|
119
|
-
'ranking/detail',
|
|
120
|
-
'ranking/detail/option',
|
|
121
|
-
'hot-game/ranking',
|
|
122
|
-
'activities/getFreeGameReward',
|
|
123
|
-
'activities/getFreeGameRewardList',
|
|
124
|
-
'activities/rebate/estimate',
|
|
125
|
-
'activities/rebate/collect',
|
|
126
|
-
'activities/rebate/history',
|
|
127
|
-
'activities/lose-rebate/history',
|
|
128
|
-
'friends',
|
|
129
|
-
'friends/home',
|
|
130
|
-
'friends/reward-list',
|
|
131
|
-
'friends/dashboard',
|
|
132
|
-
'friends/dashboard/list',
|
|
133
|
-
'activities/ranking',
|
|
134
|
-
'activities/activity/ranking',
|
|
135
|
-
'activities/cashRain',
|
|
136
|
-
'activities/jackpot/list',
|
|
137
|
-
]
|
|
138
5
|
|
|
139
6
|
function isValid(value) {
|
|
140
7
|
return value !== undefined && value !== null
|
|
@@ -149,7 +16,6 @@ export default class Request {
|
|
|
149
16
|
this.key = `cuora_${config.clientId}`
|
|
150
17
|
this.errorHandler = null
|
|
151
18
|
this.hosts = []
|
|
152
|
-
this.isBlocked = false
|
|
153
19
|
this.initialize()
|
|
154
20
|
}
|
|
155
21
|
|
|
@@ -158,8 +24,7 @@ export default class Request {
|
|
|
158
24
|
axiosConfig.headers['X-TH1GAMES-VERSION'] = this.config.version
|
|
159
25
|
axiosConfig.headers['X-TH1GAMES-PLATFORM'] = this.config.platform
|
|
160
26
|
if (this.getToken()) {
|
|
161
|
-
|
|
162
|
-
axiosConfig.headers.Authorization = `Bearer ${this.getToken()}`
|
|
27
|
+
axiosConfig.headers.Authorization = this.getToken()
|
|
163
28
|
}
|
|
164
29
|
return axiosConfig
|
|
165
30
|
})
|
|
@@ -196,25 +61,10 @@ export default class Request {
|
|
|
196
61
|
try {
|
|
197
62
|
const cancelToken = customToken || this.source.token
|
|
198
63
|
this._checkToken(req)
|
|
199
|
-
|
|
200
64
|
const requestConfig = this._createConfig(req, cancelToken)
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
if (this.isBlocked && !configUrls.includes(requestConfig.url)) {
|
|
204
|
-
// 狀態是維護中&請求非siteConfig,終止所有的請求,除了維護頁需要的資料(siteConfig)
|
|
205
|
-
// console.log('%c*禁止的請求目標', requestConfig)
|
|
206
|
-
} else {
|
|
207
|
-
// console.log('%c*允許的請求目標', requestConfig)
|
|
208
|
-
const { data } = await this.axios.request(requestConfig)
|
|
209
|
-
return data
|
|
210
|
-
}
|
|
65
|
+
const { data } = await this.axios.request(requestConfig)
|
|
66
|
+
return data
|
|
211
67
|
} catch (error) {
|
|
212
|
-
if (error.code === 'ERR_F108') {
|
|
213
|
-
console.log('%c*維護中', 'color: #00ff33ff; font-weight: bold;')
|
|
214
|
-
this.isBlocked = true
|
|
215
|
-
this.errorHandler && this.errorHandler(error)
|
|
216
|
-
throw error
|
|
217
|
-
}
|
|
218
68
|
if (error.code !== 'ERR_800') {
|
|
219
69
|
if (error.code) {
|
|
220
70
|
this.errorHandler && this.errorHandler(error)
|
|
@@ -235,38 +85,11 @@ export default class Request {
|
|
|
235
85
|
|
|
236
86
|
_createConfig(req, cancelToken) {
|
|
237
87
|
const { method, url, params, isPublic, isFormData, headers } = req
|
|
238
|
-
let fullURL = this.config.fullURL
|
|
239
|
-
let urlName = url
|
|
240
|
-
// 有些API會將參數(/?)直接帶在URL上,所以要將參數排除
|
|
241
|
-
const cleanUrl = url.split('?')[0]
|
|
242
|
-
|
|
243
|
-
const isV2Supported = supportVersion2List.some((supportedUrl) => {
|
|
244
|
-
// 如果包含動態參數(:parameter),則使用模式匹配
|
|
245
|
-
if (supportedUrl.includes(':')) {
|
|
246
|
-
const pattern = supportedUrl.replace(/:[^/]+/g, '[^/]+')
|
|
247
|
-
const regex = new RegExp(`^${pattern}$`)
|
|
248
|
-
return regex.test(cleanUrl)
|
|
249
|
-
}
|
|
250
|
-
return supportedUrl === cleanUrl
|
|
251
|
-
})
|
|
252
|
-
|
|
253
|
-
// 如果站點是ZAZA,則不支援V2版本的API
|
|
254
|
-
// clientId 可參照各站環境設定檔案
|
|
255
|
-
const supportV2Toggle = ['ZAZA'].includes(this.config?.clientId)
|
|
256
|
-
|
|
257
|
-
if (isV2Supported && !supportV2Toggle) {
|
|
258
|
-
fullURL = fullURL.replace('/v1/', '/v2/')
|
|
259
|
-
urlName = this._convertUrlToKebabCase(url)
|
|
260
|
-
// console.log(`*[DEV_ONLY]V2`, 'url:', urlName)
|
|
261
|
-
} else {
|
|
262
|
-
// console.log(`*[DEV_ONLY]V2-不支援:`, 'url:', urlName)
|
|
263
|
-
}
|
|
264
|
-
|
|
265
88
|
if (isFormData) {
|
|
266
89
|
return {
|
|
267
|
-
baseURL: fullURL,
|
|
90
|
+
baseURL: this.config.fullURL,
|
|
268
91
|
method,
|
|
269
|
-
url
|
|
92
|
+
url,
|
|
270
93
|
cancelToken,
|
|
271
94
|
isPublic,
|
|
272
95
|
headers: { 'Content-Type': 'multipart/form-data' },
|
|
@@ -274,9 +97,9 @@ export default class Request {
|
|
|
274
97
|
}
|
|
275
98
|
} else {
|
|
276
99
|
return {
|
|
277
|
-
baseURL: fullURL,
|
|
100
|
+
baseURL: this.config.fullURL,
|
|
278
101
|
method,
|
|
279
|
-
url
|
|
102
|
+
url,
|
|
280
103
|
cancelToken,
|
|
281
104
|
isPublic,
|
|
282
105
|
headers,
|
|
@@ -285,38 +108,6 @@ export default class Request {
|
|
|
285
108
|
}
|
|
286
109
|
}
|
|
287
110
|
|
|
288
|
-
// 調整API路徑與名稱
|
|
289
|
-
_convertUrlToKebabCase(url) {
|
|
290
|
-
const specifyingPath = {
|
|
291
|
-
'all-activities/list': 'activities/all-activities-list',
|
|
292
|
-
friends: 'activities/friends',
|
|
293
|
-
'friends/home': 'activities/friends/home',
|
|
294
|
-
'friends/reward-list': 'activities/friends/reward-list',
|
|
295
|
-
'friends/dashboard': 'activities/friends/dashboard',
|
|
296
|
-
'friends/dashboard/list': 'activities/friends/dashboard/list',
|
|
297
|
-
'activities/getFreeGameReward': 'activities/free-game/get-free-game-reward',
|
|
298
|
-
'activities/getFreeGameRewardList': 'activities/free-game/get-free-game-reward-list',
|
|
299
|
-
'activities/lose-rebate/history': 'activities/rebate/lose-rebate/history',
|
|
300
|
-
'activities/ranking': 'activities/ranking/promotion-ranking',
|
|
301
|
-
'activities/activity/ranking': 'activities/ranking/basic-ranking',
|
|
302
|
-
'activities/cashRain': 'activities/cash-rain/exchange',
|
|
303
|
-
'tournament/detail': 'activities/tournament/detail',
|
|
304
|
-
'ranking/detail': 'activities/tournament/ranking/detail',
|
|
305
|
-
'ranking/detail/option': 'activities/tournament/ranking/detail/option',
|
|
306
|
-
'hot-game/ranking': 'activities/tournament/ranking/hot-game',
|
|
307
|
-
'activities/rebate/estimate': 'activities/rebate/estimate',
|
|
308
|
-
'activities/exchange/diamond/max-amount': 'activities/diamond/exchange/max-amount',
|
|
309
|
-
'activities/exchange/diamond/settle': 'activities/diamond/exchange/settle',
|
|
310
|
-
}
|
|
311
|
-
if (specifyingPath[url]) {
|
|
312
|
-
// 和原有路徑不同有另外改路徑
|
|
313
|
-
return specifyingPath[url]
|
|
314
|
-
} else {
|
|
315
|
-
// 將API_URL的命名規則由駝峰調整為短橫線(-)
|
|
316
|
-
return url.replace(/([a-z])([A-Z])/g, '$1-$2').toLowerCase()
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
|
|
320
111
|
_checkToken(req) {
|
|
321
112
|
if (!req.isPublic && !this.getToken()) {
|
|
322
113
|
throw { code: 'ERR_A103', url: req.url }
|