From 23b9f51de28e54ed9b06abd100b0f77b915005f5 Mon Sep 17 00:00:00 2001 From: erdanergou Date: Thu, 6 Apr 2023 08:25:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A7=BB=E5=8A=A8=E7=AB=AF?= =?UTF-8?q?=E5=BA=93=E5=AD=98=E6=9F=A5=E8=AF=A2=E8=B7=B3=E8=BD=AC=E5=88=B0?= =?UTF-8?q?=E5=85=A5=E5=BA=93=E7=94=B3=E8=AF=B7=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../depository_manage/controller/PageController.java | 6 ++++++ 1 file changed, 6 insertions(+) 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("缺少必要参数");