|
|
@@ -9,6 +9,7 @@ import com.kym.common.R;
|
|
|
import com.kym.service.MpRelationService;
|
|
|
import com.kym.service.wechat.WeixinMPService;
|
|
|
import jakarta.servlet.http.HttpServletRequest;
|
|
|
+import com.alibaba.fastjson2.JSON;
|
|
|
import me.chanjar.weixin.mp.api.WxMpService;
|
|
|
import jakarta.servlet.http.HttpServletResponse;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
@@ -85,8 +86,8 @@ public class WeixinMPController {
|
|
|
@ResponseBody
|
|
|
public R<?> exportMenu() {
|
|
|
try {
|
|
|
- String menuJson = wxMpService.getMenuService().menuGet();
|
|
|
- return R.success(menuJson);
|
|
|
+ var menu = wxMpService.getMenuService().menuGet();
|
|
|
+ return R.success(JSON.toJSONString(menu));
|
|
|
} catch (WxErrorException e) {
|
|
|
log.error("导出菜单失败", e);
|
|
|
return R.failed(-1, "导出失败: " + e.getMessage());
|