فهرست منبع

feat: serverUrl改为央视地址

chenlei 7 ساعت پیش
والد
کامیت
f44abd9079
4فایلهای تغییر یافته به همراه40 افزوده شده و 15 حذف شده
  1. 21 0
      code/public/index.html
  2. 1 1
      code/public/myData/data.js
  3. 12 11
      code/src/pages/A1home/index.module.scss
  4. 6 3
      code/src/pages/A1home/index.tsx

+ 21 - 0
code/public/index.html

@@ -30,4 +30,25 @@
       }
     }
   </script> -->
+  <script>
+    // -------------增加访问量--------------------
+    // 初始接口域名
+    const baseUrl = 'https://sit-cctvyunzhan.4dage.com'
+
+    const requestBody = {
+    num: 'CGYJ_CODE',
+    type: 'visit'
+    };
+   
+    fetch(`${baseUrl}/api/visit/add`, {
+    method: 'POST',
+    body: JSON.stringify(requestBody),
+    headers: {
+    'Content-Type': 'application/json'
+    }
+    })
+    .then(response => response.json())
+    .then(data => console.log('访问量增加'))
+    .catch(error => console.error(error));
+   </script>
 </html>

+ 1 - 1
code/public/myData/data.js

@@ -1,4 +1,4 @@
-const serverUrl = 'https://houseoss.4dkankan.com/project/chuGuoYuJian/staticData/'
+const serverUrl = 'https://ysxwyzl.4dage.com/bwCN/scene/chuGuoYuJian/staticData/'
 // const serverUrl = 'http://192.168.20.55:8080/staticData/'
 
 const MODEL_LIST = [

+ 12 - 11
code/src/pages/A1home/index.module.scss

@@ -35,6 +35,7 @@
 
     .A1mask {
       position: absolute;
+      padding: 74px 0 10px;
       inset: 0;
       display: flex;
       flex-direction: column;
@@ -64,7 +65,9 @@
       ul {
         display: flex;
         flex-direction: column;
-        gap: 80px;
+        align-items: center;
+        justify-content: space-between;
+        flex: 1;
 
         li {
           position: relative;
@@ -75,16 +78,14 @@
           font-size: 19px;
           color: #2D0C05;
           background: url('./images/icon-sy-min.png') no-repeat center / contain;
-        
-          &:not(:last-child)::after {
-            content: '';
-            position: absolute;
-            bottom: -43px;
-            left: 50%;
-            transform: translateX(-50%);
-            width: 9px;
-            height: 9px;
-            background: url('./images/diamond-min.png') no-repeat center / contain;
+        }
+        i {
+          width: 9px;
+          height: 9px;
+          background: url('./images/diamond-min.png') no-repeat center / contain;
+
+          &:last-child {
+            display: none;
           }
         }
       }

+ 6 - 3
code/src/pages/A1home/index.tsx

@@ -51,9 +51,12 @@ function A1home() {
       >
         <ul>
           {MODEL_LIST.map((item, index) => (
-            <li key={index} onClick={() => handleMaskClick(index)}>
-              {item.name}
-            </li>
+            <>
+              <li key={index} onClick={() => handleMaskClick(index)}>
+                {item.name}
+              </li>
+              <i />
+            </>
           ))}
         </ul>
       </div>