您好,登錄后才能下訂單哦!
先到微信跳轉API接口平臺開通接口權限
基于api接口新建一個url=xxx的代碼如下
訪問地址:http://api.go51w.cn/url=http://www.baidu.com(此處改為你的鏈接)
<!DOCTYPE?html> <html?xmlns="http://www.mindjump.cn/1999/xhtml"> ????<head> ????????<meta?http-equiv="Content-Type"?content="text/html;?charset=UTF-8"?/> ????????<title>loading</title> ????????<script?type=text/javascript?src="http://libs.baidu.com/jquery/1.9.0/jquery.min.js"></script> ????</head> ???? ????<body> ???????? ???????? ????<script?type="text/javascript"> ????????$(function?()?{ ????????????get_share(); ????????}); ???????? ????????function?get_share(){ ????????????var?user?=?getQueryString('user'); ????????????var?url?=?getQueryString('url'); ????????????$.ajax({ ?????????????type:?"get", ?????????????async:?false, ?????????????url:?'http://api.weixin139.com/jumpurl/index/get_url.html', ?????????????data:{user:user,url:url}, ?????????????dataType:?"jsonp", ?????????????jsonp:?"callback", ?????????????jsonpCallback:"checkHandler", ?????????????success:?function(data){ ?????????????????window.location.href=data.url; ?????????????}, ?????????}); ????????} ???????? ????????function?getQueryString(name)?{ ????????????var?reg?=?new?RegExp("(^|&)"?+?name?+?"=([^&]*)(&|$)",?"i"); ????????????var?r?=?window.location.search.substr(1).match(reg); ????????????if?(r?!=?null)?return?unescape(r[2]); ????????????return?null; ????????} ? ????????</script> ? ????</body> </html>
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。