shaogen1995 1 year ago
parent
commit
e4dbc967fd

+ 1 - 1
backstage/public/index.html

@@ -24,7 +24,7 @@
       work correctly both with client-side routing and a non-root public URL.
       Learn how to configure a non-root public URL by running `npm run build`.
     -->
-    <title>unity本地大场景管理</title>
+    <title>本地大场景管理</title>
   </head>
   <body>
     <noscript>You need to enable JavaScript to run this app.</noscript>

+ 4 - 0
backstage/src/pages/A1List/index.module.scss

@@ -3,6 +3,10 @@
 
   :global {
 
+    .pageTitleToLeft{
+      left: -200px;
+    }
+
     .tableBox {
       margin-top: 20px;
       height: calc(100% - 65px);

+ 14 - 2
backstage/src/pages/A1List/index.tsx

@@ -17,7 +17,8 @@ import {
 } from "@/store/action/A1List";
 import { MessageFu } from "@/utils/message";
 import history from "@/utils/history";
-import { removeTokenInfo } from "@/utils/storage";
+import { getTokenInfo, removeTokenInfo } from "@/utils/storage";
+import clasNames from "classnames";
 
 const isTokenFlagFu = (val: boolean, url: string) => {
   if (val) {
@@ -32,6 +33,10 @@ const isTokenFlagFu = (val: boolean, url: string) => {
 };
 
 function A1List() {
+  const userInfo = useMemo(() => {
+    return getTokenInfo().user;
+  }, []);
+
   const dispatch = useDispatch();
 
   // 顶部筛选
@@ -153,7 +158,14 @@ function A1List() {
 
   return (
     <div className={styles.A1List}>
-      <div className="pageTitle">场景管理</div>
+      <div
+        className={clasNames(
+          "pageTitle",
+          userInfo.isAdmin !== 1 ? "pageTitleToLeft" : ""
+        )}
+      >
+        场景管理
+      </div>
       <div className="A1Top">
         <div className="selectBox">
           <div className="selectBoxL">

+ 1 - 1
backstage/src/pages/Layout/index.tsx

@@ -106,7 +106,7 @@ function Layout() {
       {/* 左边 */}
       <div className="layoutLeft">
         <div className="layoutLeftTop">
-          <img src={logonImg} alt="" />
+          {userInfo.isAdmin === 1 ? <img src={logonImg} alt="" /> : null}
         </div>
         {/* 左边主体 */}
         <div className="layoutLeftMain">

+ 1 - 1
backstage/src/pages/Login/index.tsx

@@ -41,7 +41,7 @@ export default function Login() {
   return (
     <div className={styles.Login}>
       <div className="main">
-        <h3>unity本地大场景管理</h3>
+        <h3>本地大场景管理</h3>
         {/* 账号密码输入框 */}
         <div className="inputBox">
           <div className="inputBoxRow">