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
e1e156e2
Commit
e1e156e2
authored
Sep 07, 2023
by
wuwangwolihui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
营地2.0-活动中心
parent
8880f7ff
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
206 additions
and
57 deletions
+206
-57
src/components/base/Header.vue
src/components/base/Header.vue
+2
-1
src/router/index.js
src/router/index.js
+0
-2
src/store/mutations.js
src/store/mutations.js
+0
-1
src/views/base/Index.vue
src/views/base/Index.vue
+79
-8
src/views/base/active/Active.vue
src/views/base/active/Active.vue
+12
-7
src/views/base/active/ActiveInfo.vue
src/views/base/active/ActiveInfo.vue
+113
-38
No files found.
src/components/base/Header.vue
View file @
e1e156e2
...
@@ -140,12 +140,13 @@
...
@@ -140,12 +140,13 @@
::v-deep
.el-menu
{
::v-deep
.el-menu
{
margin-right
:
100px
;
margin-right
:
100px
;
border
:
0
;
.el-menu-item
{
.el-menu-item
{
height
:
44px
;
height
:
44px
;
line-height
:
44px
;
line-height
:
44px
;
padding
:
0
5px
;
padding
:
0
5px
;
margin
:
20px
;
margin
:
18px
20px
;
color
:
#666666
;
color
:
#666666
;
font-size
:
15px
;
font-size
:
15px
;
font-family
:
"PingFang SC"
;
font-family
:
"PingFang SC"
;
...
...
src/router/index.js
View file @
e1e156e2
...
@@ -184,8 +184,6 @@ router.beforeEach((to, from, next) => {
...
@@ -184,8 +184,6 @@ router.beforeEach((to, from, next) => {
// 页面跳转之后页面回滚到顶部
// 页面跳转之后页面回滚到顶部
router
.
afterEach
((
to
,
from
,
next
)
=>
{
router
.
afterEach
((
to
,
from
,
next
)
=>
{
// console.log(to,'to')
window
.
scrollTo
(
0
,
0
)
window
.
scrollTo
(
0
,
0
)
});
});
export
default
router
export
default
router
src/store/mutations.js
View file @
e1e156e2
...
@@ -18,7 +18,6 @@ export default {
...
@@ -18,7 +18,6 @@ export default {
localStorage
.
removeItem
(
"
isLogin
"
);
localStorage
.
removeItem
(
"
isLogin
"
);
},
},
setActiveIndex
(
state
,
path
)
{
setActiveIndex
(
state
,
path
)
{
console
.
log
(
path
)
let
key
=
path
.
split
(
'
/
'
)[
1
]
==
'
active
'
?
'
/
'
+
path
.
split
(
'
/
'
)[
1
]
:
path
;
let
key
=
path
.
split
(
'
/
'
)[
1
]
==
'
active
'
?
'
/
'
+
path
.
split
(
'
/
'
)[
1
]
:
path
;
state
.
activeIndex
=
key
;
state
.
activeIndex
=
key
;
window
.
localStorage
.
setItem
(
'
index-active-path
'
,
key
);
window
.
localStorage
.
setItem
(
'
index-active-path
'
,
key
);
...
...
src/views/base/Index.vue
View file @
e1e156e2
<
template
>
<
template
>
<el-container>
<el-container>
<el-header
height=
"
auto
"
>
<el-header
height=
"
80px
"
>
<Header></Header>
<Header></Header>
</el-header>
</el-header>
<el-container>
<el-container>
<router-view
:key=
"$route.name"
></router-view>
<router-view
:key=
"$route.name"
></router-view>
<Footer></Footer>
<Footer></Footer>
</el-container>
</el-container>
<div
class=
"to-top"
v-if=
"show"
@
click=
"toTop"
:style=
"style"
>
<i
class=
"el-icon-top"
></i>
</div>
</el-container>
</el-container>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -21,12 +27,57 @@
...
@@ -21,12 +27,57 @@
Footer
,
Footer
,
},
},
data
()
{
data
()
{
return
{};
return
{
show
:
false
,
style
:
{
position
:
'
fixed
'
,
bottom
:
"
10px
"
},
};
},
},
created
()
{
created
()
{
console
.
log
(
'
created
'
);
console
.
log
(
'
created
'
);
},
},
methods
:
{},
mounted
()
{
window
.
addEventListener
(
'
scroll
'
,
this
.
handleScrollY
,
true
);
},
destroyed
()
{
window
.
removeEventListener
(
'
scroll
'
,
this
.
handleScrollY
,
true
);
},
methods
:
{
toTop
()
{
document
.
body
.
scrollIntoView
({
behavior
:
'
smooth
'
,
block
:
'
start
'
});
},
handleScrollY
()
{
// 底部距离顶部的高度
let
footerOffsetTop
=
document
.
querySelector
(
'
.footer
'
).
offsetTop
;
// 底部的高度
let
footerOffsetHeight
=
document
.
querySelector
(
'
.footer
'
).
offsetHeight
;
// body的高度
let
bodyOffsetHeight
=
document
.
body
.
offsetHeight
;
// 页面滚动高度
let
scrollTop
=
document
.
documentElement
.
scrollTop
;
if
(
scrollTop
>
0
)
{
this
.
show
=
true
;
}
else
{
this
.
show
=
false
;
}
if
(
scrollTop
<
(
footerOffsetTop
-
bodyOffsetHeight
+
60
))
{
this
.
style
=
{
position
:
'
fixed
'
,
bottom
:
"
10px
"
};
}
else
{
this
.
style
=
{
position
:
'
absolute
'
,
bottom
:
(
footerOffsetHeight
+
10
)
+
'
px
'
}
}
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
...
@@ -39,22 +90,42 @@
...
@@ -39,22 +90,42 @@
}
}
.el-container
{
.el-container
{
position
:
relative
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
min-height
:
100%
;
overflow
:
hidden
;
min-width
:
1150px
;
min-width
:
1024px
;
/*box-sizing: border-box;*/
box-sizing
:
border-box
;
background-color
:
#f5f5f5
;
background-color
:
#f5f5f5
;
.el-header
{
.el-header
{
position
:
fixed
;
width
:
100%
;
z-index
:
10000
;
padding
:
0
;
padding
:
0
;
}
}
.el-container
{
.el-container
{
width
:
100%
;
width
:
100%
;
overflow
:
auto
;
/*overflow: auto;*/
display
:
flex
;
display
:
flex
;
flex-flow
:
column
;
flex-flow
:
column
;
margin-top
:
80px
;
}
.to-top
{
right
:
10px
;
width
:
50px
;
height
:
50px
;
line-height
:
50px
;
text-align
:
center
;
font-size
:
30px
;
border-radius
:
8px
;
color
:
#ffffff
;
background-color
:
#919191
;
cursor
:
pointer
;
&
:hover
{
background-color
:
#999999
;
}
}
}
}
}
</
style
>
</
style
>
src/views/base/active/Active.vue
View file @
e1e156e2
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
placeholder=
"最小天数"
placeholder=
"最小天数"
class=
"ml"
class=
"ml"
oninput=
"value=value.replace(/^0/g, '')"
oninput=
"value=value.replace(/^0/g, '')"
@
blur=
"onInputBlur"
></el-input>
></el-input>
<div
class=
"line"
>
——
</div>
<div
class=
"line"
>
——
</div>
<el-input
v-model=
"queryForm.num2"
<el-input
v-model=
"queryForm.num2"
...
@@ -28,9 +27,15 @@
...
@@ -28,9 +27,15 @@
:min=
"1"
:min=
"1"
placeholder=
"最大天数"
placeholder=
"最大天数"
oninput=
"value=value.replace(/^0/g, '')"
oninput=
"value=value.replace(/^0/g, '')"
@
blur=
"onInputBlur"
></el-input>
></el-input>
<el-button
@
click=
"clearInput"
>
清除
</el-button>
<el-button
@
click=
"resetHandle"
>
重置
</el-button>
<el-button
@
click=
"searchHandle"
>
确定
</el-button>
</div>
<div
class=
"content-item"
>
<div
class=
"content-item-tit"
>
本站报名
</div>
<div
class=
"content-item-txt is-active"
>
全部
</div>
<div
class=
"content-item-txt"
>
支持
</div>
<div
class=
"content-item-txt"
>
不支持
</div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -205,12 +210,12 @@
...
@@ -205,12 +210,12 @@
this
.
getList
();
this
.
getList
();
},
},
methods
:
{
methods
:
{
//
输入框失去焦点
//
确定按钮
onInputBlur
()
{
searchHandle
()
{
this
.
getList
();
this
.
getList
();
},
},
//
清除
按钮
//
重置
按钮
clearInput
()
{
resetHandle
()
{
this
.
queryForm
.
num1
=
null
;
this
.
queryForm
.
num1
=
null
;
this
.
queryForm
.
num2
=
null
;
this
.
queryForm
.
num2
=
null
;
this
.
getList
();
this
.
getList
();
...
...
src/views/base/active/ActiveInfo.vue
View file @
e1e156e2
This diff is collapsed.
Click to expand it.
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