修复分享失效的问题
This commit is contained in:
parent
1a0d4498dd
commit
17850a82b2
@ -5,7 +5,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
||||
@SpringBootApplication
|
||||
public class ToolsApplication {
|
||||
public static final String version="1.4";
|
||||
public static final String version="1.4.1";
|
||||
|
||||
public static void main(String[] args) {
|
||||
System.out.println("当前版本号:" + version);
|
||||
|
@ -186,8 +186,11 @@ public class NasManager {
|
||||
json.put("file",file);
|
||||
HashMap<String,String> header=new HashMap<>();
|
||||
header.put("content-type","application/json");
|
||||
String data=HttpTools.http_post(NasUrl+":8001/nas/music/share.do",json.toJSONString().getBytes(StandardCharsets.UTF_8),1,header);
|
||||
System.out.println("分享:"+data);
|
||||
String url=NasUrl+":8001";
|
||||
if(UpdateIp.nas_ip!=null){
|
||||
url="http://"+UpdateIp.nas_ip+":8000";
|
||||
}
|
||||
String data=HttpTools.http_post(url+"/nas/music/share.do",json.toJSONString().getBytes(StandardCharsets.UTF_8),1,header);
|
||||
JSONObject _data=JSONObject.parseObject(data);
|
||||
if(_data.getInteger("code")==1) {
|
||||
RedisTools.set(token, data, 3600);
|
||||
@ -206,7 +209,11 @@ public class NasManager {
|
||||
JSONObject json=new JSONObject();
|
||||
String redis=RedisTools.get(share);
|
||||
if(redis!=null&&!"-999".equals(redis)) {
|
||||
String _json=HttpTools.get(NasUrl+":8001/nas/music/playShare.do?token="+JSONObject.parseObject(redis).getJSONObject("data").getString("share"));
|
||||
String url=NasUrl+":8001";
|
||||
if(UpdateIp.nas_ip!=null){
|
||||
url="http://"+UpdateIp.nas_ip+":8000";
|
||||
}
|
||||
String _json=HttpTools.get(url+"/nas/music/playShare.do?token="+JSONObject.parseObject(redis).getJSONObject("data").getString("share"));
|
||||
System.out.println(_json);
|
||||
JSONObject item=JSONObject.parseObject(_json);
|
||||
if(item.getInteger("code")==0) {
|
||||
|
Loading…
Reference in New Issue
Block a user