判断安卓还是iOS
let u = navigator.userAgent
let isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //如果输出结果是true就判定是android终端或者uc浏览器
按钮代码
<script type="text/wxtag-template">
{isAndroid ? <button className="btn" style={{width: '100%', height: '50px', lineHeight: '50px', background: 'rgba(0,0,0,0)', border: 'none', padding: '0' }} > </button> : <button className="btn" style={{display: 'block', width: '100%', height: '100vh', border: 'none', }} ></button>}
</script>
注意安卓的按钮不可以用display样式,否则会没有按钮
其他拉起APP的配置 点这里