open.vue 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399
  1. <template>
  2. <uni-popup ref="popupRef" type="bottom">
  3. <view class="open-box">
  4. <view class="open-tab">
  5. <view :class="['open-tab-item' , 'active-tab-item']">开多</view>
  6. <view class="open-tab-item">开空</view>
  7. </view>
  8. <view class="open-content">
  9. <view class="open-type pad-top">
  10. <view class="open-type-item">
  11. <text :class="['open-type-text' , 'active-open-type']">市价</text>
  12. <text class="open-type-text">计划</text>
  13. </view>
  14. <text class="type-text">逐仓模式</text>
  15. </view>
  16. <view class="lever-box pad-top">
  17. <text class="lever-title">杠杆</text>
  18. <view class="lever-item">
  19. <text :class="['lever-text' , 'active-lever']">5X</text>
  20. <text class="lever-text">10X</text>
  21. <text class="lever-text">20X</text>
  22. </view>
  23. </view>
  24. <view class="inp-box pad-top">
  25. <text class="inp-box-title">预估成交价:</text>
  26. <view class="inp-content">
  27. <text class="inp-nums">28510.8</text>
  28. <text class="inp-nums-tag">USDT</text>
  29. </view>
  30. </view>
  31. <view class="inp-box input-box pad-top">
  32. <text class="input-box-title">保证金</text>
  33. <view class="input-content">
  34. <input class="input-text" type="text">
  35. <text class="input-tag">USDT</text>
  36. </view>
  37. </view>
  38. <view class="set pad-top">
  39. <view class="set-title">
  40. <text class="set-title-text">设置止盈止损</text>
  41. <u-icon name="arrow-down-fill" size="10" color="#cfcfcf"></u-icon>
  42. </view>
  43. <view class="set-nums">
  44. 可用: 224.80 USDT
  45. </view>
  46. </view>
  47. <template v-if="setStatus">
  48. <view class="setting">
  49. <view class="setting-title">
  50. <view class="setting-text">
  51. <text>止盈</text>
  52. <view class="setting-icon"></view>
  53. </view>
  54. <view class="switch-unit">
  55. <view class="switch-icon iconfont ">&#xeb0d;</view>
  56. <text class="switch-text">按价格设置</text>
  57. </view>
  58. </view>
  59. </view>
  60. </template>
  61. <view class="submit-box">
  62. <view class="submit-btn">
  63. 买入/做多
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </uni-popup>
  69. </template>
  70. <script>
  71. export default {
  72. data() {
  73. return {
  74. setStatus: true
  75. };
  76. },
  77. mounted() {
  78. // this.$refs.popupRef.open()
  79. },
  80. methods: {
  81. open() {
  82. this.$nextTick(() => {
  83. this.$refs.popupRef.open();
  84. })
  85. }
  86. }
  87. }
  88. </script>
  89. <style lang="scss" scoped>
  90. $contentPaddingTop: 30rpx;
  91. .open-box {
  92. width: 100%;
  93. background-color: #fff;
  94. .open-tab {
  95. width: 100%;
  96. height: 86rpx;
  97. background-color: #F7F7F7;
  98. display: flex;
  99. align-items: center;
  100. }
  101. .open-tab-item {
  102. flex-shrink: 0;
  103. flex: 1;
  104. text-align: center;
  105. line-height: 86rpx;
  106. font-size: 30rpx;
  107. font-family: PingFang SC, PingFang SC-Bold;
  108. font-weight: 600;
  109. color: #808080;
  110. }
  111. .active-tab-item {
  112. color: #20b482;
  113. position: relative;
  114. &::before {
  115. content: '';
  116. position: absolute;
  117. left: 0;
  118. bottom: 0;
  119. width: 100%;
  120. height: 2rpx;
  121. background-color: #20b482;
  122. }
  123. }
  124. .open-content {
  125. padding: 0 $pages-padding;
  126. .pad-top {
  127. margin-top: $contentPaddingTop;
  128. }
  129. .open-type {
  130. display: flex;
  131. justify-content: space-between;
  132. align-items: center;
  133. .open-type-item {
  134. width: 460rpx;
  135. height: 74rpx;
  136. display: flex;
  137. align-items: stretch;
  138. border: 1px solid #05c175;
  139. border-radius: 4px;
  140. .open-type-text {
  141. flex: 1;
  142. text-align: center;
  143. line-height: 74rpx;
  144. font-size: 28rpx;
  145. font-family: PingFang SC, PingFang SC-Regular;
  146. font-weight: 400;
  147. color: #05c175;
  148. }
  149. .active-open-type {
  150. background: #05c175;
  151. color: #fff;
  152. }
  153. }
  154. .type-text {
  155. font-size: 28rpx;
  156. font-family: PingFang SC, PingFang SC-Bold;
  157. font-weight: 600;
  158. color: #808080;
  159. line-height: 40rpx;
  160. }
  161. }
  162. .lever-box {
  163. display: flex;
  164. align-items: center;
  165. .lever-title {
  166. font-size: 26rpx;
  167. font-family: PingFang SC, PingFang SC-Regular;
  168. font-weight: 400;
  169. text-align: left;
  170. color: #808080;
  171. line-height: 38rpx;
  172. }
  173. .lever-item {
  174. text-align: center;
  175. display: flex;
  176. align-items: center;
  177. .lever-text {
  178. margin-left: 21rpx;
  179. width: 105rpx;
  180. height: 74rpx;
  181. line-height: 74rpx;
  182. background: #ffffff;
  183. border: 1rpx solid #cccccc;
  184. border-radius: 4rpx;
  185. font-size: 26rpx;
  186. font-family: PingFang SC, PingFang SC-Regular;
  187. font-weight: 400;
  188. color: #808080;
  189. }
  190. .active-lever {
  191. background: #05c175;
  192. border-color: #05c175;
  193. font-size: 26rpx;
  194. font-family: PingFang SC, PingFang SC-Regular;
  195. font-weight: 400;
  196. color: #ffffff;
  197. }
  198. }
  199. }
  200. .inp-box {
  201. width: 100%;
  202. height: 80rpx;
  203. background: #efefef;
  204. border: 1px solid #e6e6e6;
  205. border-radius: 8rpx;
  206. display: flex;
  207. justify-content: space-between;
  208. align-items: center;
  209. padding: 0 30rpx;
  210. .inp-box-title {
  211. font-size: 28rpx;
  212. font-family: PingFang SC, PingFang SC-Regular;
  213. font-weight: 400;
  214. color: #808080;
  215. line-height: 40rpx;
  216. }
  217. .inp-content {
  218. font-size: 28rpx;
  219. font-family: PingFang SC, PingFang SC-Regular;
  220. font-weight: 400;
  221. color: #1a1a1a;
  222. line-height: 40rpx;
  223. .inp-nums-tag {
  224. padding-left: 20rpx;
  225. font-size: 28rpx;
  226. color: #808080;
  227. }
  228. }
  229. }
  230. .input-box {
  231. width: 100%;
  232. .input-box-title {
  233. font-size: 28rpx;
  234. font-family: PingFang SC, PingFang SC-Regular;
  235. font-weight: 400;
  236. color: #808080;
  237. line-height: 40rpx;
  238. flex-shrink: 0;
  239. }
  240. .input-content {
  241. flex: 1;
  242. height: 100%;
  243. display: flex;
  244. justify-content: space-between;
  245. align-items: center;
  246. .input-text {
  247. height: 100%;
  248. flex: 1;
  249. padding: 0 3px;
  250. font-size: 28rpx;
  251. font-family: PingFang SC, PingFang SC-Regular;
  252. font-weight: 400;
  253. color: #1a1a1a;
  254. text-align: right;
  255. }
  256. .input-tag {
  257. font-size: 28rpx;
  258. font-family: PingFang SC, PingFang SC-Regular;
  259. font-weight: 400;
  260. color: #808080;
  261. line-height: 40rpx;
  262. }
  263. }
  264. }
  265. .set {
  266. width: 100%;
  267. display: flex;
  268. justify-content: space-between;
  269. align-items: center;
  270. font-size: 26rpx;
  271. font-family: PingFang SC, PingFang SC-Regular;
  272. font-weight: 400;
  273. line-height: 38rpx;
  274. .set-title {
  275. display: flex;
  276. justify-content: space-between;
  277. align-items: center;
  278. color: #1a1a1a;
  279. padding-right: 5px;
  280. }
  281. .set-nums {
  282. color: #808080;
  283. }
  284. }
  285. .submit-box {
  286. width: 100%;
  287. padding: 53rpx 0 4rpx;
  288. .submit-btn {
  289. width: 100%;
  290. height: 80rpx;
  291. background: #05c175;
  292. border-radius: 8rpx;
  293. text-align: center;
  294. line-height: 80rpx;
  295. font-size: 30rpx;
  296. font-family: PingFang SC, PingFang SC-Bold;
  297. font-weight: 700;
  298. color: #ffffff;
  299. }
  300. }
  301. .setting {
  302. width: 100%;
  303. .setting-title {
  304. display: flex;
  305. justify-content: space-between;
  306. align-items: center;
  307. .setting-text {
  308. display: flex;
  309. justify-content: space-between;
  310. align-items: center;
  311. font-size: 24rpx;
  312. color: #a3a1a1;
  313. color: #666;
  314. .setting-icon{
  315. width: 20rpx;
  316. height: 20rpx;
  317. background-color: #ccc;
  318. }
  319. }
  320. .switch-unit {
  321. display: flex;
  322. justify-content: space-between;
  323. align-items: center;
  324. color: #20B482;
  325. font-size: 24rpx;
  326. .switch-text{
  327. padding-left: 3px;
  328. }
  329. }
  330. }
  331. }
  332. // <view class="setting">
  333. // <view class="setting-title">
  334. // <view class="setting-text">
  335. // <text >止盈</text>
  336. // <view class="setting-icon"></view>
  337. // </view>
  338. // <view class="switch-unit">
  339. // <text class="switch-icon iconfont">&#xeb0d;</text>
  340. // <text class="switch-text">按价格设置</text>
  341. // </view>
  342. // </view>
  343. // </view>
  344. }
  345. }
  346. </style>