@jetthai/cuora 1.1.325 → 1.1.327
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 +2 -20
- package/package.json +1 -1
- package/src/api/activity.js +0 -5
- package/src/api/game.js +0 -1
- package/src/api/user.js +0 -1
- package/src/machine/activity/friend_invite_friends_activity.js +0 -69
- package/src/machine/activity/instant_rebate_activity.js +0 -9
- package/src/machine/common.js +2 -1
- package/src/machine/game_replay.js +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -2,27 +2,9 @@
|
|
|
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.
|
|
5
|
+
### [1.1.327](https://github.com/jetthai/cuora-module/compare/v1.1.326...v1.1.327) (2024-12-04)
|
|
6
6
|
|
|
7
|
-
### [1.1.
|
|
8
|
-
|
|
9
|
-
### [1.1.320-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-3...v1.1.320-dev-4) (2024-12-02)
|
|
10
|
-
|
|
11
|
-
### [1.1.320-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-2...v1.1.320-dev-3) (2024-12-02)
|
|
12
|
-
|
|
13
|
-
### [1.1.320-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-1...v1.1.320-dev-2) (2024-11-29)
|
|
14
|
-
|
|
15
|
-
### [1.1.320-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.320-dev-1) (2024-11-29)
|
|
16
|
-
|
|
17
|
-
### [1.1.320-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-4...v1.1.320-dev-5) (2024-12-02)
|
|
18
|
-
|
|
19
|
-
### [1.1.320-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-3...v1.1.320-dev-4) (2024-12-02)
|
|
20
|
-
|
|
21
|
-
### [1.1.320-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-2...v1.1.320-dev-3) (2024-12-02)
|
|
22
|
-
|
|
23
|
-
### [1.1.320-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.320-dev-1...v1.1.320-dev-2) (2024-11-29)
|
|
24
|
-
|
|
25
|
-
### [1.1.320-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.320...v1.1.320-dev-1) (2024-11-29)
|
|
7
|
+
### [1.1.326](https://github.com/jetthai/cuora-module/compare/v1.1.324...v1.1.326) (2024-12-04)
|
|
26
8
|
|
|
27
9
|
### [1.1.324](https://github.com/jetthai/cuora-module/compare/v1.1.323...v1.1.324) (2024-12-04)
|
|
28
10
|
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -102,9 +102,4 @@ export default {
|
|
|
102
102
|
getInstantRebateCollectTime: () => ({ url: 'activities/rebate/collectTime', method: 'get' }),
|
|
103
103
|
instantRebateEstimate: () => ({ url: 'activities/rebate/estimate', method: 'get' }),
|
|
104
104
|
instantRebateCollect: () => ({ url: 'activities/rebate/collect', method: 'get' }),
|
|
105
|
-
instantRebateHistory: ({ startDate, endDate, appSecret }) => ({
|
|
106
|
-
url: 'activities/rebate/history',
|
|
107
|
-
method: 'post',
|
|
108
|
-
params: { startDate, endDate, appSecret },
|
|
109
|
-
}),
|
|
110
105
|
}
|
package/src/api/game.js
CHANGED
|
@@ -92,5 +92,4 @@ export default {
|
|
|
92
92
|
addListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/addMyFavorite', params: { games: [code] } }),
|
|
93
93
|
removeListFavorite: (code) => ({ method: 'post', url: 'game/list/v3/removeMyFavorite', params: { games: [code] } }),
|
|
94
94
|
getGameInfo: ({ appSecret, gameCode }) => ({ method: 'get', url: 'game/info', params: { appSecret, gameCode } }),
|
|
95
|
-
getGameReplayInfo: () => ({ method: 'post', url: 'game/history/detail' }),
|
|
96
95
|
}
|
package/src/api/user.js
CHANGED
|
@@ -18,7 +18,6 @@ export default {
|
|
|
18
18
|
getFriendsHome: () => ({ url: 'friends/home', method: 'get' }),
|
|
19
19
|
getFriendsDashboard: () => ({ url: 'friends/dashboard', method: 'get' }),
|
|
20
20
|
getFriendsDashboardList: ({ level, page, row }) => ({ url: 'friends/dashboard/list', method: 'post', params: { level, page, row } }),
|
|
21
|
-
getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
|
|
22
21
|
postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
|
|
23
22
|
passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
|
|
24
23
|
passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
|
|
@@ -18,16 +18,11 @@ export default function (request) {
|
|
|
18
18
|
commission: 0,
|
|
19
19
|
downLine: 0,
|
|
20
20
|
activeDownLine: 0,
|
|
21
|
-
allDownLineCounts: 0,
|
|
22
|
-
receivedCounts: 0,
|
|
23
21
|
levelTable: [],
|
|
24
22
|
pastTable: [],
|
|
25
23
|
levelDownLine: {},
|
|
26
|
-
friendsList: {},
|
|
27
24
|
currentLevel: 1,
|
|
28
|
-
currentType: 'ALL',
|
|
29
25
|
page: 1,
|
|
30
|
-
listPage: 1,
|
|
31
26
|
},
|
|
32
27
|
initial: 'fetching1',
|
|
33
28
|
states: {
|
|
@@ -68,20 +63,11 @@ export default function (request) {
|
|
|
68
63
|
target: 'fetchingList',
|
|
69
64
|
actions: ['setLevelSearch', 'reset'],
|
|
70
65
|
},
|
|
71
|
-
SELECT_TYPE: {
|
|
72
|
-
target: 'fetchingFriendsList',
|
|
73
|
-
actions: ['setTypeSearch', 'resetList'],
|
|
74
|
-
},
|
|
75
66
|
LOAD_DATA: {
|
|
76
67
|
target: 'fetchingList',
|
|
77
68
|
actions: 'setPage',
|
|
78
69
|
cond: 'isNotEnd',
|
|
79
70
|
},
|
|
80
|
-
LOAD_LIST_DATA: {
|
|
81
|
-
target: 'fetchingFriendsList',
|
|
82
|
-
actions: 'setListPage',
|
|
83
|
-
cond: 'isListNotEnd',
|
|
84
|
-
},
|
|
85
71
|
},
|
|
86
72
|
},
|
|
87
73
|
binding: {
|
|
@@ -125,18 +111,6 @@ export default function (request) {
|
|
|
125
111
|
},
|
|
126
112
|
},
|
|
127
113
|
},
|
|
128
|
-
fetchingFriendsList: {
|
|
129
|
-
invoke: {
|
|
130
|
-
src: 'fetchFriendsList',
|
|
131
|
-
onDone: {
|
|
132
|
-
target: 'idle',
|
|
133
|
-
actions: 'setFriendsList',
|
|
134
|
-
},
|
|
135
|
-
onError: {
|
|
136
|
-
target: 'idle',
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
},
|
|
140
114
|
fail: {},
|
|
141
115
|
},
|
|
142
116
|
},
|
|
@@ -181,56 +155,28 @@ export default function (request) {
|
|
|
181
155
|
currentLevel: level,
|
|
182
156
|
}
|
|
183
157
|
}),
|
|
184
|
-
setTypeSearch: assign((context, event) => {
|
|
185
|
-
const { type } = event.data
|
|
186
|
-
return {
|
|
187
|
-
currentType: type,
|
|
188
|
-
}
|
|
189
|
-
}),
|
|
190
158
|
reset: assign((context, event) => {
|
|
191
159
|
return {
|
|
192
160
|
page: 1,
|
|
193
161
|
levelDownLine: {},
|
|
194
162
|
}
|
|
195
163
|
}),
|
|
196
|
-
resetList: assign((context, event) => {
|
|
197
|
-
return {
|
|
198
|
-
listPage: 1,
|
|
199
|
-
friendsList: {},
|
|
200
|
-
}
|
|
201
|
-
}),
|
|
202
164
|
setPage: assign((context, event) => {
|
|
203
165
|
return {
|
|
204
166
|
page: context.page + 1,
|
|
205
167
|
}
|
|
206
168
|
}),
|
|
207
|
-
setListPage: assign((context, event) => {
|
|
208
|
-
return {
|
|
209
|
-
listPage: context.listPage + 1,
|
|
210
|
-
}
|
|
211
|
-
}),
|
|
212
169
|
setLevelDownLineList: assign((context, event) => {
|
|
213
170
|
return {
|
|
214
171
|
levelDownLine: event.data,
|
|
215
172
|
}
|
|
216
173
|
}),
|
|
217
|
-
setFriendsList: assign((context, event) => {
|
|
218
|
-
return {
|
|
219
|
-
friendsList: event.data,
|
|
220
|
-
receivedCounts: event.data?.rewardsDetail?.receivedCounts || 0,
|
|
221
|
-
allDownLineCounts: event.data?.rewardsDetail?.allDownLineCounts || 0,
|
|
222
|
-
}
|
|
223
|
-
}),
|
|
224
174
|
},
|
|
225
175
|
guards: {
|
|
226
176
|
isNotEnd: (context, event) => {
|
|
227
177
|
const { page } = context.levelDownLine
|
|
228
178
|
return page.current < page.total
|
|
229
179
|
},
|
|
230
|
-
isListNotEnd: (context, event) => {
|
|
231
|
-
const { page } = context.friendsList
|
|
232
|
-
return page.current < page.total
|
|
233
|
-
},
|
|
234
180
|
isFriendsEnable: (context, event) => context.friendsEnable,
|
|
235
181
|
},
|
|
236
182
|
services: {
|
|
@@ -266,21 +212,6 @@ export default function (request) {
|
|
|
266
212
|
return resopnseData
|
|
267
213
|
}
|
|
268
214
|
},
|
|
269
|
-
fetchFriendsList: async (context, event) => {
|
|
270
|
-
const { currentType, listPage, friendsList } = context
|
|
271
|
-
const copiedObj = JSON.parse(JSON.stringify(friendsList))
|
|
272
|
-
const copiedList = copiedObj.data
|
|
273
|
-
const resopnseData = await request.send(user.getFriendsList({ type: currentType, page: listPage, row: 10 }))
|
|
274
|
-
if (!!copiedList && !!resopnseData?.data?.list) {
|
|
275
|
-
const combindData = {
|
|
276
|
-
...resopnseData.data,
|
|
277
|
-
list: [...copiedList, ...resopnseData?.data?.list],
|
|
278
|
-
}
|
|
279
|
-
return combindData
|
|
280
|
-
} else {
|
|
281
|
-
return resopnseData?.data
|
|
282
|
-
}
|
|
283
|
-
},
|
|
284
215
|
},
|
|
285
216
|
}
|
|
286
217
|
)
|
|
@@ -6,7 +6,6 @@ export default function (request) {
|
|
|
6
6
|
{
|
|
7
7
|
id: 'instant_rebate_activity',
|
|
8
8
|
context: {
|
|
9
|
-
rebateCycle: null,
|
|
10
9
|
showColletButton: false,
|
|
11
10
|
estimateStartTime: null,
|
|
12
11
|
estimateEndTime: null,
|
|
@@ -14,9 +13,7 @@ export default function (request) {
|
|
|
14
13
|
lastEstimateTime: null,
|
|
15
14
|
collectAvailable: false,
|
|
16
15
|
cumulativeValidTurnover: null,
|
|
17
|
-
weekCumulativeValidTurnover: null,
|
|
18
16
|
cumulativeRebateAmount: null,
|
|
19
|
-
weekCumulativeRebateAmount: null,
|
|
20
17
|
actualRebateAmount: null,
|
|
21
18
|
rewardType: null,
|
|
22
19
|
singleMinimumAmountReceive: null,
|
|
@@ -114,16 +111,13 @@ export default function (request) {
|
|
|
114
111
|
}),
|
|
115
112
|
setEstimateResult: assign((context, event) => {
|
|
116
113
|
const {
|
|
117
|
-
rebateCycle = null,
|
|
118
114
|
showColletButton = false,
|
|
119
115
|
estimateStartTime = 0,
|
|
120
116
|
estimateEndTime = 0,
|
|
121
117
|
lastCollectTime = 0,
|
|
122
118
|
collectAvailable = false,
|
|
123
119
|
cumulativeValidTurnover = '0',
|
|
124
|
-
weekCumulativeValidTurnover = '0',
|
|
125
120
|
cumulativeRebateAmount = '0',
|
|
126
|
-
weekCumulativeRebateAmount = '0',
|
|
127
121
|
actualRebateAmount = '0',
|
|
128
122
|
rewardType = null,
|
|
129
123
|
singleMinimumAmountReceive = 0,
|
|
@@ -133,16 +127,13 @@ export default function (request) {
|
|
|
133
127
|
} = event.data
|
|
134
128
|
|
|
135
129
|
return {
|
|
136
|
-
rebateCycle,
|
|
137
130
|
showColletButton,
|
|
138
131
|
estimateStartTime,
|
|
139
132
|
estimateEndTime,
|
|
140
133
|
lastCollectTime,
|
|
141
134
|
collectAvailable,
|
|
142
135
|
cumulativeValidTurnover,
|
|
143
|
-
weekCumulativeValidTurnover,
|
|
144
136
|
cumulativeRebateAmount,
|
|
145
|
-
weekCumulativeRebateAmount,
|
|
146
137
|
actualRebateAmount,
|
|
147
138
|
rewardType,
|
|
148
139
|
singleMinimumAmountReceive,
|
package/src/machine/common.js
CHANGED
|
@@ -309,7 +309,8 @@ export default function (request) {
|
|
|
309
309
|
guards: {
|
|
310
310
|
isAffiliateCodeInstructionsEnable: (context, event) => {
|
|
311
311
|
const { siteConfig } = event.data
|
|
312
|
-
|
|
312
|
+
const { registerBindingAffiliateCodeInstructionsEnable } = siteConfig || {}
|
|
313
|
+
return registerBindingAffiliateCodeInstructionsEnable ? JSON.parse(registerBindingAffiliateCodeInstructionsEnable) : false
|
|
313
314
|
},
|
|
314
315
|
},
|
|
315
316
|
services: {
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { assign, createMachine } from 'xstate'
|
|
2
|
-
import game from '../api/game.js'
|
|
3
|
-
|
|
4
|
-
export default function (request, context) {
|
|
5
|
-
// const { appSecret } = request.config
|
|
6
|
-
// const { gameCode } = context
|
|
7
|
-
return createMachine(
|
|
8
|
-
{
|
|
9
|
-
id: 'game_replay',
|
|
10
|
-
initial: 'fetching',
|
|
11
|
-
context: {
|
|
12
|
-
gameReplayInfo: {},
|
|
13
|
-
},
|
|
14
|
-
states: {
|
|
15
|
-
fetching: {
|
|
16
|
-
invoke: {
|
|
17
|
-
src: 'fetchGameReplayInfo',
|
|
18
|
-
onDone: {
|
|
19
|
-
target: 'idle',
|
|
20
|
-
actions: 'setGameReplayInfo',
|
|
21
|
-
},
|
|
22
|
-
onError: {
|
|
23
|
-
target: 'idle',
|
|
24
|
-
},
|
|
25
|
-
},
|
|
26
|
-
},
|
|
27
|
-
idle: {},
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
actions: {
|
|
32
|
-
setGameReplayInfo: assign((context, event) => {
|
|
33
|
-
return {
|
|
34
|
-
gameReplayInfo: event.data.data,
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
},
|
|
38
|
-
services: {
|
|
39
|
-
// 取得遊戲重播資訊
|
|
40
|
-
fetchGameReplayInfo: async (context, event) => {
|
|
41
|
-
return await request.send(game.getGameReplayInfo())
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
}
|
|
45
|
-
)
|
|
46
|
-
}
|