页面优化

This commit is contained in:
itgaojian163 2025-04-18 16:58:15 +08:00
parent e96e4ebb63
commit 1c95252fd7
3 changed files with 0 additions and 7 deletions

View File

@ -47,8 +47,6 @@ Component({
'content.top': _self.data.top * phoneHeight, 'content.top': _self.data.top * phoneHeight,
'content.left': _self.data.left * phoneHeight 'content.left': _self.data.left * phoneHeight
}) })
console.log('手机px', phoneHeight)
console.log('边距:', _self.data.content)
} }
}, },
methods: { methods: {
@ -82,8 +80,6 @@ Component({
}); });
const targetLeft = this.data.screenWidth - 170; const targetLeft = this.data.screenWidth - 170;
const targetTop = this.data.screenHeight - 170; const targetTop = this.data.screenHeight - 170;
console.log(this.data.screenHeight)
console.log(this.data.screenWidth)
animation animation
.translate(targetLeft - this.data.initPosition.left, targetTop - this.data.initPosition.top) .translate(targetLeft - this.data.initPosition.left, targetTop - this.data.initPosition.top)
.scale(0.03) .scale(0.03)

View File

@ -140,10 +140,8 @@ Page({
const height = res[0].height; const height = res[0].height;
//屏幕高度-内容高度-tabbar高度 //屏幕高度-内容高度-tabbar高度
const contentHeight = _self.data.screenHeight - height - 50 const contentHeight = _self.data.screenHeight - height - 50
console.log('tabbarHeight:', _self.data.tabBarHeight)
const h = Utils.pxToRpx(contentHeight, _self.data.screenWidth) const h = Utils.pxToRpx(contentHeight, _self.data.screenWidth)
const tempH = h - 130 const tempH = h - 130
console.log('转后', h, '内容高度:', tempH)
_self.setData({ _self.setData({
contentHeight: tempH contentHeight: tempH
}) })

View File

@ -63,7 +63,6 @@ const dateTimePicker = (startYear, endYear) => {
} }
const pxToRpx = (pxValue, screenWidth) => { const pxToRpx = (pxValue, screenWidth) => {
console.log('转换Px', pxValue, '屏幕宽度', screenWidth)
// return pxValue * (750 / screenWidth); // return pxValue * (750 / screenWidth);
const rpx = (750 / screenWidth) * Number(pxValue) const rpx = (750 / screenWidth) * Number(pxValue)
return Math.floor(rpx); return Math.floor(rpx);