|
|
@@ -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>
|