Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-base
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 36ff4857
authored
Aug 22, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
web-see
1 parent
de5c2177
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
package-lock.json
package.json
src/main.js
package-lock.json
View file @
36ff485
This diff could not be displayed because it is too large.
package.json
View file @
36ff485
...
@@ -11,6 +11,9 @@
...
@@ -11,6 +11,9 @@
"dependencies"
:
{
"dependencies"
:
{
"@sentry/tracing"
:
"^7.7.0"
,
"@sentry/tracing"
:
"^7.7.0"
,
"@sentry/vue"
:
"^7.7.0"
,
"@sentry/vue"
:
"^7.7.0"
,
"@websee/core"
:
"^4.0.2"
,
"@websee/performance"
:
"^4.0.2"
,
"@websee/recordscreen"
:
"^4.0.2"
,
"core-js"
:
"^3.6.5"
,
"core-js"
:
"^3.6.5"
,
"element-ui"
:
"^2.15.6"
,
"element-ui"
:
"^2.15.6"
,
"glsx-common"
:
"^2.1.0"
,
"glsx-common"
:
"^2.1.0"
,
...
...
src/main.js
View file @
36ff485
/*
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-08-22 15:11:57
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-22 15:19:05
* @FilePath: \scrm-base\src\main.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
import
Vue
from
'vue'
import
Vue
from
'vue'
import
App
from
'./App.vue'
import
App
from
'./App.vue'
import
router
from
'./router'
import
router
from
'./router'
import
store
from
'./store'
import
store
from
'./store'
import
*
as
Sentry
from
'@sentry/vue'
import
*
as
Sentry
from
'@sentry/vue'
import
webSee
from
'@websee/core'
import
performance
from
'@websee/performance'
import
recordscreen
from
'@websee/recordscreen'
import
{
BrowserTracing
}
from
'@sentry/tracing'
import
{
BrowserTracing
}
from
'@sentry/tracing'
import
{
Http
}
from
'glsx-common'
import
{
Http
}
from
'glsx-common'
import
'@/common/reg-prototype.js'
import
'@/common/reg-prototype.js'
...
@@ -32,6 +43,29 @@ if (process.env.NODE_ENV === 'production') {
...
@@ -32,6 +43,29 @@ if (process.env.NODE_ENV === 'production') {
tracesSampleRate
:
1.0
tracesSampleRate
:
1.0
})
})
}
}
Vue
.
use
(
webSee
,
{
dsn
:
'http://192.168.1.127:8083/reportData'
,
// 上报的地址
apikey
:
'scrm'
,
// 项目唯一的id
userId
:
'scrm'
,
// 用户id
repeatCodeError
:
true
,
// 开启错误上报去重,重复的代码错误只上报一次
silentWhiteScreen
:
true
,
// 开启白屏检测
skeletonProject
:
true
,
// 项目是否有骨架屏
handleHttpStatus
(
data
)
{
// 自定义hook, 根据接口返回的 response 判断请求是否正确
let
{
url
,
response
}
=
data
let
{
code
}
=
typeof
response
===
'string'
?
JSON
.
parse
(
response
)
:
response
if
(
url
.
includes
(
'/getErrorList'
))
{
return
code
===
200
?
true
:
false
}
else
{
return
true
}
}
})
// 注册性能检测插件
webSee
.
use
(
performance
)
// 注册页面录屏插件,设置单次录屏时长为20s,默认是10s
webSee
.
use
(
recordscreen
,
{
recordScreentime
:
10
})
var
instance
=
null
var
instance
=
null
async
function
render
()
{
async
function
render
()
{
const
cfg
=
await
fetchConfig
(
false
)
const
cfg
=
await
fetchConfig
(
false
)
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment