@jetthai/cuora 1.1.358 → 1.1.359-dev-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 +4 -0
- package/package.json +1 -1
- package/src/api/payment.js +1 -0
- package/src/machine/game_v2_1.js +1 -1
- package/src/machine/ranking.js +10 -8
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
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.359-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.359-dev-1) (2025-05-24)
|
|
6
|
+
|
|
7
|
+
### [1.1.359](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.359) (2025-05-23)
|
|
8
|
+
|
|
5
9
|
### [1.1.358](https://github.com/jetthai/cuora-module/compare/v1.1.357...v1.1.358) (2025-05-09)
|
|
6
10
|
|
|
7
11
|
### [1.1.357](https://github.com/jetthai/cuora-module/compare/v1.1.356...v1.1.357) (2025-05-06)
|
package/package.json
CHANGED
package/src/api/payment.js
CHANGED
|
@@ -242,4 +242,5 @@ 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 } }),
|
|
245
246
|
}
|
package/src/machine/game_v2_1.js
CHANGED
package/src/machine/ranking.js
CHANGED
|
@@ -3,11 +3,13 @@ import ranking from '../api/ranking.js'
|
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
5
|
const cycleMapping = ['DAILY', 'WEEKLY', 'MONTHLY']
|
|
6
|
+
const limit = { DAILY: 56, WEEKLY: 8, MONTHLY: 2, ALL: 2 }
|
|
6
7
|
|
|
7
|
-
function roundProcess(rounds) {
|
|
8
|
+
function roundProcess(rounds, cycles) {
|
|
8
9
|
const roundArrays = rounds.map((round) => Array.from({ length: round }, (_, i) => i + 1))
|
|
9
10
|
return roundArrays.reduce((acc, roundArray, index) => {
|
|
10
|
-
|
|
11
|
+
const max = limit[cycles[index]] || rounds[index] // 若沒限制則取全部
|
|
12
|
+
acc[cycles[index]] = roundArray.reverse().slice(0, max)
|
|
11
13
|
return acc
|
|
12
14
|
}, {})
|
|
13
15
|
}
|
|
@@ -151,14 +153,14 @@ export default function (request) {
|
|
|
151
153
|
}
|
|
152
154
|
}),
|
|
153
155
|
setRankingOptions: assign((context, event) => {
|
|
156
|
+
const isChampion = event.data?.rule === 'CHAMPION'
|
|
154
157
|
const cycle = event.data?.cycle
|
|
155
158
|
const currentRound = event.data?.currentRound || []
|
|
156
159
|
// 取得結算週期選單列表
|
|
157
|
-
const cycleOptions = cycleMapping.slice(0, currentRound.length)
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
if (cycle === 'MONTHLY') {
|
|
160
|
+
const cycleOptions = isChampion ? cycleMapping.slice(0, currentRound.length) : [cycle]
|
|
161
|
+
const roundOptions = roundProcess(currentRound, cycleOptions)
|
|
162
|
+
// 如果是冠軍龍虎月結算,則加入全部選項
|
|
163
|
+
if (cycle === 'MONTHLY' && isChampion) {
|
|
162
164
|
cycleOptions.push('ALL')
|
|
163
165
|
roundOptions.ALL = roundOptions.MONTHLY
|
|
164
166
|
}
|
|
@@ -166,7 +168,7 @@ export default function (request) {
|
|
|
166
168
|
...event.data,
|
|
167
169
|
options: { cycle: cycleOptions, round: roundOptions },
|
|
168
170
|
// 初始固定顯示 DAILY
|
|
169
|
-
cycle:
|
|
171
|
+
cycle: isChampion ? 'DAILY' : cycle,
|
|
170
172
|
round: currentRound[0],
|
|
171
173
|
}
|
|
172
174
|
}),
|