@jetthai/cuora 1.1.191 → 1.1.193
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
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
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.193](https://github.com/jetthai/cuora-module/compare/v1.1.192...v1.1.193) (2023-10-19)
|
|
6
|
+
|
|
7
|
+
### [1.1.192](https://github.com/jetthai/cuora-module/compare/v1.1.191...v1.1.192) (2023-10-18)
|
|
8
|
+
|
|
9
|
+
### [1.1.188-branchCode-2](https://github.com/jetthai/cuora-module/compare/v1.1.189...v1.1.188-branchCode-2) (2023-10-17)
|
|
10
|
+
|
|
11
|
+
### [1.1.188-branchCode-1](https://github.com/jetthai/cuora-module/compare/v1.1.188-branchCode...v1.1.188-branchCode-1) (2023-10-12)
|
|
12
|
+
|
|
13
|
+
### [1.1.188-branchCode](https://github.com/jetthai/cuora-module/compare/v1.1.188...v1.1.188-branchCode) (2023-10-11)
|
|
14
|
+
|
|
5
15
|
### [1.1.191](https://github.com/jetthai/cuora-module/compare/v1.1.190-bigwin...v1.1.191) (2023-10-18)
|
|
6
16
|
|
|
7
17
|
### [1.1.190](https://github.com/jetthai/cuora-module/compare/v1.1.190-bigwin...v1.1.190) (2023-10-18)
|
package/package.json
CHANGED
package/src/machine/common.js
CHANGED
|
@@ -54,7 +54,7 @@ export default function (request) {
|
|
|
54
54
|
},
|
|
55
55
|
},
|
|
56
56
|
fetching: {
|
|
57
|
-
entry: ['setUA', 'setAgent', 'setPixel'],
|
|
57
|
+
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
|
|
58
58
|
invoke: {
|
|
59
59
|
src: 'fetchSiteConfig',
|
|
60
60
|
onDone: {
|
|
@@ -185,6 +185,19 @@ export default function (request) {
|
|
|
185
185
|
pix,
|
|
186
186
|
}
|
|
187
187
|
}),
|
|
188
|
+
setKPixel: assign(() => {
|
|
189
|
+
let urlParams = new URLSearchParams(window.location.search)
|
|
190
|
+
const kpix = urlParams.get('kpix') || storage.get('kpix') || ''
|
|
191
|
+
if (kpix !== '') {
|
|
192
|
+
storage.set('kpix', kpix, {
|
|
193
|
+
path: '/',
|
|
194
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
195
|
+
})
|
|
196
|
+
}
|
|
197
|
+
return {
|
|
198
|
+
kpix,
|
|
199
|
+
}
|
|
200
|
+
}),
|
|
188
201
|
setAgent: assign((context, event) => {
|
|
189
202
|
if (window.CC_JSB === true) {
|
|
190
203
|
// is cocos native app
|
|
@@ -4,13 +4,14 @@ import common from '../../api/common.js'
|
|
|
4
4
|
import { max } from '../../util/index.js'
|
|
5
5
|
|
|
6
6
|
export default function (request, context) {
|
|
7
|
-
const { paymentDetail = [], promotion, selectedAmount } = context || {}
|
|
7
|
+
const { paymentDetail = [], promotion, selectedAmount, siteConfig = {} } = context || {}
|
|
8
8
|
|
|
9
9
|
return createMachine(
|
|
10
10
|
{
|
|
11
11
|
id: 'manual_cash',
|
|
12
12
|
initial: 'loading',
|
|
13
13
|
context: {
|
|
14
|
+
siteConfig,
|
|
14
15
|
paymentDetail,
|
|
15
16
|
promotion,
|
|
16
17
|
selectedAmount,
|
|
@@ -23,6 +24,8 @@ export default function (request, context) {
|
|
|
23
24
|
selectedUserBank: null,
|
|
24
25
|
userAccountNumber: null,
|
|
25
26
|
userAccountName: null,
|
|
27
|
+
userAccountBranchName: null,
|
|
28
|
+
userAccountBranchCode: null,
|
|
26
29
|
depositTime: null,
|
|
27
30
|
receipt: null,
|
|
28
31
|
|
|
@@ -79,6 +82,12 @@ export default function (request, context) {
|
|
|
79
82
|
SELECT_USER_BANK: {
|
|
80
83
|
actions: 'setUserBank',
|
|
81
84
|
},
|
|
85
|
+
INPUT_USER_ACCOUNT_BRANCH_NAME: {
|
|
86
|
+
actions: 'setUserAccountBranchName',
|
|
87
|
+
},
|
|
88
|
+
INPUT_USER_ACCOUNT_BRANCH_CODE: {
|
|
89
|
+
actions: 'setUserAccountBranchCode',
|
|
90
|
+
},
|
|
82
91
|
INPUT_USER_ACCOUNT_NUMBER: {
|
|
83
92
|
actions: 'setUserAccountNumber',
|
|
84
93
|
},
|
|
@@ -168,6 +177,8 @@ export default function (request, context) {
|
|
|
168
177
|
selectedUserBank: userBanks[0],
|
|
169
178
|
userAccountNumber: userBanks[0].accountNumber,
|
|
170
179
|
userAccountName: userBanks[0].holderName,
|
|
180
|
+
userAccountBranchName: userBanks[0].branch,
|
|
181
|
+
userAccountBranchCode: userBanks[0].branchCode,
|
|
171
182
|
}
|
|
172
183
|
}),
|
|
173
184
|
setHouseBank: assign((context, event) => {
|
|
@@ -194,11 +205,23 @@ export default function (request, context) {
|
|
|
194
205
|
}
|
|
195
206
|
}),
|
|
196
207
|
setUserBank: assign((context, event) => {
|
|
197
|
-
const { accountNumber, holderName } = event.data
|
|
208
|
+
const { accountNumber, holderName, branch, branchCode } = event.data
|
|
198
209
|
return {
|
|
199
210
|
selectedUserBank: event.data,
|
|
200
211
|
userAccountNumber: accountNumber,
|
|
201
212
|
userAccountName: holderName,
|
|
213
|
+
userAccountBranchName: branch,
|
|
214
|
+
userAccountBranchCode: branchCode,
|
|
215
|
+
}
|
|
216
|
+
}),
|
|
217
|
+
setUserAccountBranchName: assign((context, event) => {
|
|
218
|
+
return {
|
|
219
|
+
userAccountBranchName: event.data,
|
|
220
|
+
}
|
|
221
|
+
}),
|
|
222
|
+
setUserAccountBranchCode: assign((context, event) => {
|
|
223
|
+
return {
|
|
224
|
+
userAccountBranchCode: event.data,
|
|
202
225
|
}
|
|
203
226
|
}),
|
|
204
227
|
setUserAccountNumber: assign((context, event) => {
|
|
@@ -244,8 +267,15 @@ export default function (request, context) {
|
|
|
244
267
|
return context.calculation
|
|
245
268
|
},
|
|
246
269
|
isSubmittable: (context, event) => {
|
|
247
|
-
const { selectedAmount, userAccountNumber, userAccountName, depositTime, receipt } = context
|
|
248
|
-
|
|
270
|
+
const { selectedAmount, userAccountNumber, userAccountName, userAccountBranchCode, depositTime, receipt } = context
|
|
271
|
+
const { branchCodeEnable = '0' } = context.siteConfig
|
|
272
|
+
const defaultCheck = selectedAmount && userAccountNumber && userAccountName && depositTime && receipt
|
|
273
|
+
|
|
274
|
+
if (branchCodeEnable === '1') {
|
|
275
|
+
return defaultCheck && userAccountBranchCode
|
|
276
|
+
} else {
|
|
277
|
+
return defaultCheck
|
|
278
|
+
}
|
|
249
279
|
},
|
|
250
280
|
isProcessing: (context, event) => {
|
|
251
281
|
return context.processing
|
|
@@ -284,8 +314,19 @@ export default function (request, context) {
|
|
|
284
314
|
)
|
|
285
315
|
},
|
|
286
316
|
submitDeposit: async (context, event) => {
|
|
287
|
-
const {
|
|
288
|
-
|
|
317
|
+
const {
|
|
318
|
+
method,
|
|
319
|
+
selectedAmount,
|
|
320
|
+
selectedHouseBank,
|
|
321
|
+
selectedUserBank,
|
|
322
|
+
userAccountNumber,
|
|
323
|
+
userAccountName,
|
|
324
|
+
userAccountBranchName,
|
|
325
|
+
userAccountBranchCode,
|
|
326
|
+
depositTime,
|
|
327
|
+
receipt,
|
|
328
|
+
promotion,
|
|
329
|
+
} = context
|
|
289
330
|
return await request.send(
|
|
290
331
|
payment.submitDepositTransactionBank({
|
|
291
332
|
method,
|
|
@@ -295,6 +336,8 @@ export default function (request, context) {
|
|
|
295
336
|
applyerBankCode: selectedUserBank.bankCode,
|
|
296
337
|
applyerAccountNumber: userAccountNumber,
|
|
297
338
|
applyerHolderName: userAccountName,
|
|
339
|
+
applyerBranchName: userAccountBranchName,
|
|
340
|
+
applyerBranchCode: userAccountBranchCode,
|
|
298
341
|
depositTime,
|
|
299
342
|
receipt,
|
|
300
343
|
promotionsNo: promotion?.promotionsNo,
|
|
@@ -21,6 +21,8 @@ export default function (request) {
|
|
|
21
21
|
selectedUserBank: null,
|
|
22
22
|
userAccountNumber: null,
|
|
23
23
|
userAccountName: null,
|
|
24
|
+
userAccountBranchName: null,
|
|
25
|
+
userAccountBranchCode: null,
|
|
24
26
|
depositTime: null,
|
|
25
27
|
receipt: null,
|
|
26
28
|
|
|
@@ -200,6 +202,12 @@ export default function (request) {
|
|
|
200
202
|
SELECT_USER_BANK: {
|
|
201
203
|
actions: 'setUserBank',
|
|
202
204
|
},
|
|
205
|
+
INPUT_USER_ACCOUNT_BRANCH_NAME: {
|
|
206
|
+
actions: 'setUserAccountBranchName',
|
|
207
|
+
},
|
|
208
|
+
INPUT_USER_ACCOUNT_BRANCH_CODE: {
|
|
209
|
+
actions: 'setUserAccountBranchCode',
|
|
210
|
+
},
|
|
203
211
|
INPUT_USER_ACCOUNT_NUMBER: {
|
|
204
212
|
actions: 'setUserAccountNumber',
|
|
205
213
|
},
|
|
@@ -278,6 +286,8 @@ export default function (request) {
|
|
|
278
286
|
selectedUserBank: userBanks[0],
|
|
279
287
|
userAccountNumber: userBanks[0].accountNumber,
|
|
280
288
|
userAccountName: userBanks[0].holderName,
|
|
289
|
+
userAccountBranchName: userBanks[0].branch,
|
|
290
|
+
userAccountBranchCode: userBanks[0].branchCode,
|
|
281
291
|
}
|
|
282
292
|
}),
|
|
283
293
|
setHouseBank: assign((context, event) => {
|
|
@@ -306,11 +316,23 @@ export default function (request) {
|
|
|
306
316
|
}
|
|
307
317
|
}),
|
|
308
318
|
setUserBank: assign((context, event) => {
|
|
309
|
-
const { accountNumber, holderName } = event.data
|
|
319
|
+
const { accountNumber, holderName, branch, branchCode } = event.data
|
|
310
320
|
return {
|
|
311
321
|
selectedUserBank: event.data,
|
|
312
322
|
userAccountNumber: accountNumber,
|
|
313
323
|
userAccountName: holderName,
|
|
324
|
+
userAccountBranchName: branch,
|
|
325
|
+
userAccountBranchCode: branchCode,
|
|
326
|
+
}
|
|
327
|
+
}),
|
|
328
|
+
setUserAccountBranchName: assign((context, event) => {
|
|
329
|
+
return {
|
|
330
|
+
userAccountBranchName: event.data,
|
|
331
|
+
}
|
|
332
|
+
}),
|
|
333
|
+
setUserAccountBranchCode: assign((context, event) => {
|
|
334
|
+
return {
|
|
335
|
+
userAccountBranchCode: event.data,
|
|
314
336
|
}
|
|
315
337
|
}),
|
|
316
338
|
setUserAccountNumber: assign((context, event) => {
|
|
@@ -359,8 +381,14 @@ export default function (request) {
|
|
|
359
381
|
return context.calculation
|
|
360
382
|
},
|
|
361
383
|
isSubmittable: (context, event) => {
|
|
362
|
-
const { amount, userAccountNumber, userAccountName, depositTime, receipt } = context
|
|
363
|
-
|
|
384
|
+
const { amount, userAccountNumber, userAccountName, userAccountBranchCode, depositTime, receipt } = context
|
|
385
|
+
const { branchCodeEnable = '0' } = context.siteConfig
|
|
386
|
+
const defaultCheck = amount && userAccountNumber && userAccountName && depositTime && receipt
|
|
387
|
+
if (branchCodeEnable === '1') {
|
|
388
|
+
return defaultCheck && userAccountBranchCode
|
|
389
|
+
} else {
|
|
390
|
+
return defaultCheck
|
|
391
|
+
}
|
|
364
392
|
},
|
|
365
393
|
isProcessing: (context, event) => {
|
|
366
394
|
return context.processing
|
|
@@ -398,7 +426,19 @@ export default function (request) {
|
|
|
398
426
|
)
|
|
399
427
|
},
|
|
400
428
|
submitDeposit: async (context, event) => {
|
|
401
|
-
const {
|
|
429
|
+
const {
|
|
430
|
+
method,
|
|
431
|
+
amount,
|
|
432
|
+
selectedHouseBank,
|
|
433
|
+
selectedUserBank,
|
|
434
|
+
userAccountNumber,
|
|
435
|
+
userAccountName,
|
|
436
|
+
userAccountBranchName,
|
|
437
|
+
userAccountBranchCode,
|
|
438
|
+
depositTime,
|
|
439
|
+
receipt,
|
|
440
|
+
promotion,
|
|
441
|
+
} = context
|
|
402
442
|
return await request.send(
|
|
403
443
|
payment.submitDepositTransactionBank({
|
|
404
444
|
method,
|
|
@@ -408,6 +448,8 @@ export default function (request) {
|
|
|
408
448
|
applyerBankCode: selectedUserBank.bankCode,
|
|
409
449
|
applyerAccountNumber: userAccountNumber,
|
|
410
450
|
applyerHolderName: userAccountName,
|
|
451
|
+
applyerBranchName: userAccountBranchName,
|
|
452
|
+
applyerBranchCode: userAccountBranchCode,
|
|
411
453
|
depositTime,
|
|
412
454
|
receipt,
|
|
413
455
|
promotionsNo: promotion?.activityNo,
|
package/src/machine/game_v2_1.js
CHANGED
|
@@ -143,11 +143,11 @@ export default function (request) {
|
|
|
143
143
|
src: 'disconnectGame',
|
|
144
144
|
onDone: {
|
|
145
145
|
target: 'idle',
|
|
146
|
-
actions: 'setGameURL',
|
|
146
|
+
// actions: 'setGameURL',
|
|
147
147
|
},
|
|
148
148
|
onError: {
|
|
149
149
|
target: 'idle',
|
|
150
|
-
actions: 'setGameURL',
|
|
150
|
+
// actions: 'setGameURL',
|
|
151
151
|
},
|
|
152
152
|
},
|
|
153
153
|
},
|