Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wxh-order-h5
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
李俊赕
wxh-order-h5
Commits
fd3f483e
Commit
fd3f483e
authored
Jun 08, 2020
by
ljd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面滚动
parent
047475bb
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
35 deletions
+43
-35
App_pc.vue
web/src/App_pc.vue
+19
-0
base_pc.css
web/src/assets/css/base_pc.css
+16
-0
main_pc.js
web/src/main_pc.js
+1
-1
service.vue
web/src/views/pc/haier/order/service.vue
+7
-34
No files found.
web/src/App_pc.vue
0 → 100644
View file @
fd3f483e
<
template
>
<div
id=
"app"
>
<router-view
/>
</div>
</
template
>
<
style
lang=
"less"
>
@import './assets/css/base.css';
@import './assets/css/base_pc.css';
@import './assets/css/common.less';
@import './assets/css/custom.less';
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
}
</
style
>
web/src/assets/css/base_pc.css
0 → 100644
View file @
fd3f483e
/* 修改原生的滚动条 */
::-webkit-scrollbar
{
/* 血槽宽度 */
width
:
8px
;
height
:
8px
;
}
::-webkit-scrollbar-thumb
{
/* 拖动条 */
background
:
rgba
(
0
,
0
,
0
,
0.3
);
border-radius
:
6px
;
}
::-webkit-scrollbar-track
{
/* 背景槽 */
background
:
#ddd
;
border-radius
:
6px
;
}
\ No newline at end of file
web/src/main_pc.js
View file @
fd3f483e
import
Vue
from
'vue'
import
App
from
'./App.vue'
import
App
from
'./App
_pc
.vue'
import
router
from
'./router/index'
// import store from './store'
import
'lib-flexible'
...
...
web/src/views/pc/haier/order/service.vue
View file @
fd3f483e
<
template
>
<div
class=
"about"
v-show=
"!loading"
>
<div
class=
"about"
>
<!--
<mt-header
title=
"材料辅料选择"
>
<router-link
slot=
"left"
to=
"/"
>
<mt-button
icon=
"back"
/>
</router-link>
</mt-header>
-->
<div
class=
"goods"
>
<div
class=
"goods"
v-loading=
"loading"
>
<div
class=
"menu-wrapper"
ref=
"menuWrapper"
>
<ul>
<li
...
...
@@ -57,9 +57,6 @@ import {
getAppreciationService
,
getVap
}
from
'@/api/haier/order/service'
import
{
Toast
,
Indicator
}
from
'mint-ui'
import
BScroll
from
'better-scroll'
import
shopcart
from
'@/views/pc/haier/components/goods/shopcart.vue'
import
cartcontrol
from
'@/views/pc/haier/components/goods/cartcontrol'
...
...
@@ -140,18 +137,13 @@ export default {
},
methods
:
{
foodPageScorll
()
{
const
foodList
=
this
.
$refs
.
foodsWrapper
.
getElementsByClassName
(
'food-list-hook'
)
const
foodWrapper
=
document
.
getElementsByClassName
(
'foods-wrapper'
)
console
.
log
(
foodWrapper
,
'foodWrapper'
)
foodWrapper
[
0
].
addEventListener
(
'scroll'
,
el
=>
{
this
.
scrollY
=
foodWrapper
[
0
].
scrollTop
})
},
getOrderId
(
orderId
)
{
this
.
orderId
=
orderId
||
'6099514'
this
.
getList
()
...
...
@@ -198,22 +190,16 @@ export default {
}
})
this
.
loading
=
false
Indicator
.
close
()
if
(
txt
!==
''
)
{
Toast
({
message
:
txt
,
duration
:
3000
})
this
.
$message
.
error
(
txt
)
return
false
}
this
.
$nextTick
(()
=>
{
this
.
foodPageScorll
()
// this._initScroll()
this
.
_calculateHeight
()
})
}).
catch
((
error
)
=>
{
this
.
loading
=
false
Indicator
.
close
()
console
.
log
(
error
)
})
},
...
...
@@ -225,9 +211,7 @@ export default {
this
.
$refs
.
food
.
show
()
},
selectMenu
(
index
,
event
)
{
// if (!event._constructed) {
// return
// }
let
offsetTop
=
0
const
foodList
=
this
.
$refs
.
foodsWrapper
.
getElementsByClassName
(
'food-list-hook'
)
...
...
@@ -241,21 +225,9 @@ export default {
}
else
{
el
=
foodList
[
foodList
.
length
-
1
]
}
offsetTop
=
el
.
offsetTop
this
.
currentTime
=
new
Date
().
getTime
()
window
.
scrollTo
(
0
,
1000
)
// this.foodsScroll.scrollToElement(el, 0)
},
_initScroll
()
{
this
.
menuScroll
=
new
BScroll
(
this
.
$refs
.
menuWrapper
,
{
click
:
true
})
this
.
foodsScroll
=
new
BScroll
(
this
.
$refs
.
foodsWrapper
,
{
probeType
:
3
,
click
:
true
})
this
.
foodsScroll
.
on
(
'scroll'
,
pos
=>
{
this
.
scrollY
=
Math
.
abs
(
Math
.
round
(
pos
.
y
))
})
foodWrapper
[
0
].
scrollTo
(
0
,
offsetTop
)
},
_calculateHeight
()
{
const
foodList
=
this
.
$refs
.
foodsWrapper
.
getElementsByClassName
(
...
...
@@ -375,4 +347,5 @@ export default {
.goods .foods-wrapper{overflow: auto;}
.goods .menu-wrapper{overflow: auto;}
.goods .menu-wrapper .menu-item{cursor: pointer;}
.shopcart .shopcart-list .list-content{overflow: auto;}
</
style
>
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