diff --git a/src/main/java/com/yutou/tools/nas/NasManager.java b/src/main/java/com/yutou/tools/nas/NasManager.java index 6974aca..69984b7 100644 --- a/src/main/java/com/yutou/tools/nas/NasManager.java +++ b/src/main/java/com/yutou/tools/nas/NasManager.java @@ -189,9 +189,11 @@ public class NasManager { String data=HttpTools.http_post(NasUrl+":8001/nas/music/share.do",json.toJSONString().getBytes(StandardCharsets.UTF_8),1,header); System.out.println("分享:"+data); JSONObject _data=JSONObject.parseObject(data); - RedisTools.set(token,data,3600); - System.out.println("设置分享token:"+token+" -> "+data); - _data.put("token",token); + if(_data.getInteger("code")==1) { + RedisTools.set(token, data, 3600); + System.out.println("设置分享token:" + token + " -> " + data); + _data.put("token", token); + } json.clear(); json.put("code",0); json.put("msg","ok"); diff --git a/web/html/body/nas/music.html b/web/html/body/nas/music.html index 045004c..b673dc2 100644 --- a/web/html/body/nas/music.html +++ b/web/html/body/nas/music.html @@ -27,6 +27,7 @@