@uxda/appkit 4.2.65 → 4.2.66

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/dist/index.js CHANGED
@@ -411,8 +411,14 @@ function generateUniqueId(pre) {
411
411
  function useLogger(options) {
412
412
  const appkitOptions = useAppKitOptions();
413
413
  const url = appkitOptions.baseUrl();
414
- if (url.includes("ytech.ddjf.com")) {
415
- defaultLogOptions.projectName = "ddyk-prod";
414
+ if (Taro.getEnv() === "WEB") {
415
+ if (location.origin.includes("ytech.ddjf.com")) {
416
+ defaultLogOptions.projectName = "ddyk-prod";
417
+ }
418
+ } else {
419
+ if (url.includes("ytech.ddjf.com")) {
420
+ defaultLogOptions.projectName = "ddyk-prod";
421
+ }
416
422
  }
417
423
  if (options) {
418
424
  options = Object.assign(defaultLogOptions, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "4.2.65",
3
+ "version": "4.2.66",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
@@ -32,9 +32,16 @@ export function useLogger(options?: LogType) {
32
32
  const appkitOptions = useAppKitOptions()
33
33
  const url = appkitOptions.baseUrl()
34
34
 
35
- if (url.includes('ytech.ddjf.com')) {
36
- defaultLogOptions.projectName = 'ddyk-prod'
35
+ if (Taro.getEnv() === 'WEB') {
36
+ if (location.origin.includes('ytech.ddjf.com')) {
37
+ defaultLogOptions.projectName = 'ddyk-prod'
38
+ }
39
+ } else {
40
+ if (url.includes('ytech.ddjf.com')) {
41
+ defaultLogOptions.projectName = 'ddyk-prod'
42
+ }
37
43
  }
44
+
38
45
  if (options) {
39
46
  options = Object.assign(defaultLogOptions, options)
40
47
  } else {