@jetthai/cuora 1.1.358-apiv2-1 → 1.1.358-apiv2-2
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/request/request.js +33 -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.358-apiv2-2](https://github.com/jetthai/cuora-module/compare/v1.1.359...v1.1.358-apiv2-2) (2025-05-27)
|
|
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-apiv2-1](https://github.com/jetthai/cuora-module/compare/v1.1.358...v1.1.358-apiv2-1) (2025-05-09)
|
|
6
10
|
|
|
7
11
|
### [1.1.358](https://github.com/jetthai/cuora-module/compare/v1.1.357...v1.1.358) (2025-05-09)
|
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/request/request.js
CHANGED
|
@@ -51,6 +51,32 @@ const supportVersion2List = [
|
|
|
51
51
|
'mailbox/getMessageTypes',
|
|
52
52
|
]
|
|
53
53
|
|
|
54
|
+
const version2ListName = {
|
|
55
|
+
'game/gameReplay': 'game/game-replay',
|
|
56
|
+
'game/list/v3/categoryByRange': 'game/list/v3/category-by-range',
|
|
57
|
+
'game/list/v3/additionByRange': 'game/list/v3/addition-by-range',
|
|
58
|
+
'game/list/v3/myFavorite': 'game/list/v3/my-favorite',
|
|
59
|
+
'game/list/v3/addMyFavorite': 'game/list/v3/add-my-favorite',
|
|
60
|
+
'game/list/v3/removeMyFavorite': 'game/list/v3/remove-my-favorite',
|
|
61
|
+
guestLogin: 'guest-login',
|
|
62
|
+
appLogin: 'app-login',
|
|
63
|
+
checkDt: 'check-dt',
|
|
64
|
+
updateDt: 'update-dt',
|
|
65
|
+
checkAC: 'check-ac',
|
|
66
|
+
checkAccount: 'check-account',
|
|
67
|
+
getAllAvatar: 'get-all-avatar',
|
|
68
|
+
updateUserAvatar: 'update-user-avatar',
|
|
69
|
+
getConfig: 'get-config',
|
|
70
|
+
getQuickLayout: 'get-quick-layout',
|
|
71
|
+
getNavbarSetting: 'get-navbar-setting',
|
|
72
|
+
getAffiliateCode: 'get-affiliate-code',
|
|
73
|
+
'mailbox/sendMessage': 'mailbox/send-message',
|
|
74
|
+
'mailbox/getMessageList': 'mailbox/get-message-list',
|
|
75
|
+
'mailbox/getMessage': 'mailbox/get-message',
|
|
76
|
+
'mailbox/updateMessage': 'mailbox/update-message',
|
|
77
|
+
'mailbox/getMessageTypes': 'mailbox/get-message-types',
|
|
78
|
+
}
|
|
79
|
+
|
|
54
80
|
function isValid(value) {
|
|
55
81
|
return value !== undefined && value !== null
|
|
56
82
|
}
|
|
@@ -135,16 +161,20 @@ export default class Request {
|
|
|
135
161
|
_createConfig(req, cancelToken) {
|
|
136
162
|
const { method, url, params, isPublic, isFormData, headers } = req
|
|
137
163
|
let fullURL = this.config.fullURL
|
|
164
|
+
let urlName = url
|
|
138
165
|
// 有些API會將參數(/?)直接帶在URL上,所以要將參數排除
|
|
139
166
|
if (supportVersion2List.includes(url.split('?')[0])) {
|
|
140
|
-
console.log('*[DEV_ONLY]有支援V2的API:', url.split('?')[0])
|
|
141
167
|
fullURL = fullURL.replace('/v1/', '/v2/')
|
|
168
|
+
urlName = version2ListName[url] || url
|
|
169
|
+
console.log('*[DEV_ONLY]支援V2API-原本路徑:', url)
|
|
170
|
+
console.log('*[DEV_ONLY]支援V2API-調整路徑:', fullURL, urlName)
|
|
142
171
|
}
|
|
172
|
+
|
|
143
173
|
if (isFormData) {
|
|
144
174
|
return {
|
|
145
175
|
baseURL: fullURL,
|
|
146
176
|
method,
|
|
147
|
-
url,
|
|
177
|
+
url: urlName,
|
|
148
178
|
cancelToken,
|
|
149
179
|
isPublic,
|
|
150
180
|
headers: { 'Content-Type': 'multipart/form-data' },
|
|
@@ -154,7 +184,7 @@ export default class Request {
|
|
|
154
184
|
return {
|
|
155
185
|
baseURL: fullURL,
|
|
156
186
|
method,
|
|
157
|
-
url,
|
|
187
|
+
url: urlName,
|
|
158
188
|
cancelToken,
|
|
159
189
|
isPublic,
|
|
160
190
|
headers,
|