Skip to content

Commit

Permalink
更新短网址接口
Browse files Browse the repository at this point in the history
  • Loading branch information
luren549 committed Nov 28, 2020
1 parent 5ebc64d commit 251b610
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions js/stui_block.js
Original file line number Diff line number Diff line change
Expand Up @@ -248,32 +248,35 @@ var stui = {
if(copyshort==1){
if($(".copylink").length){
$.ajax({
type : 'GET',
url : 'https://api.weibo.com/2/short_url/shorten.json?source=2849184197&url_long='+encodeURIComponent(stui.browser.url),
dataType : 'JSONP',
type : 'post',
url: 'https://www.gourls.net/dwz.php',
dataType: 'JSON',
data: {
longurl:stui.browser.url
},
success : function(r) {
url_short = r.data.urls[0].url_short;
url_short = "全网vip高清影视院线大片等,免费在线观看:"+r.ae_url;
var clipboard = new Clipboard('.copylink', {
text: function() {
return url_short;
}
});
clipboard.on('success', function(e) {
alert("地址复制成功,赶快分享给小伙伴吧!");
alert("地址复制成功,赶快分享给小伙伴,该视频即可加速播放哦!");
});
}
});
}
} else {
if($(".copylink").length){
var url_short = stui.browser.url;
url_short = "全网vip高清影视院线大片等,免费在线观看:"+stui.browser.url;
var clipboard = new Clipboard('.copylink', {
text: function() {
return url_short;
}
});
clipboard.on('success', function(e) {
alert("地址复制成功,赶快分享给小伙伴吧!");
alert("地址复制成功,赶快分享给小伙伴,该视频即可加速播放哦!");
});
}
}
Expand Down

0 comments on commit 251b610

Please sign in to comment.