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 417b8ed2
authored
Oct 22, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 倒计时
1 parent
20a1c847
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
232 additions
and
49 deletions
assets/css/sprite.scss
assets/images/common/activityBg.png
assets/images/sprite.png
components/HomeFrame/components/Activity/card.vue
components/HomeFrame/components/Activity/popup.vue
components/HomeFrame/components/ActivityCenter.vue
assets/css/sprite.scss
View file @
417b8ed
This diff is collapsed.
Click to expand it.
assets/images/common/activityBg.png
0 → 100644
View file @
417b8ed
179 KB
assets/images/sprite.png
View file @
417b8ed
2.83 MB
|
W:
|
H:
2.83 MB
|
W:
|
H:
2-up
Swipe
Onion skin
components/HomeFrame/components/Activity/card.vue
View file @
417b8ed
<
template
>
<
template
>
<view
class=
"card"
@
click=
"handleTaskItemClick(item)"
>
<view
class=
"card"
@
click=
"handleTaskItemClick(item)"
>
<view
class=
"time-limit-tag"
v-if=
"tabIndex === 0 && item.punishType == 1"
></view>
<view
v-if=
"tabIndex === 1"
class=
"time-limit-countdown"
>
<view
v-if=
"tabIndex === 0 && item.punishType == 1"
class=
"time-limit-countdown"
>
<template
v-if=
"item._timeout"
>
<template
v-if=
"item._timeout"
>
<view
class=
"countdown-label timeout-label"
>
已超时
</view>
<view
class=
"countdown-label timeout-label"
>
已超时
</view>
</
template
>
</
template
>
<
template
v-else-if=
"item._showCountdown"
>
<
template
v-else-if=
"item._showCountdown"
>
<view
class=
"countdown-label"
>
剩
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownHour
}}
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownHour
}}
</view>
<view
class=
"countdown-
separator"
>
:
</view>
<view
class=
"countdown-
label"
>
分
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownMinute
}}
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownMinute
}}
</view>
<view
class=
"countdown-
separator"
>
:
</view>
<view
class=
"countdown-
label"
>
秒
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownSecond
}}
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownSecond
}}
</view>
</
template
>
</
template
>
<
template
v-else-if=
"item._showDays"
>
<
template
v-else-if=
"item._showDays"
>
<view
class=
"countdown-label"
>
剩
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
{{
item
.
_leftDays
}}
</view>
<view
class=
"countdown-num"
>
{{
item
.
_leftDays
}}
</view>
<view
class=
"countdown-label"
>
天
</view>
<view
class=
"countdown-label"
>
天
</view>
<view
class=
"countdown-num"
>
{{
item
.
_leftDays
}}
</view>
<view
class=
"countdown-label"
>
时
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
<view
class=
"countdown-label"
>
剩
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
--
</view>
<view
class=
"countdown-num"
>
--
</view>
<view
class=
"countdown-separator"
>
:
</view>
<view
class=
"countdown-separator"
>
:
</view>
<view
class=
"countdown-num"
>
--
</view>
<view
class=
"countdown-num"
>
--
</view>
...
@@ -27,40 +28,50 @@
...
@@ -27,40 +28,50 @@
<view
class=
"countdown-num"
>
--
</view>
<view
class=
"countdown-num"
>
--
</view>
</
template
>
</
template
>
</view>
</view>
<image
class=
"task-item-img"
:src=
"
item.courseType === 1 ? require('../../../../assets/images/common/short-course-default.webp') : require('../../../../assets/images/common/course-default-bg.webp
')"
mode=
"aspectFill"
/>
<image
class=
"task-item-img"
:src=
"
require('../../../../assets/images/common/activityBg.png
')"
mode=
"aspectFill"
/>
<view
class=
"task-item-content"
>
<view
class=
"task-item-content"
>
<view
class=
"task-item-title"
>
{{ item.
taskTitl
e }}
</view>
<view
class=
"task-item-title"
>
{{ item.
nam
e }}
</view>
<view
class=
"task-item-text"
>
<view
class=
"task-item-text"
v-if=
"tabIndex !== 1"
>
<view
class=
"task-item-label"
>
任务
进度
</view>
<view
class=
"task-item-label"
>
活动
进度
</view>
<view
class=
"task-item-progress"
v-if=
"
item.completeStatus == 0
"
>
<view
class=
"task-item-progress"
v-if=
"
tabIndex !== 2
"
>
<view
class=
"task-item-progress-bar"
:style=
"{ width: Math.floor(
item.taskProgress
) + '%' }"
></view>
<view
class=
"task-item-progress-bar"
:style=
"{ width: Math.floor(
68.909
) + '%' }"
></view>
<view
class=
"task-item-progress-text"
>
{{ Math.floor(
item.taskProgress
) }}%
</view>
<view
class=
"task-item-progress-text"
>
{{ Math.floor(
68.909
) }}%
</view>
</view>
</view>
<view
class=
"task-item-value"
v-else
>
<view
class=
"task-item-value"
v-else
>
<view
class=
"dot-value"
></view>
<view
class=
"gray"
>
已结束
</view>
<view
class=
"green"
>
已完成
</view>
</view>
</view>
</view>
</view>
<view
class=
"task-item-text"
v-if=
"item.courseType === 2"
>
<view
class=
"task-item-text"
>
<view
class=
"task-item-label"
>
课程数
</view>
<view
class=
"task-item-label"
>
活动时间
</view>
<view
class=
"task-item-value"
>
<view
class=
"task-item-value"
>
2025.09.01 00:00 - 2025.09.30 23:59
</view>
{{ item.courseTotalCount }}节 |
{{ item.totalDuration || item.totalDuration === 0 ? `${item.totalDuration}min` : '-' }}
</view>
</view>
</view>
<view
class=
"task-item-text"
>
<view
class=
"task-item-text"
>
<view
class=
"task-item-label"
>
完成时间
</view>
<view
class=
"task-item-label"
>
评选规则
</view>
<view
class=
"task-item-value
"
>
{{ tabIndex === 0 ? formatTime(item.taskDeadline, 'YYYY-MM-DD HH:mm') : formatTime(item.finishDate, 'YYYY-MM-DD HH:mm') }}
</view>
<view
class=
"task-item-value
blueValue"
>
查看
</view>
</view>
</view>
<
view
class=
"task-item-status"
>
{{ item.status }}
</view
>
<
!-- <view class="task-item-status">{{ item.status }}</view> --
>
</view>
</view>
</view>
</view>
</template>
</template>
<
script
>
export
default
{
props
:
{
item
:
{
type
:
Object
,
default
:
()
=>
({})
},
tabIndex
:
{
type
:
Number
,
default
:
0
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.
task-item
{
.
card
{
position
:
relative
;
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
toRpx
(
432
);
//
height
:
toRpx
(
516
);
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
toRpx
(
24
);
border-radius
:
toRpx
(
24
);
font-size
:
0
;
font-size
:
0
;
...
@@ -123,7 +134,7 @@
...
@@ -123,7 +134,7 @@
.task-item-img
{
.task-item-img
{
width
:
100%
;
width
:
100%
;
height
:
toRpx
(
180
);
height
:
toRpx
(
312
);
border-radius
:
toRpx
(
16
)
toRpx
(
16
)
0
0
;
border-radius
:
toRpx
(
16
)
toRpx
(
16
)
0
0
;
}
}
...
@@ -135,7 +146,7 @@
...
@@ -135,7 +146,7 @@
font-size
:
toRpx
(
30
);
font-size
:
toRpx
(
30
);
color
:
#292d33
;
color
:
#292d33
;
font-weight
:
500
;
font-weight
:
500
;
margin-bottom
:
toRpx
(
2
4
);
margin-bottom
:
toRpx
(
2
0
);
width
:
toRpx
(
340
);
width
:
toRpx
(
340
);
overflow
:
hidden
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
...
@@ -147,7 +158,7 @@
...
@@ -147,7 +158,7 @@
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
font-size
:
toRpx
(
24
);
font-size
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
12
);
.task-item-label
{
.task-item-label
{
width
:
toRpx
(
96
);
width
:
toRpx
(
96
);
...
@@ -167,10 +178,13 @@
...
@@ -167,10 +178,13 @@
background
:
#2cca74
;
background
:
#2cca74
;
margin-right
:
toRpx
(
8
);
margin-right
:
toRpx
(
8
);
}
}
.gr
een
{
.gr
ay
{
color
:
#
2cca74
;
color
:
#
666666
;
}
}
}
}
.blueValue
{
color
:
#4673ff
;
}
}
}
.task-item-progress
{
.task-item-progress
{
...
...
components/HomeFrame/components/Activity/popup.vue
0 → 100644
View file @
417b8ed
<!--针对弹窗穿透滚动,统一封装的popup-->
<
template
>
<page-meta
:page-style=
"'overflow:' + (show ? 'hidden' : 'visible')"
></page-meta>
<uni-popup
:class=
"['customPopup', popupClass, noTitle ? 'noTitle' : '']"
ref=
"publishPopup"
:type=
"type"
@
change=
"change"
:safe-area=
"safeArea"
:is-mask-click=
"isMaskClick"
:showClose=
"showClose"
>
<!-- 顶部标题栏插槽 -->
<slot
name=
"header"
>
<view
class=
"popup-top-box flex align-center"
v-if=
"showTitle"
>
<view
class=
"popup-top-box-title flex-1"
>
{{
title
}}
</view>
<view
style=
"font-size: 0"
>
{{
otherText
}}
</view>
<view
@
click
.
stop=
"closePopup"
>
<view
class=
"sprite-icon icon-evaluationClose"
></view>
</view>
</view>
</slot>
<!-- 主要内容插槽 -->
<view
class=
"content"
>
<slot
name=
"content"
></slot>
</view>
<!-- 底部插槽 插槽有内容就优先自定义内容-->
<slot
name=
"footer"
>
<view
class=
"footer-box flex justify-center"
v-if=
"isShowFooter"
>
<view
class=
"cancle-btn btn"
v-if=
"isShowCancel"
@
click
.
stop=
"closePopup"
>
{{
cancelText
}}
</view>
<view
class=
"sure-btn btn"
:class=
"
{ 'single-btn': isShowCancel }" @click.stop="confirm">
{{
confirmText
}}
</view>
</view>
</slot>
</uni-popup>
</
template
>
<
script
>
export
default
{
name
:
'GeneralPopup'
,
props
:
{
type
:
{
type
:
String
,
default
:
'bottom'
},
isMaskClick
:
{
type
:
Boolean
,
default
:
false
},
safeArea
:
{
type
:
Boolean
,
default
:
true
},
popupClass
:
{
type
:
String
,
default
:
''
},
showClose
:
{
type
:
Boolean
,
default
:
true
},
title
:
{
type
:
String
,
default
:
''
},
showTitle
:
{
type
:
Boolean
,
default
:
true
},
isShowFooter
:
{
type
:
Boolean
,
default
:
true
},
cancelText
:
{
type
:
String
,
default
:
'取消'
},
confirmText
:
{
type
:
String
,
default
:
'确定'
},
isShowCancel
:
{
type
:
Boolean
,
default
:
true
},
autoClose
:
{
type
:
Boolean
,
default
:
true
},
noTitle
:
{
type
:
Boolean
,
default
:
false
},
otherText
:
{
type
:
String
,
default
:
''
}
},
data
()
{
return
{
show
:
false
}
},
methods
:
{
open
()
{
this
.
$refs
.
publishPopup
.
open
()
},
change
(
e
)
{
this
.
show
=
e
.
show
},
closePopup
()
{
this
.
$refs
.
publishPopup
.
close
()
this
.
$emit
(
'close'
)
},
confirm
()
{
if
(
this
.
autoClose
)
{
this
.
$refs
.
publishPopup
.
close
()
}
this
.
$emit
(
'confirm'
)
}
}
}
</
script
>
<
style
scoped
lang=
"scss"
>
.justify-between
{
-webkit-box-pack
:
justify
;
-ms-flex-pack
:
justify
;
-webkit-justify-content
:
space-between
;
justify-content
:
space-between
;
}
.align-center
{
align-items
:
center
;
}
.uniui-closeempty
{
color
:
#1a1a1a
;
font-size
:
toRpx
(
24
);
font-weight
:
600
;
}
.single-btn
{
width
:
100%
;
}
.btn
{
width
:
toRpx
(
720
);
height
:
toRpx
(
76
);
border-radius
:
toRpx
(
48
);
opacity
:
1
;
line-height
:
toRpx
(
80
);
text-align
:
center
;
color
:
rgba
(
26
,
26
,
26
,
0.6
);
font-size
:
toRpx
(
32
);
font-weight
:
500
;
}
.cancle-btn
{
background
:
#f0f1f5
;
margin-right
:
toRpx
(
38
);
}
.sure-btn
{
color
:
#fff
;
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
}
</
style
>
components/HomeFrame/components/ActivityCenter.vue
View file @
417b8ed
...
@@ -28,22 +28,24 @@
...
@@ -28,22 +28,24 @@
</view>
</view>
</view>
</view>
<
template
>
<
template
>
<scroll-view
scroll-y
ref=
"scrollViewRef"
:scroll-top=
"scrollTop"
@
scrolltolower=
"pageonReachBottom"
:class=
"[getScrollHeight]"
>
<view
class=
"activity-box"
>
<template
v-if=
"cardList.length"
>
<scroll-view
scroll-y
ref=
"scrollViewRef"
:scroll-top=
"scrollTop"
@
scrolltolower=
"pageonReachBottom"
class=
"activity-list-box"
>
<view
class=
"task-list"
>
<template
v-if=
"cardList.length"
>
<Card
v-for=
"item in cardList"
:key=
"item.taskId"
:item=
"item"
/>
<view
class=
"card-list"
>
</view>
<Card
v-for=
"item in cardList"
:key=
"item"
:item=
"item"
:tabIndex=
"firstIndex"
/>
</
template
>
</view>
<
template
v-else
>
</
template
>
<view
class=
"nothing flex"
>
<
template
v-else
>
<image
class=
"icon"
src=
"../../../assets/images/common/noData.png"
/>
<view
class=
"nothing flex"
>
暂无数据
<image
class=
"icon"
src=
"../../../assets/images/common/noData.png"
/>
</view>
暂无数据
</
template
>
</view>
<
template
v-if=
"nothing"
>
</
template
>
<view
class=
"end-text"
>
到底了!
</view>
<
template
v-if=
"nothing"
>
</
template
>
<view
class=
"end-text"
>
到底了!
</view>
</scroll-view>
</
template
>
</scroll-view>
</view>
</template>
</template>
</view>
</view>
</view>
</view>
...
@@ -67,7 +69,7 @@ export default {
...
@@ -67,7 +69,7 @@ export default {
{
tabName
:
'即将开始'
,
num
:
()
=>
''
},
{
tabName
:
'即将开始'
,
num
:
()
=>
''
},
{
tabName
:
'已结束'
,
num
:
()
=>
''
}
{
tabName
:
'已结束'
,
num
:
()
=>
''
}
],
],
cardList
:
[],
cardList
:
[
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
}
],
firstIndex
:
0
,
firstIndex
:
0
,
firstLeft
:
[
'first'
,
'second'
],
firstLeft
:
[
'first'
,
'second'
],
firstClass
:
[
'short-first-nav'
,
'short-second-nav'
],
firstClass
:
[
'short-first-nav'
,
'short-second-nav'
],
...
@@ -352,6 +354,20 @@ export default {
...
@@ -352,6 +354,20 @@ export default {
}
}
}
}
}
}
.activity-box
{
padding-top
:
toRpx
(
32
);
height
:
calc
(
100%
-
#{
toRpx
(
100
)}
);
.activity-list-box
{
margin-top
:
toRpx
(
24
);
height
:
calc
(
100%
-
#{
toRpx
(
210
)}
);
}
}
.card-list
{
display
:
grid
;
grid-template-columns
:
repeat
(
2
,
1
fr
);
gap
:
toRpx
(
40
);
padding
:
0
toRpx
(
40
)
toRpx
(
32
);
}
}
}
}
}
...
...
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