Explorar o código

fix: update knowlege page

chenlei hai 3 semanas
pai
achega
184c8ed04a

BIN=BIN
public/myData/knowlegeImg/bjzcyczb-bc-smjlmb-3.png


+ 1 - 1
public/myData/myData.js

@@ -3258,7 +3258,7 @@ const knowlegeData = [
                             desc: `司马金龙墓表图片来源:《山西大同石家寨北魏司马金龙墓》图7`
                           },
                           {
-                            path: ``,
+                            path: `./myData/knowlegeImg/bjzcyczb-bc-smjlmb-3.png`,
                             desc: `洛阳集成P1080`
                           }
                         ]

+ 27 - 3
src/pages/A9knowlege/components/Chart/index.module.scss

@@ -65,7 +65,8 @@
 }
 
 @keyframes pulse {
-  0%, 100% {
+  0%,
+  100% {
     opacity: 1;
   }
   50% {
@@ -97,8 +98,7 @@
   border-radius: 50px;
   border: 1px solid #7c4b36;
 
-  &::after {
-    content: '';
+  .btn {
     position: absolute;
     top: 50%;
     right: 10px;
@@ -167,3 +167,27 @@
     background: url('../../images/frame_01_03.png') no-repeat center / contain;
   }
 }
+
+.chartRefresh {
+  position: absolute;
+  bottom: 80px;
+  right: 10px;
+  width: 36px;
+  height: 36px;
+  border-radius: 50%;
+  border: 1px solid #7c4b36;
+  overflow: hidden;
+  background: url('../../images/refresh.png') no-repeat center / 20px 20px;
+  z-index: 9;
+  cursor: pointer;
+  transition: all 0.3s;
+
+  &:hover {
+    background-color: rgba(124, 75, 54, 0.1);
+    transform: scale(1.1);
+  }
+
+  &:active {
+    transform: scale(0.95);
+  }
+}

+ 13 - 5
src/pages/A9knowlege/components/Chart/index.tsx

@@ -4,11 +4,10 @@ import styles from './index.module.scss'
 import { decrypt } from '@/utils/encrypt'
 
 const questions = [
-  '程哲碑最值得看的亮点是什么?',
-  '程哲是谁?',
-  '为什么说既是造像碑又是墓碑?',
-  '最初在哪里被发现的?',
-  '想了解北朝历史,这个展览能提供什么信息?'
+  '程哲碑有哪些特殊之处?',
+  '碑主程哲是一个怎样的人?',
+  '程哲碑的造像艺术有何特点?',
+  '什么是“碑禁政策”?'
 ]
 
 const FASTGPT_API_URL = 'https://cloud.fastgpt.cn/api'
@@ -150,6 +149,12 @@ function Chart() {
     }
   }
 
+  const handleReset = () => {
+    setMessages([])
+    setInputValue('')
+    setShowQuickQuestions(true)
+  }
+
   return (
     <div className={styles.chart}>
       <div className={styles.chartWrap}>
@@ -187,6 +192,8 @@ function Chart() {
         )}
       </div>
 
+      {messages.length > 0 && <div className={styles.chartRefresh} onClick={handleReset} />}
+
       <div className={styles.chartFooter}>
         <div className={styles.chartInput}>
           <input
@@ -198,6 +205,7 @@ function Chart() {
             onKeyPress={handleInputKeyPress}
             disabled={isLoading}
           />
+          <div className={styles.btn} onClick={handleSendMessage.bind(null, inputValue)} />
         </div>
       </div>
     </div>

BIN=BIN
src/pages/A9knowlege/images/refresh.png


+ 3 - 2
src/pages/A9knowlege/index.module.scss

@@ -15,7 +15,7 @@
 .main {
   flex: 1;
 
-  >* {
+  > * {
     width: 100%;
     height: 100%;
     border: none;
@@ -26,5 +26,6 @@
   position: relative;
   width: 298px;
   height: 100%;
+  overflow: hidden;
   background: url('./images/img_pop_02-min.png') no-repeat center / cover;
-}
+}