修改小程序接口

This commit is contained in:
liuwu 2023-09-06 16:21:02 +08:00
parent a832eadd66
commit 74b2574886
1 changed files with 5 additions and 1 deletions

View File

@ -122,7 +122,11 @@ public class WechatController extends BaseController {
JSONArray array1 = new JSONArray(); JSONArray array1 = new JSONArray();
list1.forEach(l->{ list1.forEach(l->{
JSONObject object1 = new JSONObject(); JSONObject object1 = new JSONObject();
if (l.getDetailed().length()>18){
object1.put("text",l.getDetailed().substring(0,18)+"..."); object1.put("text",l.getDetailed().substring(0,18)+"...");
}else {
object1.put("text",l.getDetailed());
}
object1.put("id",l.getId()); object1.put("id",l.getId());
object1.put("shotName",l.getShotName()); object1.put("shotName",l.getShotName());
array1.add(object1); array1.add(object1);