@jetthai/cuora 1.1.358-dev-6 → 1.1.358

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,18 +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.358-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.358-dev-5...v1.1.358-dev-6) (2025-05-20)
6
-
7
- ### [1.1.358-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.358-dev-4...v1.1.358-dev-5) (2025-05-16)
8
-
9
- ### [1.1.358-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.358-dev-3...v1.1.358-dev-4) (2025-05-16)
10
-
11
- ### [1.1.358-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.358-dev-2...v1.1.358-dev-3) (2025-05-15)
12
-
13
- ### [1.1.358-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.358-dev-1...v1.1.358-dev-2) (2025-05-12)
14
-
15
- ### [1.1.358-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.358-dev-1) (2025-05-09)
16
-
17
5
  ### [1.1.358](https://github.com/jetthai/cuora-module/compare/v1.1.357...v1.1.358) (2025-05-09)
18
6
 
19
7
  ### [1.1.357](https://github.com/jetthai/cuora-module/compare/v1.1.356...v1.1.357) (2025-05-06)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.358-dev-6",
3
+ "version": "1.1.358",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -69,10 +69,10 @@ export default {
69
69
  method: 'get',
70
70
  params: { rewardType },
71
71
  }),
72
- getRewardList: ({ rewardType, count, appSecret, orderColumn }) => ({
72
+ getRewardList: ({ rewardType, count, appSecret }) => ({
73
73
  url: 'activities/rewards',
74
74
  method: 'get',
75
- params: { rewardType, count, appSecret, orderColumn },
75
+ params: { rewardType, count, appSecret },
76
76
  }),
77
77
  getCashRainReward: ({ activityNo, appSecret }) => ({
78
78
  url: `activities/cashRain`,
package/src/api/game.js CHANGED
@@ -7,7 +7,7 @@ export default {
7
7
  demoGame: (params) => ({ url: 'game/demo', method: 'get', params, isPublic: true }),
8
8
  logoutGame: ({ uid_site, provider_id }) => ({ url: 'game/logout', method: 'get', params: { uid_site, provider_id } }),
9
9
 
10
- getGameTags: ({ q, lang, limit = 20 }) => ({ url: 'game/search', method: 'get', params: { q, lang, limit } }),
10
+ getGameTags: ({ q, lang }) => ({ url: 'game/search', method: 'get', params: { q, lang } }),
11
11
  getGameSearchHome: () => ({ url: 'game/search/home', method: 'get' }),
12
12
  getGameSearchList: ({ id, index, q, click, clickDefault, providerName }) => ({
13
13
  url: 'game/search/list',
@@ -242,5 +242,4 @@ export default {
242
242
  getPendingOrder: ({ transferType }) => ({ url: 'payment/v2/pendingOrder', method: 'post', params: { transferType } }),
243
243
  withdrawCheck: () => ({ url: `payment/v2/withdrawCheck`, method: 'post' }),
244
244
  updateUtr: ({ applyId, utr }) => ({ url: 'payment/v2/updateUtr', method: 'post', params: { applyId, utr } }),
245
- uploadCommonSlip: ({ applyId, slip }) => ({ url: 'payment/v2/uploadCommonSlip', method: 'post', params: { applyId, slip } }),
246
245
  }
@@ -229,10 +229,6 @@ export default function (request) {
229
229
  ENTER_GAME_PAUSE: {
230
230
  actions: ['setIsPlaying', 'resetContent', 'resetSHA'],
231
231
  },
232
- ENTER_GAME: {
233
- target: 'connecting',
234
- actions: ['setGameInfo', 'setLang', 'setwalletType'],
235
- },
236
232
  },
237
233
  },
238
234
  playingDemo: {
@@ -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, cycles) {
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[cycles[index]] = roundArray.reverse()
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 = isChampion ? cycleMapping.slice(0, currentRound.length) : [cycle]
159
- const roundOptions = roundProcess(currentRound, cycleOptions)
160
- // 如果是冠軍龍虎月結算,則加入全部選項
161
- if (cycle === 'MONTHLY' && isChampion) {
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: isChampion ? 'DAILY' : cycle,
169
+ cycle: event.data?.rule !== 'NORMAL' ? 'DAILY' : cycle,
170
170
  round: currentRound[0],
171
171
  }
172
172
  }),
@@ -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, orderColumn }))
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(