@jetthai/cuora 1.1.289-dev-1 → 1.1.289
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
CHANGED
|
@@ -2,8 +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.289-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.289...v1.1.289-dev-1) (2024-07-26)
|
|
6
|
-
|
|
7
5
|
### [1.1.289](https://github.com/jetthai/cuora-module/compare/v1.1.288...v1.1.289) (2024-07-23)
|
|
8
6
|
|
|
9
7
|
### [1.1.288](https://github.com/jetthai/cuora-module/compare/v1.1.287...v1.1.288) (2024-07-15)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -6,12 +6,6 @@ export default {
|
|
|
6
6
|
params: { appSecret, include },
|
|
7
7
|
isPublic: true,
|
|
8
8
|
}),
|
|
9
|
-
getJackpotList: ({ appSecret }) => ({
|
|
10
|
-
url: 'activities/jackpot/list',
|
|
11
|
-
method: 'get',
|
|
12
|
-
params: { appSecret },
|
|
13
|
-
isPublic: true,
|
|
14
|
-
}),
|
|
15
9
|
getTournamentDetail: ({ activityNo, appSecret }) => ({
|
|
16
10
|
url: 'tournament/detail',
|
|
17
11
|
method: 'get',
|
|
@@ -14,7 +14,6 @@ export default function (request) {
|
|
|
14
14
|
activitiesDetailList: [],
|
|
15
15
|
activityList: [],
|
|
16
16
|
promotionList: [],
|
|
17
|
-
jackpotList: [],
|
|
18
17
|
activityMap: {},
|
|
19
18
|
tournamentList: [],
|
|
20
19
|
refs: {},
|
|
@@ -35,7 +34,7 @@ export default function (request) {
|
|
|
35
34
|
src: 'fetchList',
|
|
36
35
|
onDone: {
|
|
37
36
|
target: 'idle',
|
|
38
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'
|
|
37
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
39
38
|
},
|
|
40
39
|
onError: {
|
|
41
40
|
target: 'idle',
|
|
@@ -124,12 +123,6 @@ export default function (request) {
|
|
|
124
123
|
promotionList,
|
|
125
124
|
}
|
|
126
125
|
}),
|
|
127
|
-
setJackpotList: assign((context, event) => {
|
|
128
|
-
const { jackpotList } = event.data
|
|
129
|
-
return {
|
|
130
|
-
jackpotList,
|
|
131
|
-
}
|
|
132
|
-
}),
|
|
133
126
|
setActivitiesDetailList: assign((context, event) => {
|
|
134
127
|
return {
|
|
135
128
|
activitiesDetailList: event.data.map((item) => item.data),
|
|
@@ -169,13 +162,12 @@ export default function (request) {
|
|
|
169
162
|
const hasToken = request.getToken()
|
|
170
163
|
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
171
164
|
const apiCallable = hasToken && isDoubleWallet
|
|
172
|
-
const [{ data }, promotionList
|
|
165
|
+
const [{ data }, promotionList] = await Promise.all([
|
|
173
166
|
request.send(activity.getActivityList({ appSecret })),
|
|
174
167
|
apiCallable ? request.send(payment.getPromotionsList()) : [],
|
|
175
|
-
request.send(activity.getJackpotList({ appSecret })),
|
|
176
168
|
])
|
|
177
169
|
|
|
178
|
-
return { activityList: data, promotionList
|
|
170
|
+
return { activityList: data, promotionList }
|
|
179
171
|
},
|
|
180
172
|
fetchActivitiesDetail: async (context, event) => {
|
|
181
173
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
|
@@ -13,7 +13,6 @@ export default function (request) {
|
|
|
13
13
|
activityList: [],
|
|
14
14
|
tournamentList: [],
|
|
15
15
|
promotionList: [],
|
|
16
|
-
jackpotList: [],
|
|
17
16
|
uidSite: '',
|
|
18
17
|
detailNeededActivityTypes: [29, 34],
|
|
19
18
|
activityDetailList: [],
|
|
@@ -24,7 +23,7 @@ export default function (request) {
|
|
|
24
23
|
src: 'fetchList',
|
|
25
24
|
onDone: {
|
|
26
25
|
target: 'checking',
|
|
27
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'
|
|
26
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
28
27
|
},
|
|
29
28
|
onError: {
|
|
30
29
|
target: 'pending',
|
|
@@ -97,12 +96,6 @@ export default function (request) {
|
|
|
97
96
|
promotionList,
|
|
98
97
|
}
|
|
99
98
|
}),
|
|
100
|
-
setJackpotList: assign((context, event) => {
|
|
101
|
-
const { jackpotList } = event.data
|
|
102
|
-
return {
|
|
103
|
-
jackpotList,
|
|
104
|
-
}
|
|
105
|
-
}),
|
|
106
99
|
setUnread: assign((context, event) => {
|
|
107
100
|
const { uidSite, activityNo, unread } = event.data
|
|
108
101
|
const list = JSON.parse(JSON.stringify(context.activityList))
|
|
@@ -139,13 +132,12 @@ export default function (request) {
|
|
|
139
132
|
services: {
|
|
140
133
|
fetchList: async (context, event) => {
|
|
141
134
|
const hasToken = request.getToken()
|
|
142
|
-
const [{ data }, promotionList
|
|
135
|
+
const [{ data }, promotionList] = await Promise.all([
|
|
143
136
|
request.send(activity.getActivityList({ appSecret })),
|
|
144
137
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
145
|
-
request.send(activity.getJackpotList({ appSecret })),
|
|
146
138
|
])
|
|
147
139
|
|
|
148
|
-
return { activityList: data, promotionList
|
|
140
|
+
return { activityList: data, promotionList }
|
|
149
141
|
},
|
|
150
142
|
fetchActivityDetailList: async (context, event) => {
|
|
151
143
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -44,7 +44,6 @@ export default function (request) {
|
|
|
44
44
|
gameURL: null,
|
|
45
45
|
gameToken: null,
|
|
46
46
|
gameHtml: null,
|
|
47
|
-
switchGame: null,
|
|
48
47
|
...oldContext,
|
|
49
48
|
},
|
|
50
49
|
states: {
|
|
@@ -75,13 +74,6 @@ export default function (request) {
|
|
|
75
74
|
target: 'connecting',
|
|
76
75
|
actions: ['setGameInfo', 'setLang'],
|
|
77
76
|
},
|
|
78
|
-
MENU_ENTER_GAME: {
|
|
79
|
-
target: 'connecting',
|
|
80
|
-
actions: ['setGameInfo', 'setLang'],
|
|
81
|
-
},
|
|
82
|
-
UPDATE: {
|
|
83
|
-
target: 'updating',
|
|
84
|
-
},
|
|
85
77
|
},
|
|
86
78
|
},
|
|
87
79
|
batchFetching: {
|
|
@@ -121,18 +113,6 @@ export default function (request) {
|
|
|
121
113
|
{ target: 'idle' },
|
|
122
114
|
],
|
|
123
115
|
},
|
|
124
|
-
updating: {
|
|
125
|
-
invoke: {
|
|
126
|
-
src: 'updatePageContent',
|
|
127
|
-
onDone: {
|
|
128
|
-
target: 'idle',
|
|
129
|
-
actions: 'swapContent',
|
|
130
|
-
},
|
|
131
|
-
onError: {
|
|
132
|
-
target: 'idle',
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
116
|
connecting: {
|
|
137
117
|
invoke: {
|
|
138
118
|
src: 'connectGame',
|
|
@@ -151,24 +131,6 @@ export default function (request) {
|
|
|
151
131
|
},
|
|
152
132
|
},
|
|
153
133
|
},
|
|
154
|
-
connectSwitching: {
|
|
155
|
-
invoke: {
|
|
156
|
-
src: 'disconnectGame',
|
|
157
|
-
onDone: {
|
|
158
|
-
target: 'connecting',
|
|
159
|
-
actions: ['setSwitchGameInfo', 'setGameURL'],
|
|
160
|
-
},
|
|
161
|
-
onError: {
|
|
162
|
-
target: 'idle',
|
|
163
|
-
actions: ['setSwitchGameInfo', 'setGameURL'],
|
|
164
|
-
},
|
|
165
|
-
},
|
|
166
|
-
on: {
|
|
167
|
-
EXIT_GAME: {
|
|
168
|
-
target: 'disconnect',
|
|
169
|
-
},
|
|
170
|
-
},
|
|
171
|
-
},
|
|
172
134
|
playing: {
|
|
173
135
|
on: {
|
|
174
136
|
EXIT_GAME: {
|
|
@@ -177,10 +139,6 @@ export default function (request) {
|
|
|
177
139
|
REFRESH: {
|
|
178
140
|
target: 'refreshing',
|
|
179
141
|
},
|
|
180
|
-
MENU_ENTER_GAME: {
|
|
181
|
-
target: 'connectSwitching',
|
|
182
|
-
actions: ['setSwitch', 'setLang'],
|
|
183
|
-
},
|
|
184
142
|
},
|
|
185
143
|
},
|
|
186
144
|
refreshing: {
|
|
@@ -357,7 +315,7 @@ export default function (request) {
|
|
|
357
315
|
if (room.categoryId === GAME_SEARCH) {
|
|
358
316
|
return
|
|
359
317
|
} else if (additionEnable) {
|
|
360
|
-
const [content, addition
|
|
318
|
+
const [content, addition] = event.data
|
|
361
319
|
return {
|
|
362
320
|
content: {
|
|
363
321
|
...context.content,
|
|
@@ -418,13 +376,6 @@ export default function (request) {
|
|
|
418
376
|
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = event.data.game
|
|
419
377
|
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
420
378
|
}),
|
|
421
|
-
setSwitch: assign((context, event) => {
|
|
422
|
-
return { switchGame: event.data.game }
|
|
423
|
-
}),
|
|
424
|
-
setSwitchGameInfo: assign((context, event) => {
|
|
425
|
-
const { providerId, gameId, gameTypeId, mappingId, portrait, gameCode, name } = context.switchGame
|
|
426
|
-
return { game: { providerId, gameId, gameTypeId, mappingId, portrait: portrait ? 1 : 0, gameCode, name } }
|
|
427
|
-
}),
|
|
428
379
|
setLang: assign((context, event) => {
|
|
429
380
|
const lang = event.data.locale.replace('-', '_')
|
|
430
381
|
return { lang }
|