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 4b20b70b
authored
Jul 18, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交学习中心
1 parent
d5d9fd9a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
542 additions
and
131 deletions
api/module/common.js
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/Message/index.vue
components/HomeFrame/components/Study/LearnStatistics.vue
components/HomeFrame/components/Study/MyTask.vue
components/HomeFrame/components/Study/RecommendCourse.vue
components/HomeFrame/components/Study/WeeklyConversionRate.vue
components/HomeFrame/components/StudyCenter.vue
pages/common/messageList.vue
pages/common/serviceDetail/components/ServiceList.vue
pages/common/serviceDetail/index.vue
pages/common/studyDetail/components/RadarChart.vue
pages/common/studyDetail/detail.vue
pages/common/studyDetail/longCourse.vue
pages/common/studyDetail/shortCourse.vue
utils/cache/constantData.js
api/module/common.js
View file @
4b20b70
...
...
@@ -377,5 +377,45 @@ module.exports = {
projectName
:
'pad'
,
...
data
})
},
// 课程消息提醒列表
getCourseList
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.page.script.sop.message.course.list'
,
projectName
:
'pad'
,
...
data
})
},
// 学习中心-学习看板
getStudyBoard
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.staff.study.bulletin.board'
,
projectName
:
'pad'
,
...
data
})
},
// 学习中心-课程任务分页
getCourseTaskPage
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.staff.study.course.task.page'
,
projectName
:
'pad'
,
...
data
})
},
// 学习中心-短课程详情
getShortCourseDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.staff.study.short.course.detail'
,
projectName
:
'pad'
,
...
data
})
},
// 学习中心-长课程详情
getLongCourseDetail
(
data
)
{
return
http
.
post
({
method
:
'dj.pad.api.staff.study.long.course.detail'
,
projectName
:
'pad'
,
...
data
})
}
}
components/HomeFrame/components/LeftSide.vue
View file @
4b20b70
...
...
@@ -21,6 +21,7 @@
:class=
"['tab-item',
{ tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
v-if="!i.hidden"
>
<view
class=
"icon-box"
>
<view
:class=
"['sprite-icon', `icon-$
{i.icon}${tabIndex == index ? '-active' : ''}`]">
</view>
...
...
@@ -116,7 +117,8 @@ export default {
icon
:
"study"
,
isTrack
:
true
,
name
:
'StudyCenter'
,
eventCode
:
'app_study_center'
eventCode
:
'app_study_center'
,
hidden
:
true
},
{
label
:
"场景集市"
,
...
...
@@ -305,22 +307,35 @@ export default {
merchantId
:
shopMerchantId
,
scene
}).
then
(
result
=>
{
uni
.
$storage
.
set
(
'isSaleOpen'
,
result
)
if
(
result
)
{
this
.
hasPerson
=
true
}
const
channelType
=
1
// 非直营且非鸿蒙智行, 隐藏学习中心tab
if
(
result
||
channelType
==
1
)
{
this
.
tabs
[
2
].
hidden
=
false
}
})
},
// 获取话术未读列表
async
getMessage
()
{
const
{
sceneType
,
uuid
}
=
uni
.
$storage
.
get
(
"userInfo"
)
let
businessTypeList
=
[]
if
(
sceneType
==
0
)
{
businessTypeList
=
[
0
,
2
]
}
else
if
(
sceneType
==
1
)
{
businessTypeList
=
[
1
]
}
const
res
=
await
uni
.
$api
.
commonApi
.
getUnreadRecord
({
businessType
:
sceneType
,
// businessType: sceneType,
businessTypeList
,
uuid
})
if
(
res
.
total
)
{
this
.
messageData
=
res
this
.
messageType
=
'attendance'
this
.
$refs
.
kfRef
.
open
()
//
this.$refs.kfRef.open()
}
},
// 消息中心未读总数
...
...
@@ -381,7 +396,6 @@ export default {
})
},
getMessageInfo
()
{
console
.
log
(
111111
,
'getMessageInfo'
)
// this.getMessage()
// this.getMessageCount()
this
.
getMessagePop
()
...
...
components/HomeFrame/components/Message/index.vue
View file @
4b20b70
...
...
@@ -36,6 +36,7 @@ export default {
},
handleClick
(
item
)
{
const
{
moduleType
}
=
item
uni
.
$track
.
add
({
eventCode
:
'app_service_center'
})
uni
.
navigateTo
({
url
:
`/pages/common/serviceDetail/index?moduleType=
${
moduleType
}
`
})
...
...
components/HomeFrame/components/Study/LearnStatistics.vue
View file @
4b20b70
<!-- 累计学习 -->
<
template
>
<view
class=
"learn-statistics
"
>
<view
class=
"learn-statistics-title"
>
累计学习
</view>
<view
class=
"statistics-content"
>
<view
:class=
"['learn-statistics', isBeisen ? 'big-height' : 'small-height']
"
>
<view
class=
"learn-statistics-title"
v-if=
"isBeisen"
>
累计学习
</view>
<view
class=
"statistics-content"
v-if=
"isBeisen"
>
<view
class=
"statistics-item "
>
<view
class=
"statistics-number blue-number"
>
21.3
</view>
<view
class=
"statistics-number blue-number"
>
{{
dataInfo
.
learnDurationTotal
||
0
}}
</view>
<view
class=
"statistics-unit blue-number"
>
小时
</view>
</view>
<view
class=
"statistics-item"
>
<view
class=
"text"
>
排名
</view>
<view
class=
"statistics-rank"
>
13
</view>
<view
class=
"statistics-rank"
>
{{
dataInfo
.
learnDurationRank
||
'-'
}}
</view>
<view
class=
"statistics-unit"
>
名
</view>
</view>
</view>
<view
:class=
"['progress-box', progressList.length === 1 ? 'only-one' : '']"
>
<view
class=
"progress-item"
v-for=
"(item, index) in progressList"
:key=
"index"
>
<view
class=
"progress-item-title"
>
{{
item
.
title
}}
</view>
<view
class=
"progress-item-value"
>
<view
class=
"number"
>
{{
item
.
value
?
item
.
value
:
'-'
}}
</view>
<view
v-if=
"item.value"
class=
"unit"
>
{{
item
.
unit
}}
</view>
<view
:class=
"['progress-box', progressList.filter(item => !item.hidden).length === 1 ? 'only-one' : '']"
>
<template
v-for=
"(item, index) in progressList"
>
<view
:class=
"['progress-item', isBeisen ? 'bg' : '']"
:key=
"index"
v-if=
"!item.hidden"
>
<view
:class=
"['progress-item-title', isBeisen ? '' : 'title']"
>
{{
item
.
title
}}
</view>
<view
class=
"progress-item-value"
>
<view
:class=
"['number', isBeisen ? '' : 'blue-number']"
>
{{
dataInfo
[
item
.
key
]
||
dataInfo
[
item
.
key
]
==
0
?
dataInfo
[
item
.
key
]
:
'-'
}}
</view>
<view
v-if=
"dataInfo[item.key] || dataInfo[item.key] == 0"
:class=
"['unit', isBeisen ? '' : 'blue-unit']"
>
{{
item
.
unit
}}
</view>
</view>
<view
style=
"position: relative;"
v-if=
"dataInfo[item.key] || dataInfo[item.key] == 0"
>
<view
:class=
"['progress-bar', isBeisen ? '' : 'big-margin']"
></view>
<view
:class=
"['progress-bar-value', isBeisen ? '' : 'big-top']"
:style=
"
{ width: item.finish ? `${item.finish}%` : '0' }">
</view>
</view>
<view
:class=
"['progress-item-finish', isBeisen ? '' : 'big-margin']"
>
<template
v-if=
"dataInfo[item.key] || dataInfo[item.key] == 0"
>
<view>
本周已有
</view>
<view
class=
"progress-text"
>
<view
class=
"number"
>
{{
dataInfo
[
item
.
ratio
]
+
'%'
}}
</view>
的学员完成学习
</view>
</
template
>
<
template
v-else
>
<template
v-if=
"item.type == 3"
>
<view>
你的表现很好
</view>
<view
class=
"progress-text"
>
暂无需短课程学习
</view>
</
template
>
<
template
v-else-if=
"item.type == 4"
>
<view
class=
"no-finish-text"
>
暂无长课程学习安排
</view>
</
template
>
</template>
</view>
</view>
<view
style=
"position: relative;"
>
<view
class=
"progress-bar"
></view>
<view
class=
"progress-bar-value"
:style=
"
{ width: item.finish ? `${item.finish}%` : '0' }">
</view>
</view>
<view
class=
"progress-item-finish"
>
<template
v-if=
"item.finish"
>
<view>
本周已有
</view>
<view
class=
"progress-text"
>
<view
class=
"number"
>
{{
item
.
finish
+
'%'
}}
</view>
的学员完成学习
</view>
</
template
>
<
template
v-else
>
<view
class=
"no-finish-text"
>
暂无长课程学习安排
</view>
</
template
>
</view>
</view>
</template>
</view>
</view>
</template>
...
...
@@ -44,13 +56,40 @@
export
default
{
name
:
'LearnStatistics'
,
props
:
{
progressList
:
{
type
:
Array
,
default
:
()
=>
[]
isBeisen
:
{
type
:
Boolean
,
default
:
false
},
dataInfo
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{}
return
{
progressList
:
[
{
type
:
3
,
title
:
'短课程进度'
,
unit
:
'%'
,
key
:
'shortCourseProgress'
,
ratio
:
'shortCourseCompletedLearnRatio'
,
hidden
:
false
},
{
type
:
4
,
title
:
'长课程进度'
,
unit
:
'%'
,
key
:
'longCourseProgress'
,
ratio
:
'longCourseCompletedLearnRatio'
,
hidden
:
false
}
],
}
},
mounted
()
{
},
methods
:
{
}
}
</
script
>
...
...
@@ -60,9 +99,17 @@ export default {
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
border-radius
:
toRpx
(
24
);
background
:
#ffffff
;
padding
:
toRpx
(
24
)
toRpx
(
32
)
;
padding
:
toRpx
(
24
);
margin
:
0
toRpx
(
32
)
toRpx
(
20
);
&
.small-height
{
height
:
toRpx
(
396
);
}
&
.big-height
{
height
:
toRpx
(
480
);
}
&
-title
{
font-size
:
toRpx
(
28
);
color
:
#1A1A1A
;
...
...
@@ -72,7 +119,8 @@ export default {
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
align-items
:
center
;
margin-top
:
toRpx
(
16
);
margin-top
:
toRpx
(
12
);
margin-bottom
:
toRpx
(
36
);
.statistics-item
{
display
:
flex
;
...
...
@@ -111,7 +159,6 @@ export default {
.progress-box
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
margin-top
:
toRpx
(
40
);
gap
:
toRpx
(
24
);
&.only-one
{
...
...
@@ -122,13 +169,22 @@ export default {
display
:
flex
;
justify-content
:
space-between
;
flex-direction
:
column
;
background-color
:
#F5F9FF
;
padding
:
toRpx
(
24
)
toRpx
(
20
);
border-radius
:
toRpx
(
12
);
&.bg
{
background-color
:
#F5F9FF
;
padding
:
toRpx
(
24
)
toRpx
(
20
);
}
&
-title
{
font-size
:
toRpx
(
32
);
color
:
#808080
;
font-size
:
toRpx
(
24
);
&.title
{
color
:
#1A1A1A
;
font-size
:
toRpx
(
28
);
}
}
&
-value
{
...
...
@@ -140,16 +196,28 @@ export default {
color
:
#000
;
font-size
:
toRpx
(
32
);
font-weight
:
500
;
&.blue-number
{
font-size
:
toRpx
(
40
);
font-weight
:
700
;
color
:
#3B73FF
;
}
}
.unit
{
font-size
:
toRpx
(
20
);
color
:
#000
;
margin-left
:
toRpx
(
4
);
&.blue-unit
{
font-size
:
toRpx
(
22
);
font-weight
:
500
;
color
:
#3B73FF
;
}
}
}
.progress-bar
{
//
position
:
relative
;
width
:
calc
(
100%
-
#{
toRpx
(
68
)}
);
height
:
toRpx
(
12
);
border-radius
:
toRpx
(
8
);
...
...
@@ -157,6 +225,10 @@ export default {
background
:
linear-gradient
(
128
.8deg
,
#75bcff
0
%,
#2c66f7
100
%);
margin-top
:
toRpx
(
32
);
&
.big-margin
{
margin-top
:
toRpx
(
72
);
}
&
-value
{
position
:
absolute
;
left
:
0
;
...
...
@@ -165,14 +237,23 @@ export default {
border-radius
:
toRpx
(
8
);
opacity
:
1
;
background
:
linear-gradient
(
128.8deg
,
#75bcff
0%
,
#2c66f7
100%
);
&.big-top
{
top
:
toRpx
(
72
);
}
}
}
.progress-item-finish
{
height
:
toRpx
(
72
);
margin-top
:
toRpx
(
40
);
margin-top
:
toRpx
(
36
);
font-size
:
toRpx
(
22
);
color
:
#808080
;
line-height
:
toRpx
(
36
);
&.big-margin
{
margin-top
:
toRpx
(
72
);
}
.progress-text
{
display
:
flex
;
...
...
components/HomeFrame/components/Study/MyTask.vue
View file @
4b20b70
This diff is collapsed.
Click to expand it.
components/HomeFrame/components/Study/RecommendCourse.vue
View file @
4b20b70
This diff is collapsed.
Click to expand it.
components/HomeFrame/components/Study/WeeklyConversionRate.vue
View file @
4b20b70
<
template
>
<view
class=
"study-box2
"
>
<view
:class=
"['study-box2', isFlag ? '' : 'big-height']
"
>
<view
class=
"tab-list"
>
<view
@
click=
"handleTabClick(index)"
:class=
"['tab-item', tabIndex === index ? 'active' : '']"
v-for=
"(item, index) in tabList"
:key=
"index"
>
...
...
@@ -8,14 +8,14 @@
</view>
<view
class=
"rank-title"
>
周转化率排名
</view>
<view
class=
"rank-value"
>
<view
class=
"rank-number"
>
{{
barValue
}}
</view>
名
<view
class=
"rank-number"
>
{{
currentConversionData
.
top
}}
</view>
名
</view>
<view
class=
"bar-box"
>
<view
class=
"bar-item"
v-for=
"(item, index) in barList"
:key=
"index"
>
<view
class=
"bar-label"
>
{{
item
.
label
}}
</view>
<view
class=
"bar-container"
>
<view
class=
"bar"
:class=
"item.class"
:style=
"
{ width:
item.value
+ '%' }">
</view>
<view
class=
"bar-text"
:style=
"
{ left: `calc(${
item.value}%)` }">
{{
item
.
value
}}
%
</view>
<view
class=
"bar"
:class=
"item.class"
:style=
"
{ width:
currentConversionData[item.key]
+ '%' }">
</view>
<view
class=
"bar-text"
:style=
"
{ left: `calc(${
currentConversionData[item.key]}%)` }">
{{
currentConversionData
[
item
.
key
]
}}
%
</view>
</view>
</view>
</view>
...
...
@@ -25,34 +25,98 @@
export
default
{
name
:
'WeeklyConversionRate'
,
props
:
{
barList
:
{
type
:
Array
,
default
:
()
=>
[]
isFlag
:
{
type
:
Boolean
,
default
:
false
},
barValue
:
{
type
:
Number
,
default
:
0
dataInfo
:
{
type
:
Object
,
default
:
()
=>
{}
}
},
data
()
{
return
{
tabList
:
[
barValue
:
56
,
barList
:
[
{
title
:
'延保'
,
value
:
'1'
label
:
'我的'
,
value
:
'74.3'
,
key
:
'myConversionRatio'
,
class
:
'my'
},
{
title
:
'权益'
,
value
:
'2'
},
{
title
:
'轻改'
,
value
:
'3'
},
label
:
'Top1'
,
value
:
'94.5'
,
key
:
'topOneConversionRatio'
,
class
:
'top1'
}
],
tabIndex
:
0
,
}
},
computed
:
{
tabList
()
{
// const weekConversionRatio = this.dataInfo && this.dataInfo.weekConversionRatio
const
weekConversionRatio
=
{
0
:
{
top
:
1
,
myConversionRatio
:
'0'
,
topOneConversionRatio
:
'94.5'
},
// 1: {
// top: 2,
// myConversionRatio: '74.3',
// topOneConversionRatio: '94.5'
// },
2
:
{
top
:
3
,
myConversionRatio
:
'55.7'
,
topOneConversionRatio
:
'84.5'
}
}
if
(
!
weekConversionRatio
)
return
[]
// 生成tabList,key为weekConversionRatio的key
return
Object
.
keys
(
weekConversionRatio
).
map
(
key
=>
{
// 这里可以根据实际业务自定义title
// 例如:0-延保,1-精品,2-权益
// 这里暂时用key做title
let
title
=
''
if
(
key
==
0
)
title
=
'延保'
else
if
(
key
==
1
)
title
=
'轻改'
else
if
(
key
==
2
)
title
=
'权益'
else
title
=
`类型
${
key
}
`
return
{
title
,
value
:
key
}
})
},
currentConversionData
()
{
// 返回当前tabIndex对应的weekConversionRatio数据
// const weekConversionRatio = this.dataInfo && this.dataInfo.weekConversionRatio
const
weekConversionRatio
=
{
0
:
{
top
:
1
,
myConversionRatio
:
'0'
,
topOneConversionRatio
:
'94.5'
},
// 1: {
// top: 2,
// myConversionRatio: '74.3',
// topOneConversionRatio: '94.5'
// },
2
:
{
top
:
3
,
myConversionRatio
:
'55.7'
,
topOneConversionRatio
:
'84.5'
}
}
if
(
!
weekConversionRatio
)
return
{}
const
key
=
this
.
tabList
[
this
.
tabIndex
]
&&
this
.
tabList
[
this
.
tabIndex
].
value
return
weekConversionRatio
[
key
]
||
{}
}
},
methods
:
{
handleTabClick
(
index
)
{
this
.
tabIndex
=
index
...
...
@@ -67,6 +131,9 @@ export default {
background
:
#ffffff
;
padding
:
toRpx
(
24
);
margin
:
0
toRpx
(
32
)
toRpx
(
16
);
&
.big-height
{
height
:
toRpx
(
764
);
}
.tab-list
{
display
:
flex
;
...
...
@@ -144,7 +211,7 @@ export default {
position
:
relative
;
flex
:
1
;
//
width
:
toRpx
(
380
);
height
:
toRpx
(
20
);
height
:
toRpx
(
12
);
//
overflow
:
hidden
;
}
...
...
components/HomeFrame/components/StudyCenter.vue
View file @
4b20b70
...
...
@@ -4,14 +4,16 @@
<view
class=
"title"
>
学习看板
</view>
<view
class=
"study-board-box"
>
<!-- 累计学习看板 -->
<LearnStatistics
:
progressList=
"progressList
"
/>
<LearnStatistics
:
dataInfo=
"dataInfo"
:isBeisen=
"isBeisen
"
/>
<!-- 周转化率看板 -->
<WeeklyConversionRate
:
barList=
"barList"
:barValue=
"barValue
"
/>
<WeeklyConversionRate
:
dataInfo=
"dataInfo"
:isFlag=
"isFlag
"
/>
<!-- 能力分析看板 -->
<view
class=
"study-box3"
>
<view>
能力分析
</view>
<RadarChart
:chartData=
"chartData"
/>
</view>
<template
v-if=
"isFlag"
>
<view
:class=
"['study-box3', isBeisen ? '' : 'big-height']"
>
<view
:class=
"['study-box3-title', isBeisen ? '' : 'big-margin']"
>
能力分析
</view>
<RadarChart
:labelColors=
"labelColors"
:heightClass=
"isBeisen ? '' : 'big-height'"
:chartData=
"chartData"
/>
</view>
</
template
>
</view>
</view>
<view
class=
"study-right"
>
...
...
@@ -29,7 +31,7 @@
</view>
</view>
<
template
v-if=
"firstIndex == 0"
>
<MyTask
/>
<MyTask
ref=
"myTask"
/>
</
template
>
<
template
v-if=
"firstIndex == 1"
>
<RecommendCourse
/>
...
...
@@ -56,35 +58,9 @@ export default {
},
data
()
{
return
{
progressList
:
[
{
title
:
'短课程进度'
,
value
:
'46.2'
,
unit
:
'%'
,
finish
:
'15'
},
{
title
:
'长课程进度'
,
value
:
null
,
unit
:
'%'
,
finish
:
null
}
],
barValue
:
56
,
barList
:
[
{
label
:
'我的'
,
value
:
'74.3'
,
class
:
'my'
},
{
label
:
'Top1'
,
value
:
'94.5'
,
class
:
'top1'
}
],
chartData
:
{},
dataInfo
:
{},
labelColors
:
[],
typeList
:
[
{
tabName
:
'我的任务'
,
num
:
()
=>
''
},
{
tabName
:
'推荐课程'
,
num
:
()
=>
''
}
...
...
@@ -92,10 +68,22 @@ export default {
firstIndex
:
0
,
firstLeft
:
[
'first'
,
'second'
],
firstClass
:
[
'short-first-nav'
,
'short-second-nav'
],
isBeisen
:
true
,
// 是否是有北森权限,true 有,false无
isFlag
:
true
// 当前驻店人员所关联的门店非鸿蒙智行或非延保业务
}
},
created
()
{
// 监听自定义事件
uni
.
$on
(
'backStudyCenter'
,
()
=>
{
console
.
log
(
'backStudyCenter'
)
this
.
$refs
.
myTask
.
getCourseTaskPage
(
0
)
})
},
mounted
()
{
this
.
getServerData
();
const
beisenToken
=
uni
.
$storage
.
get
(
'beisenToken'
)
console
.
log
(
beisenToken
,
'beisenToken'
)
// this.getServerData();
this
.
getStudyBoard
();
},
methods
:
{
// tab切换
...
...
@@ -118,6 +106,34 @@ export default {
this
.
chartData
=
JSON
.
parse
(
JSON
.
stringify
(
res
));
console
.
log
(
this
.
chartData
,
' 首页'
)
},
500
);
},
async
getStudyBoard
()
{
const
res
=
await
uni
.
$api
.
commonApi
.
getStudyBoard
({})
console
.
log
(
111111
,
'res'
,
res
)
this
.
dataInfo
=
res
this
.
dataInfo
.
shortCourseProgress
=
0
this
.
dataInfo
.
shortCourseCompletedLearnRatio
=
15
const
_chartData
=
{
categories
:
res
.
abilityAnalysisTag
,
series
:
[
{
// data: res.abilityAnalysisScore
data
:
[
1
,
2
,
3
,
1
,
2
,
2
,
3
,
3
,
3
]
}
]
}
this
.
chartData
=
_chartData
// 设置雷达图标签颜色,1为红色,否则为灰色
if
(
_chartData
.
series
&&
_chartData
.
series
[
0
]
&&
Array
.
isArray
(
_chartData
.
series
[
0
].
data
))
{
const
dataArr
=
_chartData
.
series
[
0
].
data
;
let
_labelColors
=
[];
if
(
dataArr
.
every
(
val
=>
val
===
0
))
{
_labelColors
=
[];
}
else
{
_labelColors
=
dataArr
.
map
(
val
=>
val
===
1
?
'#EB4E4E'
:
'#666666'
);
}
this
.
labelColors
=
_labelColors
;
}
}
}
}
...
...
@@ -156,13 +172,27 @@ export default {
border-radius
:
0
0
toRpx
(
48
)
toRpx
(
48
);
}
}
.study-box3
{
width
:
calc
(
100%
-
#{
toRpx
(
64
)}
);
border-radius
:
toRpx
(
24
);
background
:
#ffffff
;
padding
:
toRpx
(
24
);
margin
:
0
toRpx
(
32
)
toRpx
(
16
);
&
.big-height
{
height
:
toRpx
(
448
);
}
&
-title
{
margin-bottom
:
toRpx
(
10
);
&.big-margin
{
margin-bottom
:
toRpx
(
40
);
}
}
}
.study-right
{
flex
:
1
;
background-color
:
rgba
(
255
,
255
,
255
,
0.35
);
...
...
@@ -238,6 +268,7 @@ export default {
font-weight
:
500
;
font-size
:
toRpx
(
32
);
color
:
#3B73FF
;
&::after
{
content
:
''
;
position
:
absolute
;
...
...
@@ -255,5 +286,4 @@ export default {
}
}
}
</
style
>
\ No newline at end of file
pages/common/messageList.vue
View file @
4b20b70
...
...
@@ -136,8 +136,15 @@ export default {
})
const
{
sceneType
,
uuid
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
tagIndex
,
pageNum
,
pageSize
}
=
this
let
businessTypeList
=
[]
if
(
sceneType
==
0
)
{
businessTypeList
=
[
0
,
2
]
}
else
if
(
sceneType
==
1
)
{
businessTypeList
=
[
1
]
}
const
params
=
{
businessType
:
sceneType
,
// businessType: sceneType,
businessTypeList
,
uuid
,
classCode
:
tagIndex
,
pageNum
,
...
...
pages/common/serviceDetail/components/ServiceList.vue
View file @
4b20b70
...
...
@@ -15,7 +15,7 @@
i
.
title
}}
</view>
</view>
<view
class=
"message-item-time-box"
>
<view
class=
"message-item-time"
>
{{
formatTime
(
i
.
createdTime
)
}}
</view>
<view
class=
"message-item-time"
>
{{
formatTime
(
i
.
createdTime
,
'HH:mm'
)
}}
</view>
<view
class=
"sprite-icon icon-stick-top"
></view>
</view>
</view>
...
...
@@ -35,7 +35,7 @@
<view
class=
"message-item-desc"
>
{{
moduleContentEnum
[
i
.
moduleType
]
?
moduleContentEnum
[
i
.
moduleType
]
:
i
.
title
}}
</view>
</view>
<view
class=
"message-item-time"
>
{{
formatTime
(
i
.
createdTime
)
}}
</view>
<view
class=
"message-item-time"
>
{{
formatTime
(
i
.
createdTime
,
'HH:mm'
)
}}
</view>
</view>
</view>
</view>
...
...
@@ -131,10 +131,13 @@ export default {
computed
:
{
getTopList
()
{
if
(
!
this
.
topList
)
return
[];
// 按topList中的倒序排列
return
this
.
topList
.
slice
().
reverse
().
map
(
type
=>
this
.
msgList
.
find
(
item
=>
item
.
moduleType
===
type
)
).
filter
(
Boolean
);
// 过滤出topList中包含moduleType的对象
const
result
=
this
.
msgList
.
filter
(
item
=>
this
.
topList
.
includes
(
item
.
moduleType
));
return
result
// // 按topList中的倒序排列
// return this.topList.slice().reverse().map(type =>
// this.msgList.find(item => item.moduleType === type)
// ).filter(Boolean);
},
getList
()
{
// 过滤掉topList中包含moduleType的对象
...
...
@@ -171,8 +174,8 @@ export default {
const
key
=
`
${
phone
}
-
${
shopMerchantId
}
-
${
sceneType
}
`
this
.
topList
=
_topInfo
[
key
]
||
[]
},
formatTime
(
time
)
{
return
dayjs
(
time
).
format
(
'HH:mm'
);
formatTime
(
time
,
formatStr
)
{
return
dayjs
(
time
).
format
(
formatStr
);
},
handleClick
(
item
)
{
this
.
$emit
(
'handleClick'
,
item
)
...
...
pages/common/serviceDetail/index.vue
View file @
4b20b70
...
...
@@ -20,13 +20,30 @@
</view>
<scroll-view
scroll-y
class=
"service-list"
@
scrolltolower=
"pageonReachBottom"
:scroll-top=
"scrollTop"
>
<view
class=
"service-item"
v-for=
"(item, index) in list"
:key=
"index"
@
click=
"handleDetail(item)"
>
<view
class=
"service-item-title"
>
{{
moduleTypeEnum
[
moduleType
]
}}
<view
class=
"service-item-title"
>
<template
v-if=
"moduleType == 3 || moduleType == 4"
>
<view
class=
"service-item-title-left"
>
{{
item
.
title
}}
</view>
</
template
>
<
template
v-else
>
<view
class=
"service-item-title-left"
>
{{
moduleTypeEnum
[
moduleType
]
}}
</view>
</
template
>
<view
class=
"service-item-title-right"
>
<view>
查看详情
</view>
<view
class=
"sprite-icon icon-coupon-arrow"
></view>
</view>
</view>
<view
class=
"service-item-text"
>
提醒时间:
{{
item
.
time
}}
</view>
<
template
v-if=
"moduleType == 3 || moduleType == 4"
>
<template
v-if=
"item.taskType == 1"
>
<view
class=
"service-item-text"
>
学习任务名称:
{{
item
.
taskName
}}
</view>
<view
class=
"service-item-text"
>
任务完成时间:小伙伴,请于
{{
formatTime
(
item
.
finishTime
,
'YYYY-MM-DD HH:mm'
)
}}
完成哦~
</view>
<!--
<view
class=
"service-item-text"
>
提醒内容:
{{
item
.
title
}}
</view>
-->
</
template
>
<
template
v-else-if=
"item.taskType == 2"
>
<view
class=
"service-item-text"
>
提醒内容:您有未完成的学习任务即将到期:
{{
formatTime
(
item
.
finishTime
,
'YYYY-MM-DD HH:mm'
)
}}
,抓紧时间完成哦!
</view>
<!--
<view
class=
"service-item-text"
>
学习任务名称:
{{
item
.
taskName
}}
</view>
-->
</
template
>
</template>
<view
class=
"service-item-text"
>
提醒时间:{{ item.time || formatTime(item.createdTime, 'YYYY-MM-DD HH:mm') }}
</view>
<
template
v-if=
"moduleType == 1 || moduleType == 2"
>
<view
class=
"service-item-text"
>
提醒内容:
{{
moduleContentEnum
[
moduleType
]
}}
</view>
</
template
>
...
...
@@ -70,6 +87,8 @@ export default {
scriptList
:
[],
earlyWarnList
:
[],
systemList
:
[],
shortCourseList
:
[],
longCourseList
:
[],
total
:
0
,
nothing
:
false
,
pageNum
:
1
,
...
...
@@ -90,6 +109,10 @@ export default {
return
this
.
scriptList
case
2
:
return
this
.
earlyWarnList
case
3
:
return
this
.
shortCourseList
case
4
:
return
this
.
longCourseList
default
:
return
[]
}
...
...
@@ -108,6 +131,11 @@ export default {
case
2
:
this
.
getWarningPage
()
break
case
3
:
this
.
getCourseList
(
3
)
break
case
4
:
this
.
getCourseList
(
4
)
default
:
break
}
...
...
@@ -121,11 +149,13 @@ export default {
// this.handleClick({moduleType: this.moduleType})
},
methods
:
{
formatTime
(
time
,
formatStr
)
{
return
dayjs
(
time
).
format
(
formatStr
);
},
// 获取服务中心列表
async
getMessageSummary
(
sceneType
)
{
// const userInfo = uni.$storage.get('userInfo')
const
res
=
await
getMessageSummary
({
businessType
:
sceneType
})
console
.
log
(
res
,
'==='
)
this
.
messageList
=
res
},
// 获取缓存中置顶的列表
...
...
@@ -195,8 +225,15 @@ export default {
})
const
{
sceneType
,
uuid
}
=
uni
.
$storage
.
get
(
"userInfo"
)
const
{
pageNum
,
pageSize
}
=
this
let
businessTypeList
=
[]
if
(
sceneType
==
0
)
{
businessTypeList
=
[
0
,
2
]
}
else
if
(
sceneType
==
1
)
{
businessTypeList
=
[
1
]
}
const
params
=
{
businessType
:
sceneType
,
// businessType: sceneType,
businessTypeList
,
uuid
,
pageNum
,
pageSize
...
...
@@ -256,7 +293,7 @@ export default {
* 当页面触底时,判断是否还有更多数据,如果有则加载下一页数据
* 如果没有更多数据,则标记为没有更多数据状态
*/
pageonReachBottom
()
{
pageonReachBottom
()
{
console
.
log
(
'到底了'
);
// 解构赋值,设置 nothing 的默认值
let
{
pageNum
,
total
,
nothing
=
'nothing'
,
pageSize
}
=
this
;
...
...
@@ -352,9 +389,35 @@ export default {
break
}
},
async
getCourseList
(
moduleType
)
{
try
{
uni
.
showLoading
({
mask
:
true
})
const
{
pageNum
,
pageSize
}
=
this
const
res
=
await
uni
.
$api
.
commonApi
.
getCourseList
({
pageNum
,
pageSize
,
moduleType
})
res
.
list
?.
length
&&
res
.
list
.
map
(
e
=>
{
e
.
time
=
e
.
actualSendTimeStr
})
if
(
pageNum
==
1
)
{
moduleType
==
3
?
(
this
.
shortCourseList
=
res
.
list
)
:
(
this
.
longCourseList
=
res
.
list
)
}
else
{
moduleType
==
3
?
(
this
.
shortCourseList
=
this
.
shortCourseList
.
concat
(
res
.
list
))
:
(
this
.
longCourseList
=
this
.
longCourseList
.
concat
(
res
.
list
))
}
uni
.
hideLoading
()
this
.
total
=
res
.
total
this
.
nothing
=
res
.
length
?
true
:
false
}
catch
(
error
)
{
uni
.
showToast
({
title
:
error
,
icon
:
"none"
,
});
}
},
// 置顶,取消置顶
handleStickTop
()
{
console
.
log
(
'置顶'
)
clearTimeout
(
timer
)
const
{
phone
,
shopMerchantId
,
sceneType
}
=
this
.
userInfo
const
_topInfo
=
uni
.
$storage
.
get
(
'noticeTopInfo'
)
||
{}
...
...
pages/common/studyDetail/components/RadarChart.vue
View file @
4b20b70
<
template
>
<view>
<qiun-data-charts
type=
"radar"
:opts=
"opts"
:chartData=
"chartData"
class=
"charts-box"
/>
<view
>
<template
v-if=
"labelColors && labelColors.length > 0"
>
<qiun-data-charts
type=
"radar"
:opts=
"opts"
:chartData=
"chartData"
:class=
"['charts-box', heightClass]"
/>
</
template
>
<
template
v-else
>
<view
class=
"nothing flex"
:class=
"['big-height']"
>
<image
class=
"icon"
src=
"../../../../assets/images/boutique/nothing.png"
/>
暂无数据
</view>
</
template
>
</view>
</template>
<
script
>
...
...
@@ -10,6 +18,21 @@ export default {
chartData
:
{
type
:
Object
,
default
:
()
=>
{}
},
heightClass
:
{
type
:
String
},
labelColors
:
{
type
:
Array
,
default
:
()
=>
[
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#666666'
]
}
},
watch
:
{
labelColors
:
{
handler
(
newVal
)
{
console
.
log
(
newVal
,
'newVal'
)
this
.
opts
.
labelColors
=
newVal
},
}
},
data
()
{
...
...
@@ -19,7 +42,7 @@ export default {
padding
:
[
0
,
5
,
0
,
5
],
dataLabel
:
false
,
enableScroll
:
false
,
labelColors
:
[
'#666666'
,
'#EB4E4E
'
,
'#666666'
,
'#666666'
,
'#666666'
,
'#EB4E4E'
,
'#666666'
,
'#EB4E4E'
,
'#666666'
],
// labelColors: ['#666666', '#666666
', '#666666', '#666666', '#666666', '#EB4E4E', '#666666', '#EB4E4E', '#666666'],
fontSize
:
12
,
legend
:
{
show
:
false
...
...
@@ -30,7 +53,7 @@ export default {
gridColor
:
"#dae8fd"
,
gridCount
:
3
,
opacity
:
0.2
,
max
:
10
,
max
:
3
,
labelShow
:
true
,
axisLabelTofix
:
1
,
// 保留一位小数
labelFormatter
:
function
(
val
)
{
...
...
@@ -51,5 +74,27 @@ export default {
.charts-box
{
width
:
100%
;
height
:
toRpx
(
272
);
&.big-height
{
height
:
toRpx
(
300
);
}
}
.nothing
{
width
:
100%
;
height
:
toRpx
(
228
);
flex-direction
:
column
;
margin-top
:
toRpx
(
44
);
font-size
:
toRpx
(
24
);
color
:
#999999
;
box-sizing
:
border-box
;
&.big-height
{
height
:
toRpx
(
234
);
}
.icon
{
width
:
toRpx
(
288
);
height
:
toRpx
(
144
);
margin-bottom
:
toRpx
(
4
);
}
}
</
style
>
\ No newline at end of file
pages/common/studyDetail/detail.vue
View file @
4b20b70
...
...
@@ -12,7 +12,7 @@
<view
class=
"scroll-view-box"
>
<scroll-view
class=
"scroll-view"
scroll-y
>
<view
:class=
"['scroll-view-item', selectedIndex == index ? 'active' : '']"
v-for=
"(item, index) in getCourseList"
:key=
"index"
@
click=
"openCourse(index)"
>
v-for=
"(item, index) in getCourseList"
:key=
"index"
@
click=
"openCourse(index
, item
)"
>
<template
v-if=
"type === 'long'"
>
<image
class=
"item-img"
src=
"../../../assets/images/common/long-course-default.webp"
mode=
"scaleToFill"
/>
...
...
@@ -185,7 +185,6 @@ export default {
times
:
10
}
],
type
:
''
,
selectedIndex
:
0
,
jumpUrl
:
''
,
...
...
@@ -227,12 +226,15 @@ export default {
}
uni
.
navigateBack
()
}
,
openCourse
(
inde
x
)
{
openCourse
(
inde
,
item
)
{
console
.
log
(
index
,
'index'
)
this
.
selectedIndex
=
index
;
const
arr
=
[
'80cb90d7-1609-4360-8f23-6c47ddba41c0'
,
'17983a1a-5bcd-4e7d-a180-061ef3f9a49d'
]
// 只更换url
this
.
handleOperation
(
arr
[
index
]);
if
(
this
.
type
===
'recommendation'
)
{
uni
.
$track
.
add
({
eventCode
:
'app_recommend_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/common/studyDetail/detail'
}
)
}
}
,
handleOperation
(
courseId
)
{
// 只处理课程详情,设置jumpUrl
...
...
pages/common/studyDetail/longCourse.vue
View file @
4b20b70
...
...
@@ -159,13 +159,25 @@ export default {
score
:
'未完成(25%)'
,
duration
:
'未完成(25%)'
}
]
]
,
}
}
,
onLoad
(
options
)
{
const
{
row
}
=
options
const
rowData
=
JSON
.
parse
(
decodeURIComponent
(
row
))
console
.
log
(
rowData
,
'rowData'
)
this
.
getLongCourseDetail
(
rowData
.
id
)
}
,
methods
:
{
backPage
()
{
uni
.
navigateBack
();
}
,
async
getLongCourseDetail
(
id
)
{
const
res
=
await
uni
.
$api
.
commonApi
.
getLongCourseDetail
({
id
}
)
console
.
log
(
res
,
'res'
)
}
,
startStudy
(
index
)
{
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/detail?type=long&index=${index
}
`
...
...
pages/common/studyDetail/shortCourse.vue
View file @
4b20b70
...
...
@@ -10,13 +10,12 @@
<view
class=
"left-box"
>
<view
class=
"top-box"
>
<view
class=
"top-box-name"
>
许小奇
<view
class=
"role-tag"
>
驻店销售
</view>
<view
class=
"role-tag"
>
带教导师
</view>
{{
courseDetail
.
staffName
||
'-'
}}
<view
class=
"role-tag"
v-for=
"(item, index) in courseDetail.positionList"
:key=
"index"
>
{{
item
}}
</view>
</view>
<view
class=
"top-box-info"
>
<view
class=
"top-box-info-item"
>
驻店时间:
首月
</view>
<view
class=
"top-box-info-item"
>
直属上级:
张三丰
</view>
<view
class=
"top-box-info-item"
>
驻店时间:
{{
courseDetail
.
residentTimeTag
||
'-'
}}
</view>
<view
class=
"top-box-info-item"
>
直属上级:
{{
courseDetail
.
superior
||
'-'
}}
</view>
</view>
</view>
<view
class=
"bottom-box"
>
...
...
@@ -24,7 +23,7 @@
<view>
战败复盘
</view>
<view
class=
"date"
>
2025年6月25日
</view>
</view>
<RadarChart
:chartData=
"chartData"
/>
<RadarChart
:
labelColors=
"labelColors"
:
chartData=
"chartData"
/>
<view
class=
"bottom-box-summary"
>
<view>
总结
</view>
<view
class=
"summary-btn"
>
查看
</view>
...
...
@@ -115,6 +114,7 @@ export default {
data
()
{
return
{
chartData
:
{},
labelColors
:
[],
detailList
:
[
{
name
:
'许小奇'
,
...
...
@@ -252,15 +252,60 @@ export default {
},
],
qualityTitle
:
Object
.
freeze
([
'课程标签'
,
'不足/改善建议'
,
'对练考核'
]),
courseDetail
:
{},
rowData
:
{}
}
},
mounted
()
{
this
.
getServerData
();
// this.getServerData();
},
onLoad
(
options
)
{
const
{
row
}
=
options
const
rowData
=
JSON
.
parse
(
decodeURIComponent
(
row
))
console
.
log
(
rowData
,
'rowData'
)
this
.
rowData
=
rowData
this
.
getShortCourseDetail
(
rowData
.
id
)
},
methods
:
{
backPage
()
{
uni
.
$emit
(
"backStudyCenter"
)
uni
.
navigateBack
();
},
async
getShortCourseDetail
(
id
)
{
const
res1
=
await
uni
.
$api
.
commonApi
.
getStudyBoard
({
id
})
const
res
=
{
staffName
:
'许小奇'
,
position
:
'驻店销售,带教导师'
,
residentTimeTag
:
''
,
superior
:
''
,
defeatReviewTag
:
[
"身份介绍"
,
"逼单能力"
,
"攻防能力"
,
"案例展示"
,
"场景塑造"
,
"专业知识"
,
"需求分析"
,
"话题介入"
,
"服务意识"
],
defeatReviewScore
:
[
1
,
2
,
3
,
1
,
2
,
2
,
3
,
3
,
3
]
}
const
_chartData
=
{
categories
:
res
.
defeatReviewTag
,
series
:
[
{
data
:
res
.
defeatReviewScore
}
]
}
this
.
chartData
=
_chartData
if
(
_chartData
.
series
&&
_chartData
.
series
[
0
]
&&
Array
.
isArray
(
_chartData
.
series
[
0
].
data
))
{
const
dataArr
=
_chartData
.
series
[
0
].
data
;
let
_labelColors
=
[];
if
(
dataArr
.
every
(
val
=>
val
===
0
))
{
_labelColors
=
[];
}
else
{
_labelColors
=
dataArr
.
map
(
val
=>
val
===
1
?
'#EB4E4E'
:
'#666666'
);
}
console
.
log
(
_labelColors
,
'_labelColors'
)
this
.
labelColors
=
_labelColors
;
console
.
log
(
this
.
labelColors
,
'this.labelColors'
)
}
console
.
log
(
res
,
'res'
)
res
.
positionList
=
res
.
position
.
split
(
','
)
this
.
courseDetail
=
res
},
getServerData
()
{
//模拟从服务器获取数据时的延时
setTimeout
(()
=>
{
...
...
utils/cache/constantData.js
View file @
4b20b70
...
...
@@ -41,5 +41,6 @@ export const STORAGE_OBJECTKEY = {
recordTrackList
:
'recordTrackList'
,
beisenToken
:
'beisenToken'
,
messagePopShownDate
:
'messagePopShownDate'
,
noticeTopInfo
:
'noticeTopInfo'
noticeTopInfo
:
'noticeTopInfo'
,
isSaleOpen
:
'isSaleOpen'
}
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