@jetthai/cuora 1.1.373-qa-2 → 1.1.373-qa-4
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/deposit/crypto_bank.js +10 -2
- package/src/machine/deposit/crypto_bank_cash.js +10 -2
- package/src/machine/deposit/crypto_way.js +10 -2
- package/src/machine/deposit/crypto_way_cash.js +10 -2
- package/src/machine/deposit/deposit_fc.js +1 -0
- package/src/machine/deposit/direct.js +1 -0
- package/src/machine/deposit/direct_cash.js +1 -0
- package/src/machine/deposit/float.js +1 -0
- package/src/machine/deposit/loadcard_cash.js +1 -0
- package/src/machine/deposit/loadcard_vn.js +1 -0
- package/src/machine/deposit/manual_cash.js +1 -0
- package/src/machine/deposit/manual_vn.js +1 -0
- package/src/machine/deposit/qrcode_cash.js +1 -0
- package/src/machine/deposit/qrcode_v2.js +1 -0
- package/src/machine/deposit/virtual_bank_cash.js +1 -0
- package/src/machine/deposit/virtual_bank_vn.js +1 -0
- package/src/machine/deposit/vpay.js +1 -0
- package/src/machine/withdraw/withdraw_crypto_cash.js +10 -2
- package/src/machine/withdraw/withdraw_manual.js +10 -2
- package/src/request/request.js +18 -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-qa-4](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-3...v1.1.373-qa-4) (2025-08-27)
|
|
6
|
+
|
|
7
|
+
### [1.1.373-qa-3](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-2...v1.1.373-qa-3) (2025-08-26)
|
|
8
|
+
|
|
5
9
|
### [1.1.373-qa-2](https://github.com/jetthai/cuora-module/compare/v1.1.373-qa-1...v1.1.373-qa-2) (2025-08-25)
|
|
6
10
|
|
|
7
11
|
### [1.1.373-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.373...v1.1.373-qa-1) (2025-08-22)
|
package/package.json
CHANGED
|
@@ -232,8 +232,16 @@ export default function (request) {
|
|
|
232
232
|
}
|
|
233
233
|
}),
|
|
234
234
|
setCalculation: assign((context, event) => {
|
|
235
|
-
|
|
236
|
-
|
|
235
|
+
// V2接口轉換中回傳的資料結構不同
|
|
236
|
+
const { data } = event.data
|
|
237
|
+
if (data) {
|
|
238
|
+
return {
|
|
239
|
+
calculation: data,
|
|
240
|
+
}
|
|
241
|
+
} else {
|
|
242
|
+
return {
|
|
243
|
+
calculation: event.data,
|
|
244
|
+
}
|
|
237
245
|
}
|
|
238
246
|
}),
|
|
239
247
|
clearCalculation: assign((context, event) => {
|
|
@@ -202,8 +202,16 @@ export default function (request, context) {
|
|
|
202
202
|
return { selectedAmount: event.data }
|
|
203
203
|
}),
|
|
204
204
|
setCalculation: assign((context, event) => {
|
|
205
|
-
|
|
206
|
-
|
|
205
|
+
// V2接口轉換中回傳的資料結構不同
|
|
206
|
+
const { data } = event.data
|
|
207
|
+
if (data) {
|
|
208
|
+
return {
|
|
209
|
+
calculation: data,
|
|
210
|
+
}
|
|
211
|
+
} else {
|
|
212
|
+
return {
|
|
213
|
+
calculation: event.data,
|
|
214
|
+
}
|
|
207
215
|
}
|
|
208
216
|
}),
|
|
209
217
|
clearCalculation: assign((context, event) => {
|
|
@@ -164,8 +164,16 @@ export default function (request) {
|
|
|
164
164
|
}
|
|
165
165
|
}),
|
|
166
166
|
setCalculation: assign((context, event) => {
|
|
167
|
-
|
|
168
|
-
|
|
167
|
+
// V2接口轉換中回傳的資料結構不同
|
|
168
|
+
const { data } = event.data
|
|
169
|
+
if (data) {
|
|
170
|
+
return {
|
|
171
|
+
calculation: data,
|
|
172
|
+
}
|
|
173
|
+
} else {
|
|
174
|
+
return {
|
|
175
|
+
calculation: event.data,
|
|
176
|
+
}
|
|
169
177
|
}
|
|
170
178
|
}),
|
|
171
179
|
clearCalculation: assign((context, event) => {
|
|
@@ -168,8 +168,16 @@ export default function (request, context) {
|
|
|
168
168
|
}
|
|
169
169
|
}),
|
|
170
170
|
setCalculation: assign((context, event) => {
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
// V2接口轉換中回傳的資料結構不同
|
|
172
|
+
const { data } = event.data
|
|
173
|
+
if (data) {
|
|
174
|
+
return {
|
|
175
|
+
calculation: data,
|
|
176
|
+
}
|
|
177
|
+
} else {
|
|
178
|
+
return {
|
|
179
|
+
calculation: event.data,
|
|
180
|
+
}
|
|
173
181
|
}
|
|
174
182
|
}),
|
|
175
183
|
clearCalculation: assign((context, event) => {
|
|
@@ -204,8 +204,16 @@ export default function (request, context) {
|
|
|
204
204
|
}
|
|
205
205
|
}),
|
|
206
206
|
setCalculation: assign((context, event) => {
|
|
207
|
-
|
|
208
|
-
|
|
207
|
+
// V2接口轉換中回傳的資料結構不同
|
|
208
|
+
const { data } = event.data
|
|
209
|
+
if (data) {
|
|
210
|
+
return {
|
|
211
|
+
calculation: data,
|
|
212
|
+
}
|
|
213
|
+
} else {
|
|
214
|
+
return {
|
|
215
|
+
calculation: event.data,
|
|
216
|
+
}
|
|
209
217
|
}
|
|
210
218
|
}),
|
|
211
219
|
resetCharge: assign((context, event) => {
|
|
@@ -384,8 +384,16 @@ export default function (request) {
|
|
|
384
384
|
}
|
|
385
385
|
}),
|
|
386
386
|
setCalculation: assign((context, event) => {
|
|
387
|
-
|
|
388
|
-
|
|
387
|
+
// V2接口轉換中回傳的資料結構不同
|
|
388
|
+
const { data } = event.data
|
|
389
|
+
if (data) {
|
|
390
|
+
return {
|
|
391
|
+
calculation: data,
|
|
392
|
+
}
|
|
393
|
+
} else {
|
|
394
|
+
return {
|
|
395
|
+
calculation: event.data,
|
|
396
|
+
}
|
|
389
397
|
}
|
|
390
398
|
}),
|
|
391
399
|
clearCalculation: assign((context, event) => {
|
package/src/request/request.js
CHANGED
|
@@ -149,6 +149,7 @@ export default class Request {
|
|
|
149
149
|
this.key = `cuora_${config.clientId}`
|
|
150
150
|
this.errorHandler = null
|
|
151
151
|
this.hosts = []
|
|
152
|
+
this.isBlocked = false
|
|
152
153
|
this.initialize()
|
|
153
154
|
}
|
|
154
155
|
|
|
@@ -195,10 +196,25 @@ export default class Request {
|
|
|
195
196
|
try {
|
|
196
197
|
const cancelToken = customToken || this.source.token
|
|
197
198
|
this._checkToken(req)
|
|
199
|
+
|
|
198
200
|
const requestConfig = this._createConfig(req, cancelToken)
|
|
199
|
-
|
|
200
|
-
|
|
201
|
+
// console.log('*請求資料Check', requestConfig)
|
|
202
|
+
const configUrls = ['getConfig', 'get-config']
|
|
203
|
+
if (this.isBlocked && !configUrls.includes(requestConfig.url)) {
|
|
204
|
+
// 狀態是維護中&請求非siteConfig,終止所有的請求,除了維護頁需要的資料(siteConfig)
|
|
205
|
+
// console.log('%c*禁止的請求目標', requestConfig)
|
|
206
|
+
} else {
|
|
207
|
+
// console.log('%c*允許的請求目標', requestConfig)
|
|
208
|
+
const { data } = await this.axios.request(requestConfig)
|
|
209
|
+
return data
|
|
210
|
+
}
|
|
201
211
|
} catch (error) {
|
|
212
|
+
if (error.code === 'ERR_F108') {
|
|
213
|
+
console.log('%c*維護中', 'color: #00ff33ff; font-weight: bold;')
|
|
214
|
+
this.isBlocked = true
|
|
215
|
+
this.errorHandler && this.errorHandler(error)
|
|
216
|
+
throw error
|
|
217
|
+
}
|
|
202
218
|
if (error.code !== 'ERR_800') {
|
|
203
219
|
if (error.code) {
|
|
204
220
|
this.errorHandler && this.errorHandler(error)
|