Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 8f03831f
authored
Mar 23, 2026
by
zhangxw
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
学习中心我的课程新增推荐学习tab
1 parent
73484c65
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
16 deletions
packageStudyCenter/api.js
packageStudyCenter/pages/myCourse/myCourse.js
packageStudyCenter/pages/myCourse/myCourse.sass
packageStudyCenter/pages/myCourse/myCourse.wxml
packageStudyCenter/api.js
View file @
8f03831
...
...
@@ -60,4 +60,8 @@ module.exports = {
getStaffStudyRank
(
data
)
{
return
api
.
post
(
'dj.pad.api.recommended.staff.study.duration.rank'
,
data
,
[],
'/rop-dj-pad/router'
)
},
// 获取我的课程-推荐学习
getRecommendListAPI
(
data
)
{
return
api
.
post
(
"dj.api.pad.learning.center.myself.course.recommend"
,
data
,
[],
"/rop-dj-pad/router"
)
}
}
packageStudyCenter/pages/myCourse/myCourse.js
View file @
8f03831
...
...
@@ -19,7 +19,10 @@ Page({
},
{
label
:
'已学完'
,
num
:
0
}],
},
{
label
:
'推荐学习'
,
num
:
0
}],
tabIndex
:
0
,
pageNum
:
1
,
pageSize
:
10
,
...
...
@@ -52,7 +55,7 @@ Page({
*/
onShow
()
{
this
.
getStaticData
()
this
.
getResidueTime
()
this
.
getResidueTime
()
this
.
getList
()
},
...
...
@@ -90,7 +93,8 @@ Page({
this
.
setData
({
[
'tabList[0].num'
]:
data
.
unLearnCount
,
[
'tabList[1].num'
]:
data
.
learningCount
,
[
'tabList[2].num'
]:
data
.
completedCount
[
'tabList[2].num'
]:
data
.
completedCount
,
[
'tabList[3].num'
]:
data
.
recommendCount
})
}
else
{
wx
.
$util
.
showToast
(
message
)
...
...
@@ -105,8 +109,8 @@ Page({
pageNum
:
1
,
dataList
:
[]
},
()
=>
{
this
.
getList
(
true
)
this
.
getStaticData
()
this
.
getList
(
true
)
this
.
getStaticData
()
})
},
...
...
@@ -132,7 +136,7 @@ Page({
learnStatus
:
tabIndex
,
pageNum
,
pageSize
}
}
this
.
setData
({
loading
:
true
})
...
...
@@ -140,8 +144,9 @@ Page({
this
.
setData
({
loadingList
:
true
})
}
const
res
=
await
api
.
getMyCourseList
(
params
)
}
let
eventApi
=
tabIndex
==
3
?
'getRecommendListAPI'
:
'getMyCourseList'
const
res
=
await
api
[
eventApi
](
params
)
switch
(
tabIndex
)
{
case
0
:
formItems
=
[{
...
...
packageStudyCenter/pages/myCourse/myCourse.sass
View file @
8f03831
...
...
@@ -9,14 +9,19 @@ page {
display
:
flex
;
align-items
:
center
;
justify-content
:
space-between
;
padding
:
var
(
--
fontSize24
)
var
(
--
fontSize28
)
;
padding
:
var
(
--
fontSize24
)
var
(
--
fontSize28
)
;
.tab-scroll
{
width
:
100%
;
white-space
:
nowrap
;
}
.tab-box
{
display
:
flex
;
align-items
:
center
;
display
:
inline-flex
;
gap
:
var
(
--
fontSize16
)
;
.tab-item
{
text-align
:
center
;
padding
:
0
var
(
--
fontSize32
)
;
text-align
:
center
;
flex
:
0
0
auto
;
white-space
:
nowrap
;
padding
:
0
var
(
--
fontSize24
)
;
height
:
var
(
--
fontSize72
)
;
line-height
:
var
(
--
fontSize72
)
;
border-radius
:
var
(
--
fontSize16
)
;
...
...
packageStudyCenter/pages/myCourse/myCourse.wxml
View file @
8f03831
<!--packageStudyCenter/pages/myCourse/myCourse.wxml-->
<view class="container">
<view class="top-box">
<view class="tab-box">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item.label}}<text>{{item.num != null ? item.num : '-'}}</text></view>
</view>
<scroll-view class="tab-scroll" scroll-x show-scrollbar="{{false}}" enhanced="{{true}}">
<view class="tab-box">
<view class="tab-item {{tabIndex == index ? 'active' : ''}}" wx:for="{{tabList}}" wx:key="index" bindtap="changeTab" data-index="{{index}}">{{item.label}}<text>{{item.num != null ? item.num : ''}}</text></view>
</view>
</scroll-view>
</view>
<view class="tips-box" wx:if="{{residueObj.remindType == 1 || residueObj.remindType == 2}}">
...
...
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