heyue.vue 9.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489
  1. <template>
  2. <view class="content">
  3. <view class="usdtTitle flex">
  4. <view class="left flex">
  5. <image class="img margin-r-10" src="../../static/icon/hy02.png" mode="widthFix"></image>
  6. <view class="margin-r-10">
  7. BTC/USDT
  8. </view>
  9. <view class="font-color-green">
  10. 10086
  11. </view>
  12. </view>
  13. <view class="right">
  14. <image class="img" src="../../static/icon/hy01.png" mode="widthFix"></image>
  15. </view>
  16. </view>
  17. <view class="box flex padding-t-20 padding-b-30">
  18. <view class="item">
  19. <view class="itemTitle margin-b-20">
  20. 交易方向
  21. </view>
  22. <view class="buttomBox flex">
  23. <view @click="typeIndex=1" class="buttom " :class="{action:typeIndex==1}">
  24. 上涨
  25. </view>
  26. <view @click="typeIndex=2" class="buttom " :class="{action:typeIndex==2,'bg-danger':typeIndex==2}">
  27. 下跌
  28. </view>
  29. </view>
  30. <view class="tabType flex ">
  31. <view class="tab" @click="jyType=1" :class="{action:jyType==1}">
  32. 限价委托
  33. </view>
  34. <view class="tab" @click="jyType=2" :class="{action:jyType==2}">
  35. 市价委托
  36. </view>
  37. </view>
  38. <view class="inputBox margin-b-20" v-if="jyType==1">
  39. <input v-model="xzMoney" class="input" placeholder="请输入价格" type="number">
  40. </view>
  41. <view class="itemTitle margin-b-20">
  42. 交易个数
  43. </view>
  44. <view class="inputBox flex margin-b-20">
  45. <input v-model="payNum" class="input" placeholder="请输入交易数量" type="number">
  46. <view class="rightInputBox flex">
  47. <image @click="payNum>0?payNum--:false" class="img" src="../../static/icon/hy04.png"
  48. mode="scaleToFill"></image>
  49. <view class="jg">
  50. </view>
  51. <image @click="payNum++" class="img" src="../../static/icon/hy03.png" mode="scaleToFill">
  52. </image>
  53. </view>
  54. </view>
  55. <view class="itemTitle margin-b-20">
  56. 杠杆倍数
  57. </view>
  58. <view class="itemLeftList flex margin-b-20">
  59. <view class="ll" @click="changeGG(ind,ls)" :class="{action:ind==ggIndex}"
  60. v-for="(ls,ind) in ggList">
  61. {{ls.num}}
  62. </view>
  63. </view>
  64. <view class="inputBox flex margin-b-20">
  65. <input v-model="ggBs" class="input" placeholder="请输入杠杆倍数" type="number">
  66. </view>
  67. <view class="flex margin-b-20">
  68. <view class="itemTitle">
  69. 止损价
  70. </view>
  71. <view class="inputBox flex">
  72. <input v-model="zsMoney" placeholder="请输入止损价格" class="input" type="number">
  73. </view>
  74. </view>
  75. <view class="flex margin-b-20">
  76. <view class="itemTitle">
  77. 止盈价
  78. </view>
  79. <view class="inputBox flex">
  80. <input v-model="zyMoney" placeholder="请输入止盈价格" class="input" type="number">
  81. </view>
  82. </view>
  83. <view class="flex margin-b-20">
  84. <view class="itemTitle">
  85. 保证金
  86. </view>
  87. <view class="itemTitle">
  88. 0
  89. </view>
  90. </view>
  91. <view class="flex margin-b-20">
  92. <view class="itemTitle">
  93. 可用合约余额
  94. </view>
  95. <view class="itemTitle">
  96. 0
  97. </view>
  98. </view>
  99. <view class="flex margin-b-20">
  100. <view class="itemTitle">
  101. 手续费
  102. </view>
  103. <view class="itemTitle">
  104. 0
  105. </view>
  106. </view>
  107. <view class="buttomSubmit" :class="{'bg-success':typeIndex==1,'bg-danger':typeIndex==2}">
  108. {{typeIndex==1?'做多':'做空'}}
  109. </view>
  110. </view>
  111. <view class="item padding-l-20">
  112. <view class="itemName flex">
  113. <view class="itemMinName">
  114. 价格
  115. </view>
  116. <view class="itemMinName">
  117. 数量
  118. </view>
  119. </view>
  120. <view class="itemList">
  121. <view class="list flex font-color-green">
  122. <view class="li top">
  123. 166666
  124. </view>
  125. <view class="li top">
  126. 0000.00
  127. </view>
  128. </view>
  129. <view class="llMax font-color-green">
  130. 10086
  131. </view>
  132. <view class="list flex font-color-red">
  133. <view class="li bottom">
  134. 166666
  135. </view>
  136. <view class="li bottom">
  137. 0000.00
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. <view class="box margin-t-30 padding-t-30 padding-b-30">
  144. <view class="flex listTitleBox">
  145. <view class="leftBottom flex">
  146. <view @click="ddTypeChage(1)" class="titleType margin-r-30" :class="{action:ddType==1}">
  147. 限价委托
  148. </view>
  149. <view @click="ddTypeChage(2)" class="titleType" :class="{action:ddType==2}">
  150. 持仓
  151. </view>
  152. </view>
  153. <view class="rightBottom flex">
  154. <image class="img" src="../../static/icon/hy02.png" mode="widthFix"></image>
  155. <view class="more">
  156. 全部订单
  157. </view>
  158. </view>
  159. </view>
  160. <view class="usdtList padding-t-30 padding-b-30">
  161. <view class="flex">
  162. <view class="name">
  163. <text class="font-color-green">
  164. 做多
  165. </text>
  166. <text>
  167. BTC/USDT
  168. </text>
  169. <text class="font-color-green">
  170. 0.00
  171. </text>
  172. </view>
  173. <view class="usdtListButtom">
  174. 一键平仓
  175. </view>
  176. </view>
  177. <view class="tip ">
  178. 开仓时间:2022-11-23 19:10:11
  179. </view>
  180. <view class="flex">
  181. <view class="tipList">
  182. <view class="nameTip">
  183. 开仓单价
  184. </view>
  185. <view class="text">
  186. 1600000
  187. </view>
  188. </view>
  189. <view class="tipList">
  190. <view class="nameTip">
  191. 保证金
  192. </view>
  193. <view class="text">
  194. 1600000
  195. </view>
  196. </view>
  197. <view class="tipList">
  198. <view class="nameTip">
  199. 交易个数
  200. </view>
  201. <view class="text">
  202. 1600000
  203. </view>
  204. </view>
  205. <view class="tipList">
  206. <view class="nameTip">
  207. 杠杆倍数
  208. </view>
  209. <view class="text">
  210. 1600000
  211. </view>
  212. </view>
  213. </view>
  214. </view>
  215. </view>
  216. </view>
  217. </template>
  218. <script>
  219. export default {
  220. data() {
  221. return {
  222. // 当前选中的杠杆倍数
  223. ggIndex: 0,
  224. ggList: [{
  225. num: 5
  226. }, {
  227. num: 10
  228. }, {
  229. num: 20
  230. }, {
  231. num: 50
  232. }, {
  233. num: 100
  234. }],
  235. //当前选中的交易类别
  236. typeIndex: 1,
  237. // 交易类型
  238. jyType: 1,
  239. //交易数量
  240. payNum: 0,
  241. // 杠杆倍数
  242. ggBs: 0,
  243. // 限价委托价格
  244. xzMoney: 0,
  245. // 止损价格
  246. zsMoney: 0,
  247. // 止盈价格
  248. zyMoney: 0,
  249. // 当前查看列表类型
  250. ddType: 1
  251. }
  252. },
  253. onLoad() {
  254. },
  255. onShow() {
  256. },
  257. onReachBottom() {
  258. },
  259. onReady() {
  260. },
  261. methods: {
  262. // 修改杠杆倍数
  263. changeGG(ind, item) {
  264. this.ggBs = item.num
  265. this.ggIndex = ind
  266. },
  267. // 查看列表切换类型
  268. ddTypeChage(ind) {
  269. this.ddType = ind
  270. }
  271. }
  272. }
  273. </script>
  274. <style lang="scss">
  275. .usdtTitle,
  276. .box {
  277. padding: 0 20rpx;
  278. width: 750rpx;
  279. background-color: #FFFFFF;
  280. }
  281. .usdtTitle {
  282. border-bottom: 1px solid $border-color-light;
  283. line-height: 1;
  284. .left {
  285. font-size: 32rpx;
  286. font-weight: bold;
  287. .img {
  288. width: 36rpx;
  289. }
  290. }
  291. .right {
  292. .img {
  293. width: 48rpx;
  294. }
  295. }
  296. }
  297. .box {
  298. line-height: 1;
  299. align-items: flex-start;
  300. .itemTitle {
  301. font-weight: bold;
  302. font-size: $font-sm;
  303. }
  304. .item {
  305. flex-grow: 1;
  306. flex-shrink: 0;
  307. }
  308. .buttomBox {
  309. font-size: $font-sm;
  310. .buttom {
  311. width: 200rpx;
  312. padding: 20rpx 0;
  313. text-align: center;
  314. border-radius: 10rpx;
  315. background-color: #F5F5F5;
  316. &.action {
  317. color: #FFFFFF;
  318. background-color: $color-green;
  319. }
  320. }
  321. }
  322. .tabType {
  323. justify-content: space-around;
  324. .tab {
  325. padding-top: 30rpx;
  326. padding-bottom: 20rpx;
  327. color: #545D6F;
  328. font-size: $font-sm;
  329. font-weight: bold;
  330. &.action {
  331. color: $uni-color-warning;
  332. }
  333. }
  334. }
  335. .inputBox {
  336. height: 60rpx;
  337. border-radius: 10rpx;
  338. padding: 0 20rpx;
  339. display: flex;
  340. align-items: center;
  341. border: 1px solid $border-color-light;
  342. .input {
  343. font-size: $font-sm;
  344. flex-grow: 1;
  345. }
  346. .rightInputBox {
  347. .jg {
  348. border: 1px solid $border-color-light;
  349. height: 50rpx;
  350. margin: 0 30rpx;
  351. }
  352. .img {
  353. width: 28rpx;
  354. height: 28rpx;
  355. }
  356. }
  357. }
  358. .itemLeftList {
  359. justify-content: space-around;
  360. .ll {
  361. border: 1px solid $border-color-light;
  362. width: 74rpx;
  363. height: 54rpx;
  364. line-height: 54rpx;
  365. text-align: center;
  366. font-size: $font-sm;
  367. font-weight: bold;
  368. &.action {
  369. background-color: #F5F5F5;
  370. }
  371. }
  372. }
  373. .buttomSubmit {
  374. color: #FFFFFF;
  375. height: 64rpx;
  376. line-height: 64rpx;
  377. text-align: center;
  378. font-size: $font-sm;
  379. border-radius: 10rpx;
  380. }
  381. .itemName {
  382. padding-bottom: 20rpx;
  383. .itemMinName {
  384. font-size: 22rpx;
  385. color: #5D6677;
  386. }
  387. }
  388. .itemList {
  389. .list {
  390. font-size: 20rpx;
  391. padding: 10rpx 0;
  392. }
  393. .llMax {
  394. padding: 30rpx 0;
  395. font-weight: bold;
  396. font-size: $font-lg;
  397. }
  398. }
  399. .listTitleBox {
  400. border-bottom: 1px solid $border-color-light;
  401. align-items: flex-start;
  402. .leftBottom {
  403. flex-shrink: 0;
  404. font-size: $font-lg;
  405. font-weight: bold;
  406. .action {
  407. border-bottom: 2px solid $uni-color-warning;
  408. }
  409. .titleType {
  410. padding-bottom: 20rpx;
  411. }
  412. }
  413. .rightBottom {
  414. font-size: $font-base;
  415. color: #707A8A;
  416. flex-shrink: 0;
  417. .img {
  418. width: 36rpx;
  419. }
  420. }
  421. }
  422. .usdtList{
  423. color: #707A8A;
  424. border-bottom: 1px solid $border-color-light;
  425. .name{
  426. font-size: $font-lg;
  427. font-weight: bold;
  428. }
  429. .usdtListButtom{
  430. font-size: $font-base;
  431. background-color:#F5F5F5 ;
  432. color: $uni-color-warning;
  433. border-radius: 10rpx;
  434. padding: 10rpx 20rpx;
  435. }
  436. .tip{
  437. padding-top: 10rpx;
  438. padding-bottom: 30rpx;
  439. font-size: $font-base;
  440. }
  441. .tipList{
  442. font-size: $font-sm;
  443. .nameTip{
  444. padding-bottom: 20rpx;
  445. }
  446. }
  447. }
  448. }
  449. </style>