index.vue 22 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004
  1. <template>
  2. <view class="contract-box" :rise-fall="stocksColor">
  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">{{ currencyInfo.currency_name }}/ {{ currencyInfo.legal_name }}</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 die" v-for="(item , indx) in bids" v-if="indx < 7">
  70. <text class="nums-item-bg bgcolor01" :style="{'width': item[2] + '%' }"></text>
  71. <view class="item-num">
  72. <text class="color">{{ item[1] }}</text>
  73. <text>{{ item[0] }}</text>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="left-title index-num-title flex">
  78. <text>{{ daymarket.now_price }}</text>
  79. <text>{{ daymarket.change }}%</text>
  80. </view>
  81. <view class="subhead-title index-title flex">
  82. <text>指数{{ daymarket.high }}</text>
  83. <text>标记{{ daymarket.open }}</text>
  84. </view>
  85. <view class="nums-list" style="padding-top: 6.5rpx;">
  86. <view class="nums-item zhang" v-for="(item , indx) in asks" v-if="indx < 7">
  87. <text class="nums-item-bg bgcolor01" :style="{'width': item[2] + '%' }"></text>
  88. <view class="item-num">
  89. <text class="color">{{ item[1] }}</text>
  90. <text>{{ item[0] }}</text>
  91. </view>
  92. </view>
  93. </view>
  94. </view>
  95. <view class="data-right">
  96. <view class="right-select">
  97. <view class="select-box position-select" @click.stop="selectList = !selectList">
  98. <text class="select-text">{{ value }}</text>
  99. <text class="iconfont">&#xeb6d;</text>
  100. <view class="select-list" v-show="selectList">
  101. <text @click.stop="setType(item)"
  102. :class="['select-list-item' , status === item.value ? 'active-select-item' : '']"
  103. v-for="item in range">{{ item.text }}</text>
  104. </view>
  105. </view>
  106. <view class="select-box" @click.stop="adjustLever()">
  107. <text class="select-text">{{ leverName }}{{ multiple }}x</text>
  108. <text class="iconfont">&#xeb6d;</text>
  109. </view>
  110. <!-- <uni-data-select :localdata="range" class="select-item" v-model="value"
  111. @change="change"></uni-data-select>
  112. <uni-data-select class="select-item" v-model="value" @change="change"></uni-data-select> -->
  113. </view>
  114. <view class="right-input input-item-p">
  115. <template v-if="status === 1">
  116. 市价
  117. </template>
  118. <template v-if="status === 0">
  119. <view class="target-price">
  120. <text class="target-price-tag" @click.stop="setNum(1 , target_price)">-</text>
  121. <input class="input-item" v-model="target_price" type="number">
  122. <text class="target-price-tag" @click.stop="setNum(2 , target_price)">+</text>
  123. </view>
  124. </template>
  125. <!-- target_price -->
  126. </view>
  127. <view class="right-input">
  128. <input class="input-item" v-model="share" type="number">
  129. <view class="right-input-icon">
  130. <text>张</text>
  131. <text class="icon-link">|</text>
  132. <text class="switch-icon iconfont">&#xe672;</text>
  133. </view>
  134. </view>
  135. <view class="step-content">
  136. <step :width="365" />
  137. </view>
  138. <view class="set-node">
  139. <view class="set-node-status"></view>
  140. <text class="set-node-text">设置止盈止损</text>
  141. </view>
  142. <view class="info-item">
  143. <text class="info-item-lable">成本</text>
  144. <view class="info-item-val">0.00 USDT</view>
  145. </view>
  146. <view class="info-item">
  147. <text class="info-item-lable">可用</text>
  148. <view class="info-item-val">
  149. <text>{{ pagesInfo.user_lever }}USDT</text>
  150. <text class="info-item-icon iconfont">&#xe672;</text>
  151. </view>
  152. </view>
  153. <view class="info-btns">
  154. <view class="info-btn-info">
  155. <text class="info-btn-lable">可做多</text>
  156. <text class="info-btn-val">{{ pagesInfo.lever_share_limit.max || '--' }}张</text>
  157. </view>
  158. <view class="info-btn" @click.stop="setSubmitLever(2)">
  159. 买入/做多
  160. </view>
  161. </view>
  162. <view class="info-btns err-btns">
  163. <view class="info-btn-info">
  164. <text class="info-btn-lable">可做多</text>
  165. <text class="info-btn-val">33719张</text>
  166. </view>
  167. <view class="info-btn" @click.stop="setSubmitLever(1)">
  168. 卖出/做空
  169. </view>
  170. </view>
  171. </view>
  172. </view>
  173. <gap height="10rpx" />
  174. <view class="lable-title">
  175. <view class="lable-text">
  176. <text @click.stop="freightSpaceIndex = 1"
  177. :class="['lable-text-item' , freightSpaceIndex == 1 ? 'active-text-item' : '' ]">持仓({{ lever_transaction.length }})</text>
  178. <text @click.stop="freightSpaceIndex = 2"
  179. :class="['lable-text-item' , freightSpaceIndex == 2 ? 'active-text-item' : '' ]">当前委托({{ entrustList.length }})</text>
  180. </view>
  181. <view class="iconfont" @click.stop="getHistory()">&#xe613;</view>
  182. </view>
  183. <template v-if="freightSpaceIndex === 1">
  184. <freightSpace :leverTransaction="lever_transaction" @closeLeverSuccess="closeLeverSuccess"
  185. :closeLeverContent="closeLeverContent" />
  186. </template>
  187. <template v-if="freightSpaceIndex === 2">
  188. <entrust :entrustlist="entrustList" @closeLeverSuccess="closeLeverSuccess" />
  189. </template>
  190. <!-- 侧边抽屉 -->
  191. <drawer ref="drawerRef" />
  192. <!-- 调整杠杆 -->
  193. <lever ref="leverRef" :lever-num.sync="multiple" :leverName.sync="leverName" />
  194. </view>
  195. </template>
  196. <script>
  197. import drawer from "./../modules/drawer.vue"
  198. import lever from "./lever.vue"
  199. import freightSpace from "./freight-space.vue"
  200. import entrust from "./entrust.vue"
  201. import {
  202. Api_setSubmitLever,
  203. Api_getLeverDeal,
  204. Api_getRegister
  205. } from "@/api/index.js"
  206. import {
  207. mapGetters
  208. } from 'vuex'
  209. export default {
  210. components: {
  211. drawer,
  212. lever,
  213. freightSpace,
  214. entrust
  215. },
  216. props: {
  217. currencyInfo: {
  218. type: Object,
  219. default: () => {
  220. return {}
  221. }
  222. }
  223. },
  224. data() {
  225. return {
  226. selectList: false,
  227. value: '市价委托',
  228. range: [{
  229. value: 1,
  230. text: '市价委托'
  231. },
  232. {
  233. value: 0,
  234. text: '限价委托'
  235. },
  236. // {
  237. // value: '计划委托',
  238. // text: '计划委托'
  239. // },
  240. ],
  241. leverName: '全仓',
  242. closeLeverContent: '如果存在平仓挂单(限价止盈止损),将会在全平前被撤单,确定全部平仓吗?',
  243. freightSpaceIndex: 2,
  244. pagesInfo: {
  245. lever_share_limit: ''
  246. },
  247. // 当前持仓
  248. lever_transaction: [],
  249. entrustList: [],
  250. // 下单参数
  251. multiple: 100, // 逐仓倍数
  252. share: '', // 张数
  253. status: 0, // 状态,填1. 1市价交易,为0则是挂单交易
  254. target_price: '',
  255. };
  256. },
  257. computed: {
  258. ...mapGetters([
  259. "stocksColor",
  260. 'bids',
  261. 'asks',
  262. 'daymarket'
  263. ])
  264. },
  265. created() {
  266. this.closeLeverSuccess();
  267. this.$store.dispatch("websocket/openSocket", {
  268. type: 'market_depth',
  269. legal_id: this.currencyInfo.legal_id,
  270. currency_id: this.currencyInfo.currency_id
  271. })
  272. this.$store.dispatch("websocket/openSocket", {
  273. type: 'daymarket',
  274. legal_id: this.currencyInfo.legal_id,
  275. currency_id: this.currencyInfo.currency_id
  276. })
  277. },
  278. methods: {
  279. setNum(type) {
  280. if (this.status === 0) {
  281. // 只有限价才去计算
  282. if (!this.target_price) {
  283. this.target_price = 0
  284. };
  285. switch (type) {
  286. case 1:
  287. this.target_price -= this.$decimalNum.sub(this.target_price, 0.01);
  288. break;
  289. case 2:
  290. this.target_price -= this.$decimalNum.add(this.target_price, 0.01);
  291. break;
  292. }
  293. }
  294. },
  295. setType(item) {
  296. this.status = item.value;
  297. this.selectList = false
  298. if (this.status === 0) {
  299. this.target_price = this.daymarket.now_price;
  300. } else {
  301. this.target_price = ''
  302. }
  303. },
  304. // 平仓成功
  305. closeLeverSuccess() {
  306. this.getLeverDeal()
  307. this.getRegister()
  308. },
  309. openDrawer() {
  310. this.$refs.drawerRef.open();
  311. },
  312. change(e) {
  313. console.log("e:", e);
  314. },
  315. adjustLever() {
  316. this.$nextTick(() => {
  317. this.$refs.leverRef.open()
  318. })
  319. },
  320. getLeverDeal() {
  321. Api_getLeverDeal({
  322. legal_id: this.currencyInfo.legal_id,
  323. currency_id: this.currencyInfo.currency_id
  324. }).then(res => {
  325. this.pagesInfo = res
  326. this.lever_transaction = res.lever_transaction?.in || []
  327. })
  328. },
  329. getRegister() {
  330. Api_getRegister({
  331. status: 0,
  332. legal_id: this.currencyInfo.legal_id,
  333. currency_id: this.currencyInfo.legal_id,
  334. page: 1,
  335. limit: 10000
  336. }).then(res => {
  337. const data = res.message;
  338. this.entrustList = data.data
  339. })
  340. },
  341. // Api_setSubmitLever
  342. setSubmitLever(type) {
  343. const setData = {
  344. legal_id: this.currencyInfo.legal_id,
  345. currency_id: this.currencyInfo.currency_id,
  346. multiple: this.multiple,
  347. share: this.share,
  348. type: type
  349. }
  350. Api_setSubmitLever(setData).then(res => {
  351. this.getLeverDeal()
  352. })
  353. },
  354. // 查看合约历史
  355. getHistory() {
  356. uni.navigateTo({
  357. url: '/pages/contract/history/index'
  358. })
  359. }
  360. },
  361. }
  362. </script>
  363. <style lang="scss" scoped>
  364. .contract-box {
  365. .contract-title {
  366. padding: 5rpx $pages-padding 0;
  367. min-height: 78rpx;
  368. display: flex;
  369. align-items: center;
  370. justify-content: space-between;
  371. .contract-item {
  372. display: flex;
  373. align-items: center;
  374. .title-iocn {
  375. width: 28rpx;
  376. height: 24rpx;
  377. display: flex;
  378. flex-direction: column;
  379. // align-items: center;
  380. justify-content: space-between;
  381. .title-iocn-item {
  382. width: 100%;
  383. height: 4rpx;
  384. border-radius: 2rpx;
  385. background: #111111;
  386. &:first-child {
  387. width: 50%;
  388. }
  389. }
  390. }
  391. .title-text {
  392. font-size: 37rpx;
  393. font-family: PingFang SC, PingFang SC-Bold;
  394. font-weight: 700;
  395. text-align: left;
  396. color: #141213;
  397. line-height: 52px;
  398. letter-spacing: 0.74rpx;
  399. padding-left: 19rpx;
  400. }
  401. .title-ratio {
  402. font-size: 24rpx;
  403. font-family: PingFang SC, PingFang SC-Regular;
  404. font-weight: 400;
  405. color: #808080;
  406. line-height: 33rpx;
  407. }
  408. .ratio-icon {
  409. width: 31rpx;
  410. height: 33rpx;
  411. margin-left: 22rpx;
  412. }
  413. }
  414. }
  415. .account-box {
  416. width: 100%;
  417. padding: 21rpx $pages-padding;
  418. display: flex;
  419. flex-wrap: wrap;
  420. background-color: #F6F6F6;
  421. margin-bottom: 25rpx;
  422. .account-item {
  423. display: flex;
  424. flex-direction: column;
  425. flex-shrink: 0;
  426. &:nth-child(3n) {
  427. width: 40%;
  428. text-align: right;
  429. }
  430. &:nth-child(3n - 1) {
  431. width: 30%;
  432. text-align: right;
  433. }
  434. &:nth-child(3n - 2) {
  435. width: 30%;
  436. }
  437. &:nth-child(n + 4) {
  438. margin-top: 20rpx;
  439. }
  440. .account-title {
  441. font-size: 22rpx;
  442. font-family: PingFang SC, PingFang SC-Bold;
  443. font-weight: 700;
  444. color: #807e89;
  445. line-height: 30rpx;
  446. .text {
  447. border-bottom: 2rpx dashed #707070;
  448. }
  449. }
  450. .account-num {
  451. font-size: 24rpx;
  452. font-family: PingFang SC, PingFang SC-Bold;
  453. font-weight: 700;
  454. color: #1a1a1a;
  455. line-height: 33rpx;
  456. margin-top: 11rpx;
  457. }
  458. }
  459. }
  460. }
  461. .data-box {
  462. width: 100%;
  463. padding: 25rpx $pages-padding 0;
  464. display: flex;
  465. justify-content: space-between;
  466. align-items: stretch;
  467. .data-left {
  468. width: 303rpx;
  469. .flex {
  470. display: flex;
  471. justify-content: space-between;
  472. align-items: center;
  473. }
  474. .left-title {
  475. font-size: 24rpx;
  476. font-family: PingFang SC, PingFang SC-Bold;
  477. font-weight: 700;
  478. color: #807e89;
  479. line-height: 33rpx;
  480. }
  481. .subhead-title {
  482. font-size: 24rpx;
  483. font-family: PingFang SC, PingFang SC-Bold;
  484. font-weight: 700;
  485. color: #807e89;
  486. line-height: 33rpx;
  487. }
  488. .index-num-title {
  489. font-size: 36rpx;
  490. font-family: PingFang SC, PingFang SC-Bold;
  491. font-weight: 700;
  492. color: #20b482;
  493. line-height: 50rpx;
  494. text+text {
  495. font-size: 28rpx;
  496. font-family: PingFang SC, PingFang SC-Bold;
  497. font-weight: 700;
  498. color: #20b482;
  499. line-height: 40rpx;
  500. }
  501. }
  502. .index-title {
  503. font-size: 20rpx;
  504. color: #808080;
  505. line-height: 1.2;
  506. text {
  507. border-bottom: 2rpx dashed #707070;
  508. }
  509. padding-bottom: 18rpx;
  510. border-bottom: 1px solid #f2f2f2;
  511. }
  512. .nums-list {
  513. width: 100%;
  514. padding: 10rpx 0 4rpx;
  515. border-bottom: 1rpx solid #f2f2f2;
  516. .nums-item {
  517. width: 100%;
  518. position: relative;
  519. height: 40rpx;
  520. margin-bottom: 4rpx;
  521. .nums-item-bg {
  522. position: absolute;
  523. top: 0;
  524. right: 0;
  525. z-index: 1;
  526. height: 100%;
  527. }
  528. .item-num {
  529. width: 100%;
  530. height: 100%;
  531. position: absolute;
  532. top: 0;
  533. right: 0;
  534. z-index: 2;
  535. display: flex;
  536. justify-content: space-between;
  537. align-items: center;
  538. font-size: 22rpx;
  539. font-family: PingFang SC, PingFang SC-Bold;
  540. font-weight: 700;
  541. line-height: 33rpx;
  542. color: #1a1a1a;
  543. text+text {
  544. font-weight: 700;
  545. line-height: 33rpx;
  546. }
  547. }
  548. }
  549. }
  550. // <view class="nums-list">
  551. // <view class="nums-item">
  552. // <text class="nums-item-bg"></text>
  553. // <text class="item-num">28516.8</text>
  554. // <text class="item-num">28516.8</text>
  555. // </view>
  556. // </view>
  557. }
  558. .data-right {
  559. width: 365rpx;
  560. // background-color: green;
  561. .right-select {
  562. width: 100%;
  563. display: flex;
  564. justify-content: space-between;
  565. align-items: center;
  566. .select-box {
  567. width: 175rpx;
  568. height: 50rpx;
  569. display: flex;
  570. justify-content: space-between;
  571. align-items: center;
  572. background-color: #f1f1f1;
  573. padding: 0 3px;
  574. border-radius: 4rpx;
  575. .select-text {
  576. font-size: 26rpx;
  577. font-weight: 700;
  578. }
  579. .iconfont {
  580. font-size: 20rpx;
  581. color: $Theme-Color;
  582. }
  583. }
  584. .position-select {
  585. position: relative;
  586. .select-list {
  587. position: absolute;
  588. left: 0;
  589. top: 50rpx;
  590. width: 185rpx;
  591. display: flex;
  592. flex-direction: column;
  593. background-color: #fff;
  594. z-index: 1;
  595. .select-list-item {
  596. width: 100%;
  597. height: 70rpx;
  598. line-height: 70rpx;
  599. padding: 0 30rpx;
  600. font-size: 22rpx;
  601. font-weight: bold;
  602. color: #c1c1c1;
  603. }
  604. .active-select-item {
  605. background-color: #f1f1f1;
  606. color: #000;
  607. }
  608. }
  609. }
  610. // <view class="select-box">
  611. // <text class="select-text">限价委托</text>
  612. // <text class="iconfont">&#xe601;</text>
  613. // </view>
  614. // <view class="select-box">
  615. // <text class="select-text">限价委托</text>
  616. // <text class="iconfont">&#xe601;</text>
  617. // </view>
  618. // .select-item {
  619. // width: 175rpx !important;
  620. // height: 50rpx;
  621. // flex: 0;
  622. // ::v-deep .uni-stat-box {
  623. // width: 175rpx !important;
  624. // height: 48rpx;
  625. // .uni-select {
  626. // width: 175rpx !important;
  627. // height: 48rpx;
  628. // .uni-select__input-box {
  629. // width: 100%;
  630. // height: 48rpx !important;
  631. // }
  632. // .uniui-clear{
  633. // display: none;
  634. // }
  635. // }
  636. // }
  637. // }
  638. }
  639. .right-input {
  640. width: 100%;
  641. height: 80rpx;
  642. background: #efefef;
  643. border-radius: 10rpx;
  644. margin-top: 20rpx;
  645. display: flex;
  646. justify-content: space-between;
  647. align-items: center;
  648. padding: 0 20rpx;
  649. font-size: 24rpx;
  650. font-family: PingFang SC, PingFang SC-Bold;
  651. font-weight: 700;
  652. color: #808080;
  653. line-height: 40rpx;
  654. .input-item {
  655. height: 100%;
  656. font-size: 24rpx;
  657. }
  658. .input-item-p {
  659. font-size: 24rpx;
  660. font-family: PingFang SC, PingFang SC-Bold;
  661. font-weight: 700;
  662. color: #808080;
  663. line-height: 40rpx;
  664. opacity: 0.3;
  665. }
  666. .right-input-icon {
  667. flex-shrink: 0;
  668. font-size: 28rpx;
  669. font-family: PingFang SC, PingFang SC-Bold;
  670. font-weight: 700;
  671. color: #808080;
  672. line-height: 40rpx;
  673. display: flex;
  674. align-items: center;
  675. .icon-link {
  676. margin: 0 15rpx;
  677. }
  678. .icon {
  679. width: 30rpx;
  680. height: 26rpx;
  681. }
  682. }
  683. // <view class="target-price">
  684. // <text class="target-price-tag">-</text>
  685. // <input class="input-item" v-model="target_price" type="number">
  686. // <text class="target-price-tag">+</text>
  687. // </view>
  688. .target-price {
  689. width: 100%;
  690. height: 100%;
  691. display: flex;
  692. justify-content: space-between;
  693. align-items: stretch;
  694. .target-price-tag {
  695. flex-shrink: 0;
  696. width: 50rpx;
  697. height: 100%;
  698. text-align: center;
  699. font-size: 26rpx;
  700. color: $Theme-Color;
  701. display: flex;
  702. align-items: center;
  703. &:last-child {
  704. justify-content: flex-end;
  705. }
  706. }
  707. .input-item {
  708. flex: 1;
  709. height: 100%;
  710. font-size: 24rpx;
  711. text-align: center;
  712. // .nums-inp {
  713. // width: 100%;
  714. // height: 100%;
  715. // text-align: center;
  716. // font-size: 28rpx;
  717. // font-weight: bold;
  718. // }
  719. // .nums-t {
  720. // position: absolute;
  721. // left: 0;
  722. // top: 0;
  723. // width: 100%;
  724. // height: 100%;
  725. // }
  726. // <input class="nums-inp" type="text" v-model="leverNum">
  727. // <text class="nums-inp-tag">X</text>
  728. }
  729. }
  730. }
  731. .step-content {
  732. padding: 24rpx 0 35rpx;
  733. }
  734. .set-node {
  735. width: 100%;
  736. display: flex;
  737. align-items: center;
  738. .set-node-status {
  739. width: 27rpx;
  740. height: 27rpx;
  741. background: #e6e6e8;
  742. border-radius: 2rpx;
  743. }
  744. .set-node-text {
  745. font-size: 24rpx;
  746. font-family: PingFang SC, PingFang SC-Regular;
  747. font-weight: 400;
  748. color: #808080;
  749. line-height: 34rpx;
  750. margin-left: 14rpx;
  751. border-bottom: 2rpx dashed #707070;
  752. }
  753. }
  754. .info-item {
  755. width: 100%;
  756. display: flex;
  757. justify-content: space-between;
  758. align-items: center;
  759. font-size: 26rpx;
  760. padding: 16rpx 0;
  761. line-height: 1.1;
  762. .info-item-lable {
  763. color: #ccc;
  764. border-bottom: 1rpx dashed #707070;
  765. }
  766. .info-item-val {
  767. font-size: 22rpx;
  768. font-weight: bold;
  769. display: flex;
  770. align-items: center;
  771. .info-item-icon {
  772. font-size: 20rpx;
  773. margin-left: 20rpx;
  774. width: 30rpx;
  775. height: 30rpx;
  776. background-color: $Theme-Color;
  777. color: #fff;
  778. text-align: center;
  779. line-height: 30rpx;
  780. border-radius: 6rpx;
  781. }
  782. }
  783. }
  784. .info-btns {
  785. width: 100%;
  786. padding-top: 16rpx;
  787. .info-btn-info {
  788. display: flex;
  789. justify-content: space-between;
  790. font-size: 24rpx;
  791. padding-bottom: 10rpx;
  792. .info-btn-lable {
  793. color: #ccc;
  794. }
  795. .info-btn-val {
  796. font-weight: bold;
  797. }
  798. // <view class="info-btn-info">
  799. // <text class="info-btn-lable">可做多</text>
  800. // <text class="info-btn-val">33719张</text>
  801. // </view>
  802. }
  803. .info-btn {
  804. width: 100%;
  805. height: 80rpx;
  806. background-color: $Theme-Color;
  807. text-align: center;
  808. line-height: 80rpx;
  809. font-size: 30rpx;
  810. color: #fff;
  811. }
  812. }
  813. .err-btns {
  814. .info-btn {
  815. background-color: red;
  816. }
  817. }
  818. // <view class="info-btns">
  819. // <view class="info-btn-info">
  820. // <text class="info-btn-lable">可做多</text>
  821. // <text class="info-btn-val">33719张</text>
  822. // </view>
  823. // <view class="info-btn">
  824. // 买入/做多
  825. // </view>
  826. // </view>
  827. // <view class="set-node">
  828. // <view class="set-node-status"></view>
  829. // <text class="set-node-text">设置止盈止损</text>
  830. // </view>
  831. }
  832. }
  833. .switch-icon {
  834. color: $Theme-Color;
  835. font-size: 26rpx;
  836. }
  837. .lable-title {
  838. width: 100%;
  839. height: 100rpx;
  840. border-bottom: 1rpx solid $border-color;
  841. padding: 0 $pages-padding;
  842. display: flex;
  843. justify-content: space-between;
  844. align-items: center;
  845. .lable-text {
  846. height: 100%;
  847. display: flex;
  848. align-items: stretch;
  849. .lable-text-item {
  850. height: 100%;
  851. display: flex;
  852. align-items: center;
  853. font-size: 28rpx;
  854. &:first-child {
  855. padding-right: 40rpx;
  856. }
  857. }
  858. .active-text-item {
  859. font-size: 34rpx;
  860. font-weight: bold;
  861. color: $Theme-Color;
  862. position: relative;
  863. &::before {
  864. content: '';
  865. position: absolute;
  866. left: 50%;
  867. bottom: 0;
  868. width: 40rpx;
  869. height: 8rpx;
  870. background-color: $Theme-Color;
  871. transform: translateX(-50%);
  872. border-radius: 4rpx;
  873. }
  874. }
  875. }
  876. }
  877. </style>