修复音乐播放器图片不显示的问题
修复音乐播放器播放文件夹不播放的问题
This commit is contained in:
parent
6bb84c374a
commit
7300b5e3b7
@ -54,7 +54,10 @@ public class APIFilter implements Filter {
|
||||
String tmp = request.getRequestURI();
|
||||
try {
|
||||
url = tmp.split(tmp.split("/")[tmp.split("/").length - 1])[0];
|
||||
} catch (Exception ignored) {
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
System.out.println("无权限请求:"+tmp);
|
||||
return;
|
||||
}
|
||||
|
||||
UKey key = list.get(0);
|
||||
|
@ -73,7 +73,7 @@
|
||||
} catch (e) {
|
||||
localhost = ""
|
||||
}
|
||||
//localhost = "http://192.168.31.88:8000";
|
||||
// localhost = "http://113.109.23.240:8000";
|
||||
layui.use(['table', 'element'], function () {
|
||||
let table = layui.table;
|
||||
let element = layui.element;
|
||||
@ -126,15 +126,30 @@
|
||||
window.open(localhost + "/nas/music/play.do?token=PlVodzYhvxRQbOHKakpKs2dvnoc43Cnk&random=false&filePath=" + new Base64().encode(data.file))
|
||||
}
|
||||
} else if (obj.event === 'play') {
|
||||
$.post(localhost + "/nas/music/list.do", {type: false, path: data.file}, function (obj) {
|
||||
let json = JSON.parse(obj);
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url:localhost + "/nas/music/list.do",
|
||||
contentType: "application/json; charset=utf-8",
|
||||
data:JSON.stringify({type: true, path: data.file}),
|
||||
dataType: "json",
|
||||
success:function (json){
|
||||
try {
|
||||
if (json.code === 0) {
|
||||
playIndex = 0;
|
||||
musicLib = json.data;
|
||||
musicLib=[]
|
||||
for (let datum of json.data) {
|
||||
if(datum.isdir===0){
|
||||
musicLib.push(datum)
|
||||
}
|
||||
}
|
||||
isRandom = false;
|
||||
playNext()
|
||||
}
|
||||
}catch (e){
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
@ -263,7 +278,7 @@
|
||||
});
|
||||
}
|
||||
})
|
||||
$('#img').attr("src",'/nas/music/web/image.do?fileName='+fileName);
|
||||
$('#img').attr("src",localhost+'/nas/music/web/image.do?fileName='+fileName);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user