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.

146 lines
2.7 KiB

  1. <!-- 自选股页面 -->
  2. <template>
  3. <view class="container">
  4. <!-- 自定义导航栏 -->
  5. <view class="custom-navbar">
  6. <view class="navbar-content">
  7. <view class="navbar-left">
  8. <view class="back-btn" @click="goBack">
  9. <image class="back-icon" src="https://d31zlh4on95l9h.cloudfront.net/images/e5c501fd23303533622fadce8dedd6a0.png" mode="aspectFit"></image>
  10. </view>
  11. </view>
  12. <view class="navbar-center">
  13. <text class="navbar-title">我的自选</text>
  14. </view>
  15. <view class="navbar-right">
  16. <image
  17. class="navbar-btn"
  18. src="https://d31zlh4on95l9h.cloudfront.net/images/ba5c8a2eda065274e868bcd9b2d7d914.png"
  19. @click="onFirstButtonClick"
  20. mode="aspectFit"
  21. ></image>
  22. <image
  23. class="navbar-btn"
  24. src="https://d31zlh4on95l9h.cloudfront.net/images/a4ae8952aeae90dac6d2b4c221c65fa9.png"
  25. @click="onSecondButtonClick"
  26. mode="aspectFit"
  27. ></image>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 页面内容 -->
  32. <view class="page-content">
  33. </view>
  34. </view>
  35. </template>
  36. <script>
  37. export default {
  38. data() {
  39. return {
  40. }
  41. },
  42. methods: {
  43. // 返回上一页
  44. goBack() {
  45. uni.navigateBack()
  46. },
  47. // 第一个按钮点击事件
  48. onFirstButtonClick() {
  49. console.log('第一个按钮被点击')
  50. // 这里可以添加具体的功能逻辑
  51. },
  52. // 第二个按钮点击事件
  53. onSecondButtonClick() {
  54. console.log('第二个按钮被点击')
  55. // 这里可以添加具体的功能逻辑
  56. }
  57. }
  58. }
  59. </script>
  60. <style>
  61. .container {
  62. width: 100%;
  63. height: 100vh;
  64. background-color: #f5f5f5;
  65. }
  66. /* 自定义导航栏 */
  67. .custom-navbar {
  68. position: fixed;
  69. top: 0;
  70. left: 0;
  71. right: 0;
  72. z-index: 999;
  73. background-color: #ffffff;
  74. border-bottom: 1px solid #e5e5e5;
  75. }
  76. .navbar-content {
  77. display: flex;
  78. align-items: center;
  79. justify-content: space-between;
  80. height: 44px;
  81. padding: 0 15px;
  82. /* 适配状态栏高度 */
  83. padding-top: var(--status-bar-height, 20px);
  84. min-height: calc(44px + var(--status-bar-height, 20px));
  85. }
  86. .navbar-left {
  87. flex: 0 0 auto;
  88. display: flex;
  89. align-items: center;
  90. }
  91. .back-btn {
  92. width: 40px;
  93. height: 40px;
  94. display: flex;
  95. align-items: center;
  96. justify-content: center;
  97. }
  98. .back-icon {
  99. width: 24px;
  100. height: 24px;
  101. }
  102. .navbar-center {
  103. flex: 1;
  104. display: flex;
  105. align-items: center;
  106. justify-content: center;
  107. }
  108. .navbar-title {
  109. font-size: 18px;
  110. font-weight: 500;
  111. color: #333333;
  112. }
  113. .navbar-right {
  114. flex: 0 0 auto;
  115. display: flex;
  116. align-items: center;
  117. gap: 10px;
  118. }
  119. .navbar-btn {
  120. width: 24px;
  121. height: 24px;
  122. }
  123. /* 页面内容 */
  124. .page-content {
  125. padding-top: calc(44px + var(--status-bar-height, 20px) + 1px);
  126. min-height: calc(100vh - 44px - var(--status-bar-height, 20px) - 1px);
  127. }
  128. </style>