Skip to content

Commit f4cf4d9

Browse files
committed
修复合种列表加载不全问题
1 parent cd5a10d commit f4cf4d9

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

app/src/main/java/pansong291/xposed/quickenergy/AntCooperate.java

+5
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ public void run()
5050
{
5151
jo = ja.getJSONObject(i);
5252
String cooperationId = jo.getString("cooperationId");
53+
if(!jo.has("name"))
54+
{
55+
s = AntCooperateRpcCall.rpcCall_queryCooperatePlant(loader, cooperationId);
56+
jo = new JSONObject(s).getJSONObject("cooperatePlant");
57+
}
5358
String name = jo.getString("name");
5459
int waterDayLimit = jo.getInt("waterDayLimit");
5560
CooperationIdMap.putIdMap(cooperationId, name);

app/src/main/java/pansong291/xposed/quickenergy/hook/AntCooperateRpcCall.java

+14
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,20 @@ public static String rpcCall_queryUserCooperatePlantList(ClassLoader loader)
2020
return null;
2121
}
2222

23+
public static String rpcCall_queryCooperatePlant(ClassLoader loader, String coopId)
24+
{
25+
try
26+
{
27+
String args1 = "[{\"cooperationId\":\"" + coopId + "\"}]";
28+
return RpcCall.invoke(loader, "alipay.antmember.forest.h5.queryCooperatePlant", args1);
29+
}catch(Throwable t)
30+
{
31+
Log.i(TAG, "rpcCall_queryCooperatePlant err:");
32+
Log.printStackTrace(TAG, t);
33+
}
34+
return null;
35+
}
36+
2337
public static String rpcCall_cooperateWater(ClassLoader loader, String uid, String coopId, int count)
2438
{
2539
try

0 commit comments

Comments
 (0)