@jetthai/cuora 1.1.290-dev-1 → 1.1.290-dev-2
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,6 +2,8 @@
|
|
|
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.290-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.290-dev-1...v1.1.290-dev-2) (2024-08-01)
|
|
6
|
+
|
|
5
7
|
### [1.1.290-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.290-dev...v1.1.290-dev-1) (2024-08-01)
|
|
6
8
|
|
|
7
9
|
### [1.1.290-dev](https://github.com/jetthai/cuora-module/compare/v1.1.290...v1.1.290-dev) (2024-08-01)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -6,6 +6,12 @@ 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
|
+
}),
|
|
9
15
|
getTournamentDetail: ({ activityNo, appSecret }) => ({
|
|
10
16
|
url: 'tournament/detail',
|
|
11
17
|
method: 'get',
|
|
@@ -14,6 +14,7 @@ export default function (request) {
|
|
|
14
14
|
activitiesDetailList: [],
|
|
15
15
|
activityList: [],
|
|
16
16
|
promotionList: [],
|
|
17
|
+
jackpotList: [],
|
|
17
18
|
activityMap: {},
|
|
18
19
|
tournamentList: [],
|
|
19
20
|
refs: {},
|
|
@@ -34,7 +35,7 @@ export default function (request) {
|
|
|
34
35
|
src: 'fetchList',
|
|
35
36
|
onDone: {
|
|
36
37
|
target: 'idle',
|
|
37
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
38
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setJackpotList'],
|
|
38
39
|
},
|
|
39
40
|
onError: {
|
|
40
41
|
target: 'idle',
|
|
@@ -123,6 +124,12 @@ export default function (request) {
|
|
|
123
124
|
promotionList,
|
|
124
125
|
}
|
|
125
126
|
}),
|
|
127
|
+
setJackpotList: assign((context, event) => {
|
|
128
|
+
const { jackpotList } = event.data
|
|
129
|
+
return {
|
|
130
|
+
jackpotList,
|
|
131
|
+
}
|
|
132
|
+
}),
|
|
126
133
|
setActivitiesDetailList: assign((context, event) => {
|
|
127
134
|
return {
|
|
128
135
|
activitiesDetailList: event.data.map((item) => item.data),
|
|
@@ -162,12 +169,13 @@ export default function (request) {
|
|
|
162
169
|
const hasToken = request.getToken()
|
|
163
170
|
const isDoubleWallet = context.siteConfig?.walletMode === '4'
|
|
164
171
|
const apiCallable = hasToken && isDoubleWallet
|
|
165
|
-
const [{ data }, promotionList] = await Promise.all([
|
|
172
|
+
const [{ data }, promotionList, jackpotList] = await Promise.all([
|
|
166
173
|
request.send(activity.getActivityList({ appSecret })),
|
|
167
174
|
apiCallable ? request.send(payment.getPromotionsList()) : [],
|
|
175
|
+
request.send(activity.getJackpotList({ appSecret })),
|
|
168
176
|
])
|
|
169
177
|
|
|
170
|
-
return { activityList: data, promotionList }
|
|
178
|
+
return { activityList: data, promotionList, jackpotList: jackpotList.data }
|
|
171
179
|
},
|
|
172
180
|
fetchActivitiesDetail: async (context, event) => {
|
|
173
181
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
|
@@ -13,6 +13,7 @@ export default function (request) {
|
|
|
13
13
|
activityList: [],
|
|
14
14
|
tournamentList: [],
|
|
15
15
|
promotionList: [],
|
|
16
|
+
jackpotList: [],
|
|
16
17
|
uidSite: '',
|
|
17
18
|
detailNeededActivityTypes: [29, 34],
|
|
18
19
|
activityDetailList: [],
|
|
@@ -23,7 +24,7 @@ export default function (request) {
|
|
|
23
24
|
src: 'fetchList',
|
|
24
25
|
onDone: {
|
|
25
26
|
target: 'checking',
|
|
26
|
-
actions: ['setActivityList', 'setTournamentList', 'setPromotionList'],
|
|
27
|
+
actions: ['setActivityList', 'setTournamentList', 'setPromotionList', 'setJackpotList'],
|
|
27
28
|
},
|
|
28
29
|
onError: {
|
|
29
30
|
target: 'pending',
|
|
@@ -96,6 +97,12 @@ export default function (request) {
|
|
|
96
97
|
promotionList,
|
|
97
98
|
}
|
|
98
99
|
}),
|
|
100
|
+
setJackpotList: assign((context, event) => {
|
|
101
|
+
const { jackpotList } = event.data
|
|
102
|
+
return {
|
|
103
|
+
jackpotList,
|
|
104
|
+
}
|
|
105
|
+
}),
|
|
99
106
|
setUnread: assign((context, event) => {
|
|
100
107
|
const { uidSite, activityNo, unread } = event.data
|
|
101
108
|
const list = JSON.parse(JSON.stringify(context.activityList))
|
|
@@ -132,12 +139,13 @@ export default function (request) {
|
|
|
132
139
|
services: {
|
|
133
140
|
fetchList: async (context, event) => {
|
|
134
141
|
const hasToken = request.getToken()
|
|
135
|
-
const [{ data }, promotionList] = await Promise.all([
|
|
142
|
+
const [{ data }, promotionList, jackpotList] = await Promise.all([
|
|
136
143
|
request.send(activity.getActivityList({ appSecret })),
|
|
137
144
|
hasToken ? request.send(payment.getPromotionsList()) : [],
|
|
145
|
+
request.send(activity.getJackpotList({ appSecret })),
|
|
138
146
|
])
|
|
139
147
|
|
|
140
|
-
return { activityList: data, promotionList }
|
|
148
|
+
return { activityList: data, promotionList, jackpotList: jackpotList.data }
|
|
141
149
|
},
|
|
142
150
|
fetchActivityDetailList: async (context, event) => {
|
|
143
151
|
await new Promise((resolve) => setTimeout(resolve, 1000)) // delay 1 second
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -79,6 +79,9 @@ export default function (request) {
|
|
|
79
79
|
target: 'connecting',
|
|
80
80
|
actions: ['setGameInfo', 'setLang'],
|
|
81
81
|
},
|
|
82
|
+
UPDATE: {
|
|
83
|
+
target: 'updating',
|
|
84
|
+
},
|
|
82
85
|
},
|
|
83
86
|
},
|
|
84
87
|
batchFetching: {
|
|
@@ -118,6 +121,18 @@ export default function (request) {
|
|
|
118
121
|
{ target: 'idle' },
|
|
119
122
|
],
|
|
120
123
|
},
|
|
124
|
+
updating: {
|
|
125
|
+
invoke: {
|
|
126
|
+
src: 'updatePageContent',
|
|
127
|
+
onDone: {
|
|
128
|
+
target: 'idle',
|
|
129
|
+
actions: 'swapContent',
|
|
130
|
+
},
|
|
131
|
+
onError: {
|
|
132
|
+
target: 'idle',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
121
136
|
connecting: {
|
|
122
137
|
invoke: {
|
|
123
138
|
src: 'connectGame',
|
|
@@ -342,7 +357,7 @@ export default function (request) {
|
|
|
342
357
|
if (room.categoryId === GAME_SEARCH) {
|
|
343
358
|
return
|
|
344
359
|
} else if (additionEnable) {
|
|
345
|
-
const [content, addition] = event.data
|
|
360
|
+
const [content, addition = {}] = event.data
|
|
346
361
|
return {
|
|
347
362
|
content: {
|
|
348
363
|
...context.content,
|