shaogen1995 10 months ago
parent
commit
3ca4237f75

+ 3 - 25
web/README.md

@@ -1,27 +1,5 @@
-本地运行:静态资源里面先运行一个服务 
-使用 http-server
-确保服务地址是:http://127.0.0.1:8080
+一开始说的没有后端,所以做的数据和代码分离的模式来开发的。
 
+本地运行:静态资源里面先运行一个服务(使用 http-server 或者 其它)
 
--------------------
-
-------ts版本类型问题-------
-
-找到 import { useDispatch } from "react-redux";
-
-按住 Ctrl 点击 useDispatch 出来 useDispatch.d.ts类型声明文件
-(路径node_modules>react-redux>es>hooks>useDispatch.d.ts)
-
-找到最后面的 AnyAction,按住 Ctrl 点击 进入
-(路径node_modules>redux>index.d.ts)
-
-找到
-export interface Action<T = any> {
-  type: T
-}
-
-在type后面加一个 ?   即=>
-
-export interface Action<T = any> {
-  type?: T
-}
+修改 baseUrlLoc(本地 dev) 和 myBaseUrl(build) 即可

+ 1 - 1
web/src/assets/styles/base.css

@@ -41,7 +41,7 @@ textarea {
 }
 /* 主题色 */
 :root {
-  --themeColor: #caab7a;
+  --themeColor: #f58543;
   --themeColor2: #f58543;
 }
 /* 找不到页面 */

+ 1 - 1
web/src/assets/styles/base.less

@@ -51,7 +51,7 @@ textarea {
 
 /* 主题色 */
 :root {
-  --themeColor: #caab7a;
+  --themeColor: #f58543;
   --themeColor2: #f58543;
 }
 

+ 1 - 1
web/src/index.tsx

@@ -31,7 +31,7 @@ root.render(
     locale={locale}
     theme={{
       token: {
-        colorPrimary: '#caab7a'
+        colorPrimary: '#f58543'
       }
     }}
   >

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

@@ -5,7 +5,6 @@
   width: 100%;
   height: 100%;
   z-index: 10;
-  background-size: 100% 100%;
   padding: 7% 10% 9%;
   :global {
     .Lcolse {

+ 2 - 6
web/src/pages/A4expert/A4look/index.tsx

@@ -1,6 +1,6 @@
 import React from 'react'
 import styles from './index.module.scss'
-import { baseURL, myData } from '@/utils/history'
+import { baseURL } from '@/utils/history'
 import { ZhuanObj } from '@/types'
 
 type Props = {
@@ -10,11 +10,7 @@ type Props = {
 
 function A4look({ info, closeFu }: Props) {
   return (
-    <div
-      id='LookGood'
-      className={styles.A4look}
-      style={{ backgroundImage: `url(${baseURL + myData.expert.bg})` }}
-    >
+    <div id='LookGood' className={styles.A4look}>
       {/* 关闭按钮 */}
       <img onClick={closeFu} className='Lcolse' src={baseURL + 'goods/close.png'} alt='' />
 

+ 7 - 2
web/src/pages/A4expert/index.tsx

@@ -105,7 +105,7 @@ function A4expert() {
     >
       <LeftTopLogo />
 
-      <div className='A4top'>
+      <div className='A4top' hidden={!!opInfo.name}>
         <img className='A4topll' src={baseURL + 'expert/topBg.png'} alt='' />
         <div className='A4toprr'>
           类型:&nbsp;&nbsp;
@@ -132,7 +132,12 @@ function A4expert() {
         </div>
       </div>
 
-      <div className='A4main mySorrlNo' ref={sroolRef} onWheel={e => mousemoveFu(e)}>
+      <div
+        hidden={!!opInfo.name}
+        className='A4main mySorrlNo'
+        ref={sroolRef}
+        onWheel={e => mousemoveFu(e)}
+      >
         {data.length ? (
           <div className='A4mBox' style={{ width: 310 * data.length + 'px' }}>
             {data.map((v, i) => (