diff --git a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java index c6fafce6..61ad26aa 100644 --- a/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java +++ b/src/main/java/com/dreamchaser/depository_manage/controller/PageController.java @@ -1049,6 +1049,12 @@ public class PageController { List splitInfoByMid = splitUnitService.findSplitInfoByMid(inventoryById.getMid()); inventory.setSplitInfoList(splitInfoByMid); mv.addObject("record", inventory); + String userAgent = request.getHeader("user-agent"); + // 判断当前使用的设备为移动端还是pc端 + boolean b = DeviceUtil.checkAgentIsMobile(userAgent); + if (b) { + mv.setViewName("pages/depository/Inventory-view_mobile"); + } return mv; } else { throw new MyException("缺少必要参数");