shaogen1995 9 miesięcy temu
rodzic
commit
81dd1763be

+ 24 - 0
.gitignore

@@ -0,0 +1,24 @@
+# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
+
+# dependencies
+/node_modules
+staticData
+/.pnp
+.pnp.js
+
+# testing
+/coverage
+
+# production
+/build
+
+# misc
+.DS_Store
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local
+
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*

+ 1 - 0
web/.gitignore

@@ -2,6 +2,7 @@
 
 # dependencies
 /node_modules
+staticData
 /.pnp
 .pnp.js
 

Plik diff jest za duży
+ 3005 - 160
web/public/myData/myData.js


+ 3 - 0
web/src/assets/styles/base.css

@@ -227,3 +227,6 @@ textarea {
 .ant-image-preview-operations {
   background-color: rgba(0, 0, 0, 0.6) !important;
 }
+.ant-image-preview-close {
+  display: none !important;
+}

+ 3 - 0
web/src/assets/styles/base.less

@@ -280,3 +280,6 @@ textarea {
 .ant-image-preview-operations {
   background-color: rgba(0, 0, 0, 0.6) !important;
 }
+.ant-image-preview-close {
+  display: none !important;
+}

+ 1 - 1
web/src/components/LookGood/index.module.scss

@@ -30,7 +30,7 @@
           width: 100%;
           height: 100%;
           cursor: zoom-in;
-          & > img {
+          img {
             pointer-events: none;
             width: 100%;
             height: 100%;

+ 2 - 1
web/src/components/LookGood/index.tsx

@@ -4,6 +4,7 @@ import classNames from 'classnames'
 import { GoodsRow } from '@/types'
 import { baseURL } from '@/utils/history'
 import { Image } from 'antd'
+import LazyImg from '../LazyImg'
 
 type Props = {
   info: GoodsRow
@@ -23,7 +24,7 @@ function LookGood({ info, closeFu, type }: Props) {
         <div className='LmainCen'>
           {type === 'img' ? (
             <div className='Limg' onClick={() => setImgLook(baseURL + info.lookSrc)}>
-              <img src={baseURL + info.lookSrc} alt='' />
+              <LazyImg src={baseURL + info.lookSrc} />
             </div>
           ) : null}
           {type === 'model' ? (

+ 1 - 1
web/src/pages/A3goods/index.module.scss

@@ -71,7 +71,7 @@
                 width: 100%;
                 height: calc(100% - 36px);
                 img {
-                  object-fit: cover !important;
+                  object-fit: contain !important;
                 }
               }
               .A2Irow2 {

+ 1 - 1
web/src/pages/A3goods/index.tsx

@@ -158,7 +158,7 @@ function A3goods() {
                         setOpInfo(v)
                         setOpType(index === 1 ? 'img' : index === 2 ? 'model' : 'video')
                       }}
-                      key={v.name}
+                      key={v.name + v.type}
                       title={v.name}
                     >
                       <div className='A2Irow1'>

+ 4 - 1
web/src/pages/A4expert/A4look/index.module.scss

@@ -25,10 +25,13 @@
         margin-right: 80px;
         width: 380px;
         height: 100%;
-        object-fit: cover !important;
         pointer-events: none;
         display: inline-block;
         border-radius: 30px;
+        overflow: hidden;
+        img {
+          object-fit: cover !important;
+        }
       }
       .A4Lrr {
         width: calc(100% - 460px);

+ 8 - 4
web/src/pages/A4expert/A4look/index.tsx

@@ -2,6 +2,7 @@ import React from 'react'
 import styles from './index.module.scss'
 import { baseURL } from '@/utils/history'
 import { ZhuanObj } from '@/types'
+import LazyImg from '@/components/LazyImg'
 
 type Props = {
   info: ZhuanObj
@@ -15,7 +16,10 @@ function A4look({ info, closeFu }: Props) {
       <img onClick={closeFu} className='Lcolse' src={baseURL + 'goods/close.png'} alt='' />
 
       <div className='A4Lmani'>
-        <img className='A4Lll' src={baseURL + info.lookSrc} alt='' />
+        <div className='A4Lll'>
+          <LazyImg src={baseURL + info.lookSrc} />
+        </div>
+
         <div className='A4Lrr'>
           <div className='A4Lrr1'>
             <h1>{info.name}</h1>
@@ -25,13 +29,13 @@ function A4look({ info, closeFu }: Props) {
           <div className='A4Lrr2'>
             <img src={baseURL + 'expert/li1.png'} alt='' />
             <span>职称:</span>
-            {info.zhi}
+            {info.zhi || '(空)'}
           </div>
 
           <div className='A4Lrr2'>
             <img src={baseURL + 'expert/li2.png'} alt='' />
             <span>专长:</span>
-            {info.zhuan}
+            {info.zhuan || '(空)'}
           </div>
 
           <div className='A4Lrr2'>
@@ -40,7 +44,7 @@ function A4look({ info, closeFu }: Props) {
           </div>
 
           <div className='A4Lrr3 mySorrl'>
-            <div dangerouslySetInnerHTML={{ __html: info.txt }}></div>
+            <div dangerouslySetInnerHTML={{ __html: info.txt || '(空)' }}></div>
           </div>
         </div>
       </div>

+ 11 - 6
web/src/pages/A4expert/index.module.scss

@@ -105,12 +105,14 @@
             position: relative;
 
             .A4mRtitle {
+              position: relative;
               width: 100%;
               margin: 30px 0 10px;
               color: var(--themeColor2);
               font-weight: 700;
               font-size: 24px;
               background-size: 100% 100%;
+              padding: 0 20px;
             }
             .A4mRtitle2 {
               margin-bottom: 24px;
@@ -133,12 +135,15 @@
               opacity: 1;
               pointer-events: auto;
               transition: opacity 0.5s;
-              & > img {
-                pointer-events: none;
-                width: 90%;
-                height: 220px;
-                object-fit: cover !important;
-                display: inline-block;
+              .adm-image {
+                height: 220px !important;
+                img {
+                  pointer-events: none;
+                  width: 90%;
+                  height: 220px;
+                  object-fit: cover !important;
+                  display: inline-block;
+                }
               }
             }
             .A4mRowMoveShow {

+ 8 - 4
web/src/pages/A4expert/index.tsx

@@ -7,6 +7,7 @@ import { Input } from 'antd-mobile'
 import classNames from 'classnames'
 import { ZhuanObj } from '@/types'
 import A4look from './A4look'
+import LazyImg from '@/components/LazyImg'
 
 function A4expert() {
   const [txt, setTxt] = useState('')
@@ -64,7 +65,7 @@ function A4expert() {
     if (sroolRef.current) {
       const nowMove = sroolRef.current.scrollLeft
       // 滚轮
-      let num = 50
+      let num = 100
       if (ev.deltaY < 0) num = -num
       sroolRef.current.scrollLeft = nowMove + num
     }
@@ -74,7 +75,7 @@ function A4expert() {
   const clickIncoFu = useCallback((flag: 1 | -1) => {
     if (sroolRef.current) {
       const numNow = sroolRef.current.scrollLeft
-      const moveNum = 500 * flag
+      const moveNum = 1000 * flag
       let resNum = numNow + moveNum
       sroolRef.current.scrollTo({ left: resNum, behavior: 'smooth' })
     }
@@ -141,10 +142,13 @@ function A4expert() {
         {data.length ? (
           <div className='A4mBox' style={{ width: 310 * data.length + 'px' }}>
             {data.map((v, i) => (
-              <div className={classNames('A4mRow', i % 2 === 0 ? 'A4mRowOu' : '')} key={v.name}>
+              <div
+                className={classNames('A4mRow', i % 2 === 0 ? 'A4mRowOu' : '')}
+                key={v.name + v.type}
+              >
                 <div>
                   <div className='A4mRowShow'>
-                    <img src={baseURL + v.coveImg} alt='' />
+                    <LazyImg src={baseURL + v.coveImg} />
                     {rowTongDom(v)}
                   </div>
 

BIN
web静态资源/staticData/expert/s1.jpg


BIN
web静态资源/staticData/expert/s2.jpg


BIN
web静态资源/staticData/goods/img/s1.jpg


BIN
web静态资源/staticData/goods/img/s2.jpg