chat.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. <template>
  2. <view class="chat-container">
  3. <!-- 导航栏 -->
  4. <view class="chat-nav">
  5. <view class="nav-back" @click="goBack">
  6. <text class="nav-back-icon">‹</text>
  7. </view>
  8. <text class="nav-title">{{ isNutrition ? '精准营养助手' : 'AI 家庭助手' }}</text>
  9. <view class="nav-actions">
  10. <view class="mascot-badge" v-if="mascotCode && !isNutrition" @click="showConversations = !showConversations">
  11. <text class="mascot-badge-icon">{{ mascotIcon }}</text>
  12. <text class="mascot-badge-name">{{ mascotName }}</text>
  13. </view>
  14. <text class="nav-action" @click="showConversations = !showConversations" v-else>☰</text>
  15. </view>
  16. </view>
  17. <!-- 会话列表(侧拉) -->
  18. <view class="conv-overlay" v-if="showConversations" @click="showConversations = false"></view>
  19. <view class="conv-sidebar" :class="{ 'conv-sidebar-open': showConversations }">
  20. <view class="conv-header">
  21. <text class="conv-header-title">会话列表</text>
  22. <text class="conv-header-new" @click="newConversation">+ 新会话</text>
  23. </view>
  24. <scroll-view class="conv-list" scroll-y>
  25. <view class="conv-item" v-for="conv in conversations" :key="conv.id"
  26. :class="{ 'conv-item-active': conv.id === currentConversationId }"
  27. @click="switchConversation(conv.id)">
  28. <text class="conv-item-name">{{ conv.name || '新会话' }}</text>
  29. <text class="conv-item-time">{{ formatTime(conv.updated_at) }}</text>
  30. </view>
  31. <BaseEmpty v-if="conversations.length === 0" text="暂无会话" icon="💬" />
  32. </scroll-view>
  33. </view>
  34. <!-- 消息列表 -->
  35. <scroll-view class="message-list" scroll-y :scroll-into-view="scrollToId" scroll-with-animation
  36. @scrolltoupper="loadMoreMessages" id="messageList">
  37. <view class="message-list-inner">
  38. <view class="welcome-card" v-if="messages.length === 0 && !sending">
  39. <view class="welcome-icon">{{ mascotIcon || (isNutrition ? '🥗' : '🤖') }}</view>
  40. <text class="welcome-title">{{ isNutrition ? '你好!我是精准营养助手' : ('你好!我是' + (mascotName || '家庭助手')) }}</text>
  41. <text class="welcome-desc">{{ isNutrition ? '我可以基于菌群检测报告,为你提供个性化的营养建议和推荐' : '我可以帮你了解孩子的成长情况,比如:' }}</text>
  42. <view class="welcome-suggestions">
  43. <view class="welcome-suggestion" v-if="!isNutrition" @click="quickQuestion('小明最近任务完成怎么样?')">
  44. <text class="suggestion-icon">📋</text>
  45. <text class="suggestion-text">小明最近任务完成怎么样?</text>
  46. </view>
  47. <view class="welcome-suggestion" v-if="!isNutrition" @click="quickQuestion('我家孩子的能量评分怎么样?')">
  48. <text class="suggestion-icon">⚡</text>
  49. <text class="suggestion-text">孩子的能量评分怎么样?</text>
  50. </view>
  51. <view class="welcome-suggestion" v-if="!isNutrition" @click="quickQuestion('今天有什么需要我做的事情?')">
  52. <text class="suggestion-icon">✅</text>
  53. <text class="suggestion-text">今天有什么需要我做的事情?</text>
  54. </view>
  55. <view class="welcome-suggestion" v-if="isNutrition" @click="quickQuestion('根据报告,我的孩子需要补充哪些营养?')">
  56. <text class="suggestion-icon">🥦</text>
  57. <text class="suggestion-text">根据报告,我的孩子需要补充哪些营养?</text>
  58. </view>
  59. <view class="welcome-suggestion" v-if="isNutrition" @click="quickQuestion('有哪些食物或产品推荐?')">
  60. <text class="suggestion-icon">🛒</text>
  61. <text class="suggestion-text">有哪些食物或产品推荐?</text>
  62. </view>
  63. </view>
  64. </view>
  65. <view class="message-group" v-for="(msg, idx) in messages" :key="msg.id">
  66. <!-- 用户消息 -->
  67. <view class="message message-user" v-if="msg.query">
  68. <view class="message-bubble user-bubble">{{ msg.query }}</view>
  69. </view>
  70. <!-- AI 回复 -->
  71. <view class="message message-ai" v-if="msg.answer">
  72. <view class="message-avatar">{{ mascotIcon || '🤖' }}</view>
  73. <view class="message-bubble ai-bubble">
  74. <text class="ai-answer-text">{{ msg.answer }}</text>
  75. <!-- 推荐卡片 -->
  76. <view class="rec-list" v-if="msg.recommendations && msg.recommendations.length > 0">
  77. <view class="rec-card" v-for="(rec, ri) in msg.recommendations" :key="ri" @click="gotoRec(rec)">
  78. <image class="rec-cover" v-if="rec.coverImage" :src="rec.coverImage" mode="aspectFill" />
  79. <view class="rec-info">
  80. <text class="rec-type-tag">{{ rec.type === 'product' ? '商品' : rec.type === 'activity' ? '活动' : '文章' }}</text>
  81. <text class="rec-name">{{ rec.name }}</text>
  82. <text class="rec-desc">{{ rec.description }}</text>
  83. <text class="rec-price" v-if="rec.price">¥{{ rec.price }}</text>
  84. </view>
  85. </view>
  86. </view>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 加载中 -->
  91. <view class="message message-ai" v-if="sending">
  92. <view class="message-avatar">🤖</view>
  93. <view class="message-bubble ai-bubble typing">
  94. <text class="typing-dot">.</text>
  95. <text class="typing-dot">.</text>
  96. <text class="typing-dot">.</text>
  97. </view>
  98. </view>
  99. <view id="scrollBottom"></view>
  100. </view>
  101. </scroll-view>
  102. <!-- 输入区 -->
  103. <view class="chat-input-area">
  104. <view class="chat-input-wrap">
  105. <input class="chat-input" v-model="inputText" placeholder="问我关于家庭和孩子的问题..."
  106. :disabled="sending" @confirm="sendMessage" confirm-type="send" />
  107. </view>
  108. <view class="chat-send-btn" :class="{ 'chat-send-active': inputText.trim() }"
  109. @click="sendMessage">
  110. <text class="send-icon">➤</text>
  111. </view>
  112. </view>
  113. </view>
  114. </template>
  115. <script>
  116. import { aiSendMessage, aiGetConversations, aiGetMessages, aiDeleteConversation, aiSendNutritionMessage } from '../../utils/api.js'
  117. import BaseEmpty from '../../components/BaseEmpty.vue'
  118. export default {
  119. components: { BaseEmpty },
  120. data() {
  121. return {
  122. inputText: '',
  123. messages: [],
  124. conversations: [],
  125. currentConversationId: '',
  126. sending: false,
  127. showConversations: false,
  128. scrollToId: '',
  129. pageLoaded: false,
  130. reportId: null,
  131. surveyId: null,
  132. pendingFirstMessage: '',
  133. mode: '',
  134. recommendations: [],
  135. mascotCode: '',
  136. mascotName: '',
  137. mascotIcon: ''
  138. }
  139. },
  140. computed: {
  141. isNutrition: function() {
  142. return this.mode === 'nutrition'
  143. }
  144. },
  145. onLoad: function(options) {
  146. this.reportId = options.reportId ? parseInt(options.reportId) : null
  147. this.surveyId = options.surveyId ? parseInt(options.surveyId) : null
  148. this.mode = options.mode || ''
  149. if (options.firstMessage) {
  150. this.pendingFirstMessage = decodeURIComponent(options.firstMessage)
  151. }
  152. // 加载用户mascot设置
  153. var userInfo = uni.getStorageSync('userInfo')
  154. if (userInfo) {
  155. if (userInfo.mascot === 'xibao') {
  156. this.mascotCode = 'xibao'
  157. this.mascotName = '浠宝'
  158. this.mascotIcon = '🌟'
  159. } else if (userInfo.mascot === 'fubao') {
  160. this.mascotCode = 'fubao'
  161. this.mascotName = '福宝'
  162. this.mascotIcon = '💪'
  163. }
  164. }
  165. this.loadConversations()
  166. // 如果有预填消息,自动发送
  167. var self = this
  168. if (this.pendingFirstMessage) {
  169. this.$nextTick(function() {
  170. self.inputText = self.pendingFirstMessage
  171. self.pendingFirstMessage = ''
  172. self.sendMessage()
  173. })
  174. }
  175. },
  176. onShow() {
  177. if (this.pageLoaded) {
  178. this.loadConversations()
  179. }
  180. this.pageLoaded = true
  181. },
  182. methods: {
  183. goBack() {
  184. uni.navigateBack()
  185. },
  186. async loadConversations() {
  187. try {
  188. const res = await aiGetConversations()
  189. this.conversations = res.data || []
  190. } catch (e) {
  191. console.log('加载会话列表失败', e)
  192. }
  193. },
  194. async switchConversation(convId) {
  195. this.currentConversationId = convId
  196. this.showConversations = false
  197. this.messages = []
  198. this.$nextTick(() => {
  199. this.scrollToBottom()
  200. })
  201. try {
  202. const res = await aiGetMessages({ conversationId: convId })
  203. this.messages = res.data || []
  204. this.$nextTick(() => {
  205. this.scrollToBottom()
  206. })
  207. } catch (e) {
  208. console.log('加载消息失败', e)
  209. }
  210. },
  211. newConversation() {
  212. this.currentConversationId = ''
  213. this.showConversations = false
  214. this.messages = []
  215. this.inputText = ''
  216. this.$nextTick(() => {
  217. this.scrollToBottom()
  218. })
  219. },
  220. async sendMessage() {
  221. const text = this.inputText.trim()
  222. if (!text || this.sending) return
  223. // 立即显示用户消息
  224. const tempMsg = { id: 'temp_' + Date.now(), query: text, answer: '' }
  225. this.messages.push(tempMsg)
  226. this.inputText = ''
  227. this.sending = true
  228. this.$nextTick(() => {
  229. this.scrollToBottom()
  230. })
  231. try {
  232. var params = {
  233. query: text,
  234. conversationId: this.currentConversationId
  235. }
  236. if (this.reportId) {
  237. params.reportId = this.reportId
  238. }
  239. if (this.surveyId) {
  240. params.surveyId = this.surveyId
  241. }
  242. var res, data
  243. if (this.isNutrition && this.reportId) {
  244. // 营养模式:调精准营养助手
  245. res = await aiSendNutritionMessage(params)
  246. data = res.data || {}
  247. // 更新最后一条消息的回复 + 推荐列表
  248. const lastMsg = this.messages[this.messages.length - 1]
  249. if (lastMsg) {
  250. lastMsg.answer = data.answer || ''
  251. lastMsg.recommendations = data.recommendations || []
  252. }
  253. } else {
  254. res = await aiSendMessage(params)
  255. data = res.data || {}
  256. // 更新最后一条消息的回复
  257. const lastMsg = this.messages[this.messages.length - 1]
  258. if (lastMsg) {
  259. lastMsg.answer = data.answer || ''
  260. }
  261. }
  262. // 更新 conversationId(新建会话时 Dify 返回)
  263. if (data.conversationId && !this.currentConversationId) {
  264. this.currentConversationId = data.conversationId
  265. // 刷新会话列表
  266. this.loadConversations()
  267. }
  268. } catch (e) {
  269. // 显示错误
  270. const lastMsg = this.messages[this.messages.length - 1]
  271. if (lastMsg) {
  272. lastMsg.answer = '抱歉,我暂时无法回答,请稍后再试。'
  273. }
  274. } finally {
  275. this.sending = false
  276. this.$nextTick(() => {
  277. this.scrollToBottom()
  278. })
  279. }
  280. },
  281. quickQuestion(text) {
  282. this.inputText = text
  283. this.sendMessage()
  284. },
  285. gotoRec(rec) {
  286. if (rec.url) {
  287. uni.navigateTo({ url: rec.url })
  288. }
  289. },
  290. loadMoreMessages() {
  291. // 分页加载历史(当前简化)
  292. },
  293. scrollToBottom() {
  294. this.scrollToId = 'scrollBottom'
  295. },
  296. formatTime(timestamp) {
  297. if (!timestamp) return ''
  298. const d = new Date(timestamp * 1000)
  299. const now = new Date()
  300. const diff = now - d
  301. if (diff < 86400000) {
  302. return d.getHours().toString().padStart(2, '0') + ':' + d.getMinutes().toString().padStart(2, '0')
  303. }
  304. return (d.getMonth() + 1) + '/' + d.getDate()
  305. }
  306. }
  307. }
  308. </script>
  309. <style scoped>
  310. .chat-container {
  311. display: flex;
  312. flex-direction: column;
  313. height: 100vh;
  314. background: var(--bg, #FFF7ED);
  315. position: relative;
  316. }
  317. /* 导航栏 */
  318. .chat-nav {
  319. display: flex;
  320. align-items: center;
  321. justify-content: space-between;
  322. padding: 88rpx 24rpx 16rpx;
  323. background: #fff;
  324. border-bottom: 1rpx solid var(--border-light, #E2E8F0);
  325. position: relative;
  326. z-index: 100;
  327. }
  328. .nav-back {
  329. width: 60rpx;
  330. height: 60rpx;
  331. display: flex;
  332. align-items: center;
  333. justify-content: center;
  334. }
  335. .nav-back-icon {
  336. font-size: 40rpx;
  337. color: var(--text, #1E293B);
  338. font-weight: 600;
  339. }
  340. .nav-title {
  341. font-size: 32rpx;
  342. font-weight: 600;
  343. color: var(--text, #1E293B);
  344. }
  345. .nav-actions {
  346. width: 60rpx;
  347. height: 60rpx;
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. }
  352. .nav-action {
  353. font-size: 36rpx;
  354. color: var(--text-secondary, #64748B);
  355. }
  356. /* 会话列表侧拉 */
  357. .conv-overlay {
  358. position: fixed;
  359. top: 0;
  360. left: 0;
  361. right: 0;
  362. bottom: 0;
  363. background: rgba(0,0,0,0.3);
  364. z-index: 200;
  365. }
  366. .conv-sidebar {
  367. position: fixed;
  368. top: 0;
  369. right: -500rpx;
  370. width: 460rpx;
  371. height: 100vh;
  372. background: #fff;
  373. z-index: 210;
  374. transition: right 0.3s ease;
  375. display: flex;
  376. flex-direction: column;
  377. }
  378. .conv-sidebar-open {
  379. right: 0;
  380. }
  381. .conv-header {
  382. display: flex;
  383. justify-content: space-between;
  384. align-items: center;
  385. padding: 100rpx 24rpx 16rpx;
  386. border-bottom: 1rpx solid var(--border-light, #E2E8F0);
  387. }
  388. .conv-header-title {
  389. font-size: 28rpx;
  390. font-weight: 600;
  391. color: var(--text, #1E293B);
  392. }
  393. .conv-header-new {
  394. font-size: 24rpx;
  395. color: var(--color-primary, #5B9BD5);
  396. font-weight: 500;
  397. }
  398. .conv-list {
  399. flex: 1;
  400. overflow-y: auto;
  401. }
  402. .conv-item {
  403. padding: 20rpx 24rpx;
  404. border-bottom: 1rpx solid var(--border-light, #E2E8F0);
  405. }
  406. .conv-item-active {
  407. background: rgba(91, 155, 213, 0.06);
  408. }
  409. .conv-item-name {
  410. font-size: 26rpx;
  411. color: var(--text, #1E293B);
  412. display: block;
  413. margin-bottom: 6rpx;
  414. overflow: hidden;
  415. text-overflow: ellipsis;
  416. white-space: nowrap;
  417. }
  418. .conv-item-time {
  419. font-size: 20rpx;
  420. color: var(--muted, #94A3B8);
  421. }
  422. /* 消息列表 */
  423. .message-list {
  424. flex: 1;
  425. overflow-y: auto;
  426. padding: 20rpx 24rpx;
  427. }
  428. .message-list-inner {
  429. min-height: 100%;
  430. }
  431. /* 欢迎卡片 */
  432. .welcome-card {
  433. text-align: center;
  434. padding: 60rpx 20rpx 40rpx;
  435. }
  436. .welcome-icon {
  437. font-size: 80rpx;
  438. margin-bottom: 20rpx;
  439. }
  440. .welcome-title {
  441. font-size: 32rpx;
  442. font-weight: 600;
  443. color: var(--text, #1E293B);
  444. display: block;
  445. margin-bottom: 12rpx;
  446. }
  447. .welcome-desc {
  448. font-size: 24rpx;
  449. color: var(--text-secondary, #64748B);
  450. display: block;
  451. margin-bottom: 32rpx;
  452. }
  453. .welcome-suggestions {
  454. display: flex;
  455. flex-direction: column;
  456. gap: 16rpx;
  457. padding: 0 20rpx;
  458. }
  459. .welcome-suggestion {
  460. display: flex;
  461. align-items: center;
  462. background: #fff;
  463. padding: 20rpx 24rpx;
  464. border-radius: 16rpx;
  465. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  466. }
  467. .suggestion-icon {
  468. font-size: 28rpx;
  469. margin-right: 12rpx;
  470. }
  471. .suggestion-text {
  472. font-size: 24rpx;
  473. color: var(--text, #1E293B);
  474. }
  475. /* 消息 */
  476. .message {
  477. margin-bottom: 24rpx;
  478. }
  479. .message-user {
  480. display: flex;
  481. justify-content: flex-end;
  482. }
  483. .message-ai {
  484. display: flex;
  485. align-items: flex-start;
  486. }
  487. .message-avatar {
  488. width: 48rpx;
  489. height: 48rpx;
  490. font-size: 32rpx;
  491. margin-right: 12rpx;
  492. flex-shrink: 0;
  493. display: flex;
  494. align-items: center;
  495. justify-content: center;
  496. }
  497. .message-bubble {
  498. max-width: 70%;
  499. padding: 16rpx 20rpx;
  500. font-size: 26rpx;
  501. line-height: 1.6;
  502. border-radius: 16rpx;
  503. word-break: break-word;
  504. }
  505. .user-bubble {
  506. background: var(--color-primary, #5B9BD5);
  507. color: #fff;
  508. border-bottom-right-radius: 4rpx;
  509. }
  510. .ai-bubble {
  511. background: #fff;
  512. color: var(--text, #1E293B);
  513. border-bottom-left-radius: 4rpx;
  514. box-shadow: 0 2rpx 8rpx rgba(0,0,0,0.04);
  515. }
  516. /* 输入区 */
  517. .chat-input-area {
  518. display: flex;
  519. align-items: center;
  520. padding: 16rpx 24rpx;
  521. padding-bottom: calc(16rpx + env(safe-area-inset-bottom));
  522. background: #fff;
  523. border-top: 1rpx solid var(--border-light, #E2E8F0);
  524. }
  525. .chat-input-wrap {
  526. flex: 1;
  527. background: var(--bg, #FFF7ED);
  528. border-radius: 40rpx;
  529. padding: 0 24rpx;
  530. margin-right: 16rpx;
  531. }
  532. .chat-input {
  533. height: 72rpx;
  534. font-size: 26rpx;
  535. color: var(--text, #1E293B);
  536. }
  537. .chat-send-btn {
  538. width: 72rpx;
  539. height: 72rpx;
  540. border-radius: 50%;
  541. background: var(--border-light, #E2E8F0);
  542. display: flex;
  543. align-items: center;
  544. justify-content: center;
  545. flex-shrink: 0;
  546. }
  547. .chat-send-active {
  548. background: var(--color-primary, #5B9BD5);
  549. }
  550. .send-icon {
  551. font-size: 28rpx;
  552. color: #fff;
  553. }
  554. /* 打字动画 */
  555. .typing {
  556. display: flex;
  557. align-items: center;
  558. gap: 4rpx;
  559. min-height: 40rpx;
  560. }
  561. .typing-dot {
  562. font-size: 40rpx;
  563. line-height: 1;
  564. animation: typingBounce 1.4s infinite;
  565. }
  566. .typing-dot:nth-child(2) {
  567. animation-delay: 0.2s;
  568. }
  569. .typing-dot:nth-child(3) {
  570. animation-delay: 0.4s;
  571. }
  572. @keyframes typingBounce {
  573. 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  574. 30% { opacity: 1; transform: translateY(-8rpx); }
  575. }
  576. /* 推荐卡片 */
  577. .ai-answer-text {
  578. display: block;
  579. margin-bottom: 16rpx;
  580. line-height: 1.7;
  581. }
  582. .rec-list {
  583. border-top: 1rpx solid var(--border-light, #E2E8F0);
  584. padding-top: 16rpx;
  585. display: flex;
  586. flex-direction: column;
  587. gap: 12rpx;
  588. }
  589. .rec-card {
  590. display: flex;
  591. flex-direction: row;
  592. background: var(--bg, #FFF7ED);
  593. border-radius: 12rpx;
  594. overflow: hidden;
  595. padding: 12rpx;
  596. }
  597. .rec-cover {
  598. width: 120rpx;
  599. height: 120rpx;
  600. border-radius: 8rpx;
  601. margin-right: 12rpx;
  602. flex-shrink: 0;
  603. background: #E2E8F0;
  604. }
  605. .rec-info {
  606. flex: 1;
  607. display: flex;
  608. flex-direction: column;
  609. gap: 4rpx;
  610. min-width: 0;
  611. }
  612. .rec-type-tag {
  613. display: inline-block;
  614. font-size: 18rpx;
  615. color: var(--color-primary, #5B9BD5);
  616. background: rgba(91, 155, 213, 0.1);
  617. padding: 2rpx 12rpx;
  618. border-radius: 8rpx;
  619. align-self: flex-start;
  620. }
  621. .rec-name {
  622. font-size: 26rpx;
  623. font-weight: 600;
  624. color: var(--text, #1E293B);
  625. overflow: hidden;
  626. text-overflow: ellipsis;
  627. white-space: nowrap;
  628. }
  629. .rec-desc {
  630. font-size: 22rpx;
  631. color: var(--text-secondary, #64748B);
  632. overflow: hidden;
  633. text-overflow: ellipsis;
  634. white-space: nowrap;
  635. }
  636. .rec-price {
  637. font-size: 26rpx;
  638. color: #F97316;
  639. font-weight: 600;
  640. }
  641. /* Mascot badge in nav */
  642. .mascot-badge {
  643. display: flex;
  644. align-items: center;
  645. gap: 4rpx;
  646. padding: 6rpx 16rpx;
  647. background: #EEF2FF;
  648. border-radius: 20rpx;
  649. font-size: 22rpx;
  650. }
  651. .mascot-badge-icon {
  652. font-size: 24rpx;
  653. }
  654. .mascot-badge-name {
  655. color: #6366F1;
  656. font-weight: 500;
  657. }
  658. </style>