|
@@ -100,23 +100,10 @@ public class WeixinMPController {
|
|
|
@ResponseBody
|
|
@ResponseBody
|
|
|
public R<?> createMenu() {
|
|
public R<?> createMenu() {
|
|
|
try {
|
|
try {
|
|
|
- String menuJson = """
|
|
|
|
|
- {
|
|
|
|
|
- "button": [
|
|
|
|
|
- {
|
|
|
|
|
- "type": "view",
|
|
|
|
|
- "name": "停车减免",
|
|
|
|
|
- "url": "https://cloud.yeswash.cn/parking.html"
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- "type": "view",
|
|
|
|
|
- "name": "商家入口",
|
|
|
|
|
- "url": "https://cloud.yeswash.cn/h5#/"
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
- }
|
|
|
|
|
- """;
|
|
|
|
|
- wxMpService.getMenuService().menuCreate(menuJson);
|
|
|
|
|
|
|
+ String menuJson = "{\"button\":[{\"type\":\"view\",\"name\":\"停车减免\",\"url\":\"https://cloud.yeswash.cn/parking.html\"},{\"type\":\"view\",\"name\":\"商家入口\",\"url\":\"https://cloud.yeswash.cn/h5#/\"}]}";
|
|
|
|
|
+ log.info("创建菜单: {}", menuJson);
|
|
|
|
|
+ String result = wxMpService.getMenuService().menuCreate(menuJson);
|
|
|
|
|
+ log.info("菜单创建结果: {}", result);
|
|
|
return R.success("菜单创建成功");
|
|
return R.success("菜单创建成功");
|
|
|
} catch (WxErrorException e) {
|
|
} catch (WxErrorException e) {
|
|
|
log.error("创建菜单失败", e);
|
|
log.error("创建菜单失败", e);
|