@jetthai/cuora 1.1.291-dev-1 → 1.1.291
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.291-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.291...v1.1.291-dev-1) (2024-08-07)
|
|
6
|
-
|
|
7
5
|
### [1.1.291](https://github.com/jetthai/cuora-module/compare/v1.1.290-fingerprint...v1.1.291) (2024-08-02)
|
|
8
6
|
|
|
9
7
|
### [1.1.290-fingerprint](https://github.com/jetthai/cuora-module/compare/v1.1.290...v1.1.290-fingerprint) (2024-08-01)
|
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',
|
|
@@ -7,7 +7,6 @@ import diamond_shop_activity_vn from './diamond_shop_activity_vn.js'
|
|
|
7
7
|
import diamond_shop_activity_cash from './diamond_shop_activity_cash.js'
|
|
8
8
|
import fafafa_activity from './fafafa_activity.js'
|
|
9
9
|
import invite_friends_activity from './invite_friends_activity.js'
|
|
10
|
-
import jackpot from './jackpot.js'
|
|
11
10
|
import friend_invite_friends_activity from './friend_invite_friends_activity.js'
|
|
12
11
|
import ranking_activity from './ranking_activity.js'
|
|
13
12
|
import return_bonus_activity from './return_bonus_activity.js'
|
|
@@ -33,7 +32,6 @@ export default {
|
|
|
33
32
|
diamond_shop_activity_cash,
|
|
34
33
|
fafafa_activity,
|
|
35
34
|
invite_friends_activity,
|
|
36
|
-
jackpot,
|
|
37
35
|
friend_invite_friends_activity,
|
|
38
36
|
ranking_activity,
|
|
39
37
|
return_bonus_activity,
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -79,9 +79,6 @@ export default function (request) {
|
|
|
79
79
|
target: 'connecting',
|
|
80
80
|
actions: ['setGameInfo', 'setLang'],
|
|
81
81
|
},
|
|
82
|
-
UPDATE: {
|
|
83
|
-
target: 'updating',
|
|
84
|
-
},
|
|
85
82
|
},
|
|
86
83
|
},
|
|
87
84
|
batchFetching: {
|
|
@@ -121,18 +118,6 @@ export default function (request) {
|
|
|
121
118
|
{ target: 'idle' },
|
|
122
119
|
],
|
|
123
120
|
},
|
|
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
121
|
connecting: {
|
|
137
122
|
invoke: {
|
|
138
123
|
src: 'connectGame',
|
|
@@ -357,7 +342,7 @@ export default function (request) {
|
|
|
357
342
|
if (room.categoryId === GAME_SEARCH) {
|
|
358
343
|
return
|
|
359
344
|
} else if (additionEnable) {
|
|
360
|
-
const [content, addition
|
|
345
|
+
const [content, addition] = event.data
|
|
361
346
|
return {
|
|
362
347
|
content: {
|
|
363
348
|
...context.content,
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { createMachine, assign } from 'xstate'
|
|
2
|
-
import activity from '../../api/activity.js'
|
|
3
|
-
|
|
4
|
-
export default function (request) {
|
|
5
|
-
const { appSecret } = request.config
|
|
6
|
-
return createMachine(
|
|
7
|
-
{
|
|
8
|
-
id: 'jackpot',
|
|
9
|
-
initial: 'pending',
|
|
10
|
-
context: {
|
|
11
|
-
tick: 6000,
|
|
12
|
-
jackpotList: [],
|
|
13
|
-
jackpotEnable: false,
|
|
14
|
-
},
|
|
15
|
-
states: {
|
|
16
|
-
fetchingList: {
|
|
17
|
-
invoke: {
|
|
18
|
-
src: 'fetchList',
|
|
19
|
-
onDone: {
|
|
20
|
-
target: 'pending',
|
|
21
|
-
actions: ['setJackpotList'],
|
|
22
|
-
},
|
|
23
|
-
onError: {
|
|
24
|
-
target: 'pending',
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
pending: {
|
|
29
|
-
after: {
|
|
30
|
-
TIMEOUT: {
|
|
31
|
-
target: 'fetchingList',
|
|
32
|
-
},
|
|
33
|
-
},
|
|
34
|
-
on: {
|
|
35
|
-
SET_JACKPOT_ENABLE: {
|
|
36
|
-
actions: 'setJackpotEnable',
|
|
37
|
-
target: 'fetchingList',
|
|
38
|
-
},
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
actions: {
|
|
45
|
-
setJackpotList: assign((context, event) => {
|
|
46
|
-
const { jackpotList } = event.data
|
|
47
|
-
return {
|
|
48
|
-
jackpotList,
|
|
49
|
-
}
|
|
50
|
-
}),
|
|
51
|
-
setJackpotEnable: assign((context, event) => {
|
|
52
|
-
return {
|
|
53
|
-
jackpotEnable: event.data,
|
|
54
|
-
}
|
|
55
|
-
}),
|
|
56
|
-
},
|
|
57
|
-
delays: {
|
|
58
|
-
TIMEOUT: (context, event) => {
|
|
59
|
-
const { tick } = context
|
|
60
|
-
return tick * 10
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
services: {
|
|
64
|
-
fetchList: async (context, event) => {
|
|
65
|
-
const { jackpotEnable } = context
|
|
66
|
-
|
|
67
|
-
const [jackpotList] = await Promise.all([jackpotEnable ? request.send(activity.getJackpotList({ appSecret })) : { data: [] }])
|
|
68
|
-
|
|
69
|
-
return { jackpotList: jackpotList.data }
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
}
|
|
73
|
-
)
|
|
74
|
-
}
|