Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
campSite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
杨梦雪
campSite
Commits
5f3852f9
Commit
5f3852f9
authored
Sep 14, 2023
by
wuwangwolihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营地2.0-活动中心、活动详情
parent
ddb355aa
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
277 additions
and
195 deletions
+277
-195
src/assets/scss/active/activeList.scss
src/assets/scss/active/activeList.scss
+26
-0
src/assets/scss/common.scss
src/assets/scss/common.scss
+1
-1
src/main.js
src/main.js
+5
-2
src/request/base/active.js
src/request/base/active.js
+9
-1
src/router/base/active.js
src/router/base/active.js
+2
-2
src/store/time.js
src/store/time.js
+18
-0
src/views/base/active/Active.vue
src/views/base/active/Active.vue
+17
-8
src/views/base/active/ActiveInfo.vue
src/views/base/active/ActiveInfo.vue
+181
-176
src/views/base/home/Home.vue
src/views/base/home/Home.vue
+18
-5
No files found.
src/assets/scss/active/activeList.scss
View file @
5f3852f9
...
@@ -125,6 +125,32 @@
...
@@ -125,6 +125,32 @@
font-size
:
16px
;
font-size
:
16px
;
line-height
:
28px
;
line-height
:
28px
;
margin
:
0
.4vw
0
;
margin
:
0
.4vw
0
;
.sign-box
{
display
:
inline-block
;
&
:
:
after
{
content
:
'|'
;
color
:
#333333
;
margin
:
0
5px
;
}
&
:last-child
{
&
:
:
after
{
content
:
''
;
margin
:
0
;
}
}
.sign
{
display
:
inline-block
;
padding
:
0
5px
0
0
;
&
:last-child
{
padding-right
:
0
;
}
}
}
}
}
.active-list-item-cont-txt2
{
.active-list-item-cont-txt2
{
...
...
src/assets/scss/common.scss
View file @
5f3852f9
.com-container
{
.com-container
{
width
:
8
1
%
;
width
:
8
0
%
;
max-width
:
1576px
;
max-width
:
1576px
;
min-width
:
1050px
;
min-width
:
1050px
;
padding
:
0
50px
;
padding
:
0
50px
;
...
...
src/main.js
View file @
5f3852f9
...
@@ -24,12 +24,15 @@ Vue.prototype.download = download
...
@@ -24,12 +24,15 @@ Vue.prototype.download = download
Vue
.
prototype
.
upload
=
upload
Vue
.
prototype
.
upload
=
upload
// 防止重复点击自定义属性
// 防止重复点击自定义属性
import
preventReClick
from
'
./utils/preventRepeatClick.js
'
import
preventReClick
from
'
./utils/preventRepeatClick.js
'
;
Vue
.
use
(
preventReClick
);
Vue
.
use
(
preventReClick
);
//埋点公共方法
//埋点公共方法
import
{
commonApi
}
from
'
./utils/common
'
import
{
commonApi
}
from
'
./utils/common
'
;
import
{
formatYMD
,
formatYMDChina
}
from
'
./store/time
'
;
Vue
.
prototype
.
commonApi
=
commonApi
;
Vue
.
prototype
.
commonApi
=
commonApi
;
Vue
.
prototype
.
formatYMD
=
formatYMD
;
Vue
.
prototype
.
formatYMDChina
=
formatYMDChina
;
// 禁止浏览器前进后退 另一部本在router的index.js中
// 禁止浏览器前进后退 另一部本在router的index.js中
window
.
addEventListener
(
'
popstate
'
,
function
()
{
window
.
addEventListener
(
'
popstate
'
,
function
()
{
...
...
src/request/base/active.js
View file @
5f3852f9
...
@@ -10,7 +10,7 @@ export function LabelType(data) {
...
@@ -10,7 +10,7 @@ export function LabelType(data) {
})
})
}
}
// 获取
营地
列表-搜索模块
// 获取
活动
列表-搜索模块
export
function
HotList
(
data
)
{
export
function
HotList
(
data
)
{
return
request
({
return
request
({
method
:
'
post
'
,
method
:
'
post
'
,
...
@@ -19,3 +19,11 @@ export function HotList(data) {
...
@@ -19,3 +19,11 @@ export function HotList(data) {
})
})
}
}
// 获取活动详情
export
function
GetActiveInfo
(
id
)
{
return
request
({
method
:
'
get
'
,
url
:
'
/modules-campsite/activityCenter/detail/
'
+
id
,
data
:
{}
})
}
src/router/base/active.js
View file @
5f3852f9
...
@@ -8,11 +8,11 @@ export default [
...
@@ -8,11 +8,11 @@ export default [
}
}
},
},
{
{
path
:
'
/active/:
type/:
id
'
,
path
:
'
/active/:id
'
,
name
:
'
base-active-info
'
,
name
:
'
base-active-info
'
,
component
:
()
=>
import
(
/* webpackChunkName: "login" */
'
v/base/active/ActiveInfo.vue
'
),
component
:
()
=>
import
(
/* webpackChunkName: "login" */
'
v/base/active/ActiveInfo.vue
'
),
meta
:
{
meta
:
{
title
:
'
活动
中心
'
title
:
'
活动
详情
'
}
}
},
},
]
]
src/store/time.js
View file @
5f3852f9
...
@@ -35,3 +35,21 @@ export function intervalTime(startTime, endTime) {
...
@@ -35,3 +35,21 @@ export function intervalTime(startTime, endTime) {
let
time
=
y
*
365
*
24
*
60
*
60
+
m
*
30
*
24
*
60
*
60
+
d
*
24
*
60
*
60
+
h
*
60
*
60
+
mm
*
60
+
ss
let
time
=
y
*
365
*
24
*
60
*
60
+
m
*
30
*
24
*
60
*
60
+
d
*
24
*
60
*
60
+
h
*
60
*
60
+
mm
*
60
+
ss
return
time
;
return
time
;
}
}
// 2023-01-01
export
function
formatYMD
(
data
)
{
let
time
=
new
Date
(
data
);
let
y
=
time
.
getFullYear
();
let
m
=
time
.
getMonth
()
+
1
;
let
d
=
time
.
getDate
();
return
(
y
+
"
-
"
+
add0
(
m
)
+
"
-
"
+
add0
(
d
));
}
// 2023年1月1日
export
function
formatYMDChina
(
data
)
{
let
time
=
new
Date
(
data
);
let
y
=
time
.
getFullYear
();
let
m
=
time
.
getMonth
()
+
1
;
let
d
=
time
.
getDate
();
return
(
y
+
"
年
"
+
m
+
"
月
"
+
d
+
"
日
"
);
}
src/views/base/active/Active.vue
View file @
5f3852f9
...
@@ -80,10 +80,23 @@
...
@@ -80,10 +80,23 @@
</div>
</div>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
</div>
</div>
<div
class=
"active-list-item-cont-txt1"
>
{{
item
.
schoolName
}}
|
{{
item
.
subjectName
}}
</div>
<div
class=
"active-list-item-cont-txt1"
>
<div
class=
"active-list-item-cont-txt2"
>
{{
item
.
activityStartTime
}}
(共
{{
item
.
activityTime
}}
天)
</div>
<div
class=
"sign-box"
v-if=
"item.schoolName"
>
<div
class=
"active-list-item-cont-txt3"
>
报名截止时间:
{{
item
.
bmEndTime
}}
</div>
<div
class=
"sign"
<div
class=
"active-list-item-cont-bottom"
@
click=
"$router.push('/active/current/'+item.id)"
>
v-for=
"(item2, index2) in item.schoolName.split(',')"
:key=
"index2"
>
{{
item2
}}
</div>
</div>
<div
class=
"sign-box"
v-if=
"item.subjectName"
>
<div
class=
"sign"
v-for=
"(item2, index2) in item.subjectName.split(',')"
:key=
"index2"
>
{{
item2
}}
</div>
</div>
</div>
<div
class=
"active-list-item-cont-txt2"
>
{{
formatYMD
(
item
.
activityStartTime
)
}}
(共
{{
item
.
activityTime
}}
天)
</div>
<div
class=
"active-list-item-cont-txt3"
>
报名截止时间:
{{
formatYMDChina
(
item
.
bmEndTime
)
}}
</div>
<div
class=
"active-list-item-cont-bottom"
@
click=
"$router.push('/active/'+item.id)"
>
<div>
查看详情
</div>
<div>
查看详情
</div>
<i
class=
"el-icon-right"
></i>
<i
class=
"el-icon-right"
></i>
</div>
</div>
...
@@ -98,7 +111,6 @@
...
@@ -98,7 +111,6 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
img
from
"
../../../assets/img/recruit.png
"
;
import
{
LabelType
,
HotList
}
from
"
r/base/active
"
;
import
{
LabelType
,
HotList
}
from
"
r/base/active
"
;
export
default
{
export
default
{
...
@@ -218,9 +230,6 @@
...
@@ -218,9 +230,6 @@
console
.
log
(
err
)
console
.
log
(
err
)
this
.
loading
=
false
;
this
.
loading
=
false
;
})
})
setTimeout
(()
=>
{
this
.
loading
=
false
;
},
2000
)
},
},
// 获取筛选标签列表
// 获取筛选标签列表
getLabelType
()
{
getLabelType
()
{
...
...
src/views/base/active/ActiveInfo.vue
View file @
5f3852f9
This diff is collapsed.
Click to expand it.
src/views/base/home/Home.vue
View file @
5f3852f9
...
@@ -32,10 +32,23 @@
...
@@ -32,10 +32,23 @@
</div>
</div>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
</div>
</div>
<div
class=
"active-list-item-cont-txt1"
>
{{
item
.
schoolName
}}
|
{{
item
.
subjectName
}}
</div>
<div
class=
"active-list-item-cont-txt1"
>
<div
class=
"active-list-item-cont-txt2"
>
{{
item
.
activityStartTime
}}
(共
{{
item
.
activityTime
}}
天)
</div>
<div
class=
"sign-box"
v-if=
"item.schoolName"
>
<div
class=
"active-list-item-cont-txt3"
>
报名截止时间:
{{
item
.
bmEndTime
}}
</div>
<div
class=
"sign"
<div
class=
"active-list-item-cont-bottom"
@
click=
"$router.push('/active/current/'+item.id)"
>
v-for=
"(item2, index2) in item.schoolName.split(',')"
:key=
"index2"
>
{{
item2
}}
</div>
</div>
<div
class=
"sign-box"
v-if=
"item.subjectName"
>
<div
class=
"sign"
v-for=
"(item2, index2) in item.subjectName.split(',')"
:key=
"index2"
>
{{
item2
}}
</div>
</div>
</div>
<div
class=
"active-list-item-cont-txt2"
>
{{
formatYMD
(
item
.
activityStartTime
)
}}
(共
{{
item
.
activityTime
}}
天)
</div>
<div
class=
"active-list-item-cont-txt3"
>
报名截止时间:
{{
formatYMDChina
(
item
.
bmEndTime
)
}}
</div>
<div
class=
"active-list-item-cont-bottom"
@
click=
"$router.push('/active/'+item.id)"
>
<div>
查看详情
</div>
<div>
查看详情
</div>
<i
class=
"el-icon-right"
></i>
<i
class=
"el-icon-right"
></i>
</div>
</div>
...
@@ -105,7 +118,7 @@
...
@@ -105,7 +118,7 @@
}],
}],
activeList
:
[
activeList
:
[
{
{
id
:
1
,
id
:
2
1
,
activityCover
:
img
,
activityCover
:
img
,
activityLabel
:
'
线上
'
,
activityLabel
:
'
线上
'
,
name
:
'
2023年寒假历史营地
'
,
name
:
'
2023年寒假历史营地
'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment