Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vue-ssr-mobile
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lixy
vue-ssr-mobile
Commits
a7db54df
Commit
a7db54df
authored
Sep 07, 2019
by
lixy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
车型、旅游、营地列表分页
parent
4f4fcdee
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
27 additions
and
57 deletions
+27
-57
base.scss
assets/styles/base.scss
+1
-1
footer.vue
components/footer.vue
+5
-4
campsite.vue
pages/campsite.vue
+6
-6
news.vue
pages/news.vue
+1
-1
index.vue
pages/newsDetail/index.vue
+2
-0
index.vue
pages/newsDetailHot/index.vue
+2
-0
tour.vue
pages/tour.vue
+5
-40
vehicle.vue
pages/vehicle.vue
+1
-1
index.vue
pages/vehicleDetail/index.vue
+4
-4
No files found.
assets/styles/base.scss
View file @
a7db54df
@import
'./mixin'
;
@import
'./iconfont'
;
html
{
overflow-x
:
hidden
;
overflow-x
:
hidden
!
important
;
}
*
{
word-break
:
break-all
;
...
...
components/footer.vue
View file @
a7db54df
This diff is collapsed.
Click to expand it.
pages/campsite.vue
View file @
a7db54df
...
...
@@ -44,11 +44,10 @@
<div
class=
"ellipsis2 campsite-name"
>
{{
item
.
name
}}
</div>
</router-link>
</li>
</ul>
<
!--
<p-->
<!--v-if="preventRepeatReuqest"-->
<!--class="loading">加载中……
</p>
--
>
<
p
v-if=
"preventRepeatReuqest"
class=
"loading"
>
加载中……
</p
>
<p
id=
"empty"
/>
<p
v-if=
"touchend"
...
...
@@ -125,7 +124,7 @@
let
scrollObj
=
document
.
getElementById
(
"scroll-area"
);
// 滚动区域
let
menuTop
=
document
.
querySelector
(
'#nav'
).
offsetTop
;
let
empty
=
document
.
querySelector
(
'#empty'
).
offsetTop
;
if
(
scrollTop
>
menuTop
-
44
&&
empty
>
scrollObj
.
clientHeight
)
{
if
(
scrollTop
>
menuTop
-
44
&&
empty
>
document
.
documentElement
.
clientHeight
)
{
this
.
searchBarFixed
=
true
;
}
if
(
scrollTop
<
80
)
{
...
...
@@ -136,7 +135,7 @@
let
scrollHeight
=
scrollObj
.
scrollHeight
;
// 滚动条的总高度
//滚动条到底部的条件
console
.
log
(
scrollHeight
-
scrollTop
);
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
)
{
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
-
100
)
{
if
(
this
.
touchend
)
{
return
;
}
...
...
@@ -176,6 +175,7 @@
let
list
=
response
.
data
.
data
.
data
;
t
.
dataDetail
=
[...
t
.
dataDetail
,
...
list
];
t
.
currentPage
=
response
.
data
.
data
.
pageNum
;
response
.
data
.
data
.
totalCount
=
response
.
data
.
data
.
totalCount
?
response
.
data
.
data
.
totalCount
:
0
;
if
(
response
.
data
.
data
.
totalCount
<
t
.
listQuery
.
pageNo
*
t
.
listQuery
.
pageSize
)
{
t
.
touchend
=
true
;
}
...
...
pages/news.vue
View file @
a7db54df
...
...
@@ -115,7 +115,7 @@
if
(
scrollObj
){
let
scrollHeight
=
scrollObj
.
scrollHeight
;
// 滚动条的总高度
//滚动条到底部的条件
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
)
{
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
-
100
)
{
if
(
this
.
touchend
)
{
return
;
}
...
...
pages/newsDetail/index.vue
View file @
a7db54df
...
...
@@ -69,6 +69,8 @@
async
asyncData
({
route
})
{
const
{
data
}
=
await
axios
.
get
(
'/api/uccn/article/app/unauth/one?id='
+
route
.
query
.
id
+
"&urlType=1"
);
let
detail
=
data
.
data
;
detail
.
text
=
detail
.
text
.
replace
(
/<img/g
,
"<img style='width:100%'"
);
detail
.
text
=
detail
.
text
.
replace
(
/<video style="/g
,
'<video style="width:100% !important; heigit:auto;"'
);
let
tempBannerData
=
await
axios
.
get
(
'/api/uccn/article/app/unauth/three?type=1&number=3&id='
+
route
.
query
.
id
);
let
hot
=
tempBannerData
.
data
.
data
;
return
{
detail
:
detail
,
hotList
:
hot
}
...
...
pages/newsDetailHot/index.vue
View file @
a7db54df
...
...
@@ -68,6 +68,8 @@
async
asyncData
({
route
})
{
const
{
data
}
=
await
axios
.
get
(
'/api/uccn/article/app/unauth/one?id='
+
route
.
query
.
id
+
"&urlType=1"
);
let
detail
=
data
.
data
;
detail
.
text
=
detail
.
text
.
replace
(
/<img/g
,
"<img style='width:100%'"
);
detail
.
text
=
detail
.
text
.
replace
(
/<video style="/g
,
'<video style="width:100% !important; heigit:auto;"'
);
let
tempBannerData
=
await
axios
.
get
(
'/api/uccn/article/app/unauth/three?type=1&number=3&id='
+
route
.
query
.
id
);
let
hot
=
tempBannerData
.
data
.
data
;
return
{
detail
:
detail
,
hotList
:
hot
}
...
...
pages/tour.vue
View file @
a7db54df
<
template
>
<div
class=
"tour-container"
>
<div
id=
"scroll-area"
class=
"tour-container"
>
<Head/>
<second-banner
:list =
"bannerList"
...
...
@@ -125,7 +127,7 @@
let
scrollObj
=
document
.
getElementById
(
"scroll-area"
);
// 滚动区域
let
menuTop
=
document
.
querySelector
(
'#nav'
).
offsetTop
;
let
empty
=
document
.
querySelector
(
'#empty'
).
offsetTop
;
if
(
scrollTop
>
menuTop
-
44
&&
empty
>
scrollObj
.
clientHeight
)
{
if
(
scrollTop
>
menuTop
-
44
&&
empty
>
document
.
documentElement
.
clientHeight
)
{
this
.
searchBarFixed
=
true
;
}
if
(
scrollTop
<
80
)
{
...
...
@@ -135,7 +137,7 @@
if
(
scrollObj
)
{
let
scrollHeight
=
scrollObj
.
scrollHeight
;
// 滚动条的总高度
//滚动条到底部的条件
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
)
{
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
-
100
)
{
if
(
this
.
touchend
)
{
return
;
}
...
...
@@ -258,42 +260,5 @@
width
:
100%
;
}
}
.news-item
{
margin
:
10px
0
;
}
.tour-home-r
,
.news-home-r
{
width
:
58%
;
}
.tour-img-home
,
.news-home-img
{
width
:
px2rem
(
300px
);
height
:
px2rem
(
150px
);
}
.order-page
{
.no-data
{
text-align
:
center
;
.nodata
{
width
:
px2rem
(
400px
);
height
:
px2rem
(
400px
);
margin
:
15vh
auto
px2rem
(
10px
)
auto
;
}
p
{
color
:
#6a6a6a
;
font-size
:
px2rem
(
32px
);
margin-bottom
:
px2rem
(
15px
);
}
.login
{
width
:
px2rem
(
240px
);
height
:
px2rem
(
80px
);
background
:
#56d176
;
border
:
none
;
color
:
#fff
;
font-size
:
px2rem
(
28px
);
border-radius
:
2px
;
}
}
}
</
style
>
pages/vehicle.vue
View file @
a7db54df
...
...
@@ -129,7 +129,7 @@
if
(
scrollObj
){
let
scrollHeight
=
scrollObj
.
scrollHeight
;
// 滚动条的总高度
//滚动条到底部的条件
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
){
if
(
document
.
documentElement
.
scrollTop
+
document
.
documentElement
.
clientHeight
>=
document
.
body
.
scrollHeight
-
100
){
if
(
this
.
touchend
)
{
return
;
}
...
...
pages/vehicleDetail/index.vue
View file @
a7db54df
...
...
@@ -273,7 +273,7 @@
if
(
this
.
searchBarFixed
){
document
.
documentElement
.
scrollTop
=
top1
+
180
;
}
else
{
document
.
documentElement
.
scrollTop
=
top1
+
13
0
;
document
.
documentElement
.
scrollTop
=
top1
+
13
5
;
}
this
.
searchBarFixed
=
true
;
},
...
...
@@ -285,7 +285,7 @@
if
(
this
.
searchBarFixed
){
document
.
documentElement
.
scrollTop
=
top1
+
180
;
}
else
{
document
.
documentElement
.
scrollTop
=
top1
+
13
0
;
document
.
documentElement
.
scrollTop
=
top1
+
13
5
;
}
this
.
searchBarFixed
=
true
;
},
...
...
@@ -296,7 +296,7 @@
if
(
this
.
searchBarFixed
){
document
.
documentElement
.
scrollTop
=
top1
+
180
;
}
else
{
document
.
documentElement
.
scrollTop
=
top1
+
13
0
;
document
.
documentElement
.
scrollTop
=
top1
+
13
5
;
}
this
.
searchBarFixed
=
true
;
},
...
...
@@ -307,7 +307,7 @@
if
(
this
.
searchBarFixed
){
document
.
documentElement
.
scrollTop
=
top1
+
180
;
}
else
{
document
.
documentElement
.
scrollTop
=
top1
+
13
0
;
document
.
documentElement
.
scrollTop
=
top1
+
13
5
;
}
this
.
searchBarFixed
=
true
;
},
...
...
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