判断安卓还是ios,然后做相应的操作
const u = navigator.userAgent;
const isAndroid = u.indexOf("Android") > -1 || u.indexOf("Linux") > -1; // android终端
const isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); // ios终端
调用手机的拨打电话功能
cosnt phone = '12356842568'
window.location.href = ` tel:${phone}`