wlwy-package 1.1.20 → 2.3.9

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wlwy-package",
3
3
  "author": "sean",
4
- "version": "1.1.20",
4
+ "version": "2.3.9",
5
5
  "description": "sean's npm package",
6
6
  "private": false,
7
7
  "main": "lib/index.umd.js",
package/utils/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import Console from './console'
2
2
  import WlwyConfig from './config'
3
- import XEUtils from 'xe-utils'
4
3
  /**
5
4
  * [公共方法]
6
5
  * @Iparams {*|any}
@@ -59,25 +58,13 @@ class WlwyUtils {
59
58
  }
60
59
 
61
60
  getDefaultLocale() {
62
- const Locale: string = this.cookie().get('language') || window.localStorage.getItem('language') || '';
61
+ const Locale: string = window.localStorage.getItem('language') ?? '';
63
62
  const browserLocale = navigator.language.split('-')[0] === 'zh' ? 'zhCn' : 'enUs'; // Get the language code from the browser language setting
64
63
  const language = Locale || browserLocale
65
- this.cookie().set('language', language)
66
64
  window.localStorage.setItem('language', language)
67
65
  return language;
68
66
  }
69
67
 
70
- cookie() {
71
- return {
72
- set(name: string, value: any) {
73
- return XEUtils.cookie.set(name, value, { path: '/', domain: window._CONFIG?.domainUrl })
74
- },
75
- get(name: string) {
76
- return XEUtils.cookie.get(name)
77
- }
78
- }
79
- }
80
-
81
68
  }
82
69
 
83
70