index.vue 31 KB

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