页面优化
This commit is contained in:
parent
e96e4ebb63
commit
1c95252fd7
@ -47,8 +47,6 @@ Component({
|
||||
'content.top': _self.data.top * phoneHeight,
|
||||
'content.left': _self.data.left * phoneHeight
|
||||
})
|
||||
console.log('手机px', phoneHeight)
|
||||
console.log('边距:', _self.data.content)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -82,8 +80,6 @@ Component({
|
||||
});
|
||||
const targetLeft = this.data.screenWidth - 170;
|
||||
const targetTop = this.data.screenHeight - 170;
|
||||
console.log(this.data.screenHeight)
|
||||
console.log(this.data.screenWidth)
|
||||
animation
|
||||
.translate(targetLeft - this.data.initPosition.left, targetTop - this.data.initPosition.top)
|
||||
.scale(0.03)
|
||||
|
@ -140,10 +140,8 @@ Page({
|
||||
const height = res[0].height;
|
||||
//屏幕高度-内容高度-tabbar高度
|
||||
const contentHeight = _self.data.screenHeight - height - 50
|
||||
console.log('tabbarHeight:', _self.data.tabBarHeight)
|
||||
const h = Utils.pxToRpx(contentHeight, _self.data.screenWidth)
|
||||
const tempH = h - 130
|
||||
console.log('转后', h, '内容高度:', tempH)
|
||||
_self.setData({
|
||||
contentHeight: tempH
|
||||
})
|
||||
|
@ -63,7 +63,6 @@ const dateTimePicker = (startYear, endYear) => {
|
||||
}
|
||||
|
||||
const pxToRpx = (pxValue, screenWidth) => {
|
||||
console.log('转换Px', pxValue, '屏幕宽度', screenWidth)
|
||||
// return pxValue * (750 / screenWidth);
|
||||
const rpx = (750 / screenWidth) * Number(pxValue)
|
||||
return Math.floor(rpx);
|
||||
|
Loading…
Reference in New Issue
Block a user