VUE IIS根据访问端自动跳转适合的链接
应用程序根目录新增Index.html,设置默认跳转
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title></title> <script type="text/javascript"> if ((navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i))) { window.location.href="/mobile"; //alert("mobile") } else { window.location.href="/pc"; //alert("pc") } </script> </head> <body> </body> </html>
GarsonZhang www.infnitee.com
版权声明:本文为YES开发框架网发布内容,转载请附上原文出处连接
post YES开发框架