@jetthai/cuora 1.0.174 → 1.0.175
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 +2 -0
- package/dist/bundle.mjs +1453 -595
- package/package.json +1 -1
- package/src/machine/common.js +19 -14
package/package.json
CHANGED
package/src/machine/common.js
CHANGED
|
@@ -150,22 +150,27 @@ export default function (request) {
|
|
|
150
150
|
}
|
|
151
151
|
}),
|
|
152
152
|
setAgent: assign((context, event) => {
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
if (window.CC_JSB === true) {
|
|
154
|
+
// is cocos native app
|
|
155
|
+
return
|
|
156
|
+
} else {
|
|
157
|
+
let urlParams = new URLSearchParams(window.location.search)
|
|
158
|
+
const channel = urlParams.get('channel') || cookies.get('channel') || defaultChannel || 'official'
|
|
159
|
+
const subchannel = urlParams.get('subchannel') || cookies.get('subchannel') || defaultSubchannel || 'pwa'
|
|
156
160
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
161
|
+
cookies.set('channel', channel, {
|
|
162
|
+
path: '/',
|
|
163
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
164
|
+
})
|
|
165
|
+
cookies.set('subchannel', subchannel, {
|
|
166
|
+
path: '/',
|
|
167
|
+
maxAge: 60 * 60 * 24 * 7,
|
|
168
|
+
})
|
|
165
169
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
170
|
+
return {
|
|
171
|
+
channel,
|
|
172
|
+
subchannel,
|
|
173
|
+
}
|
|
169
174
|
}
|
|
170
175
|
}),
|
|
171
176
|
setFeeds: assign((context, event) => {
|