做个控制页面

大体url如下吧,其中d是设备编号,a是可选项,执行的动作
http://wy.mikuq.com/panel.htm?d=45772655&a=on
大概就对应这么一个二维码
45772655.png
首先要取得url中的参数,送到title上

<script>
        function getUrlParam(name)
        {
                var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
                var r = window.location.search.substr(1).match(reg);
                if (r!=null) return decodeURI(r[2]); return null;
        }
        window.onload = function(){
                try{
                        var ID=getUrlParam("d");
                        document.getElementsByTagName("title")[0].innerText = "设备ID:"+ID;
                }
                catch(ex){}
        }
</script>

关于分享,QQ

<meta itemprop="name" content="设备控制面板" />
<meta itemprop="image" content="http://wy.mikuq.com/res/2.jpg" />
<meta name="description" itemprop="description" content="简单控制一下,控制消息收发" />

分享到微信,似乎要用sdk,meta只有图片可能有效

<meta property="og:type" content="website" />
<meta property="og:title" content="页面标题" /> 短信/备忘录
<meta property="og:description" content="页面描述" /> 备忘录
<meta property="og:image" content="http://wy.mikuq.com/res/45772655.png" /> 短信
<meta property="og:url" content="http://www.example.com/" />

添加到主屏幕

<meta name="apple-mobile-web-app-capable" content="yes" />
<link rel="apple-touch-icon" href="http://wy.mikuq.com/res/2.jpg">

<link rel="apple-touch-icon-precomposed" href="icon.png"/>
<link rel="apple-touch-icon" href="icon.png"/>

apple-touch-icon和apple-touch-icon-precomposed,区别就在于是否会应用iOS中自动给图标添加的那层高光。前者会自动加圆角和高亮效果

<link rel="apple-touch-icon" sizes="57x57" href="icon-57.png">
<link rel="apple-touch-icon" sizes="72x72" href="icon-72.png">
<link rel="apple-touch-icon" sizes="114x114" href="icon-114.png">
<link rel="apple-touch-icon" sizes="144x144" href="icon-144.png">

登录:on,1
设置:st,0/1
文字:mg,xxx
状态:if,0/1

标签: none

添加新评论