byt-ui 0.1.6 → 0.1.8

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,6 +1,6 @@
1
1
  {
2
2
  "name": "byt-ui",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "private": false,
5
5
  "description": "byt组件库",
6
6
  "author": {
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2022-10-18 12:37:03
5
- * @LastEditTime: 2024-04-22 19:06:56
5
+ * @LastEditTime: 2024-04-22 19:23:05
6
6
  * @LastEditors: 王国火
7
7
  */
8
8
  import Cookie from 'js-cookie'
@@ -14,7 +14,7 @@ export const getCookie = (key) => {
14
14
  }) || ''
15
15
  }
16
16
 
17
- export const setCookie = (key, value, expires = 7, path = '') => {
17
+ export const setCookie = (key, value, expires = 7, path = '/') => {
18
18
  const fullKey = `${website.key}-${key}`;
19
19
  return Cookie.set(fullKey, value, {
20
20
  expires,
@@ -23,7 +23,7 @@ export const setCookie = (key, value, expires = 7, path = '') => {
23
23
  })
24
24
  }
25
25
 
26
- export const removeCookie = (key, path = '') => {
26
+ export const removeCookie = (key, path = '/') => {
27
27
  const fullKey = `${website.key}-${key}`;
28
28
  return Cookie.remove(fullKey, {
29
29
  path
@@ -2,7 +2,7 @@
2
2
  * @Description:
3
3
  * @Author: 王国火
4
4
  * @Date: 2024-04-18 15:37:44
5
- * @LastEditTime: 2024-04-22 08:56:36
5
+ * @LastEditTime: 2024-04-23 09:30:29
6
6
  * @LastEditors: 王国火
7
7
  */
8
8
  import * as sentry from '@sentry/vue'
@@ -146,20 +146,22 @@ class Sentry {
146
146
  // 允许自定义配置覆盖、合并默认配置
147
147
  sentry.init(Object.assign({}, params, this.options))
148
148
  }
149
- async register() {
150
- const res = await this.axios({
149
+ register() {
150
+ this.axios({
151
151
  url: '/leo-tech-bridge/sysParam/getSentryDsn',
152
- method: 'GET'
153
- });
154
- // 需要兼容商城和业务中台
155
- const val = res instanceof Object ? res.data : res;
156
- if (val) {
152
+ method: 'GET',
153
+ showError: false
154
+ }).then(res => {
155
+ // 需要兼容商城和业务中台
156
+ const val = res instanceof Object ? res.data : res;
157
+ if (val) {
157
158
  // 重新处理拼接dsn地址
158
- const localhost = window.location;
159
- const result = val.split('@');
160
- const dsn = `${localhost.protocol}//${result[0]}@${localhost.host}${result[1]}`;
161
- this.init(dsn);
162
- }
159
+ const localhost = window.location;
160
+ const result = val.split('@');
161
+ const dsn = `${localhost.protocol}//${result[0]}@${localhost.host}${result[1]}`;
162
+ this.init(dsn);
163
+ }
164
+ });
163
165
  }
164
166
  }
165
167