@jetthai/cuora 1.1.353-dev-19 → 1.1.353
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 -102
- package/package.json +1 -1
- package/src/api/activity.js +0 -5
- package/src/api/game.js +0 -1
- package/src/api/index.js +1 -2
- package/src/machine/activity/activity.js +10 -7
- package/src/machine/activity/activity_cash.js +4 -0
- package/src/machine/activity/vip_card_activity.js +31 -78
- package/src/machine/common.js +0 -6
- package/src/machine/deposit/direct.js +6 -2
- package/src/machine/deposit/float.js +2 -2
- package/src/machine/deposit/loadcard_vn.js +51 -10
- package/src/machine/deposit/manual_vn.js +23 -3
- package/src/machine/deposit/qrcode_v2.js +132 -6
- package/src/machine/deposit/virtual_bank_vn.js +31 -3
- package/src/machine/deposit/vpay.js +2 -2
- package/src/machine/game_search_cash.js +1 -1
- package/src/machine/game_search_v2.js +1 -1
- package/src/machine/game_v2_1.js +11 -63
- package/src/machine/index.js +0 -2
- package/src/machine/promotions.js +5 -4
- package/src/machine/reward.js +1 -1
- package/src/machine/reward_cash.js +15 -1
- package/src/machine/setting.js +0 -7
- package/src/machine/websocket.js +0 -12
- package/src/machine/withdraw/withdraw_crypto.js +3 -1
- package/src/machine/withdraw/withdraw_crypto2.js +1 -1
- package/src/machine/withdraw/withdraw_manual.js +2 -1
- package/src/machine/withdraw/withdraw_vn.js +3 -1
- package/src/machine/withdraw/withdraw_vn2.js +1 -1
- package/src/api/ranking.js +0 -27
- package/src/machine/ranking.js +0 -216
package/CHANGELOG.md
CHANGED
|
@@ -2,108 +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.353-dev-19](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-18...v1.1.353-dev-19) (2025-04-25)
|
|
6
|
-
|
|
7
|
-
### [1.1.353-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-18...v1.1.353-dev-1) (2025-04-25)
|
|
8
|
-
|
|
9
|
-
### [1.1.353-dev-18](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-17...v1.1.353-dev-18) (2025-04-24)
|
|
10
|
-
|
|
11
|
-
### [1.1.353](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-17...v1.1.353) (2025-04-24)
|
|
12
|
-
|
|
13
|
-
### [1.1.353-dev-17](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-16...v1.1.353-dev-17) (2025-04-24)
|
|
14
|
-
|
|
15
|
-
### [1.1.353-dev-16](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-15...v1.1.353-dev-16) (2025-04-23)
|
|
16
|
-
|
|
17
|
-
### [1.1.353-dev-15](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-14...v1.1.353-dev-15) (2025-04-23)
|
|
18
|
-
|
|
19
|
-
### [1.1.353-dev-14](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.353-dev-14) (2025-04-23)
|
|
20
|
-
|
|
21
|
-
### [1.1.353-dev-13](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-12...v1.1.353-dev-13) (2025-04-21)
|
|
22
|
-
|
|
23
|
-
### [1.1.353-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-11...v1.1.353-dev-12) (2025-04-20)
|
|
24
|
-
|
|
25
|
-
### [1.1.353-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-10...v1.1.353-dev-11) (2025-04-16)
|
|
26
|
-
|
|
27
|
-
### [1.1.353-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-9...v1.1.353-dev-10) (2025-04-16)
|
|
28
|
-
|
|
29
|
-
### [1.1.353-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.353-dev-9) (2025-04-16)
|
|
30
|
-
|
|
31
|
-
### [1.1.353-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-7...v1.1.353-dev-8) (2025-04-15)
|
|
32
|
-
|
|
33
|
-
### [1.1.353-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.354...v1.1.353-dev-7) (2025-04-14)
|
|
34
|
-
|
|
35
|
-
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
|
36
|
-
|
|
37
|
-
### [1.1.353-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-4...v1.1.353-dev-5) (2025-04-14)
|
|
38
|
-
|
|
39
|
-
### [1.1.353-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-3...v1.1.353-dev-4) (2025-04-14)
|
|
40
|
-
|
|
41
|
-
### [1.1.353-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-2...v1.1.353-dev-3) (2025-04-11)
|
|
42
|
-
|
|
43
|
-
### [1.1.353-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-1...v1.1.353-dev-2) (2025-04-11)
|
|
44
|
-
|
|
45
|
-
### [1.1.353-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.346-wallet-1...v1.1.353-dev-1) (2025-04-11)
|
|
46
|
-
|
|
47
|
-
### [1.1.346-wallet-1](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.346-wallet-1) (2025-04-10)
|
|
48
|
-
|
|
49
|
-
### [1.1.353-dev-13](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-12...v1.1.353-dev-13) (2025-04-21)
|
|
50
|
-
|
|
51
|
-
### [1.1.354](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-6...v1.1.354) (2025-04-14)
|
|
52
|
-
|
|
53
|
-
### [1.1.354](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-6...v1.1.354) (2025-04-14)
|
|
54
|
-
|
|
55
|
-
### [1.1.353-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-11...v1.1.353-dev-12) (2025-04-20)
|
|
56
|
-
|
|
57
|
-
### [1.1.353-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-10...v1.1.353-dev-11) (2025-04-16)
|
|
58
|
-
|
|
59
|
-
### [1.1.353-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-9...v1.1.353-dev-10) (2025-04-16)
|
|
60
|
-
|
|
61
|
-
### [1.1.353-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.353-dev-9) (2025-04-16)
|
|
62
|
-
|
|
63
|
-
### [1.1.353-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-7...v1.1.353-dev-8) (2025-04-15)
|
|
64
|
-
|
|
65
|
-
### [1.1.353-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-6...v1.1.353-dev-7) (2025-04-14)
|
|
66
|
-
|
|
67
|
-
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
|
68
|
-
|
|
69
|
-
### [1.1.353-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-4...v1.1.353-dev-5) (2025-04-14)
|
|
70
|
-
|
|
71
|
-
### [1.1.353-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-3...v1.1.353-dev-4) (2025-04-14)
|
|
72
|
-
|
|
73
|
-
### [1.1.353-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-2...v1.1.353-dev-3) (2025-04-11)
|
|
74
|
-
|
|
75
|
-
### [1.1.353-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-1...v1.1.353-dev-2) (2025-04-11)
|
|
76
|
-
|
|
77
|
-
### [1.1.353-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.346-wallet-1...v1.1.353-dev-1) (2025-04-11)
|
|
78
|
-
|
|
79
|
-
### [1.1.346-wallet-1](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.346-wallet-1) (2025-04-10)
|
|
80
|
-
|
|
81
|
-
### [1.1.353-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-7...v1.1.353-dev-8) (2025-04-15)
|
|
82
|
-
|
|
83
|
-
### [1.1.353-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-6...v1.1.353-dev-7) (2025-04-14)
|
|
84
|
-
|
|
85
|
-
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
|
86
|
-
|
|
87
|
-
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
|
88
|
-
|
|
89
|
-
### [1.1.353-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-4...v1.1.353-dev-5) (2025-04-14)
|
|
90
|
-
|
|
91
|
-
### [1.1.353-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-3...v1.1.353-dev-4) (2025-04-14)
|
|
92
|
-
|
|
93
|
-
### [1.1.353-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-2...v1.1.353-dev-3) (2025-04-11)
|
|
94
|
-
|
|
95
|
-
### [1.1.353-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-1...v1.1.353-dev-2) (2025-04-11)
|
|
96
|
-
|
|
97
|
-
### [1.1.346-wallet-1](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.346-wallet-1) (2025-04-10)
|
|
98
|
-
|
|
99
|
-
### [1.1.353-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.353-dev-1) (2025-04-11)
|
|
100
|
-
|
|
101
|
-
### [1.1.355](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.355) (2025-04-22)
|
|
102
|
-
|
|
103
|
-
### [1.1.354](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.354) (2025-04-14)
|
|
104
|
-
|
|
105
|
-
### [1.1.354](https://github.com/jetthai/cuora-module/compare/v1.1.353...v1.1.354) (2025-04-14)
|
|
106
|
-
|
|
107
5
|
### [1.1.353](https://github.com/jetthai/cuora-module/compare/v1.1.352...v1.1.353) (2025-04-02)
|
|
108
6
|
|
|
109
7
|
### [1.1.352](https://github.com/jetthai/cuora-module/compare/v1.1.351...v1.1.352) (2025-04-02)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -107,9 +107,4 @@ export default {
|
|
|
107
107
|
method: 'post',
|
|
108
108
|
params: { startDate, endDate, appSecret },
|
|
109
109
|
}),
|
|
110
|
-
loseRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
|
111
|
-
url: 'activities/lose-rebate/history',
|
|
112
|
-
method: 'post',
|
|
113
|
-
params: { startDate, endDate, appSecret },
|
|
114
|
-
}),
|
|
115
110
|
}
|
package/src/api/game.js
CHANGED
|
@@ -4,7 +4,6 @@ export default {
|
|
|
4
4
|
removeFavoriteGame: (code) => ({ method: 'post', url: 'game/myfavorite/remove', params: { games: [code] } }),
|
|
5
5
|
getStatements: () => ({ url: 'game/statements', method: 'get' }),
|
|
6
6
|
playGame: (params) => ({ url: 'game/play', method: 'get', params }),
|
|
7
|
-
demoGame: (params) => ({ url: 'game/demo', method: 'get', params, isPublic: true }),
|
|
8
7
|
logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
|
|
9
8
|
|
|
10
9
|
getGameTags: ({ q, lang }) => ({ url: 'game/search', method: 'get', params: { q, lang } }),
|
package/src/api/index.js
CHANGED
|
@@ -6,6 +6,5 @@ import mailbox from './mailbox.js'
|
|
|
6
6
|
import payment from './payment.js'
|
|
7
7
|
import user from './user.js'
|
|
8
8
|
import form from './form.js'
|
|
9
|
-
import ranking from './ranking.js'
|
|
10
9
|
|
|
11
|
-
export default { activity, auth, common, game, mailbox, payment, user, form
|
|
10
|
+
export default { activity, auth, common, game, mailbox, payment, user, form }
|
|
@@ -77,6 +77,10 @@ export default function (request) {
|
|
|
77
77
|
SET_UNREAD: {
|
|
78
78
|
actions: 'setUnread',
|
|
79
79
|
},
|
|
80
|
+
REFRESH: {
|
|
81
|
+
target: '#activity.fetchingList',
|
|
82
|
+
actions: 'leaveGame',
|
|
83
|
+
},
|
|
80
84
|
RESET_ACTIVITIES: {
|
|
81
85
|
actions: 'resetActivities',
|
|
82
86
|
},
|
|
@@ -85,12 +89,6 @@ export default function (request) {
|
|
|
85
89
|
},
|
|
86
90
|
},
|
|
87
91
|
},
|
|
88
|
-
on: {
|
|
89
|
-
REFRESH: {
|
|
90
|
-
target: '#activity.fetchingList',
|
|
91
|
-
actions: 'leaveGame',
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
92
|
},
|
|
95
93
|
{
|
|
96
94
|
actions: {
|
|
@@ -152,8 +150,12 @@ export default function (request) {
|
|
|
152
150
|
}
|
|
153
151
|
}),
|
|
154
152
|
resetActivities: assign((context, event) => {
|
|
153
|
+
const { activityList = [], specifyActivities = [] } = context
|
|
154
|
+
const keepActivities = activityList.filter((activity) => specifyActivities.includes(activity.activityType))
|
|
155
155
|
return {
|
|
156
156
|
isPlaying: true,
|
|
157
|
+
activityList: keepActivities,
|
|
158
|
+
promotionList: [],
|
|
157
159
|
}
|
|
158
160
|
}),
|
|
159
161
|
leaveGame: assign((context, event) => {
|
|
@@ -184,7 +186,8 @@ export default function (request) {
|
|
|
184
186
|
services: {
|
|
185
187
|
fetchList: async (context, event) => {
|
|
186
188
|
const hasToken = request.getToken()
|
|
187
|
-
const
|
|
189
|
+
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
190
|
+
const apiCallable = hasToken && isDoubleWallet
|
|
188
191
|
const [{ data }, promotionList] = await Promise.all([
|
|
189
192
|
hasToken ? request.send(activity.getActivityList({ appSecret })) : request.send(activity.getAllActivityList({ appSecret })),
|
|
190
193
|
apiCallable && !context.isPlaying ? request.send(payment.getPromotionsList()) : [],
|
|
@@ -123,8 +123,12 @@ export default function (request) {
|
|
|
123
123
|
}
|
|
124
124
|
}),
|
|
125
125
|
resetActivities: assign((context, event) => {
|
|
126
|
+
const { activityList = [], detailNeededActivityTypes = [] } = context
|
|
127
|
+
const keepActivities = activityList.filter((activity) => detailNeededActivityTypes.includes(activity.activityType))
|
|
126
128
|
return {
|
|
127
129
|
isPlaying: true,
|
|
130
|
+
activityList: keepActivities,
|
|
131
|
+
promotionList: [],
|
|
128
132
|
}
|
|
129
133
|
}),
|
|
130
134
|
leaveGame: assign((context, event) => {
|
|
@@ -11,19 +11,17 @@ export default function (request) {
|
|
|
11
11
|
activityDetail: null,
|
|
12
12
|
conditions: null,
|
|
13
13
|
rebateType: null,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
currentReachLevel: null,
|
|
15
|
+
nextReachLevel: null,
|
|
16
|
+
lastPeriod: null,
|
|
17
17
|
nextDepositLimit: null,
|
|
18
18
|
nextTurnoverLimit: null,
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
currentTotalDeposit: null,
|
|
20
|
+
currentTotalTurnover: null,
|
|
21
21
|
retainAmount: '0',
|
|
22
|
-
|
|
22
|
+
yesterdayReward: '0',
|
|
23
23
|
calculateWalletMode: '1',
|
|
24
24
|
duration: 0,
|
|
25
|
-
isAccumulationPeriod: false, // 當前是否為累積期
|
|
26
|
-
isAwardPeriod: false, // 當前是否為領獎期
|
|
27
25
|
},
|
|
28
26
|
initial: 'idle',
|
|
29
27
|
states: {
|
|
@@ -33,10 +31,6 @@ export default function (request) {
|
|
|
33
31
|
target: 'loading',
|
|
34
32
|
actions: 'setActivityNo',
|
|
35
33
|
},
|
|
36
|
-
SET_ACTIVITY: {
|
|
37
|
-
target: 'loading',
|
|
38
|
-
actions: 'setActivity',
|
|
39
|
-
},
|
|
40
34
|
},
|
|
41
35
|
},
|
|
42
36
|
loading: {
|
|
@@ -51,17 +45,6 @@ export default function (request) {
|
|
|
51
45
|
},
|
|
52
46
|
},
|
|
53
47
|
},
|
|
54
|
-
sentAward: {
|
|
55
|
-
invoke: {
|
|
56
|
-
src: 'sentAward',
|
|
57
|
-
onDone: {
|
|
58
|
-
target: 'loading',
|
|
59
|
-
},
|
|
60
|
-
onError: {
|
|
61
|
-
target: 'loaded',
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
},
|
|
65
48
|
loaded: {
|
|
66
49
|
entry: 'setDuration',
|
|
67
50
|
after: {
|
|
@@ -78,9 +61,6 @@ export default function (request) {
|
|
|
78
61
|
STOP: {
|
|
79
62
|
target: '.idle',
|
|
80
63
|
},
|
|
81
|
-
SENT_AWARD: {
|
|
82
|
-
target: '.sentAward',
|
|
83
|
-
},
|
|
84
64
|
},
|
|
85
65
|
},
|
|
86
66
|
{
|
|
@@ -91,80 +71,58 @@ export default function (request) {
|
|
|
91
71
|
}
|
|
92
72
|
}),
|
|
93
73
|
setActivityDetail: assign((context, event) => {
|
|
94
|
-
let activityDetail = event.data
|
|
95
|
-
if (context.activityDetail && (!event.data || Object.keys(event.data).length === 0)) {
|
|
96
|
-
activityDetail = context.activityDetail
|
|
97
|
-
}
|
|
98
|
-
return {
|
|
99
|
-
activityDetail,
|
|
100
|
-
}
|
|
101
|
-
}),
|
|
102
|
-
setActivity: assign((context, event) => {
|
|
103
74
|
return {
|
|
104
|
-
activityDetail: event.data
|
|
105
|
-
activityNo: event.data.activityNo,
|
|
75
|
+
activityDetail: event.data,
|
|
106
76
|
}
|
|
107
77
|
}),
|
|
108
78
|
setInitData: assign((context, event) => {
|
|
109
79
|
const {
|
|
110
80
|
rebateType,
|
|
111
81
|
conditions = [],
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
82
|
+
currentReachLevel = {},
|
|
83
|
+
nextReachLevel = {},
|
|
84
|
+
lastPeriod = {},
|
|
85
|
+
currentTotalDeposit = '0',
|
|
86
|
+
currentTotalTurnover = '0',
|
|
117
87
|
retainAmount = '0',
|
|
118
|
-
|
|
88
|
+
yesterdayReward = '0',
|
|
119
89
|
calculateWalletMode = '0',
|
|
120
|
-
accumulateStartTime,
|
|
121
|
-
accumulateEndTime,
|
|
122
|
-
lastCycleCardStartTime,
|
|
123
|
-
lastCycleCardEndTime,
|
|
124
90
|
} = context.activityDetail || {}
|
|
125
91
|
|
|
126
92
|
let nextDepositLimit = '0'
|
|
127
93
|
let nextTurnoverLimit = '0'
|
|
128
|
-
|
|
94
|
+
let currentTurnover = '0'
|
|
95
|
+
let currentDeposit = '0'
|
|
129
96
|
// 若已達到最高等級,所有數值皆以最高等級顯示
|
|
130
|
-
if (
|
|
131
|
-
|
|
132
|
-
|
|
97
|
+
if (currentReachLevel?.title === conditions?.[conditions?.length - 1]?.title) {
|
|
98
|
+
currentDeposit = conditions[conditions.length - 1].depositLimit
|
|
99
|
+
currentTurnover = conditions[conditions.length - 1].turnoverLimit
|
|
100
|
+
nextDepositLimit = conditions[conditions.length - 1].depositLimit
|
|
101
|
+
nextTurnoverLimit = conditions[conditions.length - 1].turnoverLimit
|
|
133
102
|
} else {
|
|
134
|
-
|
|
135
|
-
|
|
103
|
+
currentDeposit = currentTotalDeposit
|
|
104
|
+
currentTurnover = currentTotalTurnover
|
|
105
|
+
nextDepositLimit = nextReachLevel?.depositLimit
|
|
106
|
+
nextTurnoverLimit = nextReachLevel?.turnoverLimit
|
|
136
107
|
}
|
|
137
|
-
// 計算當前是否為累積期及領獎期
|
|
138
|
-
const currentTime = new Date().getTime() / 1000
|
|
139
|
-
const isAccumulationPeriod = currentTime >= accumulateStartTime && currentTime <= accumulateEndTime
|
|
140
|
-
const isAwardPeriod = currentTime >= lastCycleCardStartTime && currentTime <= lastCycleCardEndTime
|
|
141
108
|
|
|
142
109
|
return {
|
|
143
110
|
rebateType,
|
|
144
111
|
conditions,
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
112
|
+
currentReachLevel,
|
|
113
|
+
nextReachLevel,
|
|
114
|
+
lastPeriod,
|
|
148
115
|
nextDepositLimit,
|
|
149
116
|
nextTurnoverLimit,
|
|
150
|
-
|
|
151
|
-
|
|
117
|
+
currentTotalDeposit: currentDeposit,
|
|
118
|
+
currentTotalTurnover: currentTurnover,
|
|
152
119
|
retainAmount,
|
|
153
|
-
|
|
120
|
+
yesterdayReward,
|
|
154
121
|
calculateWalletMode,
|
|
155
|
-
isAccumulationPeriod,
|
|
156
|
-
isAwardPeriod,
|
|
157
122
|
}
|
|
158
123
|
}),
|
|
159
124
|
setDuration: assign((context, event) => {
|
|
160
|
-
const {
|
|
161
|
-
const { isAwardPeriod } = context
|
|
162
|
-
// 若為累積期,則倒數時間以累積期結束時間計算
|
|
163
|
-
let currentEndTime = accumulateEndTime
|
|
164
|
-
// 若為領獎期,則倒數時間以領獎期結束時間計算
|
|
165
|
-
if (!rewardPeriodSameAsAccumulationPeriod && isAwardPeriod) {
|
|
166
|
-
currentEndTime = lastCycleCardEndTime
|
|
167
|
-
}
|
|
125
|
+
const { currentEndTime } = context?.activityDetail
|
|
168
126
|
return {
|
|
169
127
|
duration: Math.max(parseInt(currentEndTime) - new Date().getTime() / 1000, 0),
|
|
170
128
|
}
|
|
@@ -176,11 +134,6 @@ export default function (request) {
|
|
|
176
134
|
const { data } = await request.send(api.getActivityDetail({ activityNo, appSecret }))
|
|
177
135
|
return data
|
|
178
136
|
},
|
|
179
|
-
sentAward: async (context, event) => {
|
|
180
|
-
const { activityNo } = context
|
|
181
|
-
const { data } = await request.send(api.sentAward({ activityNo, appSecret }))
|
|
182
|
-
return data
|
|
183
|
-
},
|
|
184
137
|
},
|
|
185
138
|
}
|
|
186
139
|
)
|
package/src/machine/common.js
CHANGED
|
@@ -113,7 +113,6 @@ export default function (request) {
|
|
|
113
113
|
actions: 'resetByEnterGame',
|
|
114
114
|
},
|
|
115
115
|
LEAVE_GAME_REFRESH: {
|
|
116
|
-
target: '.updating',
|
|
117
116
|
actions: 'leaveGame',
|
|
118
117
|
},
|
|
119
118
|
},
|
|
@@ -294,12 +293,7 @@ export default function (request) {
|
|
|
294
293
|
}),
|
|
295
294
|
setFeeds: assign((context, event) => {
|
|
296
295
|
const { announcementList, broadcastList, mailBoxInfo } = event.data
|
|
297
|
-
const { siteConfig } = context
|
|
298
296
|
const promotions = announcementList?.announcements?.filter?.((item) => item.category === 3) || []
|
|
299
|
-
const customerMessageEnable = siteConfig?.csChat?.some((item) => item.enable && item.name === 'customermessage')
|
|
300
|
-
if (!customerMessageEnable) {
|
|
301
|
-
mailBoxInfo.rows -= mailBoxInfo.detailRows?.CUSTOMER || 0
|
|
302
|
-
}
|
|
303
297
|
return { broadcastList, mailBoxInfo, promotions }
|
|
304
298
|
}),
|
|
305
299
|
setBroadcast: assign((context, event) => {
|
|
@@ -58,6 +58,7 @@ export default function (request) {
|
|
|
58
58
|
always: [
|
|
59
59
|
{
|
|
60
60
|
target: 'loaded',
|
|
61
|
+
cond: 'isDoubleWalletMode',
|
|
61
62
|
},
|
|
62
63
|
{
|
|
63
64
|
target: 'calculating',
|
|
@@ -90,7 +91,7 @@ export default function (request) {
|
|
|
90
91
|
SUBMIT: [
|
|
91
92
|
{
|
|
92
93
|
target: 'pending',
|
|
93
|
-
cond: (context, event) => !!context.calculation,
|
|
94
|
+
cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
|
|
94
95
|
},
|
|
95
96
|
{
|
|
96
97
|
target: 'submitting',
|
|
@@ -128,7 +129,7 @@ export default function (request) {
|
|
|
128
129
|
SUBMIT: [
|
|
129
130
|
{
|
|
130
131
|
target: 'pending',
|
|
131
|
-
cond: (context, event) => !!context.calculation,
|
|
132
|
+
cond: (context, event) => context.siteConfig?.walletMode === '4' && !!context.calculation,
|
|
132
133
|
},
|
|
133
134
|
{
|
|
134
135
|
target: 'submitting',
|
|
@@ -246,6 +247,9 @@ export default function (request) {
|
|
|
246
247
|
}),
|
|
247
248
|
},
|
|
248
249
|
guards: {
|
|
250
|
+
isDoubleWalletMode: (context, event) => {
|
|
251
|
+
return context.siteConfig?.walletMode === '4'
|
|
252
|
+
},
|
|
249
253
|
isCalculable: (context, event) => {
|
|
250
254
|
const {
|
|
251
255
|
amount,
|
|
@@ -72,8 +72,8 @@ export default function (request) {
|
|
|
72
72
|
target: 'fetching',
|
|
73
73
|
cond: (context, event) => {
|
|
74
74
|
const { siteConfig = {}, promotion = {} } = context
|
|
75
|
-
const { bonusPreviewEnable } = siteConfig
|
|
76
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
75
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
76
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
77
77
|
},
|
|
78
78
|
},
|
|
79
79
|
{ target: 'loaded' },
|
|
@@ -49,8 +49,8 @@ export default function (request) {
|
|
|
49
49
|
target: 'fetching',
|
|
50
50
|
cond: (context, event) => {
|
|
51
51
|
const { siteConfig = {}, promotion = {}, selectedCard } = context
|
|
52
|
-
const { bonusPreviewEnable } = siteConfig
|
|
53
|
-
return !!selectedCard && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
52
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
53
|
+
return !!selectedCard && walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
{ target: 'loaded' },
|
|
@@ -78,8 +78,8 @@ export default function (request) {
|
|
|
78
78
|
actions: 'setCard',
|
|
79
79
|
cond: (context, event) => {
|
|
80
80
|
const { siteConfig = {}, promotion = {} } = context
|
|
81
|
-
const { bonusPreviewEnable } = siteConfig
|
|
82
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
81
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
82
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
83
83
|
},
|
|
84
84
|
},
|
|
85
85
|
{
|
|
@@ -87,6 +87,11 @@ export default function (request) {
|
|
|
87
87
|
},
|
|
88
88
|
],
|
|
89
89
|
SELECT_AMOUNT: [
|
|
90
|
+
{
|
|
91
|
+
target: 'pending',
|
|
92
|
+
actions: 'setAmount',
|
|
93
|
+
cond: 'isFreeWalletMode',
|
|
94
|
+
},
|
|
90
95
|
{
|
|
91
96
|
target: 'debouncing',
|
|
92
97
|
actions: 'setAmount',
|
|
@@ -94,6 +99,19 @@ export default function (request) {
|
|
|
94
99
|
],
|
|
95
100
|
},
|
|
96
101
|
},
|
|
102
|
+
pending: {
|
|
103
|
+
on: {
|
|
104
|
+
SELECT_AMOUNT: {
|
|
105
|
+
actions: 'setAmount',
|
|
106
|
+
},
|
|
107
|
+
CONFIRM: {
|
|
108
|
+
target: 'debouncing',
|
|
109
|
+
},
|
|
110
|
+
BACK: {
|
|
111
|
+
target: 'loaded',
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
},
|
|
97
115
|
debouncing: {
|
|
98
116
|
on: {
|
|
99
117
|
SELECT_AMOUNT: {
|
|
@@ -114,6 +132,19 @@ export default function (request) {
|
|
|
114
132
|
invoke: {
|
|
115
133
|
src: 'fetchCalculation',
|
|
116
134
|
onDone: [
|
|
135
|
+
{
|
|
136
|
+
target: 'submitting',
|
|
137
|
+
actions: 'setCalculation',
|
|
138
|
+
cond: (context, event) => {
|
|
139
|
+
const { siteConfig = {}, selectedCard = {} } = context
|
|
140
|
+
return siteConfig.walletMode === '2' && selectedCard.jumpLinkEnable === 1
|
|
141
|
+
},
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
target: 'cardInfo',
|
|
145
|
+
actions: 'setCalculation',
|
|
146
|
+
cond: 'isFreeWalletMode',
|
|
147
|
+
},
|
|
117
148
|
{
|
|
118
149
|
target: 'calculated',
|
|
119
150
|
actions: 'setCalculation',
|
|
@@ -127,10 +158,17 @@ export default function (request) {
|
|
|
127
158
|
calculable: {
|
|
128
159
|
entry: 'clearCalculation',
|
|
129
160
|
on: {
|
|
130
|
-
SELECT_AMOUNT:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
161
|
+
SELECT_AMOUNT: [
|
|
162
|
+
{
|
|
163
|
+
target: 'pending',
|
|
164
|
+
actions: 'setAmount',
|
|
165
|
+
cond: 'isFreeWalletMode',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
target: 'debouncing',
|
|
169
|
+
actions: 'setAmount',
|
|
170
|
+
},
|
|
171
|
+
],
|
|
134
172
|
BACK: {
|
|
135
173
|
target: 'loaded',
|
|
136
174
|
},
|
|
@@ -178,8 +216,8 @@ export default function (request) {
|
|
|
178
216
|
actions: 'setCard',
|
|
179
217
|
cond: (context, event) => {
|
|
180
218
|
const { siteConfig = {}, promotion = {} } = context
|
|
181
|
-
const { bonusPreviewEnable } = siteConfig
|
|
182
|
-
return bonusPreviewEnable && promotion.activityNo != 'none'
|
|
219
|
+
const { walletMode = '', bonusPreviewEnable } = siteConfig
|
|
220
|
+
return walletMode === '4' && bonusPreviewEnable && promotion.activityNo != 'none'
|
|
183
221
|
},
|
|
184
222
|
},
|
|
185
223
|
{
|
|
@@ -287,6 +325,9 @@ export default function (request) {
|
|
|
287
325
|
}),
|
|
288
326
|
},
|
|
289
327
|
guards: {
|
|
328
|
+
isFreeWalletMode: (context, event) => {
|
|
329
|
+
return context.siteConfig?.walletMode === '2'
|
|
330
|
+
},
|
|
290
331
|
isSubmittable: (context, event) => {
|
|
291
332
|
const { cardNumber, serialNumber } = context
|
|
292
333
|
return cardNumber && serialNumber
|
|
@@ -75,8 +75,24 @@ export default function (request) {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
step1: {
|
|
78
|
-
initial: '
|
|
78
|
+
initial: 'promotion',
|
|
79
79
|
states: {
|
|
80
|
+
promotion: {
|
|
81
|
+
always: [
|
|
82
|
+
{
|
|
83
|
+
target: 'idle',
|
|
84
|
+
cond: 'isDoubleWalletMode',
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
target: 'calculating',
|
|
88
|
+
actions: 'setPromotionDefaultAmount',
|
|
89
|
+
cond: 'hasMinPromotionDeposit',
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
target: 'idle',
|
|
93
|
+
},
|
|
94
|
+
],
|
|
95
|
+
},
|
|
80
96
|
idle: {},
|
|
81
97
|
calculating: {
|
|
82
98
|
invoke: {
|
|
@@ -121,10 +137,11 @@ export default function (request) {
|
|
|
121
137
|
{
|
|
122
138
|
target: 'pending',
|
|
123
139
|
cond: (context, event) => {
|
|
124
|
-
const { calculation, promotion } = context
|
|
140
|
+
const { siteConfig = {}, calculation, promotion } = context
|
|
141
|
+
const { walletMode } = siteConfig
|
|
125
142
|
const { promotionsNo, activityNo } = promotion
|
|
126
143
|
const isNoBonus = promotionsNo === 'none' || activityNo === 'none'
|
|
127
|
-
return !!calculation && !isNoBonus
|
|
144
|
+
return walletMode === '4' && !!calculation && !isNoBonus
|
|
128
145
|
},
|
|
129
146
|
},
|
|
130
147
|
{
|
|
@@ -368,6 +385,9 @@ export default function (request) {
|
|
|
368
385
|
}),
|
|
369
386
|
},
|
|
370
387
|
guards: {
|
|
388
|
+
isDoubleWalletMode: (context, event) => {
|
|
389
|
+
return context.siteConfig?.walletMode === '4'
|
|
390
|
+
},
|
|
371
391
|
isCalculable: (context, event) => {
|
|
372
392
|
const {
|
|
373
393
|
amount,
|