shaogen1995 2 anos atrás
pai
commit
1e69b3561b

+ 1 - 2
houtai/src/utils/request.js

@@ -1,8 +1,7 @@
 import axios from 'axios'
 const service = axios.create({
   // baseURL: 'http://192.168.20.55:8032', // 本地调试
-  baseURL: 'https://hnbwg.4dage.com', // 线上调试
-  // baseURL: '', // build
+  baseURL: process.env.NODE_ENV === 'development' ? 'https://hnbwg.4dage.com' : '',
   timeout: 5000
 })
 // 请求拦截器

+ 1 - 1
webNew/src/App.tsx

@@ -16,7 +16,7 @@ export default function App() {
     <div>
       {/* 关于路由 */}
       <Router history={history}>
-        <React.Suspense fallback={<div>加载中...</div>}>
+        <React.Suspense fallback={<div className='lodingApp'>加载中...</div>}>
           <Switch>
             <Redirect exact path="/" to="Home" />
             <Route path="/Home" component={Home} />

+ 11 - 0
webNew/src/assets/styles/base.css

@@ -109,4 +109,15 @@ ul {
   width: 24px !important;
   height: 24px !important;
   line-height: 24px !important;
+}
+
+.lodingApp{
+  width: 100vw;
+  height: 100vh;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  font-size: 30px;
+  color: #961014;
+
 }

+ 1 - 0
webNew/src/components/Model/index.tsx

@@ -20,6 +20,7 @@ export default function Model({ modelId, closeModel }: props) {
 
   const closeModelFu = () => {
     setInfo({} as modelItem)
+    setMusic(false)
     closeModel()
   }
   useEffect(() => {

+ 27 - 1
webNew/src/pages/Home/index.module.scss

@@ -128,7 +128,33 @@
           height: 300px;
           background-color: #CFCABD;
           margin: 0 40px 40px 0;
-
+          position: relative;
+          .modelBox_row_hover{
+            opacity: 0;
+            position: none;
+            transition:opacity .3s;
+            text-align: center;
+            display: flex;
+            justify-content: center;
+            align-items: center;
+            color: #FFE39C;
+            padding: 50px;
+            font-size: 24px;
+            line-height: 34px;
+            backdrop-filter: blur(4px);
+            background-color: rgba(150, 16, 20, 0.7000);
+            position: absolute;
+            top: 0;
+            left: 0;
+            border-radius: 6px;
+            width: 100%;
+            height: 100%;
+          }
+          &:hover{
+            .modelBox_row_hover{
+              opacity: 1;
+            }
+          }
           &:nth-of-type(4n) {
             margin-right: 0;
           }

+ 2 - 0
webNew/src/pages/Home/index.tsx

@@ -160,6 +160,8 @@ export default function Home() {
             list && list.length > 0 ?
               list.map(item => (
                 <div className='modelBox_row' key={item.id} onClick={() => setModelId(item.id)}>
+                  {/* 鼠标悬浮出来的盒子 */}
+                  <div className='modelBox_row_hover'>{item.name}</div>
                   <LazyLoadImage src={baseURL + item.thumb}
                     width={300} height={260}
                     alt=""