index.vue 30 KB

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