index.vue 24 KB

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