首先到vip.wxticket.com开通一个生成跳转ticket接口。wap跳转到微信基于微信ticket协议
拿到ticket以后通过js即可进行跳转:
-
-
<html lang="zh-cn">
-
<head>
-
<meta charset="UTF-8">
-
<title>跳转中 </title>
-
<meta http-equiv="pragma" content="no-cache">
-
<meta http-equiv="cache-control" content="no-cache">
-
<meta http-equiv="expires" content="0">
-
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
-
<style> .button{width:100px;margin:auto;border:1px solid gray;border-radius:4px;background-color:#fff;color:#434343;display:block;padding:15px 0;font-size:15px;line-height:0;text-align:center;} </style>
-
</head>
-
<body>
-
-
<div style="z-index:9999;position:absolute;display: table;left:0px;top:0px;width:100%;height:100%;">
-
<div id="loading" style="display: table-cell; vertical-align:middle; text-align:center;font-size:16px;color:#434343;">
-
加载中...
-
</div>
-
<div id="buttons" style="display: none; vertical-align:middle; text-align:center;font-size:14px;color:gray;">
-
<p>如果跳转失败请重试 </p>
-
<p> <a class='button' onclick='window.location.replace(location.href+(location.href.match(/\?/i)?"&":"?")+"_rft"+ (new Date()).valueOf());'>重新打开 </a> </p>
-
<p> <a class='button' onclick='window.history.back();'>返 回 </a> </p>
-
</div>
-
</div>
-
<!-- *******
-
微信跳转联系QQ:904999988
-
网址:vip.wxticket.com
-
******* -->
-
<script>
-
var ticket = 'ta181172a79f5b3d568454a5a3192ba74';
-
if(! /(iPhone|iPad|iPod|iOS)/i.test(navigator.userAgent)){
-
if( / baiduboxapp/i.test(navigator.userAgent)){
-
window.location.replace( 'bdbox://utils?action=sendIntent&minver=7.4¶ms=%7B%22intent%22%3A%22weixin://dl/business/?ticket='+ticket+ '%23wechat_redirect%23Intent%3Bend%22%7D');
-
} else{
-
window.location.replace( 'weixin://dl/business/?ticket='+ticket+ '#wechat_redirect');
-
}
-
} else{
-
window.location.replace( 'weixin://dl/business/?ticket='+ticket+ '#wechat_redirect');
-
}
-
setTimeout( function(){ document.getElementById( "loading").style.display= "none"; document.getElementById( "buttons").style.display= "table-cell";}, 3000);
-
</script>
-
</body>
-
</html>