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 7032c687
authored
Oct 22, 2025
by
cen
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fix: 活动中心
1 parent
417b8ed2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
249 additions
and
29 deletions
assets/css/sprite.scss
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 @
7032c68
This diff is collapsed.
Click to expand it.
assets/images/sprite.png
View file @
7032c68
2.83 MB
|
W:
|
H:
2.83 MB
|
W:
|
H:
2-up
Swipe
Onion skin
components/HomeFrame/components/Activity/card.vue
View file @
7032c68
<
template
>
<view
class=
"card"
@
click=
"handle
TaskItemClick(item
)"
>
<view
class=
"card"
@
click=
"handle
AvtivityItemClick(
)"
>
<view
v-if=
"tabIndex === 1"
class=
"time-limit-countdown"
>
<template
v-if=
"item._timeout"
>
<view
class=
"countdown-label timeout-label"
>
已超时
</view>
...
...
@@ -28,33 +28,35 @@
<view
class=
"countdown-num"
>
--
</view>
</
template
>
</view>
<image
class=
"
task
-item-img"
:src=
"require('../../../../assets/images/common/activityBg.png')"
mode=
"aspectFill"
/>
<view
class=
"
task
-item-content"
>
<view
class=
"
task
-item-title"
>
{{ item.name }}
</view>
<view
class=
"
task
-item-text"
v-if=
"tabIndex !== 1"
>
<view
class=
"
task
-item-label"
>
活动进度
</view>
<view
class=
"
task
-item-progress"
v-if=
"tabIndex !== 2"
>
<view
class=
"
task
-item-progress-bar"
:style=
"{ width: Math.floor(68.909) + '%' }"
></view>
<view
class=
"
task
-item-progress-text"
>
{{ Math.floor(68.909) }}%
</view>
<image
class=
"
card
-item-img"
:src=
"require('../../../../assets/images/common/activityBg.png')"
mode=
"aspectFill"
/>
<view
class=
"
card
-item-content"
>
<view
class=
"
card
-item-title"
>
{{ item.name }}
</view>
<view
class=
"
card
-item-text"
v-if=
"tabIndex !== 1"
>
<view
class=
"
card
-item-label"
>
活动进度
</view>
<view
class=
"
card
-item-progress"
v-if=
"tabIndex !== 2"
>
<view
class=
"
card
-item-progress-bar"
:style=
"{ width: Math.floor(68.909) + '%' }"
></view>
<view
class=
"
card
-item-progress-text"
>
{{ Math.floor(68.909) }}%
</view>
</view>
<view
class=
"
task
-item-value"
v-else
>
<view
class=
"
card
-item-value"
v-else
>
<view
class=
"gray"
>
已结束
</view>
</view>
</view>
<view
class=
"
task
-item-text"
>
<view
class=
"
task
-item-label"
>
活动时间
</view>
<view
class=
"
task
-item-value"
>
2025.09.01 00:00 - 2025.09.30 23:59
</view>
<view
class=
"
card
-item-text"
>
<view
class=
"
card
-item-label"
>
活动时间
</view>
<view
class=
"
card
-item-value"
>
2025.09.01 00:00 - 2025.09.30 23:59
</view>
</view>
<view
class=
"
task
-item-text"
>
<view
class=
"
task
-item-label"
>
评选规则
</view>
<view
class=
"
task
-item-value blueValue"
>
查看
</view>
<view
class=
"
card
-item-text"
>
<view
class=
"
card
-item-label"
>
评选规则
</view>
<view
class=
"
card
-item-value blueValue"
>
查看
</view>
</view>
<!-- <view class="
task
-item-status">{{ item.status }}</view> -->
<!-- <view class="
card
-item-status">{{ item.status }}</view> -->
</view>
</view>
</template>
<
script
>
export
default
{
name
:
'ActivityCard'
,
props
:
{
item
:
{
type
:
Object
,
...
...
@@ -64,6 +66,16 @@ export default {
type
:
Number
,
default
:
0
}
},
data
()
{
return
{
isShowActivityDetails
:
false
}
},
methods
:
{
handleAvtivityItemClick
()
{
this
.
$emit
(
'handleAvtivityItemClick'
)
}
}
}
</
script
>
...
...
@@ -132,17 +144,17 @@ export default {
}
}
.
task
-item-img
{
.
card
-item-img
{
width
:
100%
;
height
:
toRpx
(
312
);
border-radius
:
toRpx
(
16
)
toRpx
(
16
)
0
0
;
}
.
task
-item-content
{
.
card
-item-content
{
padding
:
toRpx
(
32
);
}
.
task
-item-title
{
.
card
-item-title
{
font-size
:
toRpx
(
30
);
color
:
#292d33
;
font-weight
:
500
;
...
...
@@ -153,20 +165,20 @@ export default {
white-space
:
nowrap
;
}
.
task
-item-text
{
.
card
-item-text
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
font-size
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
12
);
.
task
-item-label
{
.
card
-item-label
{
width
:
toRpx
(
96
);
color
:
#999ea8
;
margin-right
:
toRpx
(
24
);
}
.
task
-item-value
{
.
card
-item-value
{
color
:
#666666
;
display
:
inline-flex
;
align-items
:
center
;
...
...
@@ -187,13 +199,13 @@ export default {
}
}
.
task
-item-progress
{
.
card
-item-progress
{
width
:
toRpx
(
151
);
height
:
toRpx
(
16
);
background
:
linear-gradient
(
128.8deg
,
rgba
(
117
,
188
,
255
,
0.35
)
0%
,
rgba
(
44
,
102
,
247
,
0.35
)
100%
);
border-radius
:
toRpx
(
8
);
.
task
-item-progress-text
{
.
card
-item-progress-text
{
color
:
#3b73ff
;
font-size
:
toRpx
(
24
);
position
:
absolute
;
...
...
@@ -202,7 +214,7 @@ export default {
transform
:
translateY
(
-50%
);
}
.
task
-item-progress-bar
{
.
card
-item-progress-bar
{
height
:
100%
;
background
:
linear-gradient
(
128.8deg
,
#75bcff
0%
,
#2c66f7
100%
);
border-radius
:
toRpx
(
8
);
...
...
components/HomeFrame/components/Activity/popup.vue
View file @
7032c68
<!--针对弹窗穿透滚动,统一封装的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"
>
<uni-popup
:class=
"['customPopup', popupClass, noTitle ? 'noTitle' : ''
, size
]"
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"
>
...
...
@@ -28,6 +28,8 @@
</
template
>
<
script
>
import
{
size
}
from
'lodash'
export
default
{
name
:
'GeneralPopup'
,
props
:
{
...
...
@@ -35,6 +37,10 @@ export default {
type
:
String
,
default
:
'bottom'
},
size
:
{
type
:
String
,
default
:
'small'
},
isMaskClick
:
{
type
:
Boolean
,
default
:
false
...
...
@@ -131,6 +137,23 @@ export default {
.single-btn
{
width
:
100%
;
}
.popup-top-box
{
padding
:
0
toRpx
(
48
);
height
:
toRpx
(
112
);
width
:
100%
;
background-color
:
transparent
;
color
:
#333333
;
font-size
:
toRpx
(
36
);
.popup-top-box-title
{
text-align
:
center
;
}
.icon-close
{
text-align
:
end
;
}
}
.btn
{
width
:
toRpx
(
720
);
height
:
toRpx
(
76
);
...
...
@@ -150,4 +173,18 @@ export default {
color
:
#fff
;
background
:
linear-gradient
(
0deg
,
#2c66f7
0%
,
#48a6ff
100%
);
}
::v-deep
.customPopup.center.small
{
//
width
:
toRpx
(
690
);
}
::v-deep
.customPopup.center.medium
.uni-popup__wrapper
{
width
:
60vw
;
max-height
:
80vh
;
border-radius
:
toRpx
(
32
);
background
:
linear-gradient
(
180deg
,
#e6f0ff
0%
,
#ffffff
100%
);
overflow
:
hidden
;
}
::v-deep
.customPopup.center.large
{
//
width
:
toRpx
(
990
);
}
</
style
>
components/HomeFrame/components/ActivityCenter.vue
View file @
7032c68
...
...
@@ -32,7 +32,7 @@
<scroll-view
scroll-y
ref=
"scrollViewRef"
:scroll-top=
"scrollTop"
@
scrolltolower=
"pageonReachBottom"
class=
"activity-list-box"
>
<template
v-if=
"cardList.length"
>
<view
class=
"card-list"
>
<Card
v-for=
"item in cardList"
:key=
"item"
:item=
"item"
:tabIndex=
"firstIndex"
/>
<Card
v-for=
"item in cardList"
:key=
"item"
:item=
"item"
:tabIndex=
"firstIndex"
@
handleAvtivityItemClick=
"handleAvtivityItemClick"
/>
</view>
</
template
>
<
template
v-else
>
...
...
@@ -49,15 +49,57 @@
</template>
</view>
</view>
<Popup
ref=
"activityDetailsPopup"
popupClass=
"activityDetails"
title=
"活动详情"
type=
"center"
size=
"medium"
:isShowFooter=
"false"
:showClose=
"true"
@
confirm=
"confirmAddSignAgreement"
:autoClose=
"false"
>
<
template
#
content
>
<view
class=
"activity-details-content"
>
<view
class=
"activity-details-content-box"
>
<view
class=
"flex align-center top-box"
>
<image
class=
"card-item-img"
:src=
"require('../../../assets/images/common/activityBg.png')"
mode=
"aspectFill"
/>
<view
class=
"card-item-content flex-1"
>
<view
class=
"card-item-title"
>
但看
</view>
<view
class=
"card-item-text flex"
v-if=
"tabIndex !== 1"
>
<view
class=
"card-item-label"
>
活动进度
</view>
<view
v-if=
"tabIndex !== 2"
class=
"flex flex-1"
>
<view
class=
"card-item-progress"
>
<view
class=
"card-item-progress-bar"
:style=
"
{ width: Math.floor(68.909) + '%' }">
</view>
</view>
<view
class=
"card-item-progress-text ml-16"
>
{{
Math
.
floor
(
68.909
)
}}
%
</view>
</view>
<view
class=
"card-item-value"
v-else
>
<view
class=
"gray"
>
已结束
</view>
</view>
</view>
<view
class=
"card-item-text"
>
<view
class=
"card-item-label"
>
活动时间
</view>
<view
class=
"card-item-value"
>
2025.09.01 00:00 至 2025.09.30 23:59
</view>
</view>
</view>
</view>
<scroll-view
class=
"activity-tab-box"
:scroll-x=
"true"
>
<view
v-for=
"(i, index) in detailsTabList"
:key=
"index"
class=
"tab-item"
:class=
"
{ active: activeIndex === index }" @click="changeDetailsTab(index)">
{{
i
.
name
}}
</view>
</scroll-view>
<scroll-view
class=
"activity-detailslist-box"
:scroll-y=
"true"
>
<view
v-for=
"(i, index) in detailsList"
:key=
"index"
class=
"tab-item"
:class=
"
{ active: activeIndex === index }" @click="changeDetailsTab(index)">
{{
i
.
name
}}
</view>
</scroll-view>
</view>
</view>
</
template
>
</Popup>
</view>
</template>
<
script
>
import
Card
from
'./Activity/card.vue'
import
Popup
from
'./Activity/popup.vue'
export
default
{
name
:
'ActivityCenter'
,
components
:
{
Card
Card
,
Popup
},
data
()
{
return
{
...
...
@@ -69,8 +111,11 @@ export default {
{
tabName
:
'即将开始'
,
num
:
()
=>
''
},
{
tabName
:
'已结束'
,
num
:
()
=>
''
}
],
detailsTabList
:
[{
name
:
'9月7日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
},
{
name
:
'9月8日'
}],
cardList
:
[{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
}],
detailsList
:
[{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
},
{
name
:
'1'
}],
firstIndex
:
0
,
activeIndex
:
0
,
firstLeft
:
[
'first'
,
'second'
],
firstClass
:
[
'short-first-nav'
,
'short-second-nav'
],
isBeisen
:
false
,
// 是否是有北森权限,true 有,false无
...
...
@@ -143,6 +188,12 @@ export default {
}
this
.
labelColors
=
_labelColors
}
},
handleAvtivityItemClick
()
{
this
.
$refs
.
activityDetailsPopup
.
open
()
},
changeDetailsTab
(
index
)
{
this
.
activeIndex
=
index
}
}
}
...
...
@@ -384,5 +435,125 @@ export default {
margin-bottom
:
toRpx
(
24
);
}
}
.activity-details-content
{
padding
:
toRpx
(
64
);
box-sizing
:
border-box
;
&-box
{
border-radius
:
toRpx
(
24
);
background
:
#ffffff
;
box-shadow
:
0
toRpx
(
8
)
toRpx
(
24
)
0
#2a61eb1
a
;
.top-box
{
padding
:
toRpx
(
24
)
toRpx
(
32
);
box-sizing
:
border-box
;
background
:
linear-gradient
(
90deg
,
#e7f1ff
0%
,
#eaf2ff1
a
100%
);
.card-item-img
{
width
:
toRpx
(
288
);
height
:
toRpx
(
144
);
border-radius
:
toRpx
(
16
);
}
.card-item-content
{
padding
:
toRpx
(
32
);
}
.card-item-title
{
font-size
:
toRpx
(
30
);
color
:
#292d33
;
font-weight
:
500
;
margin-bottom
:
toRpx
(
20
);
width
:
toRpx
(
340
);
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.card-item-text
{
position
:
relative
;
display
:
flex
;
align-items
:
center
;
font-size
:
toRpx
(
24
);
margin-bottom
:
toRpx
(
12
);
.card-item-label
{
width
:
toRpx
(
96
);
color
:
#999ea8
;
margin-right
:
toRpx
(
24
);
}
.card-item-value
{
color
:
#666666
;
display
:
inline-flex
;
align-items
:
center
;
justify-content
:
center
;
.dot-value
{
width
:
toRpx
(
12
);
height
:
toRpx
(
12
);
border-radius
:
50%
;
background
:
#2cca74
;
margin-right
:
toRpx
(
8
);
}
.gray
{
color
:
#666666
;
}
}
.blueValue
{
color
:
#4673ff
;
}
}
.card-item-progress
{
width
:
toRpx
(
596
);
height
:
toRpx
(
16
);
background
:
linear-gradient
(
128.8deg
,
rgba
(
117
,
188
,
255
,
0.35
)
0%
,
rgba
(
44
,
102
,
247
,
0.35
)
100%
);
border-radius
:
toRpx
(
8
);
.card-item-progress-text
{
color
:
#3b73ff
;
font-size
:
toRpx
(
24
);
position
:
absolute
;
top
:
50%
;
right
:
0
;
transform
:
translateY
(
-50%
);
}
.card-item-progress-bar
{
height
:
100%
;
background
:
linear-gradient
(
128.8deg
,
#75bcff
0%
,
#2c66f7
100%
);
border-radius
:
toRpx
(
8
);
}
}
}
.activity-tab-box
{
white-space
:
nowrap
;
padding
:
toRpx
(
23
)
toRpx
(
32
)
toRpx
(
16
);
.tab-item
{
display
:
inline-block
;
width
:
toRpx
(
176
);
height
:
toRpx
(
56
);
border-radius
:
toRpx
(
12
);
opacity
:
1
;
border
:
toRpx
(
2
)
solid
#ffffff
cc
;
background
:
#f5f6f7
;
backdrop-filter
:
blur
(
toRpx
(
12
));
color
:
#666666
;
font-size
:
toRpx
(
26
);
margin-right
:
toRpx
(
16
);
text-align
:
center
;
line-height
:
toRpx
(
56
);
&:last-child
{
margin-right
:
0
;
}
}
.active
{
background
:
#3b73ff
;
color
:
#ffffff
;
}
}
.activity-detailslist-box
{
}
}
}
}
</
style
>
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