修复FastJSON大版本更新后API变动

This commit is contained in:
2022-04-28 09:50:33 +08:00
parent f1ed4be143
commit 7943606dc0
22 changed files with 103 additions and 88 deletions

View File

@@ -1,6 +1,7 @@
package com.yutou.qqbot.models.Commands;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson2.JSON;
import com.alibaba.fastjson2.JSONObject;
import com.yutou.qqbot.QQBotManager;
import com.yutou.qqbot.interfaces.DownloadInterface;
import com.yutou.qqbot.models.Model;
@@ -48,7 +49,7 @@ public class Moyu extends Model {
private void downloadImage() {
String ret = HttpTools.get("https://api.j4u.ink/proxy/remote/moyu.json");
JSONObject json = JSONObject.parseObject(ret);
JSONObject json = JSON.parseObject(ret);
HttpTools.download(json.getJSONObject("data").getString("moyu_url"), AppTools.getToDayTime() + "_moyu.jpg", new DownloadInterface() {
@Override
public void onDownload(File file) {