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.

276 lines
5.1 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <view class="deepmate">
  3. <view class="deepmate-container">
  4. <view class="deepmate-header">
  5. <view class="title-container">
  6. <view class="title-left">
  7. <text class="deepmate-title">DeepMate</text>
  8. <text class="deepmate-subtitle">您的市场最佳顾问~</text>
  9. </view>
  10. <view class="title-right">
  11. <view class="icon-container">
  12. <view class="ripple-effect ripple-1"></view>
  13. <view class="ripple-effect ripple-2"></view>
  14. <view class="ripple-effect ripple-3"></view>
  15. <image class="deepmate-icon" src="https://d31zlh4on95l9h.cloudfront.net/images/7faa683450cc071bcc746fea8191ff6b.png" mode="aspectFit"></image>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="deepmate-content">
  21. <view class="deepmate-hotspots">
  22. <view class="deepmate-question">
  23. <text class="question-text">今日股票策略晨报</text>
  24. </view>
  25. <view class="hotspot-item">
  26. <text>热门股票分析</text>
  27. </view>
  28. <view class="hotspot-item">
  29. <text>行业趋势预测</text>
  30. </view>
  31. <view class="hotspot-item">
  32. <text>市场风险提示</text>
  33. </view>
  34. <!-- <view class="hotspot-item">
  35. <text>投资策略建议</text>
  36. </view>
  37. <view class="hotspot-item">
  38. <text>财经新闻解读</text>
  39. </view> -->
  40. </view>
  41. <view class="deepmate-action">
  42. <input class="stock-input" type="text" v-model="stockInput" placeholder="请输入股票代码/名称,获取AI洞察" />
  43. <view class="send-button-container" @click="sendStockQuery">
  44. <image class="send-button" src="https://d31zlh4on95l9h.cloudfront.net/images/3da018821a5c82b06a1d6ddc81b960ac.png" mode="aspectFit"></image>
  45. </view>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </template>
  51. <script>
  52. export default {
  53. name: 'DeepMate',
  54. data() {
  55. return {
  56. stockInput: ''
  57. }
  58. },
  59. methods: {
  60. sendStockQuery() {
  61. // 检测输入内容是否为空
  62. if (!this.stockInput.trim()) {
  63. uni.showToast({
  64. title: '请输入股票代码或名称',
  65. icon: 'none'
  66. });
  67. return;
  68. }
  69. // 跳转到深度探索页面并携带用户输入的内容
  70. uni.navigateTo({
  71. url: `/pages/home/deepExploration?query=${encodeURIComponent(this.stockInput)}`
  72. });
  73. }
  74. }
  75. }
  76. </script>
  77. <style>
  78. /* DeepMate样式 */
  79. .deepmate-container {
  80. background-color: #ffe6e6;
  81. border-radius: 10px;
  82. padding: 15px 15px 15px 15px;
  83. margin: 0;
  84. width: 100%;
  85. box-sizing: border-box;
  86. overflow: hidden;
  87. }
  88. .deepmate-header {
  89. margin-bottom: 10px;
  90. }
  91. .title-container {
  92. display: flex;
  93. align-items: center;
  94. justify-content: space-between;
  95. width: 100%;
  96. }
  97. .title-left {
  98. width: 50%;
  99. display: flex;
  100. flex-direction: column;
  101. }
  102. .title-right {
  103. width: 50%;
  104. display: flex;
  105. justify-content: center;
  106. align-items: center;
  107. }
  108. .deepmate-title {
  109. font-size: 18px;
  110. font-weight: bold;
  111. color: #ff4d4f;
  112. display: block;
  113. }
  114. .deepmate-icon {
  115. width: 50px;
  116. height: 50px;
  117. margin-left: 0;
  118. }
  119. .deepmate-subtitle {
  120. font-size: 12px;
  121. color: #666;
  122. display: block;
  123. margin-top: 5px;
  124. }
  125. .deepmate-hotspots {
  126. margin: 10px 0;
  127. background-color: #ffffff;
  128. border-radius: 10px;
  129. padding: 10px;
  130. }
  131. .deepmate-question {
  132. display: flex;
  133. align-items: center;
  134. margin-bottom: 10px;
  135. padding-left: 10px;
  136. position: relative;
  137. }
  138. .deepmate-question:before {
  139. content: "";
  140. position: absolute;
  141. left: 0;
  142. top: 0;
  143. bottom: 0;
  144. width: 4px;
  145. background-color: #ff4d4f;
  146. border-radius: 2px;
  147. }
  148. .question-text {
  149. font-size: 16px;
  150. font-weight: bold;
  151. color: #333;
  152. }
  153. .hotspot-item {
  154. background-color: #f5f5f5;
  155. padding: 8px 12px;
  156. border-radius: 6px;
  157. margin-bottom: 8px;
  158. }
  159. .hotspot-item text {
  160. font-size: 14px;
  161. color: #333;
  162. }
  163. .deepmate-action {
  164. display: flex;
  165. justify-content: space-between;
  166. align-items: center;
  167. background-color: #ff4d4f;
  168. padding: 8px 15px;
  169. border-radius: 25px;
  170. margin-top: 10px;
  171. border: none;
  172. }
  173. .stock-input {
  174. flex: 1;
  175. height: 36px;
  176. font-size: 14px;
  177. color: #ffffff;
  178. padding: 0 10px;
  179. border: none;
  180. background-color: transparent;
  181. }
  182. .stock-input::placeholder {
  183. color: rgba(255, 255, 255, 0.8);
  184. }
  185. .send-button-container {
  186. display: flex;
  187. justify-content: center;
  188. align-items: center;
  189. width: 36px;
  190. height: 36px;
  191. background-color: #ffffff;
  192. border-radius: 50%;
  193. margin-left: 10px;
  194. }
  195. .send-button {
  196. width: 20px;
  197. height: 20px;
  198. }
  199. .icon-container {
  200. position: relative;
  201. width: 50px;
  202. height: 50px;
  203. border-radius: 50%;
  204. display: flex;
  205. justify-content: center;
  206. align-items: center;
  207. background-color: #f0f8ff;
  208. }
  209. .deepmate-icon {
  210. width: 40px;
  211. height: 40px;
  212. border-radius: 50%;
  213. z-index: 5;
  214. }
  215. .ripple-effect {
  216. position: absolute;
  217. border-radius: 50%;
  218. background: radial-gradient(circle, rgba(255, 0, 0, 0.4) 0%, rgba(255, 0, 0, 0.1) 70%);
  219. animation-name: ripple;
  220. animation-duration: 3s;
  221. animation-timing-function: ease-out;
  222. animation-iteration-count: infinite;
  223. }
  224. .ripple-1 {
  225. width: 100%;
  226. height: 100%;
  227. animation-delay: 0s;
  228. }
  229. .ripple-2 {
  230. width: 100%;
  231. height: 100%;
  232. animation-delay: 1s;
  233. }
  234. .ripple-3 {
  235. width: 100%;
  236. height: 100%;
  237. animation-delay: 2s;
  238. }
  239. @keyframes ripple {
  240. 0% {
  241. transform: scale(0.8);
  242. opacity: 1;
  243. }
  244. 100% {
  245. transform: scale(1.5);
  246. opacity: 0;
  247. }
  248. }
  249. </style>