소스 검색

判断是否为移动端

layui
mail_yanpeng@163.com 6 년 전
부모
커밋
a6a7efd651
  1. 3
      static/js/checkm.js
  2. 3
      views/T.header.tpl
  3. 1
      views/note.html

3
static/js/checkm.js

@ -0,0 +1,3 @@
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="http://wap.aiprose.com";
}

3
views/T.header.tpl

@ -9,9 +9,10 @@
<meta name="description" content="云悦,个人随笔是一个面向IT技术人员,提供个人平时工作总结和在线记录学习笔记,个人技术博客,在线云笔记,码农笔录,最新的技术博客,www.aiprose.com">
{{end}}
<link rel="stylesheet" href="//g.alicdn.com/sui/sui3/0.0.18/css/sui.min.css">
<script type="text/javascript" src="/static/js/checkm.js"></script>
<script type="text/javascript" src="//g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>
{{/*<script type="text/javascript" src="//g.alicdn.com/sui/sui3/0.0.18/js/sui.min.js"></script>*/}}
<script type="text/javascript" src="/static/js/sui.js"></script>
<script type="text/javascript" src="/static/js/layer.js"></script>
<script type="text/javascript" src="/static/js/layer.js"></script>
<link type="text/css" rel="styleSheet" href="/static/css/common.css"/>
{{end}}

1
views/note.html

@ -9,6 +9,7 @@
<link rel="stylesheet" href="//g.alicdn.com/sui/sui3/0.0.18/css/sui.min.css">
{{/*<script type="text/javascript" src="//g.alicdn.com/sj/lib/jquery/dist/jquery.min.js"></script>*/}}
<title>我的笔记 - 云悦</title>
<script type="text/javascript" src="/static/js/checkm.js"></script>
<link type="text/css" rel="styleSheet" href="/static/css/menu-reset.css"/>
<link type="text/css" rel="styleSheet" href="/static/css/notemenu.css"/>
<link type="text/css" rel="styleSheet" href="/static/css/menunav.css"/>

불러오는 중...
취소
저장