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.

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