@jetthai/cuora 1.1.387-dev-4 → 1.1.387-qa
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 +1 -9
- package/package.json +1 -1
- package/src/api/activity.js +0 -1
- package/src/api/common.js +0 -6
- package/src/machine/common.js +7 -47
- package/src/machine/side_v2.js +2 -2
- package/src/request/request.js +0 -3
- package/src/util/sessionStorage.js +0 -28
package/CHANGELOG.md
CHANGED
|
@@ -2,15 +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.387-
|
|
6
|
-
|
|
7
|
-
### [1.1.387-dev-3](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev-2...v1.1.387-dev-3) (2025-10-01)
|
|
8
|
-
|
|
9
|
-
### [1.1.387-dev-2](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev-1...v1.1.387-dev-2) (2025-10-01)
|
|
10
|
-
|
|
11
|
-
### [1.1.387-dev-1](https://github.com/jetthai/cuora-module/compare/v1.1.387-dev...v1.1.387-dev-1) (2025-09-26)
|
|
12
|
-
|
|
13
|
-
### [1.1.387-dev](https://github.com/jetthai/cuora-module/compare/v1.1.387...v1.1.387-dev) (2025-09-26)
|
|
5
|
+
### [1.1.387-qa](https://github.com/jetthai/cuora-module/compare/v1.1.387...v1.1.387-qa) (2025-09-26)
|
|
14
6
|
|
|
15
7
|
### [1.1.387](https://github.com/jetthai/cuora-module/compare/v1.1.386...v1.1.387) (2025-09-23)
|
|
16
8
|
|
package/package.json
CHANGED
package/src/api/activity.js
CHANGED
|
@@ -85,7 +85,6 @@ export default {
|
|
|
85
85
|
exchange: (data) => ({ url: 'activities/exchange', method: 'post', params: data }),
|
|
86
86
|
collect: (data) => ({ url: 'activities/collect', method: 'post', params: data }),
|
|
87
87
|
getVipTable: ({ appSecret }) => ({ url: 'activities/viptable', method: 'get', params: { appSecret } }),
|
|
88
|
-
getLevelBonusInfo: () => ({ url: 'activities/level-bonus/info', method: 'get' }),
|
|
89
88
|
getRankingList: () => ({ url: 'activities/ranking', method: 'get' }),
|
|
90
89
|
exchangeDiamond: ({ activityNo, exchangeAward = [] }) => ({
|
|
91
90
|
url: 'activities/exchange/diamond',
|
package/src/api/common.js
CHANGED
|
@@ -7,10 +7,4 @@ export default {
|
|
|
7
7
|
getNavbar: ({ appSecret } = {}) => ({ url: 'getNavbarSetting', params: { appSecret }, method: 'get', isPublic: true }),
|
|
8
8
|
getDefaultAffiliateCode: ({ appSecret }) => ({ url: 'getAffiliateCode', params: { appSecret }, method: 'get', isPublic: true }),
|
|
9
9
|
getSiteInfoConfig: ({ appSecret, config }) => ({ url: 'get-site-config', method: 'get', params: { appSecret, config }, isPublic: true }),
|
|
10
|
-
sendPixel: ({ appSecret, eventId, fbc, fbp, event }) => ({
|
|
11
|
-
url: 'pixel',
|
|
12
|
-
method: 'post',
|
|
13
|
-
params: { appSecret, eventId, fbc, fbp, event },
|
|
14
|
-
isPublic: true,
|
|
15
|
-
}),
|
|
16
10
|
}
|
package/src/machine/common.js
CHANGED
|
@@ -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
|
|
@@ -42,7 +41,6 @@ export default function (request) {
|
|
|
42
41
|
defaultAffiliateCode: null,
|
|
43
42
|
friendCode: null,
|
|
44
43
|
isPlaying: false,
|
|
45
|
-
isLogin: false,
|
|
46
44
|
},
|
|
47
45
|
states: {
|
|
48
46
|
config: {
|
|
@@ -56,7 +54,7 @@ export default function (request) {
|
|
|
56
54
|
},
|
|
57
55
|
},
|
|
58
56
|
fetching: {
|
|
59
|
-
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'
|
|
57
|
+
entry: ['setUA', 'setAgent', 'setPixel', 'setKPixel'],
|
|
60
58
|
invoke: {
|
|
61
59
|
src: 'fetchConfig',
|
|
62
60
|
onDone: [
|
|
@@ -90,20 +88,8 @@ export default function (request) {
|
|
|
90
88
|
},
|
|
91
89
|
},
|
|
92
90
|
feed: {
|
|
93
|
-
initial: '
|
|
91
|
+
initial: 'updating',
|
|
94
92
|
states: {
|
|
95
|
-
idle: {
|
|
96
|
-
on: {
|
|
97
|
-
LOGIN_REFRESH: {
|
|
98
|
-
target: 'updating',
|
|
99
|
-
actions: 'login',
|
|
100
|
-
},
|
|
101
|
-
LEAVE_GAME_REFRESH: {
|
|
102
|
-
target: 'updating',
|
|
103
|
-
actions: 'leaveGame',
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
93
|
updating: {
|
|
108
94
|
invoke: {
|
|
109
95
|
src: 'fetchFeeds',
|
|
@@ -124,12 +110,11 @@ export default function (request) {
|
|
|
124
110
|
},
|
|
125
111
|
on: {
|
|
126
112
|
ENTER_GAME_PAUSE: {
|
|
127
|
-
target: '.idle',
|
|
128
113
|
actions: 'resetByEnterGame',
|
|
129
114
|
},
|
|
130
|
-
|
|
131
|
-
target: '.
|
|
132
|
-
actions: '
|
|
115
|
+
LEAVE_GAME_REFRESH: {
|
|
116
|
+
target: '.updating',
|
|
117
|
+
actions: 'leaveGame',
|
|
133
118
|
},
|
|
134
119
|
},
|
|
135
120
|
},
|
|
@@ -238,18 +223,6 @@ export default function (request) {
|
|
|
238
223
|
isMobile: userAgent?.device?.type,
|
|
239
224
|
}
|
|
240
225
|
}),
|
|
241
|
-
setFbclid: assign(() => {
|
|
242
|
-
const urlParams = new URLSearchParams(window.location.search)
|
|
243
|
-
const fbclid = urlParams.get('fbclid') || ''
|
|
244
|
-
if (fbclid !== '') {
|
|
245
|
-
const timestamp = Date.now()
|
|
246
|
-
const cookieRecord = 'fb.1.' + timestamp + '.' + fbclid
|
|
247
|
-
document.cookie = `_fbc=${cookieRecord}; path=/; max-age=${60 * 60 * 24 * 7}`
|
|
248
|
-
}
|
|
249
|
-
return {
|
|
250
|
-
fbclid,
|
|
251
|
-
}
|
|
252
|
-
}),
|
|
253
226
|
setPixel: assign(() => {
|
|
254
227
|
let urlParams = new URLSearchParams(window.location.search)
|
|
255
228
|
const pix = urlParams.get('pix') || storage.get('pix') || ''
|
|
@@ -285,7 +258,7 @@ export default function (request) {
|
|
|
285
258
|
const channel = urlParams.get('channel') || storage.get('channel') || defaultChannel || 'official'
|
|
286
259
|
const subchannel = urlParams.get('subchannel') || storage.get('subchannel') || defaultSubchannel || 'pwa'
|
|
287
260
|
const affiliateCode = urlParams.get('ac') || urlParams.get('referralCode') || storage.get('ac') || storage.get('referralCode')
|
|
288
|
-
const friendCode = urlParams.get('fc') || urlParams.get('affiliate') ||
|
|
261
|
+
const friendCode = urlParams.get('fc') || urlParams.get('affiliate') || storage.get('fc') || storage.get('affiliate')
|
|
289
262
|
|
|
290
263
|
storage.set('channel', channel, {
|
|
291
264
|
path: '/',
|
|
@@ -299,7 +272,7 @@ export default function (request) {
|
|
|
299
272
|
path: '/',
|
|
300
273
|
maxAge: 60 * 60 * 24 * 7,
|
|
301
274
|
})
|
|
302
|
-
|
|
275
|
+
storage.set('fc', friendCode, {
|
|
303
276
|
path: '/',
|
|
304
277
|
maxAge: 60 * 60 * 24 * 7,
|
|
305
278
|
})
|
|
@@ -361,19 +334,6 @@ export default function (request) {
|
|
|
361
334
|
isPlaying: false,
|
|
362
335
|
}
|
|
363
336
|
}),
|
|
364
|
-
resetByLogout: assign((context, event) => {
|
|
365
|
-
return {
|
|
366
|
-
isLogin: false,
|
|
367
|
-
broadcastList: null,
|
|
368
|
-
mailBoxInfo: null,
|
|
369
|
-
promotions: null,
|
|
370
|
-
}
|
|
371
|
-
}),
|
|
372
|
-
login: assign((context, event) => {
|
|
373
|
-
return {
|
|
374
|
-
isLogin: true,
|
|
375
|
-
}
|
|
376
|
-
}),
|
|
377
337
|
},
|
|
378
338
|
guards: {
|
|
379
339
|
isAffiliateCodeInstructionsEnable: (context, event) => {
|
package/src/machine/side_v2.js
CHANGED
|
@@ -176,9 +176,9 @@ function isItemInMenu(targetItem, menuList) {
|
|
|
176
176
|
if (result) {
|
|
177
177
|
return true
|
|
178
178
|
} else {
|
|
179
|
-
if (currentItem
|
|
179
|
+
if (currentItem.categoryId === targetItem.categoryId) {
|
|
180
180
|
return true
|
|
181
|
-
} else if (currentItem
|
|
181
|
+
} else if (currentItem.sub?.length) {
|
|
182
182
|
return isItemInMenu(targetItem, currentItem.sub)
|
|
183
183
|
} else {
|
|
184
184
|
return false
|
package/src/request/request.js
CHANGED
|
@@ -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',
|
|
@@ -140,8 +139,6 @@ const supportVersion2List = [
|
|
|
140
139
|
'game/list/v3/gameInfo',
|
|
141
140
|
'payment/v2/uploadCommonSlip',
|
|
142
141
|
'game/history/options',
|
|
143
|
-
// 09/30
|
|
144
|
-
'pixel',
|
|
145
142
|
]
|
|
146
143
|
|
|
147
144
|
function isValid(value) {
|
|
@@ -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
|
-
}
|