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 2d67bd18
authored
May 15, 2025
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
北森
1 parent
2a38b5a9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
5 deletions
api/module/common.js
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/index.vue
api/module/common.js
View file @
2d67bd1
...
...
@@ -289,5 +289,21 @@ module.exports = {
projectName
:
'pad'
,
...
data
})
},
//北森埋点进入
dynamicrecordAdd
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.beisen.dynamicrecord.add'
,
projectName
:
'pad'
,
...
data
})
},
//更新埋点离开信息
dynamicrecordLeave
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.beisen.dynamicrecord.leave'
,
projectName
:
'pad'
,
...
data
})
}
}
components/HomeFrame/components/LeftSide.vue
View file @
2d67bd1
...
...
@@ -11,13 +11,13 @@
</view>
<view
:class=
"['left-tabs',
{ three: tabs.length == 3 }]">
<template
v-for=
"(i, index) in tabs"
>
<view
:class=
"['tab-item',
{ tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index)">
<view
:class=
"['tab-item',
{ tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index
, i
)">
<view
class=
"icon-box"
>
<view
:class=
"['sprite-icon', `icon-$
{i.icon}${tabIndex == index ? '-active' : ''}`]">
</view>
</view>
{{
i
.
label
}}
<view
class=
"dot"
v-if=
"i.icon == 'record' && perRecordNumber"
></view>
<view
class=
"tip-box"
v-if=
"i.icon == 'study'
"
>
待办事项:3
</view>
<view
class=
"tip-box"
v-if=
"i.icon == 'study'
&& readCount"
@
click=
"readCount = 0"
>
待办事项:
{{
readCount
}}
</view>
</view>
</
template
>
</view>
...
...
@@ -71,6 +71,7 @@ export default {
{
label
:
"学习中心"
,
icon
:
"study"
,
isTrack
:
true
,
name
:
'StudyCenter'
},
],
...
...
@@ -80,12 +81,21 @@ export default {
total
:
0
},
messageTotal
:
0
,
readCount
:
0
,
trackId
:
0
,
trackInterval
:
null
,
collectTrack
:
false
,
hasPerson
:
false
}
},
watch
:
{
userInfo
(
n
)
{
if
(
n
.
shopMerchantId
)
this
.
haveCustomerAccess
(
n
)
},
trackId
(
n
)
{
if
(
!
n
)
{
clearInterval
(
this
.
trackInterval
)
}
}
},
computed
:
{
...
...
@@ -100,11 +110,47 @@ export default {
this
.
getMessageInfo
();
});
this
.
getMessageInfo
()
this
.
getUnreadCount
()
},
inject
:
[
'showPage'
],
methods
:
{
changeIndex
(
index
)
{
getUnreadCount
()
{
uni
.
$api
.
commonApi
.
getUnreadCount
({}).
then
(
res
=>
{
this
.
readCount
=
res
})
},
addTrack
()
{
const
{
merchantId
,
merchantName
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
params
=
{
goodsType
:
1
,
merchantId
,
merchantName
}
uni
.
$api
.
commonApi
.
dynamicrecordAdd
(
params
).
then
(
res
=>
{
this
.
trackId
=
res
})
},
leaveTrack
()
{
if
(
!
this
.
trackId
)
return
uni
.
$api
.
commonApi
.
dynamicrecordLeave
({
id
:
this
.
trackId
}).
then
(
res
=>
{
console
.
log
(
res
)
})
},
startTrack
()
{
this
.
trackInterval
=
setInterval
(()
=>
{
this
.
addTrack
()
},
5000
)
},
changeIndex
(
index
,
item
)
{
if
(
this
.
tabIndex
==
index
)
return
;
if
(
item
.
isTrack
)
{
this
.
readCount
=
0
this
.
addTrack
()
this
.
startTrack
()
}
else
{
this
.
leaveTrack
()
this
.
trackId
=
0
}
this
.
$emit
(
'update:tabIndex'
,
index
)
this
.
$emit
(
"changeTab"
,
index
)
this
.
getMessageInfo
()
...
...
@@ -170,7 +216,10 @@ export default {
this
.
$emit
(
'update:tabIndex'
,
99
)
}
}
}
},
beforeCreate
()
{
clearInterval
(
this
.
trackInterval
)
},
}
</
script
>
...
...
components/HomeFrame/index.vue
View file @
2d67bd1
...
...
@@ -151,7 +151,7 @@ export default {
const
wv
=
currentWebview
.
children
()[
1
]
console
.
log
(
wv
,
1111
)
if
(
wv
)
{
wv
.
setStyle
({
left
:
'8%'
,
height
:
'100%'
,
width
:
'92%'
})
wv
.
setStyle
({
left
:
'8%'
,
height
:
'100%'
,
top
:
'3%'
,
height
:
'97%'
,
width
:
'92%'
})
}
},
100
)
}
else
{
...
...
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