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 156b9d58
authored
Oct 30, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 样式
1 parent
5edf7eb3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
32 deletions
components/HomeFrame/components/Activity/card.vue
components/HomeFrame/components/ActivityCenter.vue
components/HomeFrame/components/LeftSide.vue
components/HomeFrame/components/Activity/card.vue
View file @
156b9d5
<
template
>
<
template
>
<view
class=
"card"
@
click=
"handleAvtivityItemClick()"
>
<view
class=
"card"
@
click=
"handleAvtivityItemClick()"
>
<view
v-if=
"tabIndex === 1"
class=
"time-limit-countdown"
>
<view
v-if=
"tabIndex === 1"
class=
"time-limit-countdown"
>
<template
v-if=
"
item
._timeout"
>
<template
v-if=
"
countdownObj
._timeout"
>
<view
class=
"countdown-label timeout-label"
>
已超时
</view>
<view
class=
"countdown-label timeout-label"
>
已超时
</view>
</
template
>
</
template
>
<
template
v-else-if=
"
item
._remainSeconds < 3600"
>
<
template
v-else-if=
"
countdownObj
._remainSeconds < 3600"
>
<!-- 小于1小时,显示分钟/秒 -->
<!-- 小于1小时,显示分钟/秒 -->
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownMinute
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_countdownMinute
}}
</view>
<view
class=
"countdown-label"
>
分
</view>
<view
class=
"countdown-label"
>
分
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownSecond
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_countdownSecond
}}
</view>
<view
class=
"countdown-label"
>
秒
</view>
<view
class=
"countdown-label"
>
秒
</view>
</
template
>
</
template
>
<
template
v-else-if=
"
item
._remainSeconds < 86400"
>
<
template
v-else-if=
"
countdownObj
._remainSeconds < 86400"
>
<!-- 小于24小时,显示小时/分钟 -->
<!-- 小于24小时,显示小时/分钟 -->
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownHour
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_countdownHour
}}
</view>
<view
class=
"countdown-label"
>
天
</view>
<view
class=
"countdown-label"
>
天
</view>
<view
class=
"countdown-num"
>
{{
item
.
_countdownMinute
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_countdownMinute
}}
</view>
<view
class=
"countdown-label"
>
时
</view>
<view
class=
"countdown-label"
>
时
</view>
</
template
>
</
template
>
<
template
v-else-if=
"
item
._showDays"
>
<
template
v-else-if=
"
countdownObj
._showDays"
>
<!-- 大于24小时,显示天/小时 -->
<!-- 大于24小时,显示天/小时 -->
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-label"
>
即将开始
</view>
<view
class=
"countdown-num"
>
{{
item
.
_leftDays
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_leftDays
}}
</view>
<view
class=
"countdown-separator"
>
天
</view>
<view
class=
"countdown-separator"
>
天
</view>
<view
class=
"countdown-num"
>
{{
item
.
_leftHours
}}
</view>
<view
class=
"countdown-num"
>
{{
countdownObj
.
_leftHours
}}
</view>
<view
class=
"countdown-separator"
>
时
</view>
<view
class=
"countdown-separator"
>
时
</view>
</
template
>
</
template
>
<
template
v-else
>
<
template
v-else
>
...
@@ -81,10 +81,22 @@ export default {
...
@@ -81,10 +81,22 @@ export default {
return
{
return
{
dayjs
,
dayjs
,
isShowActivityDetails
:
false
,
isShowActivityDetails
:
false
,
countdownTimer
:
null
countdownTimer
:
null
,
countdownObj
:
null
}
}
},
},
mounted
()
{
mounted
()
{
this
.
countdownObj
=
{
_timeout
:
false
,
_showCountdown
:
true
,
_showDays
:
false
,
_remainSeconds
:
0
,
_countdownHour
:
'00'
,
_countdownMinute
:
'00'
,
_countdownSecond
:
'00'
,
_leftDays
:
'00'
,
_leftHours
:
'00'
}
// 初始化倒计时
// 初始化倒计时
if
(
this
.
tabIndex
===
1
&&
this
.
item
.
startTime
)
{
if
(
this
.
tabIndex
===
1
&&
this
.
item
.
startTime
)
{
this
.
updateCountdown
()
this
.
updateCountdown
()
...
@@ -102,7 +114,9 @@ export default {
...
@@ -102,7 +114,9 @@ export default {
methods
:
{
methods
:
{
handleAvtivityItemClick
()
{
handleAvtivityItemClick
()
{
this
.
$emit
(
'handleAvtivityItemClick'
)
if
(
this
.
tabIndex
!==
1
)
{
this
.
$emit
(
'handleAvtivityItemClick'
)
}
},
},
rulesShow
(
item
)
{
rulesShow
(
item
)
{
this
.
$emit
(
'rulesShow'
,
item
)
this
.
$emit
(
'rulesShow'
,
item
)
...
@@ -115,39 +129,39 @@ export default {
...
@@ -115,39 +129,39 @@ export default {
// 如果活动已经开始,显示"活动开始"
// 如果活动已经开始,显示"活动开始"
if
(
diff
<=
0
)
{
if
(
diff
<=
0
)
{
this
.
$set
(
this
.
item
,
'_timeout'
,
true
)
this
.
$set
(
this
.
countdownObj
,
'_timeout'
,
true
)
this
.
$set
(
this
.
item
,
'_showCountdown'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_showCountdown'
,
false
)
this
.
$set
(
this
.
item
,
'_showDays'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_showDays'
,
false
)
return
return
}
}
this
.
$set
(
this
.
item
,
'_timeout'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_timeout'
,
false
)
// 计算剩余秒数
// 计算剩余秒数
const
_remainSeconds
=
Math
.
floor
(
diff
/
1000
)
const
_remainSeconds
=
Math
.
floor
(
diff
/
1000
)
this
.
$set
(
this
.
item
,
'_remainSeconds'
,
_remainSeconds
)
this
.
$set
(
this
.
countdownObj
,
'_remainSeconds'
,
_remainSeconds
)
// 根据剩余时间设置不同的显示格式
// 根据剩余时间设置不同的显示格式
if
(
_remainSeconds
<
3600
)
{
if
(
_remainSeconds
<
3600
)
{
// 小于1小时,显示分钟/秒
// 小于1小时,显示分钟/秒
this
.
$set
(
this
.
item
,
'_showCountdown'
,
true
)
this
.
$set
(
this
.
countdownObj
,
'_showCountdown'
,
true
)
this
.
$set
(
this
.
item
,
'_showDays'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_showDays'
,
false
)
this
.
$set
(
this
.
item
,
'_countdownHour'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
60
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownHour'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
60
)))
this
.
$set
(
this
.
item
,
'_countdownMinute'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
60
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownMinute'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
60
)))
this
.
$set
(
this
.
item
,
'_countdownSecond'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
%
60
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownSecond'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
%
60
)))
}
else
if
(
_remainSeconds
<
86400
)
{
}
else
if
(
_remainSeconds
<
86400
)
{
// 小于24小时,显示小时/分钟
// 小于24小时,显示小时/分钟
this
.
$set
(
this
.
item
,
'_showCountdown'
,
true
)
this
.
$set
(
this
.
countdownObj
,
'_showCountdown'
,
true
)
this
.
$set
(
this
.
item
,
'_showDays'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_showDays'
,
false
)
this
.
$set
(
this
.
item
,
'_countdownHour'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
3600
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownHour'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
/
3600
)))
this
.
$set
(
this
.
item
,
'_countdownMinute'
,
this
.
formatTwoDigits
(
Math
.
floor
((
_remainSeconds
%
3600
)
/
60
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownMinute'
,
this
.
formatTwoDigits
(
Math
.
floor
((
_remainSeconds
%
3600
)
/
60
)))
this
.
$set
(
this
.
item
,
'_countdownSecond'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
%
60
)))
this
.
$set
(
this
.
countdownObj
,
'_countdownSecond'
,
this
.
formatTwoDigits
(
Math
.
floor
(
_remainSeconds
%
60
)))
}
else
{
}
else
{
// 大于24小时,显示天/小时
// 大于24小时,显示天/小时
this
.
$set
(
this
.
item
,
'_showCountdown'
,
false
)
this
.
$set
(
this
.
countdownObj
,
'_showCountdown'
,
false
)
this
.
$set
(
this
.
item
,
'_showDays'
,
true
)
this
.
$set
(
this
.
countdownObj
,
'_showDays'
,
true
)
this
.
$set
(
this
.
item
,
'_leftDays'
,
Math
.
floor
(
_remainSeconds
/
86400
))
this
.
$set
(
this
.
countdownObj
,
'_leftDays'
,
Math
.
floor
(
_remainSeconds
/
86400
))
this
.
$set
(
this
.
item
,
'_leftHours'
,
this
.
formatTwoDigits
(
Math
.
floor
((
_remainSeconds
%
86400
)
/
3600
)))
this
.
$set
(
this
.
countdownObj
,
'_leftHours'
,
this
.
formatTwoDigits
(
Math
.
floor
((
_remainSeconds
%
86400
)
/
3600
)))
}
}
},
},
...
...
components/HomeFrame/components/ActivityCenter.vue
View file @
156b9d5
This diff is collapsed.
Click to expand it.
components/HomeFrame/components/LeftSide.vue
View file @
156b9d5
...
@@ -307,7 +307,7 @@ export default {
...
@@ -307,7 +307,7 @@ export default {
this
.
hasPerson
=
true
this
.
hasPerson
=
true
this
.
tabs
[
4
].
hidden
=
false
this
.
tabs
[
4
].
hidden
=
false
}
else
{
}
else
{
this
.
tabs
[
4
].
hidden
=
fals
e
this
.
tabs
[
4
].
hidden
=
tru
e
}
}
})
})
},
},
...
...
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