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.

220 lines
5.7 KiB

  1. <template>
  2. <view class="main">
  3. <view :style="{height:iSMT+'px'}"></view>
  4. <view class="time-share-title">
  5. <text>分时设计</text>
  6. </view>
  7. <view style="height:57.5vh;background-color: white;">
  8. <view class="title">A股竞价</view>
  9. <view class="top-options">
  10. <view class="option-btn" :class="{ 'active': aStockBid === 0 }" @click="aStockBid = 0">
  11. <text>智能开启</text>
  12. <view class="active-dot" v-if="aStockBid === 0"></view>
  13. </view>
  14. <view class="option-btn" :class="{ 'active': aStockBid === 1 }" @click="aStockBid = 1">
  15. <text>保持开启</text>
  16. <view class="active-dot" v-if="aStockBid === 1"></view>
  17. </view>
  18. <view class="option-btn" :class="{ 'active': aStockBid === 2 }" @click="aStockBid = 2">
  19. <text>保持关闭</text>
  20. <view class="active-dot" v-if="aStockBid === 2"></view>
  21. </view>
  22. </view>
  23. <view class="title">K线样式</view>
  24. <view class="top-options">
  25. <view class="option-btn" :class="{ 'active': kStyle === 0 }" @click="kStyle = 0">
  26. <img src="/static/my/common.png" class="kline-icon" />
  27. <text>普通</text>
  28. <view class="active-dot" v-if="kStyle === 0"></view>
  29. </view>
  30. <view class="option-btn" :class="{ 'active': kStyle === 1 }" @click="kStyle = 1">
  31. <img src="/static/my/outline.png" class="kline-icon" />
  32. <text>轮廓图</text>
  33. <view class="active-dot" v-if="kStyle === 1"></view>
  34. </view>
  35. <view class="option-btn" :class="{ 'active': kStyle === 2 }" @click="kStyle = 2">
  36. <img src="/static/my/polylines.png" class="kline-icon" />
  37. <text>折线图</text>
  38. <view class="active-dot" v-if="kStyle === 2"></view>
  39. </view>
  40. </view>
  41. <view class="title">除权类型</view>
  42. <view class="top-options">
  43. <view class="option-btn" :class="{ 'active': exRights === 0 }" @click="exRights = 0">
  44. <text>除权</text>
  45. <view class="active-dot" v-if="exRights === 0"></view>
  46. </view>
  47. <view class="option-btn" :class="{ 'active': exRights === 1 }" @click="exRights = 1">
  48. <text>普通</text>
  49. <view class="active-dot" v-if="exRights === 1"></view>
  50. </view>
  51. <view class="option-btn" :class="{ 'active': exRights === 2 }" @click="exRights = 2">
  52. <text>加权</text>
  53. <view class="active-dot" v-if="exRights === 2"></view>
  54. </view>
  55. </view>
  56. <view class="title">涨跌颜色</view>
  57. <view class="top-options">
  58. <view class="option-btn" :class="{ 'active': rfColor === 0 }" @click="rfColor = 0">
  59. <view class="color-icon">
  60. <img src="/static/my/greenRise.png" class="kline-icon" />
  61. </view>
  62. <text>绿涨红跌</text>
  63. <view class="active-dot" v-if="rfColor === 0"></view>
  64. </view>
  65. <view class="option-btn" :class="{ 'active': rfColor === 1 }" @click="rfColor = 1">
  66. <view class="color-icon">
  67. <img src="/static/my/redRise.png" class="kline-icon" />
  68. </view>
  69. <text>红涨绿跌</text>
  70. <view class="active-dot" v-if="rfColor === 1"></view>
  71. </view>
  72. </view>
  73. <view class="title">副图指标个数</view>
  74. <view class="top-options">
  75. <view class="option-btn" :class="{ 'active': indexCount === 0 }" @click="indexCount = 0">
  76. <text>1</text>
  77. </view>
  78. <view class="option-btn" :class="{ 'active': indexCount === 1 }" @click="indexCount = 1">
  79. <text>2</text>
  80. </view>
  81. <view class="option-btn" :class="{ 'active': indexCount === 2 }" @click="indexCount = 2">
  82. <text>3</text>
  83. </view>
  84. </view>
  85. </view>
  86. <view class="indicator-title">
  87. <text>指标设置</text>
  88. </view>
  89. <view class="indicator-list">
  90. <view class="indicator-item" v-for="(item, index) in indicatorList" :key="index">
  91. <text class="indicator-text">{{ item }}</text>
  92. <view class="indicator-icons">
  93. <img src="/static/my/setting.png" class="icon" />
  94. <img src="/static/my/menu.png" class="icon" />
  95. </view>
  96. </view>
  97. <view style="height:10vh;background-color: white;"></view>
  98. </view>
  99. </view>
  100. </template>
  101. <script setup>
  102. import {
  103. ref,
  104. onMounted
  105. } from 'vue'
  106. const iSMT = ref(0)
  107. const aStockBid = ref(0) // 股票竞价:Stock bidding
  108. const kStyle = ref(0) // k线样式
  109. const exRights = ref(0) // 除权类型 除权:Ex-rights
  110. const rfColor = ref(0) // 涨跌颜色 rise-fall
  111. const indexCount = ref(0) // 副图指标个数
  112. const indicatorList = ref(['K线', '均线', '成交量', 'KDJ', 'MACD', 'RSI'])
  113. onMounted(() => {
  114. iSMT.value = uni.getSystemInfoSync().statusBarHeight;
  115. })
  116. </script>
  117. <style scoped>
  118. .time-share-title {
  119. height: 4.5vh;
  120. padding: 0 40rpx;
  121. display: flex;
  122. align-items: center;
  123. }
  124. .title {
  125. height: 5.5vh;
  126. padding: 0 40rpx;
  127. display: flex;
  128. align-items: center;
  129. font-size: 26rpx;
  130. color: #666;
  131. }
  132. .top-options {
  133. height: 5.5vh;
  134. display: flex;
  135. padding: 0 40rpx;
  136. }
  137. .option-btn {
  138. flex: 1;
  139. display: flex;
  140. align-items: center;
  141. justify-content: center;
  142. border: 1rpx solid #ddd;
  143. border-radius: 8rpx;
  144. margin: 0 10rpx;
  145. padding: 15rpx 0;
  146. font-size: 28rpx;
  147. }
  148. .option-btn.active {
  149. border-color: red;
  150. }
  151. .active-dot {
  152. width: 16rpx;
  153. height: 16rpx;
  154. background-color: red;
  155. border-radius: 50%;
  156. margin-left: 10rpx;
  157. }
  158. .kline-icon {
  159. margin-right: 10rpx;
  160. font-size: 32rpx;
  161. }
  162. .color-icon {
  163. margin-right: 10rpx;
  164. display: flex;
  165. gap: 4rpx;
  166. }
  167. .indicator-title {
  168. height: 6vh;
  169. padding: 0 40rpx;
  170. display: flex;
  171. align-items: center;
  172. }
  173. .indicator-list {
  174. display: flex;
  175. flex-direction: column;
  176. justify-content: center;
  177. padding: 0 40rpx;
  178. background-color: white;
  179. }
  180. .indicator-item {
  181. display: flex;
  182. align-items: center;
  183. height: 7.5vh;
  184. border-bottom: 1rpx solid #eee;
  185. }
  186. .indicator-text {
  187. font-size: 28rpx;
  188. }
  189. .indicator-icons {
  190. display: flex;
  191. gap: 100rpx;
  192. margin-left: auto;
  193. }
  194. .icon {
  195. width: 28rpx;
  196. height: 28rpx;
  197. }
  198. </style>