uniapp判断当前环境是ios还是android
判断是苹果:
uni.getSystemInfoSync().platform == 'ios'
安卓:
uni.getSystemInfoSync().platform === 'android'
switch(uni.getSystemInfoSync().platform){
case 'android':
console.log('运行Android上')
break;
case 'ios':
console.log('运行iOS上')
break;
default:
console.log('运行在开发者工具上')
break;
}