@jetthai/cuora 1.1.355-dev-1 → 1.1.355-dev-3
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/machine/game_v2_1.js +1 -1
- package/src/machine/ranking.js +4 -3
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.355-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.355-dev-2...v1.1.355-dev-3) (2025-04-29)
|
|
6
|
+
|
|
7
|
+
### [1.1.355-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-dev-2) (2025-04-25)
|
|
8
|
+
|
|
5
9
|
### [1.1.355-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.355...v1.1.355-dev-1) (2025-04-25)
|
|
6
10
|
|
|
7
11
|
### [1.1.355](https://github.com/jetthai/cuora-module/compare/v1.1.353-data-1...v1.1.355) (2025-04-22)
|
package/package.json
CHANGED
package/src/machine/game_v2_1.js
CHANGED
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, cycles) {
|
|
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[cycles[index]] = roundArray.reverse()
|
|
11
11
|
return acc
|
|
12
12
|
}, {})
|
|
13
13
|
}
|
|
@@ -156,7 +156,8 @@ export default function (request) {
|
|
|
156
156
|
// 取得結算週期選單列表
|
|
157
157
|
const cycleOptions = cycleMapping.slice(0, currentRound.length)
|
|
158
158
|
// 取得每週期的歷史期數選單列表
|
|
159
|
-
const
|
|
159
|
+
const cycles = event.data?.rule === 'NORMAL' ? [cycle] : cycleMapping
|
|
160
|
+
const roundOptions = roundProcess(currentRound, cycles)
|
|
160
161
|
// 如果是月結算,則加入全部選項
|
|
161
162
|
if (cycle === 'MONTHLY') {
|
|
162
163
|
cycleOptions.push('ALL')
|