Commit 70ced662 authored by 潘永坪's avatar 潘永坪

组合票优化

parent 479829b5
...@@ -331,9 +331,15 @@ export default { ...@@ -331,9 +331,15 @@ export default {
this.channelId=this.$commonjs.getKey(option,'channelId')||'' this.channelId=this.$commonjs.getKey(option,'channelId')||''
this.groupId=this.$commonjs.getKey(option,'groupId')||'' this.groupId=this.$commonjs.getKey(option,'groupId')||''
this.groupChannelId=this.$commonjs.getKey(option,'groupChannelId')||'' this.groupChannelId=this.$commonjs.getKey(option,'groupChannelId')||''
let statusBarHeight = uni.getWindowInfo().statusBarHeight // 状态栏高度 let statusBarHeight = uni.getWindowInfo().statusBarHeight||0 // 状态栏高度
let capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据 let capsule = uni.getMenuButtonBoundingClientRect() // 胶囊大小、位置数据
if(capsule){
//防止部分手机获取不到胶囊信息时,出现页面抖动bug,加上该逻辑
this.topHeight =statusBarHeight+(capsule.top - statusBarHeight) * 2 + capsule.height//整个上部分总高度 this.topHeight =statusBarHeight+(capsule.top - statusBarHeight) * 2 + capsule.height//整个上部分总高度
}else{
this.topHeight=statusBarHeight
}
}, },
onShow() { onShow() {
//清空之前选中的数据以及状态 //清空之前选中的数据以及状态
...@@ -504,7 +510,7 @@ export default { ...@@ -504,7 +510,7 @@ export default {
// #endif // #endif
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
uni.createSelectorQuery().select('.middle-right').boundingClientRect(data => { uni.createSelectorQuery().select('.middle-right').boundingClientRect(data =>{
//获取右边盒子原本高度,默认右边盒子等于原本高度,滚动之后等于滚动高度 //获取右边盒子原本高度,默认右边盒子等于原本高度,滚动之后等于滚动高度
if(data){ if(data){
this.originHeight=data.height this.originHeight=data.height
...@@ -542,7 +548,7 @@ export default { ...@@ -542,7 +548,7 @@ export default {
}).exec() }).exec()
// #endif // #endif
} }
let windowHeight=uni.getWindowInfo().screenHeight||1000 let windowHeight=uni.getWindowInfo().screenHeight||1100
//60为底部高度 //60为底部高度
this.scrollHeight=windowHeight-60-this.topHeight this.scrollHeight=windowHeight-60-this.topHeight
}) })
...@@ -628,6 +634,8 @@ export default { ...@@ -628,6 +634,8 @@ export default {
//---全屏滚动 //---全屏滚动
scrollFull(e){ scrollFull(e){
setTimeout(()=>{ setTimeout(()=>{
//由于下面三个值可能在这个这个方法之后生成,故加上这个判断条件
if(this.middleTopHeight&&this.scrollHeight&&this.originHeight){
let height=0 let height=0
let scrollTop=e.detail.scrollTop let scrollTop=e.detail.scrollTop
let selectFun=(data)=>{ let selectFun=(data)=>{
...@@ -656,6 +664,7 @@ export default { ...@@ -656,6 +664,7 @@ export default {
selectFun(data) selectFun(data)
}).exec() }).exec()
// #endif // #endif
}
},10) },10)
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment