@jetthai/cuora 1.1.355-dev-9 → 1.1.355-qa-1
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 +1 -19
- package/package.json +1 -1
- package/src/api/activity.js +2 -7
- package/src/machine/game_v2_1.js +4 -14
- package/src/machine/inbox.js +0 -4
- package/src/machine/ranking.js +8 -8
- package/src/machine/reward.js +1 -43
- package/src/machine/reward_cash.js +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -2,25 +2,7 @@
|
|
|
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.355-
|
|
6
|
-
|
|
7
|
-
### [1.1.355-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-7...v1.1.355-dev-8) (2025-05-05)
|
|
8
|
-
|
|
9
|
-
### [1.1.355-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-6...v1.1.355-dev-7) (2025-05-02)
|
|
10
|
-
|
|
11
|
-
### [1.1.355-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-5...v1.1.355-dev-6) (2025-04-29)
|
|
12
|
-
|
|
13
|
-
### [1.1.355-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-4...v1.1.355-dev-5) (2025-04-29)
|
|
14
|
-
|
|
15
|
-
### [1.1.356](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-2...v1.1.356) (2025-04-29)
|
|
16
|
-
|
|
17
|
-
### [1.1.355-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-2...v1.1.355-dev-4) (2025-04-29)
|
|
18
|
-
|
|
19
|
-
### [1.1.355-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-2...v1.1.355-dev-3) (2025-04-29)
|
|
20
|
-
|
|
21
|
-
### [1.1.355-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-dev-2) (2025-04-25)
|
|
22
|
-
|
|
23
|
-
### [1.1.355-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-dev-1) (2025-04-25)
|
|
5
|
+
### [1.1.355-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-qa-1) (2025-04-25)
|
|
24
6
|
|
|
25
7
|
### [1.1.355](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.355) (2025-04-22)
|
|
26
8
|
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -69,10 +69,10 @@ export default {
|
|
|
69
69
|
method: 'get',
|
|
70
70
|
params: { rewardType },
|
|
71
71
|
}),
|
|
72
|
-
getRewardList: ({ rewardType, count, appSecret
|
|
72
|
+
getRewardList: ({ rewardType, count, appSecret }) => ({
|
|
73
73
|
url: 'activities/rewards',
|
|
74
74
|
method: 'get',
|
|
75
|
-
params: { rewardType, count, appSecret
|
|
75
|
+
params: { rewardType, count, appSecret },
|
|
76
76
|
}),
|
|
77
77
|
getCashRainReward: ({ activityNo, appSecret }) => ({
|
|
78
78
|
url: `activities/cashRain`,
|
|
@@ -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/machine/game_v2_1.js
CHANGED
|
@@ -39,7 +39,6 @@ export default function (request) {
|
|
|
39
39
|
portrait: null,
|
|
40
40
|
gameCode: null,
|
|
41
41
|
name: null,
|
|
42
|
-
isDemo: false,
|
|
43
42
|
},
|
|
44
43
|
walletType: null,
|
|
45
44
|
lang: 'en_US',
|
|
@@ -89,10 +88,6 @@ export default function (request) {
|
|
|
89
88
|
target: 'demoGame',
|
|
90
89
|
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
91
90
|
},
|
|
92
|
-
DEMO_GAME: {
|
|
93
|
-
target: 'demoGame',
|
|
94
|
-
actions: ['setGameInfo', 'setLang', 'setSite'],
|
|
95
|
-
},
|
|
96
91
|
MENU_ENTER_GAME: {
|
|
97
92
|
target: 'connecting',
|
|
98
93
|
actions: ['setGameInfo', 'setLang'],
|
|
@@ -237,15 +232,12 @@ export default function (request) {
|
|
|
237
232
|
},
|
|
238
233
|
playingDemo: {
|
|
239
234
|
on: {
|
|
240
|
-
EXIT_GAME: {
|
|
241
|
-
target: 'disconnect',
|
|
242
|
-
},
|
|
243
235
|
EXIT_DEMO_GAME: {
|
|
244
236
|
target: 'idle',
|
|
245
237
|
},
|
|
246
238
|
ENTER_GAME: {
|
|
247
239
|
target: 'connecting',
|
|
248
|
-
actions: ['setGameInfo', 'setLang', '
|
|
240
|
+
actions: ['setGameInfo', 'setLang', 'setWalletMode'],
|
|
249
241
|
},
|
|
250
242
|
},
|
|
251
243
|
},
|
|
@@ -619,7 +611,7 @@ export default function (request) {
|
|
|
619
611
|
return { type, gameToken, gameHtml, gameURL: redirect_url, gameWalletType: wallet_type }
|
|
620
612
|
},
|
|
621
613
|
demoGame: async (context, event) => {
|
|
622
|
-
const { lang, site, isMobile
|
|
614
|
+
const { lang, site, isMobile } = context
|
|
623
615
|
const { providerId, gameId, gameTypeId, mappingId } = context.game
|
|
624
616
|
const params = {
|
|
625
617
|
site,
|
|
@@ -630,10 +622,8 @@ export default function (request) {
|
|
|
630
622
|
is_mobile: isMobile === 'mobile' ? 'y' : null,
|
|
631
623
|
lang,
|
|
632
624
|
}
|
|
633
|
-
const { type, redirect_url, gameToken, gameHtml
|
|
634
|
-
|
|
635
|
-
game.isDemo = is_demo
|
|
636
|
-
return { type, gameToken, gameHtml, gameURL: redirect_url, game }
|
|
625
|
+
const { type, redirect_url, gameToken, gameHtml } = await request.send(api.demoGame(params))
|
|
626
|
+
return { type, gameToken, gameHtml, gameURL: redirect_url }
|
|
637
627
|
},
|
|
638
628
|
disconnectGame: async (context, event) => {
|
|
639
629
|
const uid_site = event.data
|
package/src/machine/inbox.js
CHANGED
|
@@ -154,9 +154,6 @@ export default function (request) {
|
|
|
154
154
|
LOAD_MESSAGES: {
|
|
155
155
|
target: 'checking',
|
|
156
156
|
},
|
|
157
|
-
RESET_MESSAGES: {
|
|
158
|
-
target: 'reloadMessages',
|
|
159
|
-
},
|
|
160
157
|
},
|
|
161
158
|
},
|
|
162
159
|
inquiring: {
|
|
@@ -285,7 +282,6 @@ export default function (request) {
|
|
|
285
282
|
}
|
|
286
283
|
}),
|
|
287
284
|
resetPage: assign((context, event) => {
|
|
288
|
-
console.log('updateMessage resetPage')
|
|
289
285
|
const { inbox, currentTab } = JSON.parse(JSON.stringify(context))
|
|
290
286
|
inbox[currentTab].page = -1
|
|
291
287
|
return {
|
package/src/machine/ranking.js
CHANGED
|
@@ -4,10 +4,10 @@ import ranking from '../api/ranking.js'
|
|
|
4
4
|
export default function (request) {
|
|
5
5
|
const cycleMapping = ['DAILY', 'WEEKLY', 'MONTHLY']
|
|
6
6
|
|
|
7
|
-
function roundProcess(rounds
|
|
7
|
+
function roundProcess(rounds) {
|
|
8
8
|
const roundArrays = rounds.map((round) => Array.from({ length: round }, (_, i) => i + 1))
|
|
9
9
|
return roundArrays.reduce((acc, roundArray, index) => {
|
|
10
|
-
acc[
|
|
10
|
+
acc[cycleMapping[index]] = roundArray.reverse()
|
|
11
11
|
return acc
|
|
12
12
|
}, {})
|
|
13
13
|
}
|
|
@@ -151,14 +151,14 @@ export default function (request) {
|
|
|
151
151
|
}
|
|
152
152
|
}),
|
|
153
153
|
setRankingOptions: assign((context, event) => {
|
|
154
|
-
const isChampion = event.data?.rule === 'CHAMPION'
|
|
155
154
|
const cycle = event.data?.cycle
|
|
156
155
|
const currentRound = event.data?.currentRound || []
|
|
157
156
|
// 取得結算週期選單列表
|
|
158
|
-
const cycleOptions =
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
157
|
+
const cycleOptions = cycleMapping.slice(0, currentRound.length)
|
|
158
|
+
// 取得每週期的歷史期數選單列表
|
|
159
|
+
const roundOptions = roundProcess(currentRound)
|
|
160
|
+
// 如果是月結算,則加入全部選項
|
|
161
|
+
if (cycle === 'MONTHLY') {
|
|
162
162
|
cycleOptions.push('ALL')
|
|
163
163
|
roundOptions.ALL = roundOptions.MONTHLY
|
|
164
164
|
}
|
|
@@ -166,7 +166,7 @@ export default function (request) {
|
|
|
166
166
|
...event.data,
|
|
167
167
|
options: { cycle: cycleOptions, round: roundOptions },
|
|
168
168
|
// 初始固定顯示 DAILY
|
|
169
|
-
cycle:
|
|
169
|
+
cycle: event.data?.rule !== 'NORMAL' ? 'DAILY' : cycle,
|
|
170
170
|
round: currentRound[0],
|
|
171
171
|
}
|
|
172
172
|
}),
|
package/src/machine/reward.js
CHANGED
|
@@ -18,7 +18,6 @@ export default function (request) {
|
|
|
18
18
|
rewardType: null,
|
|
19
19
|
isPlaying: false,
|
|
20
20
|
callback: () => {},
|
|
21
|
-
orderColumn: 'createTime',
|
|
22
21
|
},
|
|
23
22
|
states: {
|
|
24
23
|
timer: {
|
|
@@ -57,10 +56,6 @@ export default function (request) {
|
|
|
57
56
|
target: 'fetching',
|
|
58
57
|
actions: 'setRewardData',
|
|
59
58
|
},
|
|
60
|
-
FETCH_OTHER_REWARD: {
|
|
61
|
-
target: 'fetchingOtherReward',
|
|
62
|
-
actions: 'setOrderColumn',
|
|
63
|
-
},
|
|
64
59
|
RECEIVE_REWARD: {
|
|
65
60
|
target: 'receiving',
|
|
66
61
|
actions: ['setCallback', 'setRewardType'],
|
|
@@ -86,18 +81,6 @@ export default function (request) {
|
|
|
86
81
|
},
|
|
87
82
|
},
|
|
88
83
|
},
|
|
89
|
-
fetchingOtherReward: {
|
|
90
|
-
invoke: {
|
|
91
|
-
src: 'fetchOtherRewardList',
|
|
92
|
-
onDone: {
|
|
93
|
-
target: 'idle',
|
|
94
|
-
actions: 'setOtherRewardList',
|
|
95
|
-
},
|
|
96
|
-
onError: {
|
|
97
|
-
target: 'idle',
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
84
|
pending: {
|
|
102
85
|
on: {
|
|
103
86
|
RECEIVE_REWARD: {
|
|
@@ -153,11 +136,6 @@ export default function (request) {
|
|
|
153
136
|
rewardList: event.data[2]?.data || [],
|
|
154
137
|
}
|
|
155
138
|
}),
|
|
156
|
-
setOtherRewardList: assign((context, event) => {
|
|
157
|
-
return {
|
|
158
|
-
otherRewardList: event.data[0]?.data,
|
|
159
|
-
}
|
|
160
|
-
}),
|
|
161
139
|
setRewardData: assign((context, event) => {
|
|
162
140
|
const { activityNo, receiveNo } = event.data
|
|
163
141
|
return {
|
|
@@ -170,11 +148,6 @@ export default function (request) {
|
|
|
170
148
|
callback: event.data?.callback || (() => {}),
|
|
171
149
|
}
|
|
172
150
|
}),
|
|
173
|
-
setOrderColumn: assign((context, event) => {
|
|
174
|
-
return {
|
|
175
|
-
orderColumn: event.data?.orderColumn || 'createTime',
|
|
176
|
-
}
|
|
177
|
-
}),
|
|
178
151
|
setRewardType: assign((context, event) => {
|
|
179
152
|
return {
|
|
180
153
|
rewardType: event.data?.rewardType,
|
|
@@ -205,27 +178,12 @@ export default function (request) {
|
|
|
205
178
|
},
|
|
206
179
|
services: {
|
|
207
180
|
fetchRewardList: async (context, event) => {
|
|
208
|
-
const orderColumn = context.orderColumn
|
|
209
181
|
const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
|
|
210
182
|
const getPointsRewardAPI = request.send(activity.getRewardList({ rewardType: 'POINTS', count: 30, appSecret }))
|
|
211
|
-
const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret
|
|
183
|
+
const getOtherRewardAPI = request.send(activity.getRewardList({ rewardType: 'CASH,FREE,PRIZE', count: 30, appSecret }))
|
|
212
184
|
const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
|
|
213
185
|
return [otherRewardList, pointsRewardList, rewardList]
|
|
214
186
|
},
|
|
215
|
-
fetchOtherRewardList: async (context, event) => {
|
|
216
|
-
const orderColumn = context.orderColumn
|
|
217
|
-
|
|
218
|
-
const getOtherRewardAPI = request.send(
|
|
219
|
-
activity.getRewardList({
|
|
220
|
-
rewardType: 'CASH,FREE,PRIZE',
|
|
221
|
-
count: 30,
|
|
222
|
-
appSecret,
|
|
223
|
-
orderColumn,
|
|
224
|
-
})
|
|
225
|
-
)
|
|
226
|
-
const [otherRewardList] = await Promise.all([getOtherRewardAPI])
|
|
227
|
-
return [otherRewardList]
|
|
228
|
-
},
|
|
229
187
|
fetchWithdrawRulePreview: async (context, event) => {
|
|
230
188
|
const { receiveNo } = context
|
|
231
189
|
const data = await request.send(payment.getWithdrawRulePreview({ applyType: 'activity', applyNo: receiveNo, amount: null }))
|
|
@@ -17,7 +17,6 @@ export default function (request) {
|
|
|
17
17
|
receiveNo: null,
|
|
18
18
|
withdrawRule: {},
|
|
19
19
|
callback: () => {},
|
|
20
|
-
orderColumn: 'createTime',
|
|
21
20
|
},
|
|
22
21
|
states: {
|
|
23
22
|
timer: {
|
|
@@ -66,10 +65,6 @@ export default function (request) {
|
|
|
66
65
|
target: 'fetching',
|
|
67
66
|
actions: 'setRewardData',
|
|
68
67
|
},
|
|
69
|
-
FETCH_OTHER_REWARD: {
|
|
70
|
-
target: 'fetchingOtherReward',
|
|
71
|
-
actions: 'setOrderColumn',
|
|
72
|
-
},
|
|
73
68
|
RECEIVE_REWARD: {
|
|
74
69
|
target: 'receiving',
|
|
75
70
|
actions: 'setCallback',
|
|
@@ -92,18 +87,6 @@ export default function (request) {
|
|
|
92
87
|
},
|
|
93
88
|
},
|
|
94
89
|
},
|
|
95
|
-
fetchingOtherReward: {
|
|
96
|
-
invoke: {
|
|
97
|
-
src: 'fetchOtherRewardList',
|
|
98
|
-
onDone: {
|
|
99
|
-
target: 'idle',
|
|
100
|
-
actions: 'setOtherRewardList',
|
|
101
|
-
},
|
|
102
|
-
onError: {
|
|
103
|
-
target: 'idle',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
90
|
pending: {
|
|
108
91
|
on: {
|
|
109
92
|
RECEIVE_REWARD: {
|
|
@@ -171,11 +154,6 @@ export default function (request) {
|
|
|
171
154
|
rewardList: event.data[2]?.data || [],
|
|
172
155
|
}
|
|
173
156
|
}),
|
|
174
|
-
setOtherRewardList: assign((context, event) => {
|
|
175
|
-
return {
|
|
176
|
-
otherRewardList: event.data[0]?.data,
|
|
177
|
-
}
|
|
178
|
-
}),
|
|
179
157
|
setRewardData: assign((context, event) => {
|
|
180
158
|
const { activityNo, receiveNo } = event.data
|
|
181
159
|
return {
|
|
@@ -188,11 +166,6 @@ export default function (request) {
|
|
|
188
166
|
callback: event.data?.callback || (() => {}),
|
|
189
167
|
}
|
|
190
168
|
}),
|
|
191
|
-
setOrderColumn: assign((context, event) => {
|
|
192
|
-
return {
|
|
193
|
-
orderColumn: event.data?.orderColumn || 'createTime',
|
|
194
|
-
}
|
|
195
|
-
}),
|
|
196
169
|
doCallback: (context, event) => {
|
|
197
170
|
context.callback()
|
|
198
171
|
},
|
|
@@ -205,7 +178,6 @@ export default function (request) {
|
|
|
205
178
|
services: {
|
|
206
179
|
fetchRewardList: async (context, event) => {
|
|
207
180
|
const getRewardAPI = request.send(activity.getRewardList({ count: 30, appSecret }))
|
|
208
|
-
const orderColumn = context.orderColumn
|
|
209
181
|
const getPointsRewardAPI = request.send(
|
|
210
182
|
activity.getRewardList({
|
|
211
183
|
rewardType: 'POINTS',
|
|
@@ -218,26 +190,11 @@ export default function (request) {
|
|
|
218
190
|
rewardType: 'CASH,FREE,PRIZE',
|
|
219
191
|
count: 30,
|
|
220
192
|
appSecret,
|
|
221
|
-
orderColumn,
|
|
222
193
|
})
|
|
223
194
|
)
|
|
224
195
|
const [otherRewardList, pointsRewardList, rewardList] = await Promise.all([getOtherRewardAPI, getPointsRewardAPI, getRewardAPI])
|
|
225
196
|
return [otherRewardList, pointsRewardList, rewardList]
|
|
226
197
|
},
|
|
227
|
-
fetchOtherRewardList: async (context, event) => {
|
|
228
|
-
const orderColumn = context.orderColumn
|
|
229
|
-
|
|
230
|
-
const getOtherRewardAPI = request.send(
|
|
231
|
-
activity.getRewardList({
|
|
232
|
-
rewardType: 'CASH,FREE,PRIZE',
|
|
233
|
-
count: 30,
|
|
234
|
-
appSecret,
|
|
235
|
-
orderColumn,
|
|
236
|
-
})
|
|
237
|
-
)
|
|
238
|
-
const [otherRewardList] = await Promise.all([getOtherRewardAPI])
|
|
239
|
-
return [otherRewardList]
|
|
240
|
-
},
|
|
241
198
|
fetchWithdrawRulePreview: async (context, event) => {
|
|
242
199
|
const { receiveNo } = context
|
|
243
200
|
const data = await request.send(
|