Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 975f6d43
authored
Apr 08, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复显示问题
1 parent
d8e4f90f
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
58 deletions
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/Message/MessageDetail.vue
components/HomeFrame/components/Message/MessageList.vue
pages/common/msgwebview.vue
components/HomeFrame/components/LeftSide.vue
View file @
975f6d4
...
@@ -78,7 +78,7 @@ export default {
...
@@ -78,7 +78,7 @@ export default {
},
},
inject
:
[
'showPage'
],
inject
:
[
'showPage'
],
mounted
()
{
mounted
()
{
this
.
getMessageInfo
()
//
this.getMessageInfo()
},
},
methods
:
{
methods
:
{
changeIndex
(
index
)
{
changeIndex
(
index
)
{
...
...
components/HomeFrame/components/Message/MessageDetail.vue
View file @
975f6d4
<
template
>
<
template
>
<view
class=
"detail-box"
>
<view
class=
"detail-box"
>
<view
class=
"nav-bar"
>
<view
class=
"nav-bar"
>
<view
v-if=
"type == 'view'"
class=
"back"
@
click=
"backPage"
>
<view
v-if=
"type == 'view'
&& messageInfo.status == 1
"
class=
"back"
@
click=
"backPage"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
</view>
<view
class=
"title"
>
消息
</view>
<view
class=
"title"
>
消息
</view>
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<view
class=
"tips-tags"
>
<view
class=
"tips-tags"
>
<template
v-for=
"(i, idx) in classCountList"
>
<template
v-for=
"(i, idx) in classCountList"
>
<view>
{{
i
.
className
}}
</view>
<view>
{{
i
.
className
}}
</view>
<view
v-if=
"i.count > 1"
>
*
{{
i
.
count
}}
</view>
<view
v-if=
"i.count > 1"
>
*
{{
i
.
count
}}
</view>
<view
class=
"tags-separator"
v-if=
"classCountList.length - 1 != idx"
>
|
</view>
<view
class=
"tags-separator"
v-if=
"classCountList.length - 1 != idx"
>
|
</view>
</
template
>
</
template
>
</view>
</view>
...
@@ -22,7 +22,7 @@
...
@@ -22,7 +22,7 @@
v-for=
"(item, index) in recordDetailList"
:key=
"item.id"
>
v-for=
"(item, index) in recordDetailList"
:key=
"item.id"
>
<view
class=
"tip-header"
>
<view
class=
"tip-header"
>
<view
class=
"tip-rank"
>
{{
onlyOneLength
?
''
:
`NO.${index + 1
}
`
}}
优秀话术
-
{{
item
.
className
}}
<
/view
>
<view
class=
"tip-rank"
>
{{
onlyOneLength
?
''
:
`NO.${index + 1
}
`
}}
优秀话术
-
{{
item
.
className
}}
<
/view
>
<
view
class
=
"tip-time"
>
{{
item
.
pushT
ime
}}
<
/view
>
<
view
class
=
"tip-time"
>
{{
item
.
t
ime
}}
<
/view
>
<
view
class
=
"tip-tags"
>
{{
item
.
className
}}
<
/view
>
<
view
class
=
"tip-tags"
>
{{
item
.
className
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"tip-content"
>
<
view
class
=
"tip-content"
>
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<
/view
>
<
/view
>
<
/scroll-view
>
<
/scroll-view
>
<
view
class
=
"detail-footer"
>
<
view
class
=
"detail-footer"
>
<
view
class
=
"tips"
>
以上内容请认真阅读,至少读完
1
分钟,如未按照要求阅读完内容,今日无法使用
pad
接待
<
/view
>
<
view
class
=
"tips"
>
以上内容请认真阅读,至少读完
{{
MOCKDATA
.
timer
}}
分钟,如未按照要求阅读完内容,今日无法使用
pad
接待
<
/view
>
<
view
:
class
=
"['btn', !countFlag ? '' : 'blue']"
@
click
=
"handleCompleted"
>
已完成阅读
{{
!
countFlag
?
<
view
:
class
=
"['btn', !countFlag ? '' : 'blue']"
@
click
=
"handleCompleted"
>
已完成阅读
{{
!
countFlag
?
`${countdown
}
s`
:
`${countdown
}
s`
:
''
}}
<
/view
>
''
}}
<
/view
>
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<
view
:
class
=
"['outstanding-tip-item', messageInfo.status == 1 ? 'single' : 'read' ]"
>
<
view
:
class
=
"['outstanding-tip-item', messageInfo.status == 1 ? 'single' : 'read' ]"
>
<
view
class
=
"tip-header"
>
<
view
class
=
"tip-header"
>
<
view
class
=
"tip-rank"
>
优秀话术
-
{{
messageInfo
.
className
}}
<
/view
>
<
view
class
=
"tip-rank"
>
优秀话术
-
{{
messageInfo
.
className
}}
<
/view
>
<
view
class
=
"tip-time"
>
{{
messageInfo
.
pushT
ime
}}
<
/view
>
<
view
class
=
"tip-time"
>
{{
messageInfo
.
t
ime
}}
<
/view
>
<
view
class
=
"tip-tags"
>
{{
messageInfo
.
className
}}
<
/view
>
<
view
class
=
"tip-tags"
>
{{
messageInfo
.
className
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"tip-content"
>
<
view
class
=
"tip-content"
>
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
<
/view
>
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"detail-footer"
v
-
if
=
"messageInfo.status == 0"
>
<
view
class
=
"detail-footer"
v
-
if
=
"messageInfo.status == 0"
>
<
view
class
=
"tips"
>
以上内容请认真阅读,至少读完
1
分钟,如未按照要求阅读完内容,今日无法使用
pad
接待
<
/view
>
<
view
class
=
"tips"
>
以上内容请认真阅读,至少读完
{{
MOCKDATA
.
timer
}}
分钟,如未按照要求阅读完内容,今日无法使用
pad
接待
<
/view
>
<
view
:
class
=
"['btn', !countFlag ? '' : 'blue']"
@
click
=
"handleCompleted"
>
已完成阅读
{{
!
countFlag
?
<
view
:
class
=
"['btn', !countFlag ? '' : 'blue']"
@
click
=
"handleCompleted"
>
已完成阅读
{{
!
countFlag
?
`${countdown
}
s`
:
`${countdown
}
s`
:
''
}}
<
/view
>
''
}}
<
/view
>
...
@@ -74,7 +74,10 @@ export default {
...
@@ -74,7 +74,10 @@ export default {
type
:
'view'
,
type
:
'view'
,
tagIndex
:
''
,
tagIndex
:
''
,
enterTime
:
''
,
enterTime
:
''
,
isProcessing
:
false
isProcessing
:
false
,
MOCKDATA
:
{
timer
:
3
}
}
}
}
,
}
,
props
:
{
props
:
{
...
@@ -90,8 +93,8 @@ export default {
...
@@ -90,8 +93,8 @@ export default {
}
,
}
,
created
()
{
created
()
{
// 获取mock配置的时间
// 获取mock配置的时间
const
MOCKDATA
=
uni
.
$storage
.
get
(
'mock_data'
)
this
.
MOCKDATA
=
uni
.
$storage
.
get
(
'mock_data'
)
if
(
MOCKDATA
)
this
.
countdown
=
MOCKDATA
.
timer
this
.
countdown
=
this
.
MOCKDATA
.
timer
*
60
-
1
}
,
}
,
mounted
()
{
mounted
()
{
// 开始倒计时
// 开始倒计时
...
@@ -108,6 +111,9 @@ export default {
...
@@ -108,6 +111,9 @@ export default {
}
else
if
(
type
==
'read'
)
{
}
else
if
(
type
==
'read'
)
{
this
.
type
=
type
this
.
type
=
type
this
.
classCountList
=
classCountList
this
.
classCountList
=
classCountList
recordDetailList
.
map
(
e
=>
{
e
.
time
=
dayjs
(
new
Date
(
e
.
pushTime
)).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
)
this
.
recordDetailList
=
recordDetailList
this
.
recordDetailList
=
recordDetailList
console
.
log
(
this
.
classCountList
)
console
.
log
(
this
.
classCountList
)
}
}
...
@@ -243,8 +249,6 @@ export default {
...
@@ -243,8 +249,6 @@ export default {
.
outstanding
-
tip
-
list
{
.
outstanding
-
tip
-
list
{
height
:
calc
(
100
%
-
#
{
toRpx
(
348
)
}
);
height
:
calc
(
100
%
-
#
{
toRpx
(
348
)
}
);
}
}
.
outstanding
-
tip
-
item
{
.
outstanding
-
tip
-
item
{
...
...
components/HomeFrame/components/Message/MessageList.vue
View file @
975f6d4
...
@@ -26,26 +26,25 @@
...
@@ -26,26 +26,25 @@
<view
:class=
"['tag-item', i.classCode == tagIndex ? 'active' : '']"
v-for=
"i in tagList"
:key=
"i.className"
<view
:class=
"['tag-item', i.classCode == tagIndex ? 'active' : '']"
v-for=
"i in tagList"
:key=
"i.className"
@
click=
"selectTag(i)"
>
{{ i.className }}
</view>
@
click=
"selectTag(i)"
>
{{ i.className }}
</view>
</view>
</view>
<scroll-view
scroll-y
:class=
"['message-list', getScrollHeight]"
@
scrolltolower=
"pageonReachBottom
"
<scroll-view
scroll-y
ref=
"scrollViewRef"
:class=
"['message-list', getScrollHeight]
"
:scroll-top=
"scrollTop"
>
@
scrolltolower=
"pageonReachBottom"
:scroll-top=
"scrollTop"
>
<
template
v-if=
"getList.length"
>
<
template
v-if=
"getList.length"
>
<view
class=
"message-item"
v-for=
"item in getList"
:key=
"item.id"
@
click=
"openDetail(item)"
>
<view
class=
"message-item"
v-for=
"item in getList"
:key=
"item.id"
@
click=
"openDetail(item)"
>
<template
v-if=
"firstIndex == 0"
>
<template
v-if=
"firstIndex == 0"
>
<view
class=
"message-header"
>
<view
class=
"message-header"
>
<view
:class=
"['dot', item.readFlag ? '' : 'red']"
></view>
<view
:class=
"['dot', item.readFlag ? '' : 'red']"
></view>
<view
class=
"message-type"
>
{{
firstIndex
==
1
?
item
.
className
:
'系统通知'
}}
</view>
<view
class=
"message-type"
>
系统通知
</view>
<view
class=
"message-time"
>
{{
item
.
time
}}
</view>
<view
class=
"message-time"
>
{{
item
.
actualSendTimeStr
}}
</view>
<view
class=
"message-tag"
>
{{
CONTRNT_TYPE
[
item
.
contentType
]
}}
</view>
<view
class=
"message-tag"
>
{{
CONTRNT_TYPE
[
item
.
contentType
]
}}
</view>
</view>
</view>
<view
class=
"message-content"
>
您有新的消息【
{{
item
.
title
}}
】
{{
item
.
subtitle
?
`[${item.subtitle
}
]`
:
''
<view
class=
"message-content"
>
您有新的消息【
{{
item
.
title
}}
】
{{
item
.
subtitle
?
item
.
subtitle
.
length
>
40
?
`[${item.subtitle.slice(0, 39)
}
...]`
:
`[${item.subtitle
}
]`
:
''
}}
,请点击查看
}}
,请点击查看
<
/view
>
<
/view
>
<
/template
>
<
/template
>
<
template
v
-
else
-
if
=
"firstIndex == 1"
>
<
template
v
-
else
-
if
=
"firstIndex == 1"
>
<
view
class
=
"message-header"
>
<
view
class
=
"message-header"
>
<
view
:
class
=
"['dot', item.status == 1 ? '' : 'red']"
><
/view
>
<
view
:
class
=
"['dot', item.status == 1 ? '' : 'red']"
><
/view
>
<
view
class
=
"message-type"
>
{{
item
.
className
}}
<
/view
>
<
view
class
=
"message-type"
>
优秀话术
-
{{
item
.
className
}}
<
/view
>
<
view
class
=
"message-time"
>
{{
item
.
pushT
ime
}}
<
/view
>
<
view
class
=
"message-time"
>
{{
item
.
t
ime
}}
<
/view
>
<
view
class
=
"message-tag"
>
{{
item
.
className
}}
<
/view
>
<
view
class
=
"message-tag"
>
{{
item
.
className
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"message-content"
>
{{
item
.
polishContent
}}
<
/view
>
<
view
class
=
"message-content"
>
{{
item
.
polishContent
}}
<
/view
>
...
@@ -85,10 +84,10 @@ export default {
...
@@ -85,10 +84,10 @@ export default {
nothing
:
false
,
nothing
:
false
,
total
:
0
,
total
:
0
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
5
,
pageSize
:
10
,
tagList
:
[],
tagList
:
[],
tagIndex
:
''
,
tagIndex
:
''
,
scrollTop
:
0
,
scrollTop
:
0
}
}
}
,
}
,
computed
:
{
computed
:
{
...
@@ -119,16 +118,17 @@ export default {
...
@@ -119,16 +118,17 @@ export default {
}
,
}
,
inject
:
[
'showPage'
],
inject
:
[
'showPage'
],
mounted
()
{
mounted
()
{
console
.
log
(
111
)
this
.
init
()
this
.
init
()
}
,
}
,
methods
:
{
methods
:
{
init
()
{
init
()
{
this
.
getSystemPage
()
console
.
log
(
this
.
transfer
)
if
(
this
.
transfer
)
{
if
(
this
.
transfer
)
{
const
{
firstIndex
,
tagIndex
}
=
this
.
transfer
// 从话术详情返回,需记录上一次选择
const
{
firstIndex
,
tagIndex
}
=
this
.
transfer
this
.
changeType
(
firstIndex
,
tagIndex
)
this
.
changeType
(
firstIndex
,
tagIndex
)
}
else
{
// 第一次进入消息中心
this
.
getSystemPage
()
}
}
}
,
}
,
// tab切换
// tab切换
...
@@ -151,19 +151,10 @@ export default {
...
@@ -151,19 +151,10 @@ export default {
openDetail
(
row
)
{
openDetail
(
row
)
{
console
.
log
(
row
)
console
.
log
(
row
)
const
{
id
,
contentType
}
=
row
const
{
id
,
contentType
}
=
row
const
{
tagIndex
}
=
this
const
{
tagIndex
}
=
this
if
(
this
.
firstIndex
==
1
)
this
.
showPage
(
'MessageDetail'
,
{
row
,
type
:
'view'
,
tagIndex
}
)
if
(
this
.
firstIndex
==
1
)
this
.
showPage
(
'MessageDetail'
,
{
row
,
type
:
'view'
,
tagIndex
}
)
else
if
(
this
.
firstIndex
==
0
)
{
else
if
(
this
.
firstIndex
==
0
)
{
this
.
getDetailById
(
id
)
this
.
getDetailById
(
id
)
// if (contentType == 1)
{
// this.showPage('SystemDetial',
{
row
}
)
//
}
else
{
// const url = 'https://wx.glsx.com.cn/upload/fragment/video(1)_2021112217142-1726304035479-20240914045357.mp4'
// // const url = 'https://wx.glsx.com.cn/upload/fragment/pdfpdfpdf-1725352659790-20240903043740.pdf'
// uni.navigateTo(
{
// url: `/pages/common/msgwebview?url=$
{
url
}
`
//
}
)
//
}
}
}
}
,
}
,
back
()
{
back
()
{
...
@@ -208,6 +199,9 @@ export default {
...
@@ -208,6 +199,9 @@ export default {
pageSize
pageSize
}
}
const
res
=
await
uni
.
$api
.
commonApi
.
getPageRecord
(
params
)
const
res
=
await
uni
.
$api
.
commonApi
.
getPageRecord
(
params
)
res
.
list
?.
length
&&
res
.
list
.
map
(
e
=>
{
e
.
time
=
dayjs
(
new
Date
(
e
.
pushTime
)).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
)
if
(
pageNum
==
1
)
{
if
(
pageNum
==
1
)
{
this
.
messageList
=
res
.
list
this
.
messageList
=
res
.
list
}
else
{
}
else
{
...
@@ -232,9 +226,9 @@ export default {
...
@@ -232,9 +226,9 @@ export default {
const
res
=
await
uni
.
$api
.
commonApi
.
getTaskInfo
({
const
res
=
await
uni
.
$api
.
commonApi
.
getTaskInfo
({
pageNum
,
pageSize
pageNum
,
pageSize
}
)
}
)
res.list?.length && res.list.map(e => {
//
res.list?.length && res.list.map(e =>
{
e.time = dayjs(new Date(e.actualSendTime)).format("YYYY-MM-DD HH:mm:ss")
//
e.time = dayjs(new Date(e.actualSendTime)).format("YYYY-MM-DD HH:mm:ss")
}
)
//
}
)
if
(
pageNum
==
1
)
{
if
(
pageNum
==
1
)
{
this
.
systemList
=
res
.
list
this
.
systemList
=
res
.
list
}
else
{
}
else
{
...
@@ -248,31 +242,24 @@ export default {
...
@@ -248,31 +242,24 @@ export default {
}
}
}
,
}
,
async
getDetailById
(
id
)
{
async
getDetailById
(
id
)
{
const res = await uni.$api.commonApi.getTaskById({
id
}
)
const
res
=
await
uni
.
$api
.
commonApi
.
getTaskById
({
id
}
)
console
.
log
(
res
)
console
.
log
(
res
)
if(res.contentType == 1) {
if
(
res
.
contentType
==
1
)
{
this
.
showPage
(
'SystemDetial'
,
{
row
:
res
}
)
this
.
showPage
(
'SystemDetial'
,
{
row
:
res
}
)
}
else
if
(
res
.
contentType
==
2
)
{
}
else
if
(
res
.
contentType
==
2
)
{
console
.
log
(
JSON
.
parse
(
res
.
content
))
console
.
log
(
JSON
.
parse
(
res
.
content
))
const _content = res.content ? JSON.parse(res.content)
:
[]
const
_content
=
res
.
content
?
JSON
.
parse
(
res
.
content
)
:
[]
const
url
=
_content
[
0
]
const
url
=
_content
[
0
]
const {
content, title
}
= res
const
{
content
,
title
,
id
}
=
res
uni
.
navigateTo
({
uni
.
navigateTo
({
url: `
/
pages
/
common
/
msgwebview
?
url
=
$
{
url
}
&
title
=
$
{
title
}
`
url
:
`/pages/common/msgwebview?url=${url
}
&title=${title
}
&id=${id
}
`
}
)
}
)
// const url = res.content ? JSON.parse(res.content)[0].image : ''
// console.log(url)
// const url = 'https://wx.glsx.com.cn/upload/fragment/video(1)_2021112217142-1726304035479-20240914045357.mp4'
// const {content, title
}
= res
// uni.navigateTo({
// url: `
/
pages
/
common
/
msgwebview
?
url
=
$
{
url
}
&
title
=
$
{
title
}
`
//
}
)
}
else
if
(
res
.
contentType
==
3
)
{
}
else
if
(
res
.
contentType
==
3
)
{
const _content = res.content ? JSON.parse(res.content)
:
[]
const
_content
=
res
.
content
?
JSON
.
parse
(
res
.
content
)
:
[]
const
url
=
_content
[
0
].
image
const
url
=
_content
[
0
].
image
const {
content, title
}
= res
const
{
content
,
title
,
id
}
=
res
uni
.
navigateTo
({
uni
.
navigateTo
({
url: `
/
pages
/
common
/
msgwebview
?
url
=
$
{
url
}
&
title
=
$
{
title
}
`
url
:
`/pages/common/msgwebview?url=${url
}
&title=${title
}
&id=${id
}
`
}
)
}
)
}
}
}
,
}
,
...
@@ -285,9 +272,7 @@ export default {
...
@@ -285,9 +272,7 @@ export default {
this
.
pageNum
+=
1
this
.
pageNum
+=
1
if
(
this
.
firstIndex
==
1
)
this
.
getMessagePage
()
if
(
this
.
firstIndex
==
1
)
this
.
getMessagePage
()
else
if
(
this
.
firstIndex
==
0
)
this
.
getSystemPage
()
else
if
(
this
.
firstIndex
==
0
)
this
.
getSystemPage
()
// this.getGrantRecord(this.firstIndex)
}
else
this
.
nothing
=
true
}
else
this
.
nothing
=
true
// this.getMessagePage()
}
}
}
}
}
}
...
@@ -422,9 +407,9 @@ export default {
...
@@ -422,9 +407,9 @@ export default {
}
}
.
message
-
list
{
.
message
-
list
{
position
:
relative
;
background
-
color
:
#
fff
;
background
-
color
:
#
fff
;
border
-
radius
:
0
0
toRpx
(
48
)
toRpx
(
48
);
border
-
radius
:
0
0
toRpx
(
48
)
toRpx
(
48
);
&
.
scroll
-
list
{
&
.
scroll
-
list
{
height
:
calc
(
100
%
-
#
{
toRpx
(
222
)
}
);
height
:
calc
(
100
%
-
#
{
toRpx
(
222
)
}
);
}
}
...
@@ -436,8 +421,12 @@ export default {
...
@@ -436,8 +421,12 @@ export default {
.
message
-
item
{
.
message
-
item
{
border
-
radius
:
toRpx
(
16
);
border
-
radius
:
toRpx
(
16
);
box
-
shadow
:
0
toRpx
(
4
)
toRpx
(
20
)
0
#
0000001
a
;
box
-
shadow
:
0
toRpx
(
4
)
toRpx
(
20
)
0
#
0000001
a
;
margin:
toRpx(10)
toRpx(64) toRpx(40);
margin
:
0
toRpx
(
64
)
toRpx
(
40
);
padding
:
toRpx
(
24
)
toRpx
(
32
);
padding
:
toRpx
(
24
)
toRpx
(
32
);
box
-
sizing
:
border
-
box
;
&
:
first
-
child
{
margin
-
top
:
toRpx
(
10
);
}
.
message
-
header
{
.
message
-
header
{
display
:
flex
;
display
:
flex
;
...
@@ -534,4 +523,9 @@ export default {
...
@@ -534,4 +523,9 @@ export default {
}
}
}
}
}
}
/deep/
{
.
uni
-
scroll
-
view
-
content
{
height
:
calc
(
100
%
-
#
{
toRpx
(
10
)
}
);
}
}
<
/style>
<
/style>
\ No newline at end of file
\ No newline at end of file
pages/common/msgwebview.vue
View file @
975f6d4
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
</
template
>
</
template
>
<
script
type=
"text/ecmascript-6"
>
<
script
type=
"text/ecmascript-6"
>
let
timer
=
null
export
default
{
export
default
{
name
:
''
,
name
:
''
,
data
()
{
data
()
{
...
@@ -26,10 +27,41 @@ export default {
...
@@ -26,10 +27,41 @@ export default {
if
(
options
.
title
)
uni
.
setNavigationBarTitle
({
if
(
options
.
title
)
uni
.
setNavigationBarTitle
({
title
:
options
.
title
title
:
options
.
title
})
})
this
.
addTrack
(
options
)
},
},
mounted
()
{
mounted
()
{
},
},
beforeDestroy
()
{
if
(
timer
)
{
clearInterval
(
timer
);
}
},
methods
:
{
methods
:
{
// 进入埋点事件
addTrack
(
row
)
{
console
.
log
(
row
)
try
{
const
{
phone
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
entryData
=
{
taskId
:
row
.
id
,
phoneNumber
:
phone
}
uni
.
$api
.
commonApi
.
addSystemInfo
(
entryData
).
then
(
res
=>
{
if
(
res
)
{
this
.
leaveTrack
(
res
)
timer
=
setInterval
(()
=>
{
this
.
leaveTrack
(
res
)
},
3000
)
}
})
}
catch
(
error
)
{
console
.
error
(
'进入埋点发生错误'
,
error
);
}
},
// 离开埋点事件
async
leaveTrack
(
id
)
{
await
uni
.
$api
.
commonApi
.
leaveSystemInfo
({
id
})
}
}
}
}
}
</
script
>
</
script
>
...
...
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