switch(uni.getSystemInfoSync().platform){ case 'android': console.log('运行Android上') this.inputBottom2 = e.detail.height * 2 + 30 break; case 'ios': console.log('运行iOS上') this.inputBottom2 = e.detail.height + 25 break; default: console.log('运行在开发者工具上') break; }