Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
merchant-manage-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
merchant-manage-ui
Commits
1bfdb1be
Commit
1bfdb1be
authored
Mar 13, 2023
by
张子雨
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 测试
parent
fbad9667
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
15 deletions
+23
-15
app.js
src/app.js
+23
-15
No files found.
src/app.js
View file @
1bfdb1be
...
@@ -3,23 +3,31 @@ import * as Sentry from '@sentry/react';
...
@@ -3,23 +3,31 @@ import * as Sentry from '@sentry/react';
import
localStorage
from
'
@/utils/localStorage
'
;
import
localStorage
from
'
@/utils/localStorage
'
;
// process.env.SENTRY_ENV !== 'test' 去掉测试环境不会报错
// process.env.SENTRY_ENV !== 'test' 去掉测试环境不会报错
// if (process.env.NODE_ENV === 'production') {
if
(
process
.
env
.
NODE_ENV
===
'
production
'
)
{
try
{
try
{
Sentry
.
init
({
Sentry
.
init
({
dsn
:
'
http://b3f60c62e1234e26a5b851b9f26fba07@sentry.q-gp.com/34
'
,
dsn
:
'
http://b3f60c62e1234e26a5b851b9f26fba07@sentry.q-gp.com/34
'
,
release
:
'
merchant-manage-ui@1.0.0
'
,
release
:
'
merchant-manage-ui@1.0.0
'
,
maxBreadcrumbs
:
50
,
maxBreadcrumbs
:
50
,
tracesSampleRate
:
1
,
tracesSampleRate
:
1
,
});
beforeSend
:
e
=>
{
Sentry
.
configureScope
(
scope
=>
{
const
err
=
e
.
exception
?.
values
||
[];
scope
.
setUser
({
// XXX 12-21 不上报[object Object]此类基础库异常
token
:
localStorage
.
get
(
'
token
'
)
||
null
,
if
(
err
.
some
(
item
=>
item
.
value
.
indexOf
(
'
“ResizeObserver
'
)
>
-
1
))
{
return
null
;
}
return
e
;
},
});
});
});
Sentry
.
configureScope
(
scope
=>
{
}
catch
(
e
)
{
scope
.
setUser
({
console
.
log
(
'
Sentry无法加载
'
,
e
);
token
:
localStorage
.
get
(
'
token
'
)
||
null
,
});
});
}
catch
(
e
)
{
console
.
log
(
'
Sentry无法加载
'
,
e
);
}
}
}
// }
export
const
dva
=
{
export
const
dva
=
{
config
:
{
config
:
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment