Browse Source

Merge branch 'develop' of http://120.55.44.4:10080/xujunjie/gt_client_pad into develop

ZhaoJun 1 year ago
parent
commit
ad6e69d0b1

BIN
src/assets/projects/bg.png


+ 4 - 4
src/pages/Home/index.js

@@ -14,10 +14,10 @@ const HomePage = (props) => {
   const { data } = useRequest(queryConditionSnapshot, {
     defaultParams: [{ project_id: projectId }],
   });
-  useEffect(() => {
-    localStorage.width = document.documentElement.getBoundingClientRect().width;
-    window.refreshRem();
-  }, []);
+  // useEffect(() => {
+  //   localStorage.width = document.documentElement.getBoundingClientRect().width;
+  //   window.refreshRem();
+  // }, []);
   return (
     <div className={styles.content}>
       <LeftContent data={data} />

+ 5 - 2
src/pages/Projects/index.js

@@ -1,7 +1,7 @@
 import { queryProject } from '@/services/diagnosticTec';
 import { UnityAction } from '@/utils/utils';
 import { useRequest } from '@umijs/max';
-import { useRef } from 'react';
+import { useEffect, useRef } from 'react';
 import Swiper from 'react-id-swiper';
 import 'swiper/css/swiper.css';
 import styles from './index.less';
@@ -39,7 +39,10 @@ const Projects = () => {
   const toProject = (item) => {
     UnityAction.sendMsg('project', JSON.stringify(item));
   };
-
+  useEffect(() => {
+    localStorage.width = document.documentElement.getBoundingClientRect().width;
+    window.refreshRem();
+  }, []);
   return (
     <div className={styles.main}>
       <div className={styles.titleCon}>

+ 2 - 2
src/pages/Projects/index.less

@@ -1,8 +1,8 @@
 .main {
   width: 100%;
   height: 100vh;
-  background: url('@/assets/projects/bg.png') no-repeat center;
-  background-size: 100% 100%;
+  // background: url('@/assets/projects/bg.png') no-repeat center;
+  // background-size: 100% 100%;
   .titleCon {
     margin: 0 1.8rem;
     padding: 2.64rem 0 0.4rem;