You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

845 lines
20 KiB

1 month ago
  1. <template>
  2. <view class="deepMate-page">
  3. <!-- 顶部导航栏 -->
  4. <view class="header" :style="{ paddingTop: safeAreaInsets?.top + 'px' }">
  5. <view class="header-left">
  6. <image
  7. src="https://d31zlh4on95l9h.cloudfront.net/images/f91e09b5987802185e7679055dafd272.svg"
  8. class="icon"
  9. ></image>
  10. </view>
  11. <view class="header-center">
  12. <text class="title">DeepMate</text>
  13. </view>
  14. <view class="header-right">
  15. <image
  16. src="https://d31zlh4on95l9h.cloudfront.net/images/d7c4e74201213a25dd9574e908233928.svg"
  17. class="icon"
  18. ></image>
  19. <image
  20. src="https://d31zlh4on95l9h.cloudfront.net/images/099903c4aabf5713488b5cb60815e3f7.svg"
  21. class="icon"
  22. ></image>
  23. <!-- 新增新会话按钮
  24. <button class="new-chat-button" @click="newChat">
  25. <text class="new-chat-text">新会话</text>
  26. </button> -->
  27. </view>
  28. </view>
  29. <!-- 主要内容区域 -->
  30. <view class="main-content">
  31. <view class="banner-panel" v-if="messages.length === 0">
  32. <image src="https://d31zlh4on95l9h.cloudfront.net/images/42e18bd7fe97d4f4f37aa70439a0990b.svg" class="pray-banner" ></image>
  33. <view class="contain">
  34. <!-- 机器人头像和欢迎语 -->
  35. <view class="robot-container" v-if="messages.length === 0">
  36. <image src="https://d31zlh4on95l9h.cloudfront.net/images/61fa384381c88ad80be28f41827fe0e5.svg" class="robot-avatar"></image>
  37. <view class="welcome-message">
  38. <text class="greeting">Hi, 我是您的股市随身顾问~</text>
  39. <text class="description">个股诊断市场情绪解读都可以找我</text>
  40. </view>
  41. </view>
  42. <!-- 功能标签栏 -->
  43. <!-- <view class="function-tabs" v-if="messages.length === 0">
  44. <view ref="tabsTrack" class="tabs-track" :style="{ transform: 'translate3d(-' + marqueeOffset + 'px,0,0)' }">
  45. <view class="tab-item" v-for="(tab, idx) in marqueeList" :key="idx">{{ tab }}</view>
  46. </view>
  47. </view> -->
  48. <!-- 特斯拉推荐卡片 -->
  49. <view class="recommend-card" v-if="messages.length === 0">
  50. <view class="arrow" v-if="messages.length === 0"></view>
  51. <view class="card-content">
  52. <image src="../../static/images/tesla-logo.png" class="logo"></image>
  53. <view class="card-text">
  54. <text class="main-question">当前特斯拉该如何布局</text>
  55. <text class="stock-code">TSLA</text>
  56. </view>
  57. <image src="https://d31zlh4on95l9h.cloudfront.net/images/40d94054644f6e3f1c366751f07f0010.svg" class="arrow-icon" @click="goBlank"></image>
  58. </view>
  59. </view>
  60. </view>
  61. </view>
  62. <!-- 可能感兴趣的话题 -->
  63. <!-- <view v-if="messages.length === 0" class="interest-section">
  64. <text class="section-title">- 您可能感兴趣 -</text>
  65. <view class="topics-list">
  66. <view class="topic-item" v-for="topic in hotTopics" :key="topic.id">
  67. <image :src="topic.icon" class="tag-icon"></image>
  68. <text class="topic-text" @click="sendMessageList(topic.text)">{{
  69. topic.text
  70. }}</text>
  71. </view>
  72. </view>
  73. </view> -->
  74. <!-- 聊天区域 -->
  75. <view class="chat-container" v-if="messages.length > 0">
  76. <view class="message-list" id="messageList">
  77. <view
  78. v-for="(message, index) in messages"
  79. :key="index"
  80. :class="
  81. message.isUser ? 'message user-message' : 'message bot-message'
  82. "
  83. >
  84. <!-- 会话图标 -->
  85. <text
  86. :class="
  87. message.isUser
  88. ? 'fa-solid fa-user message-icon'
  89. : 'fa-solid fa-robot message-icon'
  90. "
  91. ></text>
  92. <!-- 会话内容 -->
  93. <view class="message-content">
  94. <text class="message-text">{{ message.content }}</text>
  95. <!-- loading -->
  96. <view
  97. class="loading-dots"
  98. v-if="message.isThinking || message.isTyping"
  99. >
  100. <text class="dot"></text>
  101. <text class="dot"></text>
  102. <text class="dot"></text>
  103. </view>
  104. </view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <!-- 输入框区域 -->
  110. <view class="input-area">
  111. <view class="input-wrapper">
  112. <input
  113. type="text"
  114. placeholder="请输入股票代码/名称,获取AI洞察"
  115. placeholder-style="color:#fff;opacity:1"
  116. class="input-field"
  117. v-model="inputMessage"
  118. @confirm="sendMessage"
  119. />
  120. <image class="send-button" @click="sendMessage" :disabled="isSending">
  121. <!-- <image
  122. src="https://d31zlh4on95l9h.cloudfront.net/images/95f1ea2262e9157db13c93c0dc1c5d96.svg"
  123. class="send-icon"
  124. ></image> -->
  125. </image>
  126. </view>
  127. <text class="disclaimer"
  128. >以上数据由AI生成不作为最终投资建议决策需独立</text
  129. >
  130. </view>
  131. <image
  132. class="back-to-top"
  133. src="https://d31zlh4on95l9h.cloudfront.net/images/ba357635d2bb480241952bb1cabacd73.svg"
  134. @click="scrollToTop"
  135. ></image>
  136. <footerBar class="static-footer" :type="type"></footerBar>
  137. </view>
  138. </template>
  139. <script setup>
  140. const { safeAreaInsets } = uni.getSystemInfoSync();
  141. import { ref, computed, onMounted, onUnmounted, watch, nextTick } from "vue";
  142. const type = ref('member')
  143. const inputMessage = ref("");
  144. const isSending = ref(false);
  145. const uuid = ref("");
  146. const messages = ref([]);
  147. const hotTopics = ref([
  148. {
  149. id: 1,
  150. text: "英伟达(NVDA)股票情绪温度?",
  151. icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
  152. },
  153. {
  154. id: 2,
  155. text: "博通(AVGO)明天还能涨吗?",
  156. icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
  157. },
  158. {
  159. id: 3,
  160. text: "为什么Fluence Energy(FLNC)会暴涨?",
  161. icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
  162. },
  163. {
  164. id: 4,
  165. text: "为什么Fluence Energy(FLNC)会暴涨?",
  166. icon: "https://d31zlh4on95l9h.cloudfront.net/images/7ed58be0f4b81aeb398d9ba2534a624b.svg",
  167. },
  168. ]);
  169. // 新增:tabs 列表用于渲染与轮换
  170. const tabsList = ref(['个股诊断', '市场情绪温度计', '买卖时机提示', '个股']);
  171. // 用于无缝滚动的引用与状态(兼容小程序/App)
  172. const tabsTrack = ref(null);
  173. const marqueeOffset = ref(0);
  174. let tabsTickId = 0;
  175. const marqueeSpeed = 0.6; // 像素/帧
  176. let currentThreshold = 0; // 当前第一个标签的宽度(含右外边距)
  177. // 统一 raf/caf(小程序端可能没有 rAF)
  178. const hasRAF = typeof requestAnimationFrame === 'function';
  179. const startFrame = (fn) => hasRAF ? requestAnimationFrame(fn) : setTimeout(fn, 16);
  180. const stopFrame = (id) => hasRAF ? cancelAnimationFrame(id) : clearTimeout(id);
  181. const measureFirstThreshold = (cb) => {
  182. if (!tabsList.value.length) { currentThreshold = 0; if (cb) cb(0); return; }
  183. const q = uni.createSelectorQuery();
  184. q.selectAll('.function-tabs .tab-item').boundingClientRect();
  185. q.exec(res => {
  186. if (res && res[0] && res[0].length) {
  187. const firstRect = res[0][0];
  188. const marginRightPx = uni.upx2px(20);
  189. currentThreshold = (firstRect?.width || 0) + marginRightPx;
  190. if (typeof cb === 'function') cb(currentThreshold);
  191. } else {
  192. // 若暂时无法获取,稍后重试一次
  193. setTimeout(() => measureFirstThreshold(cb), 16);
  194. }
  195. });
  196. };
  197. const startTabsMarquee = () => {
  198. stopFrame(tabsTickId);
  199. if (tabsList.value.length <= 1) return; // 单个标签不滚动
  200. marqueeOffset.value = 0;
  201. measureFirstThreshold(() => {
  202. const step = () => {
  203. marqueeOffset.value += marqueeSpeed;
  204. if (currentThreshold > 0 && marqueeOffset.value >= currentThreshold) {
  205. const first = tabsList.value.shift();
  206. if (first !== undefined) tabsList.value.push(first);
  207. marqueeOffset.value -= currentThreshold;
  208. measureFirstThreshold();
  209. }
  210. tabsTickId = startFrame(step);
  211. };
  212. nextTick(step);
  213. });
  214. };
  215. // 初始化
  216. onMounted(() => {
  217. initUUID();
  218. if (messages.value.length === 0) {
  219. nextTick(startTabsMarquee);
  220. }
  221. if (messages.value.length > 0) {
  222. nextTick(() => { scrollToBottom(); });
  223. }
  224. });
  225. // 当消息数量变化,控制滚动是否运行
  226. watch(messages, (val) => {
  227. if (val.length === 0) {
  228. nextTick(startTabsMarquee);
  229. } else {
  230. stopFrame(tabsTickId);
  231. }
  232. });
  233. onUnmounted(() => { stopFrame(tabsTickId); });
  234. // 初始化 UUID
  235. const initUUID = () => {
  236. let storedUUID = uni.getStorageSync("user_uuid");
  237. if (!storedUUID) {
  238. storedUUID = generateUUID();
  239. uni.setStorageSync("user_uuid", storedUUID);
  240. }
  241. uuid.value = storedUUID;
  242. };
  243. // 生成简单UUID
  244. const generateUUID = () => {
  245. return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (c) {
  246. var r = (Math.random() * 16) | 0,
  247. v = c == "x" ? r : (r & 0x3) | 0x8;
  248. return v.toString(16);
  249. });
  250. };
  251. // 新会话
  252. const newChat = () => {
  253. messages.value = [];
  254. uni.removeStorageSync("user_uuid");
  255. initUUID();
  256. };
  257. // 跳转到空白页
  258. const goBlank = () => {
  259. uni.navigateTo({
  260. url: "/pages/blank/blank",
  261. });
  262. };
  263. // 发送消息
  264. const sendMessage = () => {
  265. if (inputMessage.value.trim() === "" || isSending.value) return;
  266. const userMessage = {
  267. content: inputMessage.value,
  268. isUser: true,
  269. isThinking: false,
  270. isTyping: false,
  271. };
  272. messages.value.push(userMessage);
  273. inputMessage.value = "";
  274. // 滚动到底部
  275. nextTick(() => {
  276. scrollToBottom();
  277. });
  278. // 模拟机器人回复
  279. simulateBotResponse(userMessage.content);
  280. };
  281. // 发送消息
  282. const sendMessageList = (listMessage) => {
  283. console.log(listMessage);
  284. const userMessage = {
  285. content: listMessage,
  286. isUser: true,
  287. isThinking: false,
  288. isTyping: false,
  289. };
  290. messages.value.push(userMessage);
  291. inputMessage.value = "";
  292. // 滚动到底部
  293. nextTick(() => {
  294. scrollToBottom();
  295. });
  296. // 模拟机器人回复
  297. simulateBotResponse(userMessage.content);
  298. };
  299. // 模拟机器人回复
  300. const simulateBotResponse = (userMessage) => {
  301. isSending.value = true;
  302. // 添加机器人加载消息
  303. const botMsg = {
  304. content: "",
  305. isUser: false,
  306. isTyping: true,
  307. isThinking: false,
  308. };
  309. messages.value.push(botMsg);
  310. // 滚动到底部
  311. nextTick(() => {
  312. scrollToBottom();
  313. });
  314. // 模拟流式响应
  315. let responseText = `我已经收到您的消息: "${userMessage}"。作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?作为您的股市顾问,我可以为您提供专业的投资建议。请问您想了解哪方面的信息?`;
  316. let index = 0;
  317. const typeWriter = () => {
  318. if (index < responseText.length) {
  319. botMsg.content += responseText.charAt(index);
  320. index++;
  321. // 滚动到底部
  322. scrollToBottom();
  323. setTimeout(typeWriter, 30);
  324. } else {
  325. botMsg.isTyping = false;
  326. isSending.value = false;
  327. }
  328. };
  329. setTimeout(typeWriter, 500);
  330. };
  331. // 滚动到底部
  332. const scrollToBottom = () => {
  333. const query = uni.createSelectorQuery();
  334. query.select("#messageList").boundingClientRect();
  335. query.selectViewport().scrollOffset();
  336. query.exec((res) => {
  337. if (res[0] && res[1]) {
  338. uni.pageScrollTo({
  339. scrollTop: res[0].height,
  340. duration: 100,
  341. });
  342. }
  343. });
  344. };
  345. const scrollToTop = () => {
  346. uni.pageScrollTo({ scrollTop: 0, duration: 200 });
  347. };
  348. </script>
  349. <style scoped>
  350. .deepMate-page {
  351. display: flex;
  352. flex-direction: column;
  353. height: 100vh;
  354. background-color: #ffffff;
  355. padding: 20rpx 0rpx;
  356. }
  357. .header {
  358. display: flex;
  359. justify-content: space-between;
  360. align-items: center;
  361. padding: 20rpx 30rpx;
  362. background-color: #ffffff;
  363. }
  364. .header-left,
  365. .header-right {
  366. display: flex;
  367. align-items: center;
  368. }
  369. .header-left .icon,
  370. .header-right .icon {
  371. width: 40rpx;
  372. height: 40rpx;
  373. margin-right: 20rpx;
  374. }
  375. .header-center .title {
  376. font-size: 36rpx;
  377. font-weight: bold;
  378. color: #333333;
  379. }
  380. .new-chat-button {
  381. background-color: #ff6600;
  382. border: none;
  383. border-radius: 8rpx;
  384. padding: 10rpx 20rpx;
  385. }
  386. .new-chat-text {
  387. color: white;
  388. font-size: 24rpx;
  389. }
  390. .main-content {
  391. flex: 1;
  392. padding: 20rpx;
  393. overflow-y: auto;
  394. margin-top: 20rpx;
  395. margin-bottom: 120rpx;
  396. }
  397. .robot-container {
  398. display: flex;
  399. align-items: center;
  400. margin-top: 30rpx;
  401. }
  402. .robot-avatar {
  403. width: 130rpx;
  404. height: 130rpx;
  405. border-radius: 50%;
  406. margin-left: 20rpx;
  407. }
  408. .welcome-message {
  409. flex: 1;
  410. }
  411. .greeting {
  412. font-size: 32rpx;
  413. margin-left: 50rpx;
  414. top: 40rpx;
  415. font-weight: bold;
  416. color: #333333;
  417. line-height: 48rpx;
  418. }
  419. .description {
  420. display: block;
  421. font-size: 24rpx;
  422. color: #666666;
  423. line-height: 36rpx;
  424. margin-top: 10rpx;
  425. margin-left: 45rpx;
  426. }
  427. .function-tabs {
  428. display: block;
  429. overflow: hidden;
  430. margin-bottom: 30rpx;
  431. }
  432. .tabs-track {
  433. display: inline-flex;
  434. white-space: nowrap;
  435. will-change: transform;
  436. }
  437. .tab-item {
  438. padding: 5rpx 20rpx;
  439. border-radius: 20rpx;
  440. font-size: 20rpx;
  441. font-weight: 700;
  442. color: #666666;
  443. background-color: #fffefe;
  444. margin-right: 20rpx;
  445. transition: all 0.3s;
  446. }
  447. .tab-item.active {
  448. color: #ff6600;
  449. background-color: #fff;
  450. border: 1rpx solid #ff6600;
  451. }
  452. .recommend-card {
  453. background: url("https://d31zlh4on95l9h.cloudfront.net/images/4da1d629a55c307c3605ca15bf15189a.svg");
  454. background-repeat: no-repeat;
  455. background-size: 100% 100%;
  456. /* border-radius: 20rpx; */
  457. padding: 40rpx;
  458. margin-top: 20rpx;
  459. margin-bottom: 10rpx;
  460. /* box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05); */
  461. }
  462. .card-content {
  463. display: flex;
  464. align-items: center;
  465. justify-content: space-between;
  466. }
  467. .logo {
  468. width: 80rpx;
  469. height: 80rpx;
  470. background-color: #ff0000;
  471. border-radius: 10rpx;
  472. display: flex;
  473. align-items: center;
  474. justify-content: center;
  475. margin-right: 20rpx;
  476. }
  477. .card-text {
  478. flex: 1;
  479. margin-left: 20rpx;
  480. }
  481. .main-question {
  482. font-size: 32rpx;
  483. color: #333333;
  484. line-height: 48rpx;
  485. }
  486. .stock-code {
  487. display: block;
  488. font-size: 24rpx;
  489. color: #ff3b30;
  490. background-color: #ffffff;
  491. padding: 2rpx 15rpx;
  492. border-radius: 12rpx;
  493. margin-top: 8rpx;
  494. width: fit-content;
  495. border: 1rpx solid #ff3b30;
  496. }
  497. .arrow-icon {
  498. background: url("https://d31zlh4on95l9h.cloudfront.net/images/40d94054644f6e3f1c366751f07f0010.svg");
  499. background-repeat: no-repeat;
  500. left: 0.5rem;
  501. top: 1.8rem;
  502. background-size: 100% 100%;
  503. width: 60rpx;
  504. height: 60rpx;
  505. }
  506. .interest-section {
  507. margin-bottom: 30rpx;
  508. }
  509. .section-title {
  510. display: block;
  511. text-align: center;
  512. font-size: 26rpx;
  513. color: #666666;
  514. margin-bottom: 20rpx;
  515. }
  516. .topics-list {
  517. display: flex;
  518. flex-direction: column;
  519. gap: 15rpx;
  520. }
  521. .topic-item {
  522. display: flex;
  523. align-items: center;
  524. padding: 15rpx 20rpx;
  525. background-color: #f0f0f0;
  526. border-radius: 15rpx;
  527. width: fit-content;
  528. }
  529. .tag-icon {
  530. width: 24rpx;
  531. height: 24rpx;
  532. margin-right: 10rpx;
  533. }
  534. .topic-text {
  535. font-size: 28rpx;
  536. color: #333333;
  537. flex: 1;
  538. }
  539. /* 聊天区域样式 */
  540. .chat-container {
  541. margin-top: 30rpx;
  542. border-radius: 10rpx;
  543. height: fit-content;
  544. /* overflow-y: auto; */
  545. }
  546. .message-list {
  547. /* padding: 20rpx; */
  548. }
  549. .message {
  550. display: flex;
  551. align-items: flex-start;
  552. margin-bottom: 30rpx;
  553. }
  554. .user-message {
  555. flex-direction: row-reverse;
  556. }
  557. .message-icon {
  558. font-size: 24rpx;
  559. margin: 0 10rpx;
  560. padding: 10rpx;
  561. border-radius: 50%;
  562. background-color: #ddd;
  563. width: 40rpx;
  564. height: 40rpx;
  565. display: flex;
  566. align-items: center;
  567. justify-content: center;
  568. }
  569. .user-message .message-icon {
  570. background-color: #007aff;
  571. color: white;
  572. }
  573. .bot-message .message-icon {
  574. background-color: #34c759;
  575. color: white;
  576. }
  577. .message-content {
  578. max-width: 70%;
  579. position: relative;
  580. }
  581. .user-message .message-content {
  582. background-color: #007aff;
  583. border-radius: 10rpx;
  584. padding: 15rpx;
  585. }
  586. .bot-message .message-content {
  587. background-color: #f0f0f0;
  588. border-radius: 10rpx;
  589. padding: 15rpx;
  590. }
  591. .message-text {
  592. font-size: 28rpx;
  593. line-height: 40rpx;
  594. }
  595. .user-message .message-text {
  596. color: white;
  597. }
  598. .bot-message .message-text {
  599. color: #333;
  600. }
  601. .loading-dots {
  602. display: flex;
  603. align-items: center;
  604. padding-top: 10rpx;
  605. }
  606. .dot {
  607. width: 10rpx;
  608. height: 10rpx;
  609. background-color: #666;
  610. border-radius: 50%;
  611. margin: 0 4rpx;
  612. animation: loading 1.4s infinite ease-in-out both;
  613. }
  614. .user-message .dot {
  615. background-color: white;
  616. }
  617. .dot:nth-child(1) {
  618. animation-delay: -0.32s;
  619. }
  620. .dot:nth-child(2) {
  621. animation-delay: -0.16s;
  622. }
  623. @keyframes loading {
  624. 0%,
  625. 80%,
  626. 100% {
  627. transform: scale(0);
  628. }
  629. 40% {
  630. transform: scale(1);
  631. }
  632. }
  633. .input-area {
  634. position: fixed;
  635. bottom: 0;
  636. left: 0;
  637. right: 0;
  638. padding: 0 40rpx 80rpx 40rpx;
  639. background-color: #ffffff;
  640. }
  641. .input-wrapper {
  642. position: relative;
  643. display: flex;
  644. align-items: center;
  645. padding: 15rpx 20rpx;
  646. background-color: rgb(220, 31, 29);
  647. border-radius: 100rpx;
  648. display: flex;
  649. align-items: center;
  650. justify-content: center;
  651. height: 50rpx;
  652. }
  653. .mic-icon {
  654. width: 36rpx;
  655. height: 36rpx;
  656. margin-right: 20rpx;
  657. }
  658. .input-field {
  659. flex: 1;
  660. font-size: 28rpx;
  661. color: #fff;
  662. display: flex;
  663. align-items: center;
  664. justify-content: center;
  665. margin-left: 60rpx;
  666. background: none;
  667. border: none;
  668. outline: none;
  669. }
  670. .input-field::placeholder {
  671. color: #ffffff !important;
  672. opacity: 1;
  673. }
  674. .send-button {
  675. background: url("https://d31zlh4on95l9h.cloudfront.net/images/95f1ea2262e9157db13c93c0dc1c5d96.svg");
  676. background-repeat: no-repeat;
  677. background-size: 100% 100%;
  678. height: 50rpx;
  679. width: 50rpx;
  680. padding: 0;
  681. border: 1rpx solid transparent;
  682. margin-left: 20rpx;
  683. }
  684. .send-icon {
  685. width: 36rpx;
  686. height: 36rpx;
  687. }
  688. .disclaimer {
  689. font-size: 15rpx;
  690. color: #4d4c4c;
  691. display: flex;
  692. align-items: center;
  693. justify-content: center;
  694. margin-top: 15rpx;
  695. }
  696. .banner-panel {
  697. position: relative;
  698. height: 480rpx; /* 拉长容器,灰色背景跟随变高 */
  699. overflow: hidden; /* 让圆角和内部层剪裁一致 */
  700. border-radius: 15rpx;
  701. }
  702. .panelShow{
  703. height: 12%;
  704. }
  705. .pray-banner {
  706. position: absolute;
  707. /* background-size: 100% 100%; */
  708. inset: 0; /* 顶部、底部、左、右都贴合容器 */
  709. width: 100%;
  710. height: 88%;
  711. border-radius: 15rpx;
  712. z-index: 1; /* 在灰底之上、内容之下 */
  713. }
  714. .contain {
  715. margin: 0 20rpx;
  716. gap: 5rpx;
  717. }
  718. .banner-panel .robot-container,
  719. .banner-panel .function-tabs,
  720. .banner-panel .recommend-card {
  721. position: relative;
  722. z-index: 2;
  723. }
  724. .back-to-top {
  725. position: fixed;
  726. right: 30rpx;
  727. bottom: 35%;
  728. width: 100rpx;
  729. height: 100rpx;
  730. z-index: 1000;
  731. }
  732. .back-to-top:active {
  733. transform: scale(0.96);
  734. }
  735. .static-footer {
  736. position: fixed;
  737. bottom: 0;
  738. }
  739. </style>