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.

457 lines
12 KiB

4 weeks ago
4 weeks ago
4 weeks ago
  1. <template>
  2. <view class="main">
  3. <!-- 顶部状态栏占位 -->
  4. <view class="top" :style="{ height: iSMT + 'px' }"></view>
  5. <!-- 标题图标部分 -->
  6. <deepExploration_header></deepExploration_header>
  7. <view class="search">
  8. <input
  9. v-model="stockName"
  10. class="searchInput"
  11. type="text"
  12. placeholder="请输入股票名称、股票代码"
  13. placeholder-style="color: #A6A6A6; font-size: 22rpx;"
  14. />
  15. <image
  16. @click="searchStock"
  17. class="seachIcon"
  18. src="/static/deepExploration-images/search.png"
  19. mode="aspectFill"
  20. ></image>
  21. </view>
  22. <!-- 四大功能模块 -->
  23. <view class="select">
  24. <view class="selectItem" @click="toMain('主力追踪')">
  25. <image
  26. class="img"
  27. src="/static/deepExploration-images/icon3.png"
  28. mode="aspectFill"
  29. ></image>
  30. <view class="txt">主力追踪</view>
  31. </view>
  32. <view class="selectItem" @click="toMain('主力雷达')">
  33. <image
  34. class="img"
  35. src="/static/deepExploration-images/icon2.png"
  36. mode="aspectFill"
  37. ></image>
  38. <view class="txt">主力雷达</view>
  39. </view>
  40. <view class="selectItem" @click="toMain('主力解码')">
  41. <image
  42. class="img"
  43. src="/static/deepExploration-images/icon1.png"
  44. mode="aspectFill"
  45. ></image>
  46. <view class="txt">主力解码</view>
  47. </view>
  48. <view class="selectItem" @click="toMain('主力资金流')">
  49. <image
  50. class="img"
  51. src="/static/deepExploration-images/icon4.png"
  52. mode="aspectFill"
  53. ></image>
  54. <view class="txt">主力资金流</view>
  55. </view>
  56. </view>
  57. <!-- 灰色间隔 -->
  58. <view class="gap"></view>
  59. <!-- 选股策略 -->
  60. <view class="stockSelection">
  61. <view class="stockSelection_top">
  62. <view class="txt">
  63. <text>选股策略</text>
  64. </view>
  65. <view class="viewAll" @click="viewAll">
  66. <text>查看全部</text>
  67. </view>
  68. </view>
  69. <view class="stockSelection_content">
  70. <view class="selectionItem">
  71. <view class="header">
  72. <view class="left">
  73. <image
  74. src="/static/deepExploration-images/plus.png"
  75. mode="aspectFill"
  76. ></image>
  77. <text>抄底卖顶</text>
  78. </view>
  79. <view class="right">
  80. <image
  81. src="/static/deepExploration-images/Americle.png"
  82. mode="aspectFill"
  83. ></image>
  84. <text>美股</text>
  85. </view>
  86. </view>
  87. <view class="content">
  88. <view class="contentTitle">
  89. <view class="contentTitle_name">股票名称</view>
  90. <view class="contentTitle_close">最新收盘价</view>
  91. <view class="contentTitle_price">选股价格</view>
  92. </view>
  93. <view class="contentItem">
  94. <view class="row" v-for="(item, index) in stockData" :key="index">
  95. <view class="nameItem">{{ item.name }}</view>
  96. <view class="closeItem">{{ item.close }}</view>
  97. <view class="priceItem">{{ item.select }}</view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. </view>
  103. <view class="stockSelection_content">
  104. <view class="selectionItem">
  105. <view class="header">
  106. <view class="left">
  107. <image
  108. src="/static/deepExploration-images/plus.png"
  109. mode="aspectFill"
  110. ></image>
  111. <text>抄底卖顶</text>
  112. </view>
  113. <view class="right">
  114. <image
  115. src="/static/deepExploration-images/Americle.png"
  116. mode="aspectFill"
  117. ></image>
  118. <text>美股</text>
  119. </view>
  120. </view>
  121. <view class="content">
  122. <view class="contentTitle">
  123. <view class="contentTitle_name">股票名称</view>
  124. <view class="contentTitle_close">最新收盘价</view>
  125. <view class="contentTitle_price">选股价格</view>
  126. </view>
  127. <view class="contentItem">
  128. <view class="row" v-for="(item, index) in stockData" :key="index">
  129. <view class="nameItem">{{ item.name }}</view>
  130. <view class="closeItem">{{ item.close }}</view>
  131. <view class="priceItem">{{ item.select }}</view>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </view>
  138. <footerBar class="static-footer" :type="type"></footerBar>
  139. <LoginPrompt ref="loginPrompt"></LoginPrompt>
  140. </view>
  141. </template>
  142. <script setup>
  143. import { ref, onMounted } from "vue";
  144. import footerBar from "@/components/footerBar.vue";
  145. import deepExploration_header from "@/components/deepExploration_header.vue";
  146. const type = ref("deepExploration");
  147. const iSMT = ref(0);
  148. //查看全部选股策略
  149. const toMain = (val) => {
  150. if (val == "主力追踪") {
  151. uni.navigateTo({
  152. url: "/pages/deepExploration/MainForceActions?index=1",
  153. });
  154. } else if (val == "主力雷达") {
  155. uni.navigateTo({
  156. url: "/pages/deepExploration/MainForceActions?index=2",
  157. });
  158. } else if (val == "主力解码") {
  159. uni.navigateTo({
  160. url: "/pages/deepExploration/MainForceActions?index=3",
  161. });
  162. } else if (val == "主力资金流") {
  163. uni.navigateTo({
  164. url: "/pages/deepExploration/MainForceActions?index=4",
  165. });
  166. }
  167. };
  168. const stockName = ref("");
  169. //搜索股票
  170. const searchStock = () => {
  171. console.log("搜索参数:", stockName.value);
  172. uni.navigateTo({
  173. url: `/pages/deepExploration/MainForceActions?stockName=${stockName.value}`,
  174. });
  175. };
  176. //查看全部选股策略
  177. const viewAll = () => {
  178. uni.navigateTo({
  179. url: "/pages/deepExploration/stockSelectDetail",
  180. });
  181. };
  182. //选股策略数据
  183. const stockData = [
  184. {
  185. name: "(MKTW)MarketWise Inc",
  186. close: "$14.190",
  187. select: "$13.180",
  188. },
  189. {
  190. name: "(MTCH)Match Group Inc",
  191. close: "$32.120",
  192. select: "$28.120",
  193. },
  194. {
  195. name: "(MKTW)MarketWise Inc",
  196. close: "$14.190",
  197. select: "$13.180",
  198. },
  199. ];
  200. onMounted(() => {
  201. // 状态栏高度
  202. iSMT.value = uni.getSystemInfoSync().statusBarHeight;
  203. });
  204. </script>
  205. <style scoped lang="scss">
  206. .main {
  207. width: 100%;
  208. height: 100vh;
  209. background-color: #fff;
  210. .search {
  211. position: relative;
  212. display: flex;
  213. align-items: center;
  214. background-color: #f3f3f3;
  215. width: calc(100% - 60rpx);
  216. height: 80rpx;
  217. border-radius: 50rpx;
  218. box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.1);
  219. padding: 0 40rpx;
  220. margin: 15rpx 30rpx 0 30rpx;
  221. .seachIcon {
  222. position: absolute;
  223. right: 50rpx;
  224. width: 32rpx;
  225. height: 32rpx;
  226. }
  227. .searchInput {
  228. color: #111;
  229. }
  230. }
  231. .select {
  232. display: flex;
  233. padding: 60rpx 10rpx 30rpx 30rpx;
  234. gap: 70rpx;
  235. align-items: center;
  236. justify-content: center;
  237. .selectItem {
  238. .img {
  239. width: 80rpx;
  240. height: 80rpx;
  241. display: block;
  242. margin: 0 auto;
  243. }
  244. .txt {
  245. color: #6a6a6a;
  246. font-family: "PingFang SC";
  247. font-size: 11px;
  248. font-style: normal;
  249. font-weight: 400;
  250. line-height: 14.5px;
  251. margin-top: 13rpx;
  252. white-space: nowrap;
  253. }
  254. }
  255. }
  256. .gap {
  257. width: 100%;
  258. height: 15rpx;
  259. background-color: #f3f3f3;
  260. }
  261. .stockSelection {
  262. width: 100%;
  263. padding: 32rpx 15rpx;
  264. .stockSelection_top {
  265. display: flex;
  266. justify-content: space-between;
  267. .txt {
  268. color: #000000;
  269. font-family: "PingFang SC";
  270. font-size: 38rpx;
  271. font-style: normal;
  272. font-weight: 400;
  273. line-height: 50rpx;
  274. }
  275. .viewAll {
  276. background-color: #000000;
  277. border-radius: 10rpx;
  278. padding: 6rpx 20rpx;
  279. color: #ffffff;
  280. font-family: "PingFang SC";
  281. font-size: 10rpx;
  282. font-style: normal;
  283. font-weight: 100;
  284. line-height: 29rpx;
  285. height: 40rpx;
  286. }
  287. }
  288. .stockSelection_content {
  289. .selectionItem {
  290. background-color: #f3f3f3;
  291. padding: 30rpx 15rpx 17rpx 30rpx;
  292. border-radius: 30rpx;
  293. margin-top: 30rpx;
  294. .header {
  295. display: flex;
  296. justify-content: space-between;
  297. align-items: center;
  298. .left {
  299. display: flex;
  300. justify-content: space-between;
  301. align-items: center;
  302. image {
  303. display: flex;
  304. justify-content: center;
  305. align-items: center;
  306. width: 15rpx;
  307. height: 15rpx;
  308. }
  309. text {
  310. margin-left: 15rpx;
  311. color: #000000;
  312. font-family: "PingFang SC";
  313. font-size: 28rpx;
  314. font-style: normal;
  315. font-weight: 400;
  316. line-height: 18.5px;
  317. }
  318. }
  319. .right {
  320. display: flex;
  321. justify-content: space-between;
  322. align-items: center;
  323. border-radius: 15rpx;
  324. background-color: #ffffff;
  325. padding: 6rpx 20rpx;
  326. image {
  327. display: flex;
  328. justify-content: center;
  329. align-items: center;
  330. width: 40rpx;
  331. height: 26.5rpx;
  332. }
  333. text {
  334. margin-left: 10rpx;
  335. color: #6a6a6a;
  336. font-family: "PingFang SC";
  337. font-size: 18rpx;
  338. font-style: normal;
  339. font-weight: 400;
  340. line-height: 24rpx;
  341. }
  342. }
  343. }
  344. .content {
  345. .contentTitle {
  346. display: flex;
  347. color: #6a6a6a;
  348. font-family: "PingFang SC";
  349. font-size: 11px;
  350. font-style: normal;
  351. font-weight: 400;
  352. line-height: 14.5px;
  353. margin-top: 24rpx;
  354. margin-bottom: 20rpx;
  355. .contentTitle_name {
  356. width: 100rpx;
  357. }
  358. .contentTitle_close {
  359. width: 130rpx;
  360. margin-left: 260rpx;
  361. }
  362. .contentTitle_price {
  363. width: 120rpx;
  364. margin-left: 60rpx;
  365. }
  366. }
  367. .contentItem {
  368. .row {
  369. display: flex;
  370. box-shadow: 0 -2rpx 5rpx rgba(0, 0, 0, 0.05);
  371. padding: 10rpx 0;
  372. margin-bottom: 10rpx;
  373. .nameItem {
  374. width: 260rpx;
  375. white-space: nowrap;
  376. overflow: hidden;
  377. text-overflow: ellipsis;
  378. color: #000000;
  379. font-family: "PingFang SC";
  380. font-size: 13px;
  381. font-style: normal;
  382. font-weight: 400;
  383. line-height: 17.5px;
  384. }
  385. .closeItem {
  386. width: 120rpx;
  387. margin-left: 100rpx;
  388. color: #25ba5d;
  389. font-family: "PingFang SC";
  390. font-size: 13px;
  391. font-style: normal;
  392. font-weight: 400;
  393. line-height: 17.5px;
  394. }
  395. .priceItem {
  396. width: 120rpx;
  397. margin-left: 73rpx;
  398. color: #25ba5d;
  399. font-family: "PingFang SC";
  400. font-size: 13px;
  401. font-style: normal;
  402. font-weight: 400;
  403. line-height: 17.5px;
  404. }
  405. }
  406. }
  407. }
  408. }
  409. }
  410. }
  411. .static-footer {
  412. position: fixed;
  413. bottom: 0;
  414. }
  415. }
  416. * {
  417. box-sizing: border-box;
  418. }
  419. </style>