R7E 真机二次反馈移动修复

引用 R7E-16C BIZ8-12B
这个提交包含在:
2026-05-15 18:24:03 +08:00
父节点 8cd4b92857
当前提交 f945c0bfb0
共修改 10 个文件,包含 197 行新增和 24 行删除
+16 -1
查看文件
@@ -1,3 +1,4 @@
import { useEffect } from "react";
import { Link, useLocation, useNavigate } from "react-router-dom";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { toast } from "sonner";
@@ -204,6 +205,20 @@ export function MobilePortalPage() {
queryFn: () => fetchPortalHome(),
});
useEffect(() => {
if (location.hash !== "#finance" || !canUseFinance) {
return;
}
const frameId = window.requestAnimationFrame(() => {
const financeSection = document.getElementById("finance");
financeSection?.scrollIntoView({ block: "start", behavior: "smooth" });
financeSection?.focus({ preventScroll: true });
});
return () => window.cancelAnimationFrame(frameId);
}, [canUseFinance, location.hash, portalHomeQuery.isError, portalHomeQuery.isLoading]);
const markHomeNotificationReadMutation = useMutation({
mutationFn: (notificationId: string) => markNotificationRead(notificationId),
onSuccess: async () => {
@@ -379,7 +394,7 @@ export function MobilePortalPage() {
) : null}
{canUseFinance ? (
<section id="finance" className="mobile-card mobile-page-stack" data-testid="mobile-finance-summary">
<section id="finance" tabIndex={-1} className="mobile-card mobile-page-stack" data-testid="mobile-finance-summary">
<div className="mobile-section-header">
<div className="mobile-section-title">财务</div>
<span className="badge-neutral">{paymentBatchEnabled ? "复核与付款" : "审批与台账"}</span>