Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
U
uni-pdtravel
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
panyongping
uni-pdtravel
Commits
70ced662
Commit
70ced662
authored
Mar 17, 2025
by
潘永坪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合票优化
parent
479829b5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
29 deletions
+38
-29
distributionCombiChoose.vue
...ation/distributionCombiChoose/distributionCombiChoose.vue
+38
-29
No files found.
pages/combination/distributionCombiChoose/distributionCombiChoose.vue
View file @
70ced662
...
...
@@ -331,9 +331,15 @@ export default {
this
.
channelId
=
this
.
$commonjs
.
getKey
(
option
,
'channelId'
)
||
''
this
.
groupId
=
this
.
$commonjs
.
getKey
(
option
,
'groupId'
)
||
''
this
.
groupChannelId
=
this
.
$commonjs
.
getKey
(
option
,
'groupChannelId'
)
||
''
let
statusBarHeight
=
uni
.
getWindowInfo
().
statusBarHeight
// 状态栏高度
let
statusBarHeight
=
uni
.
getWindowInfo
().
statusBarHeight
||
0
// 状态栏高度
let
capsule
=
uni
.
getMenuButtonBoundingClientRect
()
// 胶囊大小、位置数据
this
.
topHeight
=
statusBarHeight
+
(
capsule
.
top
-
statusBarHeight
)
*
2
+
capsule
.
height
//整个上部分总高度
if
(
capsule
){
//防止部分手机获取不到胶囊信息时,出现页面抖动bug,加上该逻辑
this
.
topHeight
=
statusBarHeight
+
(
capsule
.
top
-
statusBarHeight
)
*
2
+
capsule
.
height
//整个上部分总高度
}
else
{
this
.
topHeight
=
statusBarHeight
}
},
onShow
()
{
//清空之前选中的数据以及状态
...
...
@@ -504,7 +510,7 @@ export default {
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.middle-right'
).
boundingClientRect
(
data
=>
{
uni
.
createSelectorQuery
().
select
(
'.middle-right'
).
boundingClientRect
(
data
=>
{
//获取右边盒子原本高度,默认右边盒子等于原本高度,滚动之后等于滚动高度
if
(
data
){
this
.
originHeight
=
data
.
height
...
...
@@ -542,7 +548,7 @@ export default {
}).
exec
()
// #endif
}
let
windowHeight
=
uni
.
getWindowInfo
().
screenHeight
||
1
0
00
let
windowHeight
=
uni
.
getWindowInfo
().
screenHeight
||
1
1
00
//60为底部高度
this
.
scrollHeight
=
windowHeight
-
60
-
this
.
topHeight
})
...
...
@@ -628,34 +634,37 @@ export default {
//---全屏滚动
scrollFull
(
e
){
setTimeout
(()
=>
{
let
height
=
0
let
scrollTop
=
e
.
detail
.
scrollTop
let
selectFun
=
(
data
)
=>
{
if
(
data
){
//10为中间盒子的top-10
height
=
data
.
height
+
this
.
middleTopHeight
-
10
-
this
.
topHeight
let
opacity
=
scrollTop
/
(
data
.
height
)
this
.
tabbarOpacity
=
parseFloat
(
opacity
.
toFixed
(
2
))
//下面值取整数,防止部分手机取值太多小数,出现抖动的bug
if
(
parseInt
(
scrollTop
)
>=
parseInt
(
height
)){
//中间上部分固定,中间下部分可滚动,全屏不滚动
this
.
rightHeight
=
this
.
scrollHeight
}
else
{
//中间上部分不固定,中间下部分不可滚动,全屏滚动'
this
.
rightHeight
=
this
.
originHeight
//由于下面三个值可能在这个这个方法之后生成,故加上这个判断条件
if
(
this
.
middleTopHeight
&&
this
.
scrollHeight
&&
this
.
originHeight
){
let
height
=
0
let
scrollTop
=
e
.
detail
.
scrollTop
let
selectFun
=
(
data
)
=>
{
if
(
data
){
//10为中间盒子的top-10
height
=
data
.
height
+
this
.
middleTopHeight
-
10
-
this
.
topHeight
let
opacity
=
scrollTop
/
(
data
.
height
)
this
.
tabbarOpacity
=
parseFloat
(
opacity
.
toFixed
(
2
))
//下面值取整数,防止部分手机取值太多小数,出现抖动的bug
if
(
parseInt
(
scrollTop
)
>=
parseInt
(
height
)){
//中间上部分固定,中间下部分可滚动,全屏不滚动
this
.
rightHeight
=
this
.
scrollHeight
}
else
{
//中间上部分不固定,中间下部分不可滚动,全屏滚动'
this
.
rightHeight
=
this
.
originHeight
}
}
}
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
}
// #ifdef MP-WEIXIN
uni
.
createSelectorQuery
().
in
(
this
).
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
// #ifdef MP-ALIPAY
uni
.
createSelectorQuery
().
select
(
'.banner'
).
boundingClientRect
(
data
=>
{
selectFun
(
data
)
}).
exec
()
// #endif
},
10
)
},
...
...
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