diff --git a/web/html/body/nas/music.html b/web/html/body/nas/music.html index b9788fd..38f6577 100644 --- a/web/html/body/nas/music.html +++ b/web/html/body/nas/music.html @@ -187,10 +187,13 @@ } $.post('/nas/music/share.do',{file:file,isDir:isDir},function (json){ if(json.code===0){ + var url="https://"+window.location.host+"/html/body/nas/music.html?share="+json.data.token layer.prompt({ title:"分享链接", - value:"https://"+window.location.host+"/html/body/nas/music.html?share="+json.data.token + value:url },function (value,index,elem){ + $('.layui-layer-input')[0].select() + document.execCommand("Copy") layer.close(index); }) } @@ -256,9 +259,14 @@ $('#play_share').click(function (){ $.post('/nas/music/share.do',{file:playNow},function (json){ if(json.code===0){ + var url="https://"+window.location.host+"/html/body/nas/music.html?share="+json.data.token layer.prompt({ title:"分享链接", - value:"https://"+window.location.host+"/html/body/nas/music.html?share="+json.data.token + value:url + },function(value,index,elem){ + $('.layui-layer-input')[0].select() + document.execCommand("Copy") + layer.close(index); }) } })