@jetthai/cuora 1.1.373-dev-14 → 1.1.373-qa-1

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +1 -27
  2. package/package.json +1 -1
  3. package/src/api/activity.js +1 -3
  4. package/src/api/game.js +6 -6
  5. package/src/api/ranking.js +2 -2
  6. package/src/api/user.js +9 -14
  7. package/src/machine/bank_binding.js +0 -6
  8. package/src/machine/common.js +2 -3
  9. package/src/machine/deposit/amb.js +1 -1
  10. package/src/machine/deposit/crypto_bank.js +2 -10
  11. package/src/machine/deposit/crypto_bank_cash.js +2 -10
  12. package/src/machine/deposit/crypto_way.js +2 -10
  13. package/src/machine/deposit/crypto_way_cash.js +2 -10
  14. package/src/machine/deposit/deposit_fc.js +0 -1
  15. package/src/machine/deposit/direct.js +1 -2
  16. package/src/machine/deposit/direct_cash.js +1 -2
  17. package/src/machine/deposit/float.js +1 -2
  18. package/src/machine/deposit/loadcard_cash.js +0 -1
  19. package/src/machine/deposit/loadcard_vn.js +0 -1
  20. package/src/machine/deposit/manual_cash.js +1 -2
  21. package/src/machine/deposit/manual_vn.js +0 -1
  22. package/src/machine/deposit/qrcode_cash.js +0 -1
  23. package/src/machine/deposit/qrcode_v2.js +0 -1
  24. package/src/machine/deposit/virtual_bank_cash.js +0 -1
  25. package/src/machine/deposit/virtual_bank_vn.js +0 -1
  26. package/src/machine/deposit/vpay.js +1 -2
  27. package/src/machine/game_search_cash.js +4 -4
  28. package/src/machine/game_search_v2.js +9 -9
  29. package/src/machine/game_v2_1.js +0 -3
  30. package/src/machine/ranking.js +1 -1
  31. package/src/machine/side_cash.js +2 -3
  32. package/src/machine/side_v2.js +2 -3
  33. package/src/machine/user_reset_password.js +4 -5
  34. package/src/machine/withdraw/withdraw_crypto_cash.js +2 -10
  35. package/src/machine/withdraw/withdraw_manual.js +2 -10
  36. package/src/request/request.js +2 -19
  37. package/src/util/sessionStorage.js +0 -28
package/CHANGELOG.md CHANGED
@@ -2,33 +2,7 @@
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-14](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-13...v1.1.373-dev-14) (2025-08-28)
6
-
7
- ### [1.1.373-dev-13](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-12...v1.1.373-dev-13) (2025-08-28)
8
-
9
- ### [1.1.373-dev-12](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-11...v1.1.373-dev-12) (2025-08-27)
10
-
11
- ### [1.1.373-dev-11](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-10...v1.1.373-dev-11) (2025-08-27)
12
-
13
- ### [1.1.373-dev-10](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-9...v1.1.373-dev-10) (2025-08-26)
14
-
15
- ### [1.1.373-dev-9](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-8...v1.1.373-dev-9) (2025-08-26)
16
-
17
- ### [1.1.373-dev-8](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-7...v1.1.373-dev-8) (2025-08-25)
18
-
19
- ### [1.1.373-dev-7](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-6...v1.1.373-dev-7) (2025-08-23)
20
-
21
- ### [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)
22
-
23
- ### [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)
24
-
25
- ### [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)
26
-
27
- ### [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)
28
-
29
- ### [1.1.373-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.373-dev-1...v1.1.373-dev-2) (2025-08-16)
30
-
31
- ### [1.1.373-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.373...v1.1.373-dev-1) (2025-08-15)
5
+ ### [1.1.373-qa-1](https://github.com/jetthai/cuora-module/compare/v1.1.373...v1.1.373-qa-1) (2025-08-22)
32
6
 
33
7
  ### [1.1.373](https://github.com/jetthai/cuora-module/compare/v1.1.372...v1.1.373) (2025-08-13)
34
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetthai/cuora",
3
- "version": "1.1.373-dev-14",
3
+ "version": "1.1.373-qa-1",
4
4
  "description": "",
5
5
  "main": "./src/index.js",
6
6
  "type": "module",
