index.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953
  1. <template>
  2. <view>
  3. <view class="contract-title" :rise-fall="stocksColor">
  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-price" :class="$setColor(daymarket.now_price)">
  14. <text class="color">{{ daymarket.now_price }}</text>
  15. <text class="color" v-show="daymarket.change">{{ daymarket.change }}%</text>
  16. </view>
  17. <view class="contract-item">
  18. <text class="iconfont">&#xe625;</text>
  19. </view>
  20. </view>
  21. <view class="iframe-box">
  22. <template v-if="currencyVal.legal_id">
  23. <iframe
  24. :src="`https://doc.okenx.com/biking/kline.html?legal_id=${currencyVal.legal_id}&currency_id=${currencyVal.currency_id}&symbol=${currencyVal.currency_name}/${currencyVal.legal_name}`"
  25. frameborder="0"></iframe>
  26. </template>
  27. </view>
  28. <gap />
  29. <view class="swiper-title">
  30. <view class="swiper-lable">
  31. <template v-for="(item , index) in lableList">
  32. <text @click.stop="lableIndex = index"
  33. :class="['swiper-item', lableIndex === index ? 'active-swiper-item' : '' ]">{{ item }}</text>
  34. </template>
  35. </view>
  36. <view class="iconfont" @click.stop="getHistory()">&#xe613;</view>
  37. </view>
  38. <!-- {{ pagesInfo }} -->
  39. <view class="shortcut">
  40. <swiper class="swiper-content" :current="lableIndex"
  41. :style="{'height': scrollHeight ? `${scrollHeight}px` : '' }">
  42. <swiper-item class="swiper-item-box">
  43. <u-list>
  44. <view class="shortcut-open">
  45. <view class="shortcut-type">
  46. <view class="type-box">
  47. <text class="type-item active-type-item">市价委托</text>
  48. <text class="type-item">计划委托</text>
  49. </view>
  50. <view class="type-times" @click.stop="adjustLever()">
  51. {{leverName}}{{ multiple }}x
  52. <text class="iconfont">&#xeb6d;</text>
  53. </view>
  54. </view>
  55. <view class="shortcut-price">
  56. <view class="price-box">
  57. <text class="price-lable">价格</text>
  58. <view class="price-info">
  59. <text class="price-num">{{ daymarket.now_price }}</text>
  60. <text class="price-tag">USDT</text>
  61. </view>
  62. </view>
  63. <view class="price-box">
  64. <text class="price-lable">保证金</text>
  65. <input class="price-inp" type="number" v-model="caution_money">
  66. <view class="price-info">
  67. USDT
  68. </view>
  69. </view>
  70. </view>
  71. <view class="shortcut-usable">
  72. <view class="usable-info">
  73. 可用:{{ pagesInfo.user_lever }} USDT
  74. </view>
  75. <view class="usable-btn" @click.stop="PayCurrency()">
  76. 充值
  77. </view>
  78. </view>
  79. <view class="shortcut-btns">
  80. <view class="shortcut-btn" @click.stop="setSubmitLever(2)">
  81. 买入/做多
  82. </view>
  83. <view class="shortcut-btn" @click.stop="setSubmitLever(1)">
  84. 卖出/做空
  85. </view>
  86. </view>
  87. </view>
  88. </u-list>
  89. </swiper-item>
  90. <swiper-item>
  91. <u-list class="swiper-list" :style="{'height': scrollHeight ? `${scrollHeight}px` : '' }">
  92. <template v-if="leverTransaction && leverTransaction.length > 0">
  93. <view class="lable-title">
  94. <text class="lable-title-text">仓位信息</text>
  95. <text class="lable-title-btn" @click.stop="setCloseLeverAll()">全部平仓</text>
  96. </view>
  97. <view class="account-box">
  98. <view class="account-item">
  99. <view class="account-title">
  100. <text class="text">持仓保证金USDT)</text>
  101. </view>
  102. <text class="account-num">{{ contractAccount.usdt_totle || '--' }}</text>
  103. </view>
  104. <view class="account-item">
  105. <view class="account-title">
  106. <text class="text">可用保证金(USDT)</text>
  107. </view>
  108. <text class="account-num">{{ contractAccount.totle || '--' }}</text>
  109. </view>
  110. <view class="account-item" :class="[$setColor(rateProfitsTotal.hazard_rate || '0.00')]">
  111. <view class="account-title">
  112. <text class="text">未实现亏盈(USDT)</text>
  113. </view>
  114. <text class="account-num color">{{ rateProfitsTotal.hazard_rate }}</text>
  115. </view>
  116. </view>
  117. <template v-for="item in leverTransaction">
  118. <view class="content-box" :rise-fall="stocksColor">
  119. <view class="content-top">
  120. <view class="top-left">
  121. <view class="top-left-title">
  122. <text>{{ item.symbol }}</text>
  123. <text v-if="item.settled == 0">永续</text>
  124. <text v-else-if="item.settled == 9">快捷合约</text>
  125. </view>
  126. <view class="top-left-b">
  127. <text>{{ item.multiple }}倍杠杆</text>
  128. <text class="top-left-b-tag">{{ item.type_name }}</text>
  129. </view>
  130. </view>
  131. <view class="top-right">
  132. <text>{{ item.profits }}</text>
  133. <text
  134. class="top-right-float"><text>浮动盈亏</text>{{ item.fact_profits }}%</text>
  135. </view>
  136. </view>
  137. <view class="content-info">
  138. <view class="info-item">
  139. <text class="info-item-lable">保证金(USDT)</text>
  140. <text class="info-item-val">{{ item.caution_money }}</text>
  141. </view>
  142. <view class="info-item">
  143. <text class="info-item-lable">开仓价格(USDT)</text>
  144. <text class="info-item-val">{{ item.price }}</text>
  145. </view>
  146. <view class="info-item">
  147. <text class="info-item-lable">预估平仓价格(USDT)</text>
  148. <text class="info-item-val">{{item.update_price}}</text>
  149. </view>
  150. <view class="info-item">
  151. <text class="info-item-lable">过夜费</text>
  152. <text class="info-item-val">{{item.overnight_money}}</text>
  153. </view>
  154. <view class="info-item">
  155. <text class="info-item-lable">风险率(%)</text>
  156. <text class="info-item-val">0%</text>
  157. <!-- {{ item.caution_money }} -->
  158. </view>
  159. <!-- <view class="info-item">
  160. <text class="info-item-lable">预计止损(USDT)</text>
  161. <text class="info-item-val"
  162. @click.stop="setRestrict(item)">{{ item.stop_loss_price || '--' }} <text
  163. class="iconfont">&#xe610;</text></text>
  164. </view>
  165. <view class="info-item">
  166. <text class="info-item-lable">预计止盈(USDT)</text>
  167. <text class="info-item-val"
  168. @click.stop="setRestrict(item)">{{ item.target_profit_price || '--' }} <text
  169. class="iconfont">&#xe610;</text> </text>
  170. </view> -->
  171. <view class="info-item">
  172. <text class="info-item-lable">创建时间</text>
  173. <text class="info-item-val">{{ $getData_(item.create_time , false) }}</text>
  174. </view>
  175. </view>
  176. <view class="content-btns">
  177. <view class="content-btn-item" @click.stop="setCloseLever(item)">
  178. 平仓
  179. </view>
  180. <view class="content-btn-item" @click.stop="setInversion(item)">
  181. 反向开仓
  182. </view>
  183. <!-- <view class="content-btn-item">
  184. 加仓
  185. </view> -->
  186. </view>
  187. <view class="set-stop">
  188. <view class="stop-left" @click.stop="setRestrict(item)">
  189. <text>止盈/止损</text>
  190. <text
  191. class="stop-num">{{ item.target_profit_price || '--' }}/{{ item.stop_loss_price || '--'}}</text>
  192. <text class="iconfont">&#xe610;</text>
  193. </view>
  194. <view class="stop-right">
  195. <text class="icon-size iconfont">&#xe8b0;</text>
  196. <text class="icon-size">分享</text>
  197. </view>
  198. </view>
  199. </view>
  200. <gap />
  201. </template>
  202. </template>
  203. </u-list>
  204. </swiper-item>
  205. </swiper>
  206. </view>
  207. <drawer ref="drawerRef" />
  208. <restrictPopup ref="restrictRef" @setSuccess="setSuccess" />
  209. <lever ref="leverRef" :leverNum.sync="multiple" :leverName.sync="leverName" />
  210. <unopen ref="placeOrderRef" @confirm="confirmPlaceOrder" title="下单确认" cancelBtn content="确定要下单吗?" />
  211. <unopen ref="unopenRef" @confirm="confirm" textAlign="left" :title="unopenSolt.title" cancelBtn
  212. :content="unopenSolt.closeLeverContent" />
  213. <popupHint ref="hintRef" title="快捷合约">
  214. <template #hintContent>
  215. <view class="">
  216. 快捷合约是币王交易所为用户带来的新型区块链合约衍生品,有闪电开平仓、持仓稳定、抗市场干扰的优势,主要特点如下:
  217. </view>
  218. <!-- <view class="">
  219. 赠金获取方式:
  220. </view> -->
  221. <view class="content-list">
  222. <text>1. 开仓/平仓流程及功能与永续一致</text>
  223. <text>2. 五交割期</text>
  224. <text>3. 市价开仓100%快速成交</text>
  225. <text>4. 开平仓价即为预估成交价</text>
  226. <text>5. 每天4:00(UTC+8)收取0.02%过夜费</text>
  227. </view>
  228. <view class="">
  229. 更多内容请点击<text class="explain" @click.stop="readPactInfo(189)">《快捷合约》</text>
  230. </view>
  231. <view class="hite-box" @click.stop="readPact = !readPact">
  232. <text class="box">
  233. <text v-show="readPact" class="iconfont2">&#xe6c5;</text>
  234. </text>
  235. <text>不在提示</text>
  236. </view>
  237. <view class="confirm-btn" @click.stop="confirmHiteBtn">
  238. 确定
  239. </view>
  240. </template>
  241. </popupHint>
  242. </view>
  243. </template>
  244. <script>
  245. import {
  246. mapGetters
  247. } from 'vuex'
  248. import {
  249. Api_setSubmitLever,
  250. Api_getLeverDeal,
  251. Api_getRegister,
  252. Api_setBatchClose,
  253. Api_setCloseLever
  254. } from "@/api/index.js"
  255. import lever from "../sustainability/lever.vue"
  256. import drawer from "./../modules/drawer.vue"
  257. import popupHint from "../modules/popup-hint.vue"
  258. import {
  259. startWebSocket
  260. } from "@/utils/websock.js"
  261. import restrictPopup from "./../modules/restrict.vue"
  262. export default {
  263. name: 'shortcut',
  264. components: {
  265. lever,
  266. drawer,
  267. restrictPopup,
  268. popupHint
  269. },
  270. data() {
  271. return {
  272. readPact: false,
  273. closeLeverItem: null,
  274. lableList: [
  275. '开仓',
  276. '当前持仓'
  277. ],
  278. lableIndex: 0,
  279. leverName: '逐仓',
  280. multiple: 100, // 逐仓倍数
  281. caution_money: '',
  282. status: 1, // 状态,填1. 1市价交易,为0则是挂单交易
  283. scrollHeight: 0,
  284. unopenSolt: {
  285. title: '',
  286. content: ''
  287. }
  288. };
  289. },
  290. props: {
  291. leverTransaction: {
  292. type: Array,
  293. default: () => {
  294. return []
  295. }
  296. },
  297. pagesInfo: {
  298. type: Object,
  299. default: () => {
  300. return {}
  301. }
  302. },
  303. rateProfitsTotal: {
  304. type: Object,
  305. default: () => {
  306. return {}
  307. }
  308. },
  309. },
  310. computed: {
  311. ...mapGetters([
  312. 'currencyVal',
  313. 'daymarket',
  314. 'stocksColor',
  315. 'PageContentHeight',
  316. 'tabBarHeight',
  317. 'contractAccount'
  318. ]),
  319. },
  320. mounted() {
  321. // startWebSocket()
  322. },
  323. watch: {
  324. currencyVal: {
  325. handler(newCurrency) {
  326. if (newCurrency && newCurrency?.legal_id) {
  327. this.init()
  328. }
  329. },
  330. deep: true,
  331. immediate: true
  332. },
  333. PageContentHeight: {
  334. handler(newHeigth) {
  335. if (newHeigth) {
  336. console.log('newHeigth = ', newHeigth)
  337. this.scrollHeight = newHeigth - uni.upx2px(100) - this.tabBarHeight;
  338. }
  339. },
  340. deep: true,
  341. immediate: true
  342. },
  343. },
  344. created() {
  345. this.openPactPopup()
  346. },
  347. methods: {
  348. init() {
  349. // this.getLeverDeal()
  350. // this.getRegister()
  351. },
  352. // getRegister() {
  353. // Api_getRegister({
  354. // status: 1,
  355. // legal_id: this.currencyVal.legal_id,
  356. // currency_id: this.currencyVal.currency_id,
  357. // settled: 9,
  358. // limit: 1000
  359. // }).then(res => {
  360. // console.log('Api_getRegister = ', res)
  361. // })
  362. // },
  363. confirmBtn() {
  364. },
  365. openDrawer() {
  366. this.$nextTick(() => {
  367. this.$refs.drawerRef.open();
  368. })
  369. },
  370. setSubmitLever() {
  371. this.$nextTick(() => {
  372. this.$refs.placeOrderRef.open()
  373. })
  374. },
  375. // 确认下单
  376. confirmPlaceOrder(type) {
  377. const obj = {
  378. legal_id: this.currencyVal.legal_id,
  379. currency_id: this.currencyVal.currency_id,
  380. multiple: this.multiple,
  381. caution_money: this.caution_money,
  382. status: this.status
  383. }
  384. Api_setSubmitLever(obj).then(res => {
  385. this.setSuccess()
  386. })
  387. },
  388. // 设置止盈止损
  389. setRestrict(item) {
  390. this.$nextTick(() => {
  391. this.$refs.restrictRef.open(item)
  392. })
  393. },
  394. setSuccess() {
  395. this.$emit('refreshData')
  396. },
  397. setCloseLever(item) {
  398. this.closeLeverItem = item;
  399. this.unopenSolt = {
  400. title: '平仓',
  401. closeLeverContent: '如果存在平仓挂单(限价止盈止损),将会在全平前被撤单,确定平仓吗?'
  402. }
  403. this.setDepot();
  404. },
  405. setInversion() {
  406. this.closeLeverItem = -1;
  407. this.unopenSolt = {
  408. title: '反向开仓',
  409. closeLeverContent: '如果存在平仓挂单(限价止盈止损),将会在全平前被撤单,确定反向开仓吗?',
  410. }
  411. this.setDepot();
  412. },
  413. setCloseLeverAll() {
  414. this.closeLeverItem = null;
  415. this.unopenSolt = {
  416. title: '全部平仓',
  417. closeLeverContent: '如果存在平仓挂单(限价止盈止损),将会在全平前被撤单,确定全部平仓吗?',
  418. }
  419. this.setDepot();
  420. // this.title = '全部平仓';
  421. // this.closeLeverContent = '';
  422. // this.closeLeverItem = null;
  423. // this.$refs.unopenRef.open();
  424. },
  425. // 平仓 - 反向开仓
  426. setDepot(obj) {
  427. this.$nextTick(() => {
  428. this.$refs.unopenRef.open()
  429. })
  430. },
  431. confirm() {
  432. if (this.leverTransaction.length > 0) {
  433. if (this.closeLeverItem && this.closeLeverItem !== -1) {
  434. // 平仓
  435. Api_setCloseLever({
  436. id: this.closeLeverItem.id
  437. }).then(res => {
  438. this.setSuccess()
  439. })
  440. } else if (this.closeLeverItem == -1) {
  441. // 反向开仓
  442. } else {
  443. // 全部平仓
  444. Api_setBatchClose({
  445. type: 0,
  446. currency_id: this.currencyVal.currency_id
  447. }).then(res => {
  448. this.setSuccess()
  449. })
  450. }
  451. }
  452. },
  453. adjustLever() {
  454. this.$nextTick(() => {
  455. this.$refs.leverRef.open()
  456. })
  457. },
  458. openPactPopup() {
  459. const readPactObj = this.$getStorageSync('contractReadPact');
  460. if (!readPactObj || !readPactObj.rapidPact) {
  461. this.readPact = false
  462. this.$nextTick(() => {
  463. this.$refs.hintRef.open()
  464. })
  465. }
  466. },
  467. // 提示弹框确认按钮
  468. confirmHiteBtn() {
  469. // t.readPact
  470. const readPactObj = this.$getStorageSync('contractReadPact') || {}
  471. readPactObj.rapidPact = this.readPact
  472. this.$setStorageSync('contractReadPact', readPactObj)
  473. this.$refs.hintRef.close();
  474. },
  475. // 阅读合约
  476. readPactInfo(id) {
  477. this.$readArticleInfo(id)
  478. },
  479. // 充值
  480. PayCurrency() {
  481. uni.navigateTo({
  482. url: '/pages/content/select-currency?type=recharge'
  483. })
  484. },
  485. // 获取历史
  486. getHistory(){
  487. uni.navigateTo({
  488. url: '/pages/contract/history/fast-history'
  489. })
  490. }
  491. }
  492. }
  493. </script>
  494. <style lang="scss" scoped>
  495. @import "~../sustainability/index.scss";
  496. .contract-title {
  497. padding: 5rpx $pages-padding 0;
  498. min-height: 90rpx;
  499. display: flex;
  500. align-items: center;
  501. justify-content: space-between;
  502. border-bottom: 1rpx solid $border-color;
  503. .contract-price {
  504. flex: 1;
  505. display: flex;
  506. justify-content: space-between;
  507. align-items: center;
  508. padding: 0 30rpx 0 20rpx;
  509. font-size: 28rpx;
  510. }
  511. .contract-item {
  512. flex-shrink: 0;
  513. display: flex;
  514. align-items: center;
  515. .title-iocn {
  516. width: 28rpx;
  517. height: 24rpx;
  518. display: flex;
  519. flex-direction: column;
  520. // align-items: center;
  521. justify-content: space-between;
  522. .title-iocn-item {
  523. width: 100%;
  524. height: 5rpx;
  525. border-radius: 3rpx;
  526. background: #111111;
  527. &:first-child {
  528. width: 50%;
  529. }
  530. }
  531. }
  532. .title-text {
  533. font-size: 34rpx;
  534. font-family: PingFang SC, PingFang SC-Bold;
  535. font-weight: 700;
  536. text-align: left;
  537. color: #141213;
  538. line-height: 1.2;
  539. letter-spacing: 0.74rpx;
  540. padding-left: 19rpx;
  541. }
  542. .title-ratio {
  543. font-size: 24rpx;
  544. font-family: PingFang SC, PingFang SC-Regular;
  545. font-weight: 400;
  546. color: #808080;
  547. line-height: 33rpx;
  548. }
  549. .ratio-icon {
  550. width: 31rpx;
  551. height: 33rpx;
  552. margin-left: 22rpx;
  553. }
  554. }
  555. }
  556. // <view class="lable-title">
  557. // <template v-for="(item , index) in lableList">
  558. // <text class="lable-item">{{ item }}</text>
  559. // </template>
  560. // </view>
  561. .swiper-title {
  562. padding: 0 $pages-padding;
  563. width: 100%;
  564. height: 100rpx;
  565. border-bottom: 1rpx solid $border-color;
  566. display: flex;
  567. align-items: center;
  568. justify-content: space-between;
  569. // width: 100%;
  570. // height: 100rpx;
  571. // border-bottom: 1rpx solid $border-color;
  572. // padding: 0 $pages-padding;
  573. // display: flex;
  574. // justify-content: space-between;
  575. // align-items: center;
  576. .swiper-lable {
  577. height: 100%;
  578. display: flex;
  579. align-items: center;
  580. justify-content: space-between;
  581. }
  582. .swiper-item {
  583. height: 100%;
  584. font-size: 28rpx;
  585. display: flex;
  586. align-items: center;
  587. &:nth-child(n + 2) {
  588. margin-left: 60rpx;
  589. }
  590. }
  591. .active-swiper-item {
  592. font-size: 34rpx;
  593. color: $Theme-Color;
  594. position: relative;
  595. &::before {
  596. content: '';
  597. position: absolute;
  598. left: 50%;
  599. bottom: 0;
  600. width: 30rpx;
  601. height: 5rpx;
  602. background-color: $Theme-Color;
  603. border-radius: 3rpx;
  604. transform: translateX(-50%);
  605. }
  606. }
  607. .iconfont{
  608. font-size: 30rpx;
  609. color: $SizeColor1;
  610. }
  611. }
  612. .shortcut {
  613. .shortcut-open {
  614. padding: 30rpx $pages-padding;
  615. }
  616. .shortcut-type {
  617. width: 100%;
  618. display: flex;
  619. align-items: stretch;
  620. justify-content: space-between;
  621. .type-box {
  622. flex: 1;
  623. display: flex;
  624. align-items: stretch;
  625. border-radius: 6rpx;
  626. overflow: hidden;
  627. .type-item {
  628. font-size: 24rpx;
  629. flex-shrink: 0;
  630. flex: 1;
  631. text-align: center;
  632. display: flex;
  633. align-items: center;
  634. justify-content: center;
  635. border: 1rpx solid $border-color6;
  636. color: $SizeColor;
  637. }
  638. .active-type-item {
  639. color: #fff;
  640. background-color: $Theme-Color;
  641. border: 1rpx solid $Theme-Color;
  642. }
  643. }
  644. .type-times {
  645. margin-left: 20rpx;
  646. width: 230rpx;
  647. height: 50rpx;
  648. line-height: 50rpx;
  649. border: 1rpx solid red;
  650. text-align: center;
  651. font-size: 26rpx;
  652. position: relative;
  653. color: $SizeColor;
  654. border: 1rpx solid $border-color6;
  655. border-radius: 6rpx;
  656. .iconfont {
  657. position: absolute;
  658. right: 10rpx;
  659. top: 50%;
  660. transform: translateY(-50%);
  661. font-size: 20rpx;
  662. color: $Theme-Color;
  663. }
  664. }
  665. }
  666. }
  667. .shortcut-price {
  668. width: 100%;
  669. padding-top: 60rpx;
  670. .price-box {
  671. width: 100%;
  672. height: 80rpx;
  673. border-radius: 10rpx;
  674. display: flex;
  675. justify-content: space-between;
  676. align-items: center;
  677. padding: 0 20rpx;
  678. background-color: $box-bg;
  679. font-size: 24rpx;
  680. color: $SizeColor2;
  681. .price-lable,
  682. .price-info {
  683. flex-shrink: 0;
  684. }
  685. .price-info {
  686. .price-num {
  687. color: #000;
  688. padding-right: 20rpx;
  689. }
  690. }
  691. .price-inp {
  692. flex: 1;
  693. height: 100%;
  694. padding: 0 10rpx;
  695. font-size: 24rpx;
  696. color: #000;
  697. text-align: right;
  698. }
  699. // <view class="price-box">
  700. // <text class="price-lable">价格</text>
  701. // <input class="price-inp" type="number">
  702. // <view class="price-info">
  703. // USDT
  704. // </view>
  705. // </view>
  706. }
  707. .price-box+.price-box {
  708. background-color: #fff;
  709. margin-top: 20rpx;
  710. border: 1rpx solid $box-bg;
  711. }
  712. }
  713. // <view class="shortcut-usable">
  714. // <view class="usable-info">
  715. // 可用:2927.81 USDT
  716. // </view>
  717. // <view class="usable-btn">
  718. // 充值
  719. // </view>
  720. // </view>
  721. .shortcut-usable {
  722. width: 100%;
  723. display: flex;
  724. justify-content: space-between;
  725. align-items: center;
  726. font-size: 24rpx;
  727. color: $SizeColor2;
  728. padding: 20rpx 0 40rpx;
  729. .usable-btn {
  730. color: $Theme-Color;
  731. }
  732. }
  733. // <view class="shortcut-btns">
  734. // <view class="shortcut-btn">
  735. // 买入/做多
  736. // </view>
  737. // <view class="shortcut-btn">
  738. // 卖出做空
  739. // </view>
  740. // </view>
  741. .shortcut-btns {
  742. display: flex;
  743. align-items: center;
  744. .shortcut-btn {
  745. flex: 1;
  746. height: 70rpx;
  747. line-height: 70rpx;
  748. text-align: center;
  749. font-size: 28rpx;
  750. color: #fff;
  751. background-color: $Theme-Color;
  752. &:nth-child(n + 2) {
  753. margin-left: 30rpx;
  754. background-color: $Theme-Color2;
  755. }
  756. }
  757. }
  758. .iframe-box {
  759. width: 100%;
  760. height: 50vh;
  761. iframe {
  762. width: 100%;
  763. height: 100%;
  764. }
  765. }
  766. // <view class="set-stop">
  767. // <view class="stop-left">
  768. // <text>止盈/止损</text>
  769. // <text class="stop-num">{{ item.target_profit_price || '--' }}/{{ item.stop_loss_price || '--'}}</text>
  770. // <text class="iconfont">&#xe610;</text>
  771. // </view>
  772. // <view class="stop-right">
  773. // <text class="icon-size iconfont">&#xe8b0;</text>
  774. // <text class="icon-size">分享</text>
  775. // </view>
  776. // </view>
  777. .set-stop {
  778. width: 100%;
  779. display: flex;
  780. align-items: center;
  781. justify-content: space-between;
  782. font-size: 26rpx;
  783. padding: 30rpx $pages-padding 0;
  784. .stop-left {
  785. font-size: 24rpx;
  786. color: $SizeColor2;
  787. .stop-num {
  788. padding: 0 10rpx;
  789. }
  790. .iconfont {
  791. color: $Theme-Color;
  792. }
  793. }
  794. .stop-right {
  795. color: $Theme-Color;
  796. font-size: 26rpx;
  797. .iconfont {
  798. margin-right: 6rpx;
  799. }
  800. }
  801. }
  802. // <view class="account-box">
  803. // <view class="account-item">
  804. // <view class="account-title">
  805. // <text class="text">持仓保证金USDT)</text>
  806. // </view>
  807. // <text class="account-num">{{ contractAccount.usdt_totle }}</text>
  808. // </view>
  809. // <view class="account-item">
  810. // <view class="account-title">
  811. // <text class="text">可用保证金(USDT)</text>
  812. // </view>
  813. // <text class="account-num">{{ contractAccount.totle }}</text>
  814. // </view>
  815. // <view class="account-item">
  816. // <view class="account-title">
  817. // <text class="text">未实现亏盈(USDT)</text>
  818. // </view>
  819. // <text class="account-num">{{ rateProfitsTotal.hazard_rate }}</text>
  820. // </view>
  821. // </view>
  822. .account-box {
  823. width: 100%;
  824. min-height: 120rpx;
  825. display: flex;
  826. align-items: stretch;
  827. width: 100%;
  828. padding: 30rpx $pages-padding;
  829. border-bottom: 1rpx solid $border-color4;
  830. .account-item {
  831. display: flex;
  832. flex-direction: column;
  833. flex-shrink: 0;
  834. flex: 1;
  835. &:nth-child(3n) {
  836. text-align: right;
  837. }
  838. // &:nth-child(3n - 1) {
  839. // width: 35%;
  840. // }
  841. // &:nth-child(3n - 2) {
  842. // width: 30%;
  843. // }
  844. // &:nth-child(n + 4) {
  845. // margin-top: 20rpx;
  846. // }
  847. .account-title {
  848. font-size: 24rpx;
  849. font-family: PingFang SC, PingFang SC-Bold;
  850. font-weight: 600;
  851. color: #807e89;
  852. line-height: 30rpx;
  853. }
  854. .account-num {
  855. font-size: 22rpx;
  856. font-family: PingFang SC, PingFang SC-Bold;
  857. font-weight: 700;
  858. color: #1a1a1a;
  859. line-height: 33rpx;
  860. margin-top: 11rpx;
  861. }
  862. }
  863. }
  864. </style>