@jetthai/cuora 1.1.373-dev-4 → 1.1.373-dev-6
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/activity.js +2 -1
- package/src/api/game.js +4 -4
- package/src/api/ranking.js +2 -2
- package/src/machine/game_v2_1.js +2 -0
- package/src/machine/ranking.js +1 -1
- package/src/machine/side_cash.js +3 -2
- package/src/machine/side_v2.js +3 -2
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.373-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-5...v1.1.373-dev-6) (2025-08-22)
|
|
6
|
+
|
|
7
|
+
### [1.1.373-dev-5](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-4...v1.1.373-dev-5) (2025-08-22)
|
|
8
|
+
|
|
5
9
|
### [1.1.373-dev-4](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-3...v1.1.373-dev-4) (2025-08-22)
|
|
6
10
|
|
|
7
11
|
### [1.1.373-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-2...v1.1.373-dev-3) (2025-08-22)
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -29,9 +29,10 @@ export default {
|
|
|
29
29
|
method: 'get',
|
|
30
30
|
params: { activityNo, appSecret },
|
|
31
31
|
}),
|
|
32
|
-
getActivityRanking: () => ({
|
|
32
|
+
getActivityRanking: ({ appSecret }) => ({
|
|
33
33
|
url: 'activities/activity/ranking',
|
|
34
34
|
method: 'get',
|
|
35
|
+
params: { appSecret },
|
|
35
36
|
isPublic: true,
|
|
36
37
|
}),
|
|
37
38
|
getAchievements: ({ limit, page, appSecret }) => ({
|
package/src/api/game.js
CHANGED
|
@@ -57,15 +57,15 @@ export default {
|
|
|
57
57
|
url: 'game/history/options',
|
|
58
58
|
method: 'get',
|
|
59
59
|
}),
|
|
60
|
-
getListRoot: ({ timestamp } = {}) => ({
|
|
60
|
+
getListRoot: ({ timestamp, appSecret } = {}) => ({
|
|
61
61
|
url: 'game/list/v3/root',
|
|
62
62
|
method: 'get',
|
|
63
|
-
params: { timestamp },
|
|
63
|
+
params: { timestamp, appSecret },
|
|
64
64
|
}),
|
|
65
|
-
getListCategory: ({ categoryId, timestamp, index }) => ({
|
|
65
|
+
getListCategory: ({ categoryId, timestamp, index, appSecret }) => ({
|
|
66
66
|
url: 'game/list/v3/category',
|
|
67
67
|
method: 'get',
|
|
68
|
-
params: { categoryId, timestamp, index },
|
|
68
|
+
params: { categoryId, timestamp, index, appSecret },
|
|
69
69
|
}),
|
|
70
70
|
getListAddition: ({ categoryId, timestamp, index, appSecret }) => ({
|
|
71
71
|
url: 'game/list/v3/addition',
|
package/src/api/ranking.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
// 未登入排名資料
|
|
3
|
-
getTournament: ({ activityNo, cycle, round, site }) => ({
|
|
3
|
+
getTournament: ({ activityNo, cycle, round, site, appSecret }) => ({
|
|
4
4
|
url: 'tournament/detail',
|
|
5
5
|
method: 'post',
|
|
6
|
-
params: { activityNo, cycle, round, site },
|
|
6
|
+
params: { activityNo, cycle, round, site, appSecret },
|
|
7
7
|
isPublic: true,
|
|
8
8
|
}),
|
|
9
9
|
// 登入後排名預設期數資料
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -523,6 +523,7 @@ export default function (request) {
|
|
|
523
523
|
api.getListCategory({
|
|
524
524
|
categoryId: category.id,
|
|
525
525
|
index: 0,
|
|
526
|
+
appSecret,
|
|
526
527
|
})
|
|
527
528
|
)
|
|
528
529
|
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
|
@@ -536,6 +537,7 @@ export default function (request) {
|
|
|
536
537
|
api.getListCategory({
|
|
537
538
|
categoryId: category.id,
|
|
538
539
|
index: 0,
|
|
540
|
+
appSecret,
|
|
539
541
|
})
|
|
540
542
|
)
|
|
541
543
|
.then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
|
package/src/machine/ranking.js
CHANGED
|
@@ -195,7 +195,7 @@ export default function (request) {
|
|
|
195
195
|
services: {
|
|
196
196
|
fetchTournament: async (context) => {
|
|
197
197
|
const { activityNo, cycle, round, site } = context
|
|
198
|
-
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site }))
|
|
198
|
+
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site, appSecret }))
|
|
199
199
|
return data
|
|
200
200
|
},
|
|
201
201
|
fetchRankingOptions: async (context) => {
|
package/src/machine/side_cash.js
CHANGED
|
@@ -2,6 +2,7 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import game from '../api/game.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
+
const { appSecret } = request.config
|
|
5
6
|
return createMachine(
|
|
6
7
|
{
|
|
7
8
|
id: 'side',
|
|
@@ -78,10 +79,10 @@ export default function (request) {
|
|
|
78
79
|
},
|
|
79
80
|
services: {
|
|
80
81
|
getMenu: async (context, event) => {
|
|
81
|
-
return await request.send(game.getListRoot())
|
|
82
|
+
return await request.send(game.getListRoot({ appSecret }))
|
|
82
83
|
},
|
|
83
84
|
fetchUpdateMenu: async (context, event) => {
|
|
84
|
-
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
|
|
85
|
+
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
|
|
85
86
|
},
|
|
86
87
|
},
|
|
87
88
|
}
|
package/src/machine/side_v2.js
CHANGED
|
@@ -2,6 +2,7 @@ import { assign, createMachine } from 'xstate'
|
|
|
2
2
|
import game from '../api/game.js'
|
|
3
3
|
|
|
4
4
|
export default function (request) {
|
|
5
|
+
const { appSecret } = request.config
|
|
5
6
|
return createMachine(
|
|
6
7
|
{
|
|
7
8
|
id: 'side',
|
|
@@ -160,10 +161,10 @@ export default function (request) {
|
|
|
160
161
|
},
|
|
161
162
|
services: {
|
|
162
163
|
getMenu: async (context, event) => {
|
|
163
|
-
return await request.send(game.getListRoot())
|
|
164
|
+
return await request.send(game.getListRoot({ appSecret }))
|
|
164
165
|
},
|
|
165
166
|
fetchUpdateMenu: async (context, event) => {
|
|
166
|
-
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
|
|
167
|
+
return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
|
|
167
168
|
},
|
|
168
169
|
},
|
|
169
170
|
}
|