@@ -29,10 +29,9 @@ export default {
29
29
  method: 'get',
30
30
  params: { activityNo, appSecret },
31
31
  }),
32
- getActivityRanking: ({ appSecret }) => ({
32
+ getActivityRanking: () => ({
33
33
  url: 'activities/activity/ranking',
34
34
  method: 'get',
35
- params: { appSecret },
36
35
  isPublic: true,
37
36
  }),
38
37
  getAchievements: ({ limit, page, appSecret }) => ({
@@ -85,7 +84,6 @@ export default {
85
84
  exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
86
85
  collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
87
86
  getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
88
- getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
89
87
  getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
90
88
  exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
91
89
  url: 'activities/exchange/diamond',
package/src/api/game.js CHANGED
@@ -57,25 +57,25 @@ export default {
57
57
  url: 'game/history/options',
58
58
  method: 'get',
59
59
  }),
60
- getListRoot: ({ timestamp, appSecret } = {}) => ({
60
+ getListRoot: ({ timestamp } = {}) => ({
61
61
  url: 'game/list/v3/root',
62
62
  method: 'get',
63
- params: { timestamp, appSecret },
63
+ params: { timestamp },
64
64
  }),
65
- getListCategory: ({ categoryId, timestamp, index, appSecret }) => ({
65
+ getListCategory: ({ categoryId, timestamp, index }) => ({
66
66
  url: 'game/list/v3/category',
67
67
  method: 'get',
68
- params: { categoryId, timestamp, index, appSecret },
68
+ params: { categoryId, timestamp, index },
69
69
  }),
70
70
  getListAddition: ({ categoryId, timestamp, index, appSecret }) => ({
71
71
  url: 'game/list/v3/addition',
72
72
  method: 'get',
73
73
  params: { categoryId, timestamp, index, appSecret },
74
74
  }),
75
- getListCategoryByRange: ({ categoryId, timestamp, end, appSecret }) => ({
75
+ getListCategoryByRange: ({ categoryId, timestamp, end }) => ({
76
76
  url: 'game/list/v3/categoryByRange',
77
77
  method: 'get',
78
- params: { categoryId, timestamp, end, appSecret },
78
+ params: { categoryId, timestamp, end },
79
79
  }),
80
80
  getListAdditionByRange: ({ categoryId, timestamp, end, appSecret }) => ({
81
81
  url: 'game/list/v3/additionByRange',
@@ -1,9 +1,9 @@
1
1
  export default {
2
2
  // 未登入排名資料
3
- getTournament: ({ activityNo, cycle, round, site, appSecret }) => ({
3
+ getTournament: ({ activityNo, cycle, round, site }) => ({
4
4
  url: 'tournament/detail',
5
5
  method: 'post',
6
- params: { activityNo, cycle, round, site, appSecret },
6
+ params: { activityNo, cycle, round, site },
7
7
  isPublic: true,
8
8
  }),
9
9
  // 登入後排名預設期數資料
package/src/api/user.js CHANGED
@@ -21,33 +21,28 @@ export default {
21
21
  getFriendsList: ({ type, page, row }) => ({ url: 'friends/reward-list', method: 'post', params: { type, page, row } }),
22
22
  postFriends: ({ friendCode }) => ({ url: 'friends', method: 'post', params: { friendCode } }),
23
23
  passwordRecovery: (recoveryData) => ({ url: 'recovery', method: 'post', params: recoveryData, isPublic: true }),
24
- // passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }), 平台版和現金網未使用
25
- // passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }), 平台版和現金網未使用
24
+ passwordAbandon: ({ number }) => ({ url: 'recovery/abandon', method: 'post', params: { number }, isPublic: true }),
25
+ passwordAcknowledge: (acknowledgeData) => ({ url: 'recovery/acknowledge', method: 'post', params: acknowledgeData, isPublic: true }),
26
26
  verify: () => ({ url: 'verify', method: 'post' }),
27
27
  acknowledge: ({ requestId, code }) => ({ url: 'acknowledge', method: 'post', params: { requestId, code } }),
28
- passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email, appSecret }) => ({
28
+ passwordV2RecoveryInit: ({ provider, username, countryCode, phone, email }) => ({
29
29
  url: 'recovery/v2/initiate',
30
30
  method: 'post',
31
- params: { provider, username, countryCode, phone, email, appSecret },
31
+ params: { provider, username, countryCode, phone, email },
32
32
  isPublic: true,
33
33
  }),
34
- passwordV2Acknowledge: ({ requestId, target, code, appSecret }) => ({
34
+ passwordV2Acknowledge: ({ requestId, target, code }) => ({
35
35
  url: 'recovery/v2/acknowledge',
36
36
  method: 'post',
37
- params: { requestId, target, code, appSecret },
38
- isPublic: true,
39
- }),
40
- // passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }), 平台版和現金網未使用
41
- passwordV2ResetOtp: ({ requestId, target }) => ({
42
- url: 'recovery/v2/reset',
43
- method: 'post',
44
- params: { requestId, target, appSecret },
37
+ params: { requestId, target, code },
45
38
  isPublic: true,
46
39
  }),
40
+ passwordV2Abandon: ({ requestId, target }) => ({ url: 'recovery/v2/abandon', method: 'post', params: { requestId, target }, isPublic: true }),
41
+ passwordV2ResetOtp: ({ requestId, target }) => ({ url: 'recovery/v2/reset', method: 'post', params: { requestId, target }, isPublic: true }),
47
42
  passwordV2Change: ({ requestId, target, newPassword }) => ({
48
43
  url: 'recovery/v2/changePassword',
49
44
  method: 'post',
50
- params: { requestId, target, newPassword, appSecret },
45
+ params: { requestId, target, newPassword },
51
46
  isPublic: true,
52
47
  }),
53
48
  verifyV2Initiate: ({ strategy }) => ({
@@ -10,7 +10,6 @@ export default function (request) {
10
10
  initial: 'fetching',
11
11
  context: {
12
12
  hasAnyAccount: false,
13
- hasAnyBankAccount: false,
14
13
  paymentList: {
15
14
  bankList: [],
16
15
  cryptoList: [],
@@ -170,14 +169,9 @@ export default function (request) {
170
169
  setBanks: assign((context, event) => {
171
170
  const { paymentList = {}, paymentInfo = {} } = event.data
172
171
  const { bankInfo = [] } = paymentInfo
173
- const { currency } = context
174
- const firstBank = bankInfo.find((b) => b.bindingType === 'BANK' || b.bindingType === 'EWALLET')
175
-
176
172
  return {
177
173
  hasAnyAccount: bankInfo.length > 0,
178
- hasAnyBankAccount: bankInfo.some((b) => b.bindingType === 'BANK' || b.bindingType === 'EWALLET'),
179
174
  holderName: bankInfo[0]?.holderName,
180
- ifscCode: currency === 'PKR' ? firstBank?.ifscCode : '',
181
175
  firstNameLocale: bankInfo[0]?.firstNameLocale || null,
182
176
  lastNameLocale: bankInfo[0]?.lastNameLocale || null,
183
177
  paymentList,
@@ -3,7 +3,6 @@ import { assign, createMachine } from 'xstate'
3
3
  import pickBy from 'lodash/pickBy.js'
4
4
  import api from '../api/common.js'
5
5
  import storage from '../util/storage.js'
6
- import sessionStorage from '../util/sessionStorage.js'
7
6
 
8
7
  export default function (request) {
9
8
  const { appSecret, defaultChannel, defaultSubchannel } = request.config
@@ -259,7 +258,7 @@ export default function (request) {
259
258
  const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
260
259
  const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
261
260
  const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
262
- const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || sessionStorage.get('fc') || sessionStorage.get('affiliate')
261
+ const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || storage.get('fc') || storage.get('affiliate')
263
262
 
264
263
  storage.set('channel', channel, {
265
264
  path: '/',
@@ -273,7 +272,7 @@ export default function (request) {
273
272
  path: '/',
274
273
  maxAge: 60 * 60 * 24 * 7,
275
274
  })
276
- sessionStorage.set('fc', friendCode, {
275
+ storage.set('fc', friendCode, {
277
276
  path: '/',
278
277
  maxAge: 60 * 60 * 24 * 7,
279
278
  })
@@ -63,7 +63,7 @@ export default function (request) {
63
63
  houseAccountName: houseAccount.accountName,
64
64
  houseAccountNumber: houseAccount.accountNumber,
65
65
  houseBankName: houseAccount.bankName,
66
- bankList: bankList?.data ? bankList.data : bankList,
66
+ bankList,
67
67
  }
68
68
  }),
69
69
  },
@@ -232,16 +232,8 @@ export default function (request) {
232
232
  }
233
233
  }),
234
234
  setCalculation: assign((context, event) => {
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
- }
235
+ return {
236
+ calculation: event.data,
245
237
  }
246
238
  }),
247
239
  clearCalculation: assign((context, event) => {
@@ -202,16 +202,8 @@ export default function (request, context) {
202
202
  return { selectedAmount: event.data }
203
203
  }),
204
204
  setCalculation: assign((context, event) => {
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
- }
205
+ return {
206
+ calculation: event.data,
215
207
  }
216
208
  }),
217
209
  clearCalculation: assign((context, event) => {
@@ -164,16 +164,8 @@ export default function (request) {
164
164
  }
165
165
  }),
166
166
  setCalculation: assign((context, event) => {
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
- }
167
+ return {
168
+ calculation: event.data,
177
169
  }
178
170
  }),
179
171
  clearCalculation: assign((context, event) => {
@@ -168,16 +168,8 @@ export default function (request, context) {
168
168
  }
169
169
  }),
170
170
  setCalculation: assign((context, event) => {
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
- }
171
+ return {
172
+ calculation: event.data,
181
173
  }
182
174
  }),
183
175
  clearCalculation: assign((context, event) => {
@@ -180,7 +180,6 @@ export default function (request) {
180
180
  return properties
181
181
  }),
182
182
  setCalculatedResult: assign((context, event) => {
183
- // V2接口轉換中回傳的資料結構不同
184
183
  const { data } = event.data
185
184
  if (data) {
186
185
  return {
@@ -197,7 +197,7 @@ export default function (request) {
197
197
  }
198
198
  }),
199
199
  setBanks: assign((context, event) => {
200
- const banks = event.data?.data ? event.data.data : event.data
200
+ const banks = event.data
201
201
  return {
202
202
  banks,
203
203
  selectedBank: banks[0],
@@ -220,7 +220,6 @@ export default function (request) {
220
220
  }
221
221
  }),
222
222
  setCalculation: assign((context, event) => {
223
- // V2接口轉換中回傳的資料結構不同
224
223
  const { data } = event.data
225
224
  if (data) {
226
225
  return {
@@ -119,7 +119,7 @@ export default function (request, context) {
119
119
  }),
120
120
  setBanks: assign((context, event) => {
121
121
  const { selectedDirect, bankMap } = context
122
- const userBanks = event.data?.data ? event.data.data : event.data
122
+ const userBanks = event.data
123
123
 
124
124
  if (selectedDirect)
125
125
  return {
@@ -144,7 +144,6 @@ export default function (request, context) {
144
144
  }
145
145
  }),
146
146
  setCalculation: assign((context, event) => {
147
- // V2接口轉換中回傳的資料結構不同
148
147
  const { data } = event.data
149
148
  if (data) {
150
149
  return {
@@ -276,7 +276,7 @@ export default function (request) {
276
276
  options: optional,
277
277
  minimum,
278
278
  maximum,
279
- bankList: bankList?.data ? bankList.data : bankList,
279
+ bankList,
280
280
  grandTotalEnable,
281
281
  }
282
282
  }),
@@ -292,7 +292,6 @@ export default function (request) {
292
292
  }
293
293
  }),
294
294
  setCalculation: assign((context, event) => {
295
- // V2接口轉換中回傳的資料結構不同
296
295
  const { data } = event.data
297
296
  if (data) {
298
297
  return {
@@ -151,7 +151,6 @@ export default function (request, context) {
151
151
  return { selectedAmount: event.data }
152
152
  }),
153
153
  setCalculation: assign((context, event) => {
154
- // V2接口轉換中回傳的資料結構不同
155
154
  const { data } = event.data
156
155
  if (data) {
157
156
  return {
@@ -265,7 +265,6 @@ export default function (request) {
265
265
  return { selectedAmount: event.data }
266
266
  }),
267
267
  setCalculation: assign((context, event) => {
268
- // V2接口轉換中回傳的資料結構不同
269
268
  const { data } = event.data
270
269
  if (data) {
271
270
  return {
@@ -150,7 +150,7 @@ export default function (request, context) {
150
150
  setInitData: assign((context, event) => {
151
151
  const { currentPayment, bankList, bindingPaymentInfo, processing } = event.data
152
152
  const userBankLsit = bindingPaymentInfo.bankList || []
153
- const allBankList = bankList?.data ? bankList.data : bankList
153
+ const allBankList = bankList || []
154
154
 
155
155
  const houseBanks = currentPayment.banks.map((bank) => {
156
156
  const foundBank = allBankList.find((item) => item.bankCode === bank.bankName)
@@ -200,7 +200,6 @@ export default function (request, context) {
200
200
  return { selectedAmount: event.data }
201
201
  }),
202
202
  setCalculation: assign((context, event) => {
203
- // V2接口轉換中回傳的資料結構不同
204
203
  const { data } = event.data
205
204
  if (data) {
206
205
  return {
@@ -291,7 +291,6 @@ export default function (request) {
291
291
  }
292
292
  }),
293
293
  setCalculation: assign((context, event) => {
294
- // V2接口轉換中回傳的資料結構不同
295
294
  const { data } = event.data
296
295
  if (data) {
297
296
  return {
@@ -170,7 +170,6 @@ export default function (request, context) {
170
170
  return { selectedAmount: event.data }
171
171
  }),
172
172
  setCalculation: assign((context, event) => {
173
- // V2接口轉換中回傳的資料結構不同
174
173
  const { data } = event.data
175
174
  if (data) {
176
175
  return {
@@ -260,7 +260,6 @@ export default function (request) {
260
260
  return { selectedAmount: event.data }
261
261
  }),
262
262
  setCalculation: assign((context, event) => {
263
- // V2接口轉換中回傳的資料結構不同
264
263
  const { data } = event.data
265
264
  if (data) {
266
265
  return {
@@ -128,7 +128,6 @@ export default function (request, context) {
128
128
  return { selectedAmount: event.data }
129
129
  }),
130
130
  setCalculation: assign((context, event) => {
131
- // V2接口轉換中回傳的資料結構不同
132
131
  const { data } = event.data
133
132
  if (data) {
134
133
  return {
@@ -190,7 +190,6 @@ export default function (request) {
190
190
  }
191
191
  }),
192
192
  setCalculation: assign((context, event) => {
193
- // V2接口轉換中回傳的資料結構不同
194
193
  const { data } = event.data
195
194
  if (data) {
196
195
  return {
@@ -267,7 +267,7 @@ export default function (request) {
267
267
  options: optional,
268
268
  minimum,
269
269
  maximum,
270
- bankList: bankList?.data ? bankList.data : bankList,
270
+ bankList,
271
271
  grandTotalEnable,
272
272
  }
273
273
  }),
@@ -287,7 +287,6 @@ export default function (request) {
287
287
  return { amount: event.data }
288
288
  }),
289
289
  setCalculation: assign((context, event) => {
290
- // V2接口轉換中回傳的資料結構不同
291
290
  const { data } = event.data
292
291
  if (data) {
293
292
  return {
@@ -27,9 +27,9 @@ export default function (request) {
27
27
  recentlyGame: [],
28
28
  youMayLike: [],
29
29
  selectedType: null,
30
- isYouMayLike: false,
31
- isRecentlyGame: false,
32
- isRecentlySearch: false,
30
+ isYouMayLike: null,
31
+ isRecentlyGame: null,
32
+ isRecentlySearch: null,
33
33
  },
34
34
  states: {
35
35
  init: {
@@ -388,7 +388,7 @@ export default function (request) {
388
388
  sendMayLikeTrace: async (context, event) => {
389
389
  return await request.send(
390
390
  game.setGameSearchTrace({
391
- isYouMayLike: true,
391
+ isYouMayLike: 1,
392
392
  })
393
393
  )
394
394
  },
@@ -21,9 +21,9 @@ export default function (request) {
21
21
  click: null,
22
22
  clickDefault: null,
23
23
  traceId: null,
24
- isYouMayLike: false,
25
- isRecentlyGame: false,
26
- isRecentlySearch: false,
24
+ isYouMayLike: null,
25
+ isRecentlyGame: null,
26
+ isRecentlySearch: null,
27
27
  gameCode: null,
28
28
  lang: 'en-US',
29
29
  },
@@ -119,9 +119,9 @@ export default function (request) {
119
119
  data: {
120
120
  tagId: context.tagList[0]?.id,
121
121
  traceData: {
122
- isYouMayLike: false,
123
- isRecentlyGame: false,
124
- isRecentlySearch: false,
122
+ isYouMayLike: null,
123
+ isRecentlyGame: null,
124
+ isRecentlySearch: null,
125
125
  },
126
126
  },
127
127
  })),
@@ -319,9 +319,9 @@ export default function (request) {
319
319
  tagIndex: null,
320
320
  gameCode: null,
321
321
  gameCodeIndex: null,
322
- isYouMayLike: false,
323
- isRecentlyGame: false,
324
- isRecentlySearch: false,
322
+ isYouMayLike: null,
323
+ isRecentlyGame: null,
324
+ isRecentlySearch: null,
325
325
  query: context.keyword,
326
326
  click: null,
327
327
  clickDefault: null,
@@ -523,7 +523,6 @@ export default function (request) {
523
523
  api.getListCategory({
524
524
  categoryId: category.id,
525
525
  index: 0,
526
- appSecret,
527
526
  })
528
527
  )
529
528
  .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
@@ -537,7 +536,6 @@ export default function (request) {
537
536
  api.getListCategory({
538
537
  categoryId: category.id,
539
538
  index: 0,
540
- appSecret,
541
539
  })
542
540
  )
543
541
  .then((res) => Object.assign({ downLine: res.data.filter((item) => item.isGame).slice(0, 20) }, category))
@@ -581,7 +579,6 @@ export default function (request) {
581
579
  categoryId: room.categoryId,
582
580
  end: index,
583
581
  timestamp: content.timestamp,
584
- appSecret,
585
582
  })
586
583
  ),
587
584
  request.send(
@@ -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, appSecret }))
198
+ const { data } = await request.send(ranking.getTournament({ activityNo, cycle, round, site }))
199
199
  return data
200
200
  },
201
201
  fetchRankingOptions: async (context) => {
@@ -2,7 +2,6 @@ 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
6
5
  return createMachine(
7
6
  {
8
7
  id: 'side',
@@ -79,10 +78,10 @@ export default function (request) {
79
78
  },
80
79
  services: {
81
80
  getMenu: async (context, event) => {
82
- return await request.send(game.getListRoot({ appSecret }))
81
+ return await request.send(game.getListRoot())
83
82
  },
84
83
  fetchUpdateMenu: async (context, event) => {
85
- return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
84
+ return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
86
85
  },
87
86
  },
88
87
  }
@@ -2,7 +2,6 @@ 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
6
5
  return createMachine(
7
6
  {
8
7
  id: 'side',
@@ -161,10 +160,10 @@ export default function (request) {
161
160
  },
162
161
  services: {
163
162
  getMenu: async (context, event) => {
164
- return await request.send(game.getListRoot({ appSecret }))
163
+ return await request.send(game.getListRoot())
165
164
  },
166
165
  fetchUpdateMenu: async (context, event) => {
167
- return await request.send(game.getListRoot({ timestamp: context.menu.timestamp, appSecret }))
166
+ return await request.send(game.getListRoot({ timestamp: context.menu.timestamp }))
168
167
  },
169
168
  },
170
169
  }
@@ -2,7 +2,6 @@ import { assign, createMachine } from 'xstate'
2
2
  import user from '../api/user.js'
3
3
 
4
4
  export default function (request) {
5
- const { appSecret } = request.config
6
5
  return createMachine(
7
6
  {
8
7
  id: 'user_reset_password',
@@ -208,20 +207,20 @@ export default function (request) {
208
207
  services: {
209
208
  sendOtp: async (context, event) => {
210
209
  const { provider, username, countryCode, phone, email } = context.otpParams
211
- return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email, appSecret }))
210
+ return await request.send(user.passwordV2RecoveryInit({ provider, username, countryCode, phone, email }))
212
211
  },
213
212
  resetOtp: async (context, event) => {
214
213
  const { requestId, target } = context
215
- return await request.send(user.passwordV2ResetOtp({ requestId, target, appSecret }))
214
+ return await request.send(user.passwordV2ResetOtp({ requestId, target }))
216
215
  },
217
216
  acknowledge: async (context, event) => {
218
217
  const { requestId, target } = context
219
218
  const code = event.data
220
- return await request.send(user.passwordV2Acknowledge({ requestId, target, code, appSecret }))
219
+ return await request.send(user.passwordV2Acknowledge({ requestId, target, code }))
221
220
  },
222
221
  change: async (context, event) => {
223
222
  const { requestId, target, newPassword } = context
224
- return await request.send(user.passwordV2Change({ requestId, target, newPassword, appSecret }))
223
+ return await request.send(user.passwordV2Change({ requestId, target, newPassword }))
225
224
  },
226
225
  },
227
226
  }
@@ -204,16 +204,8 @@ export default function (request, context) {
204
204
  }
205
205
  }),
206
206
  setCalculation: assign((context, event) => {
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
- }
207
+ return {
208
+ calculation: event.data,
217
209
  }
218
210
  }),
219
211
  resetCharge: assign((context, event) => {
@@ -384,16 +384,8 @@ export default function (request) {
384
384
  }
385
385
  }),
386
386
  setCalculation: assign((context, event) => {
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
- }
387
+ return {
388
+ calculation: event.data,
397
389
  }
398
390
  }),
399
391
  clearCalculation: assign((context, event) => {
@@ -111,7 +111,6 @@ const supportVersion2List = [
111
111
  'activities/types',
112
112
  'activities/promo',
113
113
  'activities/viptable',
114
- 'activities/level-bonus/info',
115
114
  'activities/numbers',
116
115
  'activities/honorBroadcast',
117
116
  'activities/exchange/diamond/max-amount',
@@ -150,7 +149,6 @@ export default class Request {
150
149
  this.key = `cuora_${config.clientId}`
151
150
  this.errorHandler = null
152
151
  this.hosts = []
153
- this.isBlocked = false
154
152
  this.initialize()
155
153
  }
156
154
 
@@ -197,25 +195,10 @@ export default class Request {
197
195
  try {
198
196
  const cancelToken = customToken || this.source.token
199
197
  this._checkToken(req)
200
-
201
198
  const requestConfig = this._createConfig(req, cancelToken)
202
- // console.log('*請求資料Check', requestConfig)
203
- const configUrls = ['getConfig', 'get-config']
204
- if (this.isBlocked && !configUrls.includes(requestConfig.url)) {
205
- // 狀態是維護中&請求非siteConfig,終止所有的請求,除了維護頁需要的資料(siteConfig)
206
- // console.log('%c*禁止的請求目標', requestConfig)
207
- } else {
208
- // console.log('%c*允許的請求目標', requestConfig)
209
- const { data } = await this.axios.request(requestConfig)
210
- return data
211
- }
199
+ const { data } = await this.axios.request(requestConfig)
200
+ return data
212
201
  } catch (error) {
213
- if (error.code === 'ERR_F108') {
214
- console.log('%c*維護中', 'color: #00ff33ff; font-weight: bold;')
215
- this.isBlocked = true
216
- this.errorHandler && this.errorHandler(error)
217
- throw error
218
- }
219
202
  if (error.code !== 'ERR_800') {
220
203
  if (error.code) {
221
204
  this.errorHandler && this.errorHandler(error)
@@ -1,28 +0,0 @@
1
- export default {
2
- get(name, options) {
3
- const itemStr = sessionStorage.getItem(name)
4
-
5
- if (!itemStr) {
6
- return null
7
- }
8
-
9
- const item = JSON.parse(itemStr)
10
- if (item.expiry && new Date().getTime() > item.expiry) {
11
- sessionStorage.removeItem(name)
12
- return null
13
- }
14
-
15
- return item.value
16
- },
17
- set(name, value, options) {
18
- const item = { value }
19
-
20
- if (options?.maxAge) {
21
- item.expiry = new Date().getTime() + options.maxAge * 1000
22
- }
23
- sessionStorage.setItem(name, JSON.stringify(item))
24
- },
25
- remove(name, options) {
26
- sessionStorage.removeItem(name)
27
- },
28
- }