判断是否为手机 /zyh2525246/article/details/95448404
import {Injectable } from '@angular/core';@Injectable({providedIn: 'root'})export class BrowserService {constructor() {}get ua() {try {if (navigator) {return navigator.userAgent;} else {// this.header['authorization']return '';}} catch {return '';}}get isIPhone() {const curlReg = /iphone/i;return curlReg.test(this.ua);}}