@jetthai/cuora 1.1.353-dev-6 → 1.1.353-dev-7
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 +2 -0
- package/package.json +1 -1
- package/src/api/ranking.js +2 -2
- package/src/machine/ranking.js +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
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.353-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-6...v1.1.353-dev-7) (2025-04-14)
|
|
6
|
+
|
|
5
7
|
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
|
6
8
|
|
|
7
9
|
### [1.1.353-dev-6](https://github.com/jetthai/cuora-module/compare/v1.1.353-dev-5...v1.1.353-dev-6) (2025-04-14)
|
package/package.json
CHANGED
package/src/api/ranking.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
// 未登入排名資料
|
|
3
|
-
getTournament: ({ activityNo }) => ({
|
|
3
|
+
getTournament: ({ activityNo, cycle, round, site }) => ({
|
|
4
4
|
url: 'tournament/detail',
|
|
5
5
|
method: 'post',
|
|
6
|
-
params: { activityNo, cycle, round },
|
|
6
|
+
params: { activityNo, cycle, round, site },
|
|
7
7
|
isPublic: true,
|
|
8
8
|
}),
|
|
9
9
|
// 登入後排名預設期數資料
|
package/src/machine/ranking.js
CHANGED
|
@@ -24,6 +24,7 @@ export default function (request) {
|
|
|
24
24
|
initial: 'idle',
|
|
25
25
|
context: {
|
|
26
26
|
auth: false,
|
|
27
|
+
site: '',
|
|
27
28
|
activityNo: '',
|
|
28
29
|
// api options 回傳的資料
|
|
29
30
|
currentRound: [],
|
|
@@ -58,7 +59,7 @@ export default function (request) {
|
|
|
58
59
|
},
|
|
59
60
|
setting: {
|
|
60
61
|
entry: 'setOptions',
|
|
61
|
-
always: [{ target: 'getRankingDetail' }],
|
|
62
|
+
always: [{ target: 'getRankingDetail', cond: 'hasAuth' }, { target: 'getTournament' }],
|
|
62
63
|
},
|
|
63
64
|
// 取得排名選單資料
|
|
64
65
|
getRankingOptions: {
|
|
@@ -132,6 +133,7 @@ export default function (request) {
|
|
|
132
133
|
actions: {
|
|
133
134
|
setActivity: assign((context, event) => {
|
|
134
135
|
return {
|
|
136
|
+
site: event.data?.site,
|
|
135
137
|
auth: !!request.getToken(),
|
|
136
138
|
activityNo: event.data?.activityNo,
|
|
137
139
|
}
|
|
@@ -193,8 +195,8 @@ export default function (request) {
|
|
|
193
195
|
},
|
|
194
196
|
services: {
|
|
195
197
|
fetchTournament: async (context) => {
|
|
196
|
-
const { activityNo, cycle, round } = context
|
|
197
|
-
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round }))
|
|
198
|
+
const { activityNo, cycle, round, site } = context
|
|
199
|
+
const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site }))
|
|
198
200
|
return data
|
|
199
201
|
},
|
|
200
202
|
fetchRankingOptions: async (context) => {
|