index.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541
  1. <template>
  2. <view class="contract-box">
  3. <view class="contract-title">
  4. <view class="contract-item" @click.stop="openDrawer">
  5. <view class="title-iocn">
  6. <text class="title-iocn-item"></text>
  7. <text class="title-iocn-item"></text>
  8. <text class="title-iocn-item"></text>
  9. </view>
  10. <!-- <image class="title-iocn" src="../../../static/logo.png" mode="aspectFit"></image> -->
  11. <text class="title-text">ETH/USDT</text>
  12. </view>
  13. <view class="contract-item">
  14. <text class="title-ratio">资金费率:-0.0100%</text>
  15. <image class="ratio-icon" src="../../../static/logo.png" mode="aspectFit"></image>
  16. <image class="ratio-icon" src="../../../static/logo.png" mode="aspectFit"></image>
  17. </view>
  18. </view>
  19. <view class="account-box">
  20. <view class="account-item">
  21. <view class="account-title">
  22. <text class="text">持仓保证金USDT]</text>
  23. </view>
  24. <text class="account-num">365.26</text>
  25. </view>
  26. <view class="account-item">
  27. <view class="account-title">
  28. <text class="text">可用保证金(USDT)</text>
  29. </view>
  30. <text class="account-num">365.26</text>
  31. </view>
  32. <view class="account-item">
  33. <view class="account-title">
  34. <text class="text">未实现亏盈(USDT] 三1</text>
  35. </view>
  36. <text class="account-num">-0.99</text>
  37. </view>
  38. <view class="account-item">
  39. <view class="account-title">
  40. <text class="text">净值(USDIL</text>
  41. </view>
  42. <text class="account-num">9869.77</text>
  43. </view>
  44. <view class="account-item">
  45. <view class="account-title">
  46. <text class="text">风险率必</text>
  47. </view>
  48. <text class="account-num">9869.77</text>
  49. </view>
  50. <view class="account-item">
  51. <view class="account-title">
  52. <text class="text">账户余额[USDTI</text>
  53. </view>
  54. <text class="account-num">9869.77</text>
  55. </view>
  56. </view>
  57. <gap height="8rpx" />
  58. <view class="data-box">
  59. <view class="data-left">
  60. <view class="left-title flex">
  61. <text>价格</text>
  62. <text>数量</text>
  63. </view>
  64. <view class="subhead-title flex">
  65. <text>(USDT)</text>
  66. <text>(张)</text>
  67. </view>
  68. <view class="nums-list">
  69. <view class="nums-item" v-for="item in 7">
  70. <text class="nums-item-bg"></text>
  71. <view class="item-num">
  72. <text>28516.8</text>
  73. <text>28516.8</text>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="left-title index-num-title flex">
  78. <text>28515.6</text>
  79. <text>+0.09%</text>
  80. </view>
  81. <view class="subhead-title index-title flex">
  82. <text>指数28523.0</text>
  83. <text>标记285114</text>
  84. </view>
  85. <view class="nums-list" style="padding-top: 6.5rpx;">
  86. <view class="nums-item" v-for="item in 7">
  87. <text class="nums-item-bg"></text>
  88. <view class="item-num">
  89. <text>28516.8</text>
  90. <text>28516.8</text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="data-right">
  96. <view class="right-select">
  97. <uni-data-select class="select-item" v-model="value" @change="change"></uni-data-select>
  98. <uni-data-select class="select-item" v-model="value" @change="change"></uni-data-select>
  99. </view>
  100. <view class="right-input input-item-p">
  101. 市价
  102. </view>
  103. <view class="right-input">
  104. <input class="input-item" placeholder-class="input-item-p" placeholder="市价">
  105. <view class="right-input-icon">
  106. <text>张</text>
  107. <text class="icon-link">|</text>
  108. <image class="icon" src="../../../static/logo.png" mode=""></image>
  109. </view>
  110. </view>
  111. <view class="step-content">
  112. <step />
  113. </view>
  114. <view class="set-node">
  115. <view class="set-node-status"></view>
  116. <text class="set-node-text">设置止盈止损</text>
  117. </view>
  118. <view class="info-item">
  119. <text>成本</text>
  120. <view>0.00 USDT</view>
  121. </view>
  122. <view class="info-item">
  123. <text>可用</text>
  124. <view>
  125. <text>10000.00 USDT</text>
  126. </view>
  127. </view>
  128. <view class="info-item">
  129. <text>可做多</text>
  130. <view>
  131. <text>33719张</text>
  132. </view>
  133. </view>
  134. </view>
  135. </view>
  136. <drawer ref="drawerRef"/>
  137. </view>
  138. </template>
  139. <script>
  140. import drawer from "./../modules/drawer.vue"
  141. export default {
  142. components:{drawer},
  143. data() {
  144. return {
  145. value: undefined,
  146. range: [{
  147. value: 0,
  148. text: "篮球"
  149. },
  150. {
  151. value: 1,
  152. text: "足球"
  153. },
  154. {
  155. value: 2,
  156. text: "游泳"
  157. },
  158. ],
  159. };
  160. },
  161. methods: {
  162. openDrawer(){
  163. this.$refs.drawerRef.open();
  164. },
  165. change(e) {
  166. console.log("e:", e);
  167. },
  168. },
  169. }
  170. </script>
  171. <style lang="scss" scoped>
  172. .contract-box {
  173. .contract-title {
  174. padding: 5rpx $pages-padding 0;
  175. min-height: 78rpx;
  176. display: flex;
  177. align-items: center;
  178. justify-content: space-between;
  179. .contract-item {
  180. display: flex;
  181. align-items: center;
  182. .title-iocn {
  183. width: 28rpx;
  184. height: 24rpx;
  185. display: flex;
  186. flex-direction: column;
  187. // align-items: center;
  188. justify-content: space-between;
  189. .title-iocn-item {
  190. width: 100%;
  191. height: 4rpx;
  192. border-radius: 2rpx;
  193. background: #111111;
  194. &:first-child {
  195. width: 50%;
  196. }
  197. }
  198. }
  199. .title-text {
  200. font-size: 37rpx;
  201. font-family: PingFang SC, PingFang SC-Bold;
  202. font-weight: 700;
  203. text-align: left;
  204. color: #141213;
  205. line-height: 52px;
  206. letter-spacing: 0.74rpx;
  207. padding-left: 19rpx;
  208. }
  209. .title-ratio {
  210. font-size: 24rpx;
  211. font-family: PingFang SC, PingFang SC-Regular;
  212. font-weight: 400;
  213. color: #808080;
  214. line-height: 33rpx;
  215. }
  216. .ratio-icon {
  217. width: 31rpx;
  218. height: 33rpx;
  219. margin-left: 22rpx;
  220. }
  221. }
  222. }
  223. .account-box {
  224. width: 100%;
  225. padding: 21rpx $pages-padding;
  226. display: flex;
  227. flex-wrap: wrap;
  228. background-color: #F6F6F6;
  229. margin-bottom: 25rpx;
  230. .account-item {
  231. display: flex;
  232. flex-direction: column;
  233. flex-shrink: 0;
  234. &:nth-child(3n) {
  235. width: 40%;
  236. text-align: right;
  237. }
  238. &:nth-child(3n - 1) {
  239. width: 30%;
  240. text-align: right;
  241. }
  242. &:nth-child(3n - 2) {
  243. width: 30%;
  244. }
  245. &:nth-child(n + 4) {
  246. margin-top: 20rpx;
  247. }
  248. .account-title {
  249. font-size: 22rpx;
  250. font-family: PingFang SC, PingFang SC-Bold;
  251. font-weight: 700;
  252. color: #807e89;
  253. line-height: 30rpx;
  254. .text {
  255. border-bottom: 2rpx dashed #707070;
  256. }
  257. }
  258. .account-num {
  259. font-size: 24rpx;
  260. font-family: PingFang SC, PingFang SC-Bold;
  261. font-weight: 700;
  262. color: #1a1a1a;
  263. line-height: 33rpx;
  264. margin-top: 11rpx;
  265. }
  266. }
  267. }
  268. }
  269. .data-box {
  270. width: 100%;
  271. padding: 25rpx $pages-padding 0;
  272. display: flex;
  273. justify-content: space-between;
  274. align-items: stretch;
  275. .data-left {
  276. width: 303rpx;
  277. .flex {
  278. display: flex;
  279. justify-content: space-between;
  280. align-items: center;
  281. }
  282. .left-title {
  283. font-size: 24rpx;
  284. font-family: PingFang SC, PingFang SC-Bold;
  285. font-weight: 700;
  286. color: #807e89;
  287. line-height: 33rpx;
  288. }
  289. .subhead-title {
  290. font-size: 24rpx;
  291. font-family: PingFang SC, PingFang SC-Bold;
  292. font-weight: 700;
  293. color: #807e89;
  294. line-height: 33rpx;
  295. }
  296. .index-num-title {
  297. font-size: 36rpx;
  298. font-family: PingFang SC, PingFang SC-Bold;
  299. font-weight: 700;
  300. color: #20b482;
  301. line-height: 50rpx;
  302. text+text {
  303. font-size: 28rpx;
  304. font-family: PingFang SC, PingFang SC-Bold;
  305. font-weight: 700;
  306. color: #20b482;
  307. line-height: 40rpx;
  308. }
  309. }
  310. .index-title {
  311. font-size: 20rpx;
  312. color: #808080;
  313. line-height: 1.2;
  314. text {
  315. border-bottom: 2rpx dashed #707070;
  316. }
  317. padding-bottom: 18rpx;
  318. border-bottom: 1px solid #f2f2f2;
  319. }
  320. .nums-list {
  321. width: 100%;
  322. padding: 10rpx 0 4rpx;
  323. border-bottom: 1rpx solid #f2f2f2;
  324. .nums-item {
  325. width: 100%;
  326. position: relative;
  327. height: 40rpx;
  328. margin-bottom: 4rpx;
  329. .nums-item-bg {
  330. position: absolute;
  331. top: 0;
  332. right: 0;
  333. z-index: 1;
  334. width: 50%;
  335. height: 100%;
  336. background-color: #FEEBED;
  337. }
  338. .item-num {
  339. width: 100%;
  340. height: 100%;
  341. position: absolute;
  342. top: 0;
  343. right: 0;
  344. z-index: 2;
  345. display: flex;
  346. justify-content: space-between;
  347. align-items: center;
  348. font-size: 22rpx;
  349. font-family: PingFang SC, PingFang SC-Bold;
  350. font-weight: 700;
  351. color: #ea5162;
  352. line-height: 33rpx;
  353. text+text {
  354. font-weight: 700;
  355. color: #1a1a1a;
  356. line-height: 33rpx;
  357. }
  358. }
  359. }
  360. }
  361. // <view class="nums-list">
  362. // <view class="nums-item">
  363. // <text class="nums-item-bg"></text>
  364. // <text class="item-num">28516.8</text>
  365. // <text class="item-num">28516.8</text>
  366. // </view>
  367. // </view>
  368. }
  369. .data-right {
  370. width: 365rpx;
  371. // background-color: green;
  372. .right-select {
  373. width: 100%;
  374. display: flex;
  375. justify-content: space-between;
  376. align-items: center;
  377. .select-item {
  378. width: 178rpx !important;
  379. height: 48rpx;
  380. :v-deep .uni-select {
  381. width: 178rpx !important;
  382. height: 48rpx;
  383. .uni-select__input-box {
  384. width: 100%;
  385. height: 48rpx !important;
  386. }
  387. }
  388. }
  389. }
  390. .right-input {
  391. width: 100%;
  392. height: 80rpx;
  393. background: #efefef;
  394. border-radius: 10rpx;
  395. margin-top: 20rpx;
  396. display: flex;
  397. justify-content: space-between;
  398. align-items: center;
  399. padding: 0 20rpx;
  400. font-size: 24rpx;
  401. font-family: PingFang SC, PingFang SC-Bold;
  402. font-weight: 700;
  403. color: #808080;
  404. line-height: 40rpx;
  405. .input-item {
  406. height: 100%;
  407. }
  408. .input-item-p {
  409. font-size: 24rpx;
  410. font-family: PingFang SC, PingFang SC-Bold;
  411. font-weight: 700;
  412. color: #808080;
  413. line-height: 40rpx;
  414. opacity: 0.3;
  415. }
  416. .right-input-icon {
  417. flex-shrink: 0;
  418. font-size: 28rpx;
  419. font-family: PingFang SC, PingFang SC-Bold;
  420. font-weight: 700;
  421. color: #808080;
  422. line-height: 40rpx;
  423. display: flex;
  424. align-items: center;
  425. .icon-link {
  426. margin: 0 15rpx;
  427. }
  428. .icon {
  429. width: 30rpx;
  430. height: 26rpx;
  431. }
  432. }
  433. }
  434. .step-content{
  435. padding: 24rpx 0 35rpx;
  436. }
  437. .set-node{
  438. width: 100%;
  439. display: flex;
  440. align-items: center;
  441. .set-node-status{
  442. width: 27rpx;
  443. height: 27rpx;
  444. background: #e6e6e8;
  445. border-radius: 2rpx;
  446. }
  447. .set-node-text{
  448. font-size: 24rpx;
  449. font-family: PingFang SC, PingFang SC-Regular;
  450. font-weight: 400;
  451. color: #808080;
  452. line-height: 34rpx;
  453. margin-left: 14rpx;
  454. border-bottom: 2rpx dashed #707070;
  455. }
  456. }
  457. // <view class="set-node">
  458. // <view class="set-node-status"></view>
  459. // <text class="set-node-text">设置止盈止损</text>
  460. // </view>
  461. }
  462. }
  463. </style>