Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-home
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 80334768
authored
Aug 16, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
web-see
1 parent
7d7708bd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
74 additions
and
23 deletions
src/setup/qiankun.js
src/views/home/aiCall.vue
src/setup/qiankun.js
View file @
8033476
...
...
@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2022-07-22 18:15:13
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-08-16 1
0:52:36
* @LastEditTime: 2023-08-16 1
8:15:24
* @FilePath: \scrm-micro-home\src\setup\qiankun.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -22,29 +22,29 @@ Vue.use(GLTable)
Vue
.
use
(
GLEditor
)
Vue
.
use
(
GLFull
)
Vue
.
use
(
GLDialog
)
Vue
.
use
(
webSee
,
{
dsn
:
'http://192.168.1.127:8083/reportData'
,
// 上报的地址
apikey
:
'project_home'
,
// 项目唯一的id
userId
:
'897578'
,
// 用户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
}
}
})
//
Vue.use(webSee, {
//
dsn: 'http://192.168.1.127:8083/reportData', // 上报的地址
//
apikey: 'project_home', // 项目唯一的id
//
userId: '897578', // 用户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
:
2
0
})
//
//
注册性能检测插件
//
webSee.use(performance)
//
//
注册页面录屏插件,设置单次录屏时长为20s,默认是10s
// webSee.use(recordscreen, { recordScreentime: 1
0 })
// import GLTable from '@/components/glsx-table/index'
// Vue.component('GLTable', GLTable)
// import 'glsx-components/src/theme/theme.scss'
...
...
src/views/home/aiCall.vue
View file @
8033476
...
...
@@ -25,6 +25,12 @@
<div
class=
"form-panel"
>
<div
class=
"form-header"
>
<div
class=
"forom-title"
>
任务列表
</div>
<el-button
type=
"primary"
@
click=
"codeErr"
>
js错误
</el-button>
<el-button
type=
"success"
@
click=
"asyncError"
>
异步错误
</el-button>
<el-button
type=
"danger"
@
click=
"promiseErr"
>
promise错误
</el-button>
<el-button
type=
"info"
@
click=
"xhrError"
>
xhr请求报错
</el-button>
<el-button
type=
"warning"
@
click=
"fetchError"
>
fetch请求报错
</el-button>
<el-button
type=
"danger"
@
click=
"resourceError"
>
加载资源报错
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"small"
@
click=
"handleAdd()"
>
创建任务
</el-button>
</div>
...
...
@@ -156,6 +162,51 @@ export default {
}
},
methods
:
{
fetchError
()
{
fetch
(
'https://jsonplaceholder.typicode.com/posts/a'
)
.
then
(
res
=>
{
console
.
log
(
res
)
})
.
catch
(()
=>
{})
},
asyncError
()
{
setTimeout
(()
=>
{
JSON
.
parse
(
''
)
})
},
codeErr
()
{
let
a
=
undefined
if
(
a
.
length
)
{
console
.
log
(
'1'
)
}
},
resourceError
()
{
let
script
=
document
.
createElement
(
'script'
)
script
.
type
=
'text/javascript'
script
.
src
=
'https://abc.com/index.js'
document
.
body
.
appendChild
(
script
)
},
promiseErr
()
{
new
Promise
(
resolve
=>
{
let
person
=
{}
person
.
name
.
age
()
resolve
()
})
},
xhrError
()
{
let
_this
=
this
let
ajax
=
new
XMLHttpRequest
()
ajax
.
open
(
'GET'
,
'https://abc.com/test/api'
)
ajax
.
setRequestHeader
(
'content-type'
,
'application/json'
)
ajax
.
onreadystatechange
=
function
()
{
if
(
ajax
.
status
===
200
||
ajax
.
status
===
304
)
{
console
.
log
(
'ajax'
,
ajax
)
}
}
ajax
.
send
()
ajax
.
addEventListener
(
'loadend'
,
()
=>
{})
},
findStatus
(
status
)
{
return
TASK_STATUS
.
find
(
item
=>
item
.
value
==
status
).
label
},
...
...
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