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 8fcf819a
authored
Jul 22, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'SAAS+V4.55.0' of
http://192.168.3.233:8090/glsx/gl_tape
into SAAS+V4.55.0
2 parents
df57eff3
8a000f40
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
255 additions
and
364 deletions
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/Study/LearnStatistics.vue
components/HomeFrame/components/Study/RecommendCourse.vue
components/HomeFrame/components/Study/WeeklyConversionRate.vue
components/HomeFrame/components/StudyCenter.vue
mixin/loginMixin.js
pages/boutique/case.vue
pages/common/components/AccountList.vue
pages/common/serviceDetail/index.vue
pages/common/studyDetail/detail.vue
pages/common/studyDetail/longCourse.vue
pages/common/studyDetail/shortCourse.vue
components/HomeFrame/components/LeftSide.vue
View file @
8fcf819
...
...
@@ -118,7 +118,7 @@ export default {
isTrack
:
true
,
name
:
'StudyCenter'
,
eventCode
:
'app_study_center'
,
hidden
:
fals
e
hidden
:
tru
e
},
{
label
:
"场景集市"
,
...
...
@@ -423,11 +423,11 @@ export default {
// 学习中心权限获取
getStudyCenterPermission
()
{
const
res
=
uni
.
$storage
.
get
(
'studyCenterPermission'
)
const
{
directSaleAuth
,
hmzxAuth
}
=
res
if
(
!
directSaleAuth
&&
!
hmzxAuth
)
{
const
{
directSaleAuth
,
hmzxAuth
,
authorizedBusinessList
}
=
res
// 当驻店人员为非直营,且非鸿蒙智行延保业务驻店人员情况下。隐藏左侧【学习中心】图标
const
isYb
=
authorizedBusinessList
&&
authorizedBusinessList
.
includes
(
1
)
// 1.延保 2.轻改 3.权益
if
(
directSaleAuth
||
(
hmzxAuth
&&
isYb
))
{
this
.
tabs
[
2
].
hidden
=
false
}
}
}
},
beforeCreate
()
{
...
...
components/HomeFrame/components/Study/LearnStatistics.vue
View file @
8fcf819
<!-- 累计学习 -->
<
template
>
<view
:class=
"['learn-statistics', isBeisen ? 'big-height' : 'small-height']"
>
<view
class=
"learn-statistics-title"
v-if=
"isBeisen"
>
累计学习
</view>
<!-- 北森帐号显示累计时长 -->
<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"
>
{{
dataInfo
.
learnDurationTotal
||
0
}}
</view>
...
...
@@ -13,26 +14,26 @@
<view
class=
"statistics-unit"
>
名
</view>
</view>
</view>
<view
:class=
"['progress-box',
filteredP
rogressList.filter(item => !item.hidden).length === 1 ? 'only-one' : '']"
>
<template
v-for=
"(item, index) in
filteredP
rogressList"
>
<view
:class=
"['progress-box',
p
rogressList.filter(item => !item.hidden).length === 1 ? 'only-one' : '']"
>
<template
v-for=
"(item, index) in
p
rogressList"
>
<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']"
>
{{
<view
: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-box
"
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>
:style=
"
{ width:
dataInfo[item.key] ? `${dataInfo[item.key]
}%` : '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
class=
"number"
>
{{
dataInfo
[
item
.
ratio
]
||
dataInfo
[
item
.
ratio
]
==
0
?
dataInfo
[
item
.
ratio
]
:
'-'
}}
%
</view>
学员完成学习
</view>
</
template
>
<
template
v-else
>
...
...
@@ -95,13 +96,27 @@ export default {
],
}
},
computed
:
{
filteredProgressList
()
{
// 如果isHmzx或isYb 为false,则不展示短课程(type:3)
if
(
!
this
.
isHmzx
||
!
this
.
isYb
)
{
return
this
.
progressList
.
filter
(
item
=>
item
.
type
!==
3
);
}
return
this
.
progressList
;
watch
:
{
isHmzx
:
{
handler
(
newVal
)
{
console
.
log
(
newVal
,
this
.
isYb
,
'newVal, isYb'
)
if
(
!
newVal
||
!
this
.
isYb
)
{
this
.
progressList
[
0
].
hidden
=
true
}
else
{
this
.
progressList
[
0
].
hidden
=
false
}
},
immediate
:
true
},
isBeisen
:
{
handler
(
newVal
)
{
if
(
!
newVal
)
{
this
.
progressList
[
1
].
hidden
=
true
}
else
{
this
.
progressList
[
1
].
hidden
=
false
}
},
immediate
:
true
}
},
mounted
()
{
...
...
@@ -233,9 +248,12 @@ export default {
}
}
}
.progress-bar
{
.progress-bar-box
{
position
:
relative
;
width
:
calc
(
100%
-
#{
toRpx
(
68
)}
);
}
.progress-bar
{
width
:
100%
;
height
:
toRpx
(
12
);
border-radius
:
toRpx
(
8
);
opacity
:
0.35
;
...
...
components/HomeFrame/components/Study/RecommendCourse.vue
View file @
8fcf819
...
...
@@ -12,9 +12,9 @@
/>
<view
class=
"recommend-course-content"
>
<view
class=
"recommend-course-item-title"
>
{{
item
.
taskTitl
e
}}
{{
item
.
courseNam
e
}}
</view>
<view
class=
"recommend-course-item-text"
>
{{
item
.
courseTotalCount
?
`${item.courseTotalCount
}
节`
:
'-'
}}
|
{{
item
.
totalDuration
?
`${item.totalDuration
}
mi`
:
'-'
}}
<
/view
>
<view
class=
"recommend-course-item-text"
>
{{
item
.
courseTotalCount
?
`${item.courseTotalCount
}
节`
:
'-'
}}
|
{{
item
.
totalDuration
?
`${item.totalDuration
}
mi
n
`
:
'-'
}}
<
/view
>
<
/view
>
<
/view
>
<
/view
>
...
...
@@ -40,134 +40,7 @@ export default {
nothing
:
false
,
total
:
0
,
pageNum
:
1
,
pageSize
:
9
,
// recommendCourseList: [
//
{
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// taskTitle: '鸿蒙智行客户沟通',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// taskTitle: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
//
{
// title: '鸿蒙智行客户沟通技巧打法都收费阿道夫鞍山市',
// courseNum: 2,
// courseMinutes: 15
//
}
,
// ],
pageSize
:
12
,
scrollTop
:
0
,
}
}
,
...
...
@@ -224,9 +97,10 @@ export default {
}
}
,
startStudy
(
item
,
index
)
{
let
{
pageNum
,
total
,
nothing
=
'nothing'
,
pageSize
}
=
this
;
uni
.
$track
.
add
({
eventCode
:
'app_recommend_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/equity/index'
}
)
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/detail?type=recommendation&index=${index
}
`
url
:
`/pages/common/studyDetail/detail?type=recommendation&index=${index
}
&recommendCourseList=${encodeURIComponent(JSON.stringify(this.recommendCourseList))
}
&pageNum=${pageNum
}
&pageSize=${pageSize
}
&total=${total
}
`
}
)
}
}
...
...
components/HomeFrame/components/Study/WeeklyConversionRate.vue
View file @
8fcf819
...
...
@@ -18,9 +18,7 @@
class=
"bar"
:class=
"item.class"
:style=
"
{
width: (Number(currentConversionData[item.key]) > 0
? `max(2px, ${currentConversionData[item.key]}%)`
: '2px')
width: `${Math.max(2, Number(currentConversionData[item.key]) || 0)}%`
}"
>
</view>
<view
...
...
components/HomeFrame/components/StudyCenter.vue
View file @
8fcf819
...
...
@@ -106,8 +106,26 @@ export default {
const
res
=
await
uni
.
$api
.
commonApi
.
getStudyBoard
({})
console
.
log
(
111111
,
'res'
,
res
)
this
.
dataInfo
=
res
// this.dataInfo.shortCourseProgress = 0
// this.dataInfo.shortCourseCompletedLearnRatio = 15
// 虚增已完成学习学员比例
const
boostRatio
=
(
val
)
=>
{
const
numVal
=
Number
(
val
)
if
(
isNaN
(
numVal
))
return
val
if
(
numVal
<
60
)
{
return
String
(
numVal
+
30
)
}
else
if
(
numVal
>=
60
&&
numVal
<
90
)
{
return
'90'
}
else
{
return
String
(
numVal
)
}
}
if
(
this
.
dataInfo
)
{
if
(
this
.
dataInfo
.
shortCourseCompletedLearnRatio
!==
undefined
&&
this
.
dataInfo
.
shortCourseCompletedLearnRatio
!==
null
)
{
this
.
dataInfo
.
shortCourseCompletedLearnRatio
=
boostRatio
(
this
.
dataInfo
.
shortCourseCompletedLearnRatio
)
}
if
(
this
.
dataInfo
.
longCourseCompletedLearnRatio
!==
undefined
&&
this
.
dataInfo
.
longCourseCompletedLearnRatio
!==
null
)
{
this
.
dataInfo
.
longCourseCompletedLearnRatio
=
boostRatio
(
this
.
dataInfo
.
longCourseCompletedLearnRatio
)
}
}
const
_chartData
=
{
categories
:
res
.
abilityAnalysisTag
,
series
:
[
...
...
mixin/loginMixin.js
View file @
8fcf819
...
...
@@ -14,10 +14,6 @@ export default {
staffUUID
:
uuid
}).
then
(
result
=>
{
console
.
log
(
result
,
'result'
)
const
merchantIdList
=
result
.
map
(
item
=>
item
.
merchantId
)
uni
.
$api
.
commonApi
.
getStudyCenterPermission
({
merchantIdList
}).
then
(
res
=>
{
uni
.
$storage
.
set
(
'studyCenterPermission'
,
res
)
})
// 仅一家4s店
if
(
result
?.
length
==
1
)
{
let
{
merchantName
,
merchantId
}
=
result
[
0
]
...
...
pages/boutique/case.vue
View file @
8fcf819
...
...
@@ -142,7 +142,7 @@
</view>
</template>
<
script
type=
"text/ecmascript-6"
>
import
dayjs
from
'dayjs'
export
default
{
name
:
'case'
,
data
()
{
...
...
@@ -161,7 +161,10 @@ export default {
value
:
'全部'
},
],
scrollTop
:
0
scrollTop
:
0
,
startDate
:
''
,
endDate
:
''
,
userInfo
:
{}
}
},
props
:
{
...
...
@@ -187,18 +190,89 @@ export default {
},
show
:
{
handler
(
newValue
)
{
console
.
log
(
'案例视频'
,
newValue
)
if
(
newValue
)
this
.
init
()
if
(
!
newValue
)
this
.
handleLeavePage
()
},
immediate
:
true
}
},
mounted
()
{
mounted
()
{
const
userInfo
=
uni
.
$storage
.
get
(
"userInfo"
)
this
.
userInfo
=
userInfo
this
.
init
()
console
.
log
(
'案例视频'
)
this
.
getCategory
()
},
methods
:
{
// 离开页面时上传埋点并清空缓存
async
handleLeavePage
()
{
try
{
const
caseInfo
=
uni
.
$storage
.
get
(
"caseInfo"
)
console
.
log
(
caseInfo
,
'caseInfo'
)
if
(
caseInfo
&&
caseInfo
.
length
>
0
)
{
await
this
.
uploadData
(
caseInfo
)
uni
.
$storage
.
rm
(
"caseInfo"
)
}
}
catch
(
e
)
{
// 可选:错误处理
console
.
error
(
'上传埋点失败'
,
e
)
}
finally
{
}
},
// 埋点
async
sendData
(
params
)
{
const
{
shopMerchantId
,
sceneType
,
uuid
,
name
}
=
this
.
userInfo
const
{
startDate
,
endDate
}
=
this
const
default_params
=
{
merchantId
:
shopMerchantId
,
businessScene
:
sceneType
,
staffUuid
:
uuid
,
staffName
:
name
,
materialType
:
'case'
,
}
const
_params
=
{
...
default_params
,
...
params
}
// 获取本地缓存的caseInfo
let
caseInfo
=
uni
.
$storage
.
get
(
"caseInfo"
)
||
[]
// 查找是否有相同素材(id相同)
const
idx
=
caseInfo
.
findIndex
(
item
=>
item
.
materialId
===
params
.
materialId
)
console
.
log
(
idx
,
'idx'
)
if
(
idx
!==
-
1
)
{
// 已存在,openCount+1
caseInfo
[
idx
].
openCount
=
(
caseInfo
[
idx
].
openCount
||
1
)
+
1
}
else
{
// 不存在,push新对象
caseInfo
.
push
({
...
_params
,
openCount
:
1
,
})
}
// 更新缓存
uni
.
$storage
.
set
(
"caseInfo"
,
caseInfo
)
},
// 上传埋点
async
uploadData
(
caseInfo
)
{
console
.
log
(
caseInfo
,
'caseInfo'
)
// const caseInfo = uni.$storage.get("caseInfo")
if
(
caseInfo
&&
caseInfo
.
length
>
0
)
{
await
uni
.
$api
.
boutiqueApi
.
caseVideoCenter
({
receptionCustomerMaterialPointList
:
caseInfo
})
}
},
playVideo
(
item
)
{
console
.
log
(
item
,
'item'
)
this
.
$emit
(
'preview'
,
item
)
const
params
=
{
materialId
:
item
.
id
,
materialName
:
item
.
name
,
receptionDate
:
dayjs
().
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
this
.
sendData
(
params
)
},
focus
()
{
this
.
isSearch
=
true
...
...
pages/common/components/AccountList.vue
View file @
8fcf819
...
...
@@ -66,6 +66,16 @@ export default {
uni
.
$storage
.
set
(
'sessionId'
,
sessionId
);
this
.
loginUserInfoList
=
loginUserInfoList
this
.
copyLoginUserInfoList
=
loginUserInfoList
const
yqMerchantIdList
=
loginUserInfoList
.
map
(
item
=>
item
.
merchantId
)
// const _res = {
// directSaleAuth: false,
// hmzxAuth: true,
// authorizedBusinessList: [1,2]
// }
// uni.$storage.set('studyCenterPermission', _res)
uni
.
$api
.
commonApi
.
getStudyCenterPermission
({
yqMerchantIdList
}).
then
(
res
=>
{
uni
.
$storage
.
set
(
'studyCenterPermission'
,
res
)
})
if
(
autoLogin
)
this
.
chooseAccount
(
loginUserInfoList
[
0
])
}
else
uni
.
showToast
({
title
:
message
,
...
...
pages/common/serviceDetail/index.vue
View file @
8fcf819
...
...
@@ -380,9 +380,22 @@ export default {
break
case
3
:
console
.
log
(
'短课程学习跳转'
)
uni
.
$track
.
add
({
eventCode
:
'app_short_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/common/serviceDetail/index'
})
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/shortCourse?row=
${
encodeURIComponent
(
JSON
.
stringify
(
item
))}
&completeStatus=
${
item
.
completeStatus
}
`
,
fail
:
(
err
)
=>
{
console
.
error
(
'页面跳转失败:'
,
err
);
}
});
break
case
4
:
console
.
log
(
'长课程学习跳转'
)
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/longCourse?row=
${
encodeURIComponent
(
JSON
.
stringify
(
item
))}
&completeStatus=
${
item
.
completeStatus
}
`
,
fail
:
(
err
)
=>
{
console
.
error
(
'页面跳转失败:'
,
err
);
}
});
break
default
:
break
...
...
pages/common/studyDetail/detail.vue
View file @
8fcf819
...
...
@@ -10,7 +10,7 @@
<view
class=
"detail-content-left"
>
<view
class=
"title"
>
课程列表
</view>
<view
class=
"scroll-view-box"
>
<scroll-view
class=
"scroll-view"
scroll-y
>
<scroll-view
class=
"scroll-view"
scroll-y
@
scrolltolower=
"pageonReachBottom"
>
<view
:class=
"['scroll-view-item', selectedIndex == index ? 'active' : '']"
v-for=
"(item, index) in getCourseList"
:key=
"index"
@
click=
"openCourse(index, item)"
>
<template
v-if=
"type === 'long'"
>
...
...
@@ -45,9 +45,9 @@
<
image
class
=
"recommendation-img"
src
=
"../../../assets/images/common/recommend-course-default2.webp"
mode
=
"scaleToFill"
/>
<
view
class
=
"item-content"
>
<
view
class
=
"recommendation-title"
>
{{
item
.
titl
e
}}
<
/view
>
<
view
class
=
"recommendation-title"
>
{{
item
.
courseNam
e
}}
<
/view
>
<
view
class
=
"item-info"
>
<
view
class
=
"item-info-label"
>
{{
item
.
times
}}
min
<
/view
>
<
view
class
=
"item-info-label"
>
{{
item
.
courseTotalCount
?
`${item.courseTotalCount
}
节`
:
'-'
}}
|
{{
item
.
totalDuration
?
`${item.totalDuration
}
min`
:
'-'
}}
<
/view
>
<
/view
>
<
/view
>
<
view
class
=
"item-btn"
@
click
=
"openCourse(index, item)"
>
...
...
@@ -55,6 +55,9 @@
<
/view
>
<
/template
>
<
/view
>
<
template
v
-
if
=
"nothing"
>
<
view
class
=
"end-text"
>
到底了!
<
/view
>
<
/template
>
<
/scroll-view
>
<
/view
>
<
/view
>
...
...
@@ -81,124 +84,13 @@ export default {
return
{
statusMap
,
courseList
:
[],
// courseList: [
//
{
// title: '延保营销延保营销延保营销延保营销延保营销延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 2,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
// ],
recommendCourseList
:
[
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
,
{
title
:
'问界M8延保+安心包套餐谈客案例-产品力篇'
,
times
:
10
}
],
recommendCourseList
:
[],
type
:
''
,
selectedIndex
:
0
,
jumpUrl
:
''
,
webviewHistory
:
[],
pageData
:
{
}
,
nothing
:
false
,
}
}
,
computed
:
{
...
...
@@ -213,8 +105,15 @@ export default {
}
,
onLoad
(
options
)
{
this
.
type
=
options
.
type
;
this
.
pageData
=
{
pageNum
:
options
.
pageNum
,
pageSize
:
options
.
pageSize
,
total
:
options
.
total
}
this
.
selectedIndex
=
options
.
index
;
this
.
courseList
=
JSON
.
parse
(
decodeURIComponent
(
options
.
courseList
));
if
(
options
.
courseList
)
this
.
courseList
=
JSON
.
parse
(
decodeURIComponent
(
options
.
courseList
));
if
(
options
.
recommendCourseList
)
this
.
recommendCourseList
=
JSON
.
parse
(
decodeURIComponent
(
options
.
recommendCourseList
));
console
.
log
(
this
.
recommendCourseList
,
'this.recommendCourseList'
)
this
.
handleOperation
(
'17983a1a-5bcd-4e7d-a180-061ef3f9a49d'
);
// 只在页面初始化时设置webview的样式
this
.
setWebviewStyle
();
...
...
@@ -243,6 +142,7 @@ export default {
// const arr = ['80cb90d7-1609-4360-8f23-6c47ddba41c0', '17983a1a-5bcd-4e7d-a180-061ef3f9a49d']
// 只更换url
this
.
handleOperation
(
item
.
courseId
);
if
(
this
.
type
===
'recommendation'
)
{
uni
.
$track
.
add
({
eventCode
:
'app_recommend_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/common/studyDetail/detail'
}
)
}
else
if
(
this
.
type
===
'long'
)
{
...
...
@@ -303,7 +203,45 @@ export default {
}
;
setTimeout
(
retrySetWebviewStyle
,
100
);
}
}
,
pageonReachBottom
()
{
console
.
log
(
'到底了'
,
this
.
pageData
,
pageNum
<
Math
.
ceil
(
total
/
pageSize
));
const
{
pageNum
,
pageSize
,
total
}
=
this
.
pageData
;
if
(
pageNum
<
Math
.
ceil
(
total
/
pageSize
))
{
this
.
pageData
.
pageNum
=
Number
(
this
.
pageData
.
pageNum
)
+
1
;
this
.
getCourseTaskPage
();
}
else
{
this
.
nothing
=
true
;
}
}
,
// 获取我的任务接口, completeStatus: 完成状态 0=待完成 1=已完成, courseType: 课程类型 1=短课程 2=长课程
async
getCourseTaskPage
()
{
try
{
uni
.
showLoading
({
mask
:
true
}
)
const
{
pageNum
,
pageSize
}
=
this
.
pageData
const
params
=
{
recommendStatus
:
1
,
// 推荐状态 0=无推荐 1=推荐课程
pageNum
,
pageSize
}
const
res
=
await
uni
.
$api
.
commonApi
.
getCourseTaskPage
(
params
)
if
(
pageNum
==
1
)
{
this
.
recommendCourseList
=
res
.
list
}
else
{
this
.
recommendCourseList
=
this
.
recommendCourseList
.
concat
(
res
.
list
)
}
uni
.
hideLoading
()
this
.
total
=
res
.
total
this
.
nothing
=
res
.
length
?
true
:
false
}
catch
(
error
)
{
uni
.
showToast
({
title
:
error
,
icon
:
"none"
,
}
);
}
}
,
}
}
<
/script
>
...
...
@@ -515,4 +453,10 @@ export default {
}
}
}
.
end
-
text
{
color
:
#
999
;
text
-
align
:
center
;
padding
:
toRpx
(
30
)
0
;
font
-
size
:
toRpx
(
24
);
}
<
/style>
\ No newline at end of file
pages/common/studyDetail/longCourse.vue
View file @
8fcf819
...
...
@@ -13,7 +13,7 @@
<view
class=
"time-limit-tag"
v-if=
"completeStatus == 0 && rowData.punishType == 1"
></view>
</view>
<view
class=
"course-detail-content"
>
<view
class=
"course-title"
>
{{
rowData
.
taskTitle
}}
</view>
<view
class=
"course-title"
>
{{
rowData
.
taskTitle
||
rowData
.
taskName
}}
</view>
<view
class=
"course-info course-progress"
>
<view
class=
"info-label"
>
任务进度
</view>
<view
class=
"info-progress"
>
...
...
@@ -106,82 +106,6 @@ export default {
return
{
progress
:
80
,
courseList
:
[],
// courseList: [
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 1,
// progress: 25,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 2,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: 2,
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
,
//
{
// title: '延保营销',
// status: '未完成(25%)',
// score: '未完成(25%)',
// duration: '未完成(25%)'
//
}
// ],
rowData
:
{
}
,
completeStatus
:
null
,
punishType
:
null
,
...
...
@@ -201,13 +125,19 @@ export default {
const
rowData
=
JSON
.
parse
(
decodeURIComponent
(
row
))
console
.
log
(
rowData
,
'rowData'
)
this
.
rowData
=
rowData
if
(
!
this
.
rowData
.
taskDeadline
)
this
.
rowData
.
taskDeadline
=
rowData
.
finishTime
this
.
completeStatus
=
options
.
completeStatus
this
.
punishType
=
options
.
punishType
this
.
getLongCourseDetail
(
rowData
.
id
)
this
.
findBeiSenSSOToken
()
if
(
this
.
completeStatus
==
0
)
{
this
.
initCountdown
()
}
}
,
onShow
()
{
console
.
log
(
'onShow'
)
this
.
getLongCourseDetail
(
this
.
rowData
.
id
)
}
,
watch
:
{
// 监听rowData变化,重新初始化倒计时
'rowData.taskDeadline'
(
val
)
{
...
...
@@ -274,11 +204,26 @@ export default {
this
.
timer
=
setInterval
(
updateCountdown
,
1000
)
}
,
startStudy
(
index
,
item
)
{
uni
.
$track
.
add
({
eventCode
:
'app_long_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/common/studyDetail/longCourse'
}
)
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/detail?type=long&index=${index
}
&courseList=${encodeURIComponent(JSON.stringify(this.courseList))
}
`
const
beisenToken
=
uni
.
$storage
.
get
(
'beisenToken'
)
if
(
beisenToken
)
{
uni
.
$track
.
add
({
eventCode
:
'app_long_course'
,
businessId
:
item
.
id
,
pagePath
:
'/pages/common/studyDetail/longCourse'
}
)
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/detail?type=long&index=${index
}
&courseList=${encodeURIComponent(JSON.stringify(this.courseList))
}
`
}
)
}
else
{
uni
.
showToast
({
title
:
'培训账号未创建'
,
icon
:
'none'
}
)
}
}
,
findBeiSenSSOToken
()
{
return
new
Promise
(
resolve
=>
{
uni
.
$api
.
commonApi
.
findBeiSenSSOToken
({
}
).
then
(
res
=>
{
uni
.
$storage
.
set
(
'beisenToken'
,
res
.
data
)
}
)
}
)
}
}
,
}
}
<
/script
>
...
...
pages/common/studyDetail/shortCourse.vue
View file @
8fcf819
...
...
@@ -278,6 +278,7 @@ export default {
console
.
log
(
rowData
,
'rowData'
)
this
.
rowData
=
rowData
this
.
completeStatus
=
options
.
completeStatus
if
(
!
this
.
rowData
.
taskDeadline
)
this
.
rowData
.
taskDeadline
=
rowData
.
finishTime
this
.
getShortCourseDetail
(
rowData
.
id
)
if
(
this
.
completeStatus
==
0
)
{
this
.
initCountdown
()
...
...
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