judgeTerrace() {//检测平台let p = navigator.platform;this.system.win = p.indexOf("Win") == 0;this.system.mac = p.indexOf("Mac") == 0;this.system.x11 = (p == "X11") || (p.indexOf("Linux") == 0);this.system.ipad = (navigator.userAgent.match(/iPad/i) != null) ? true : false;let ua = navigator.userAgent.toLowerCase();if (this.system.win || this.system.mac || this.system.xll || this.system.ipad) {if (ua.match(/MicroMessenger/i) == "micromessenger") {// console.log('在PC端微信上打开的');this.ismobileWeiXin = false} else {// console.log('在PC端非微信上打开的');this.ismobileWeiXin = false}} else {if (ua.match(/MicroMessenger/i) == "micromessenger") {// console.log('在手机端微信上打开的');this.ismobileWeiXin = true} else {// console.log('在手机上非微信上打开的');this.ismobileWeiXin = true}}}
1200字范文,内容丰富有趣,写作的好帮手!