Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
singleStore
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
CI / CD Analytics
Repository Analytics
Value Stream Analytics
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Max
singleStore
Commits
98f2b622
Commit
98f2b622
authored
Jul 18, 2021
by
June
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化滚动监听。
parent
77f88714
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
202 additions
and
237 deletions
+202
-237
pages.json
pages.json
+3
-1
pages/goods/detail.vue
pages/goods/detail.vue
+8
-9
pages/home/index.js
pages/home/index.js
+1
-26
pages/home/index.vue
pages/home/index.vue
+189
-191
readme.md
readme.md
+1
-10
No files found.
pages.json
View file @
98f2b622
...
...
@@ -5,7 +5,9 @@
"path"
:
"pages/home/index"
,
"style"
:
{
"navigationStyle"
:
"custom"
,
"navigationBarTextStyle"
:
"white"
"navigationBarTextStyle"
:
"white"
,
"enablePullDownRefresh"
:
true
,
"onReachBottomDistance"
:
45
}
},
{
...
...
pages/goods/detail.vue
View file @
98f2b622
<
template
>
<
scroll-
view
<view
class=
"wrapper w-100"
scroll-y
@
scroll=
"scrolling"
>
<c-nav
_bar
...
...
@@ -151,7 +149,7 @@
<!-- 购物弹窗 -->
<goods-popup
ref=
"popup"
/>
</
scroll-
view>
</view>
</template>
<
script
>
...
...
@@ -231,11 +229,13 @@ export default {
image
:
goods_thumb
?
`
${
this
.
baseUrl
}
/
${
goods_thumb
}
`
:
''
}
},
onPageScroll
:
throttle
(
function
(
e
)
{
const
scrollTop
=
e
.
scrollTop
if
(
scrollTop
>
400
)
return
const
opacity
=
(
scrollTop
/
375
).
toFixed
(
1
)
this
.
navBg
=
`rgba(255, 255, 255,
${
opacity
}
)`
},
300
),
methods
:
{
scrolling
:
throttle
(
function
(
e
)
{
const
opacity
=
(
e
.
detail
.
scrollTop
/
375
).
toFixed
(
1
)
this
.
navBg
=
`rgba(255, 255, 255,
${
opacity
}
)`
},
300
),
// 富文本预览事件
preview
(
src
,
e
)
{
// do something
...
...
@@ -337,7 +337,6 @@ export default {
<
style
lang=
"scss"
scoped
>
@import
url("/components/parse/parse.css")
;
.wrapper
{
height
:
100vh
;
margin-bottom
:
98rpx
;
.swiper-wrap
{
position
:
relative
;
...
...
pages/home/index.js
View file @
98f2b622
...
...
@@ -50,34 +50,9 @@ function checkShowAll(Obj) {
}
}
// 上拉加载更多
function
scrolltolower
()
{
console
.
log
(
'
触底
'
)
const
cate_data
=
this
.
cate_data
if
(
this
.
checkShowAll
(
cate_data
))
{
console
.
log
(
'
pass
'
)
this
.
searchData
()
}
}
function
refresherrefresh
()
{
uni
.
showLoading
({
title
:
'
加载中...
'
})
this
.
refresherTriggered
=
true
this
.
getStoreInfo
()
this
.
getHomeCate
()
let
timer
=
setTimeout
(()
=>
{
this
.
refresherTriggered
=
false
uni
.
hideLoading
()
timer
=
null
},
500
)
}
export
default
{
searchData
,
getHomeCate
,
checkShowAll
,
scrolltolower
,
refresherrefresh
checkShowAll
}
\ No newline at end of file
pages/home/index.vue
View file @
98f2b622
This diff is collapsed.
Click to expand it.
readme.md
View file @
98f2b622
...
...
@@ -28,17 +28,8 @@
#### warning
+
2021/6/29,本日起的代码可能会引起不适,but all can run(效率和质量不会成正比关系)
#### 未完成
+
支付
+
订单管理
+
订单详情
+
精度处理
#### unFinish, but not important
+
自定义的导航栏的样式计算可以在vuex中处理(wxs计算)
+
详情有个深拷贝的问题。暂时通过JSON.stringify()处理
+
所有的价格都是通过toFixed会可能出现精度问题。一般发现不了
+
确认订单页面要跳到地址列表页面选择
签收退款 + 退款成功状态显示
\ No newline at end of file
+
确认订单页面要跳到地址列表页面选择
\ No newline at end of file
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