index.vue 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316
  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">{{ leverTrade.caution_money }}</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">{{ leverTrade.origin_caution_money_all }}</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">{{ leverTrade.profits_all }}</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">{{ leverTrade.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. 'leverTrade'
  387. ])
  388. },
  389. created() {
  390. },
  391. mounted() {
  392. this.$eventBus.$on('placeOrder', (val) => {
  393. // 止盈
  394. this.restrictProfitVal = val.target_profit_price;
  395. this.restrictProfitStatus = 1
  396. // 止损
  397. this.restrictLossVal = val.stop_loss_price;
  398. // restrictLossStatus: 1, // 按价格止损 , 2 : 比例止损
  399. if (this.restrictProfitVal || this.restrictLossVal) {
  400. this.restrictType = 2 // 按价格止盈 , 2 : 比例止盈
  401. } else {
  402. this.restrictType = 1
  403. }
  404. });
  405. },
  406. methods: {
  407. getData() {
  408. this.closeLeverSuccess();
  409. },
  410. setNum(type) {
  411. if (this.status === 0) {
  412. // 只有限价才去计算
  413. if (!this.target_price) {
  414. this.target_price = 0
  415. };
  416. switch (type) {
  417. case 1:
  418. this.target_price = this.$decimalNum.sub(this.target_price, 0.01);
  419. break;
  420. case 2:
  421. this.target_price = this.$decimalNum.add(this.target_price, 0.01);
  422. break;
  423. }
  424. }
  425. },
  426. setType(item) {
  427. this.status = item.value;
  428. this.selectList = false
  429. if (this.status === 0) {
  430. this.target_price = this.daymarket.now_price;
  431. } else {
  432. this.target_price = ''
  433. }
  434. },
  435. // 平仓成功
  436. closeLeverSuccess() {
  437. this.$emit('refreshData')
  438. // this.getLeverDeal()
  439. },
  440. openDrawer() {
  441. this.$refs.drawerRef.open();
  442. },
  443. change(e) {
  444. console.log("e:", e);
  445. },
  446. adjustLever() {
  447. this.$nextTick(() => {
  448. this.$refs.leverRef.open()
  449. })
  450. },
  451. // 下单确认
  452. setSubmitLever(type) {
  453. this.$nextTick(() => {
  454. this.$refs.placeOrderRef.open(type)
  455. })
  456. },
  457. // 确认下单
  458. confirmPlaceOrder(type) {
  459. const setData = {
  460. status: this.status,
  461. legal_id: this.currencyVal.legal_id,
  462. currency_id: this.currencyVal.currency_id,
  463. multiple: this.multiple,
  464. share: this.percent ? `${this.percent}%` : this.share,
  465. type: type
  466. }
  467. if (this.setNodePrice) {
  468. // restrictProfitVal: '',
  469. // restrictProfitStatus: 1, // 按价格止盈 , 2 : 比例止盈
  470. // restrictType: 1, // 1 普通输入 , 2 市价(禁止输入,只能通过高级设置)
  471. // // 止损
  472. // restrictLossVal: '',
  473. // restrictLossStatus: 1, // 按价格止损 , 2 : 比例止损
  474. setData.target_profit_price = this.restrictProfitStatus === 1 ? this.restrictProfitVal : `${this.restrictProfitVal}%` // 【5-18】止盈,选填
  475. setData.stop_loss_price = this.restrictLossStatus === 1 ? this.restrictLossVal : `${this.restrictLossVal}%` // 5-18】止损,选填
  476. };
  477. if (this.status === 0) {
  478. setData.target_price = this.target_price
  479. }
  480. uni.showLoading({
  481. title: '',
  482. mask: true
  483. })
  484. Api_setSubmitLever(setData).then(res => {
  485. // this.getLeverDeal()
  486. uni.showToast({
  487. icon: 'none',
  488. title: '下单成功'
  489. })
  490. setTimeout(() => {
  491. uni.hideToast()
  492. this.$emit('refreshData')
  493. }, 500)
  494. }).finally(() => {
  495. uni.hideLoading()
  496. })
  497. },
  498. // 查看合约历史
  499. getHistory() {
  500. uni.navigateTo({
  501. url: `/pages/contract/history/index?legal_id=${this.currencyVal.legal_id}&currency_id=${this.currencyVal.currency_id}`
  502. })
  503. },
  504. // 平仓 - 反向开仓
  505. setDepot(obj) {
  506. this.closeLeverContent = obj.closeLeverContent;
  507. this.title = obj.title;
  508. this.$nextTick(() => {
  509. this.$refs.unopenRef.open()
  510. })
  511. },
  512. confirm() {
  513. this.$nextTick(() => {
  514. this.$refs.freightSpaceRef.confirm();
  515. })
  516. },
  517. lookDetails() {
  518. if (this.currencyVal && this.currencyVal.currency_id && this.currencyVal.legal_id) {
  519. uni.navigateTo({
  520. url: '/pages/contract/sustainability/details'
  521. })
  522. }
  523. },
  524. // 合约设置
  525. setContract() {
  526. this.$emit('setContract')
  527. },
  528. // 切换张数
  529. switchShare() {
  530. this.percent = 0
  531. this.isShareFocus = false;
  532. this.$nextTick(() => {
  533. this.isShareFocus = true;
  534. });
  535. }
  536. },
  537. }
  538. </script>
  539. <style lang="scss" scoped>
  540. .contract-box {
  541. .contract-title {
  542. padding: 5rpx $pages-padding 0;
  543. min-height: 78rpx;
  544. display: flex;
  545. align-items: center;
  546. justify-content: space-between;
  547. .contract-item {
  548. display: flex;
  549. align-items: center;
  550. flex-shrink: 0;
  551. .title-iocn {
  552. width: 28rpx;
  553. height: 24rpx;
  554. display: flex;
  555. flex-direction: column;
  556. // align-items: center;
  557. justify-content: space-between;
  558. .title-iocn-item {
  559. width: 100%;
  560. height: 4rpx;
  561. border-radius: 2rpx;
  562. background: #111111;
  563. &:first-child {
  564. width: 50%;
  565. }
  566. }
  567. }
  568. .title-text {
  569. font-size: 37rpx;
  570. font-family: PingFang SC, PingFang SC-Bold;
  571. font-weight: 700;
  572. text-align: left;
  573. color: #141213;
  574. line-height: 1.2;
  575. letter-spacing: 0.74rpx;
  576. padding-left: 19rpx;
  577. }
  578. .title-ratio {
  579. font-size: 24rpx;
  580. font-family: PingFang SC, PingFang SC-Regular;
  581. font-weight: 400;
  582. color: #808080;
  583. line-height: 33rpx;
  584. }
  585. .ratio-icon {
  586. width: 31rpx;
  587. height: 33rpx;
  588. margin-left: 22rpx;
  589. }
  590. }
  591. }
  592. .account-box {
  593. width: 100%;
  594. padding: 21rpx $pages-padding;
  595. display: flex;
  596. flex-wrap: wrap;
  597. background-color: #F6F6F6;
  598. .account-item {
  599. display: flex;
  600. flex-direction: column;
  601. flex-shrink: 0;
  602. &:nth-child(3n) {
  603. width: 40%;
  604. text-align: right;
  605. }
  606. &:nth-child(3n - 1) {
  607. width: 30%;
  608. text-align: right;
  609. }
  610. &:nth-child(3n - 2) {
  611. width: 30%;
  612. }
  613. &:nth-child(n + 4) {
  614. margin-top: 20rpx;
  615. }
  616. .account-title {
  617. font-size: 20rpx;
  618. font-family: PingFang SC, PingFang SC-Bold;
  619. font-weight: 600;
  620. color: #807e89;
  621. line-height: 30rpx;
  622. height: 30rpx;
  623. .text {
  624. border-bottom: 2rpx dashed #707070;
  625. }
  626. }
  627. .account-num {
  628. font-size: 22rpx;
  629. font-family: PingFang SC, PingFang SC-Bold;
  630. font-weight: 700;
  631. color: #1a1a1a;
  632. height: 33rpx;
  633. line-height: 33rpx;
  634. margin-top: 11rpx;
  635. }
  636. }
  637. }
  638. }
  639. .data-box {
  640. width: 100%;
  641. padding: 25rpx $pages-padding 20rpx;
  642. display: flex;
  643. justify-content: space-between;
  644. align-items: stretch;
  645. .data-left {
  646. width: 303rpx;
  647. .nums-title {
  648. width: 100%;
  649. height: 67rpx;
  650. .flex {
  651. display: flex;
  652. justify-content: space-between;
  653. align-items: center;
  654. line-height: 33rpx;
  655. font-size: 24rpx;
  656. font-family: PingFang SC, PingFang SC-Bold;
  657. font-weight: 700;
  658. color: #807e89;
  659. }
  660. }
  661. // .<view class="nums-title">
  662. // <view class="left-title flex">
  663. // <text>价格</text>
  664. // <text>数量</text>
  665. // </view>
  666. // <view class="subhead-title flex">
  667. // <text>(USDT)</text>
  668. // <text>(张)</text>
  669. // </view>
  670. // </view>
  671. // .left-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. // .subhead-title {
  679. // font-size: 24rpx;
  680. // font-family: PingFang SC, PingFang SC-Bold;
  681. // font-weight: 700;
  682. // color: #807e89;
  683. // line-height: 33rpx;
  684. // }
  685. .nums-list {
  686. width: 100%;
  687. padding: 10rpx 0 4rpx;
  688. min-height: 318rpx;
  689. .nums-item {
  690. width: 100%;
  691. position: relative;
  692. height: 40rpx;
  693. margin-bottom: 4rpx;
  694. .nums-item-bg {
  695. position: absolute;
  696. top: 0;
  697. right: 0;
  698. z-index: 1;
  699. height: 100%;
  700. }
  701. .item-num {
  702. width: 100%;
  703. height: 100%;
  704. position: absolute;
  705. top: 0;
  706. right: 0;
  707. z-index: 2;
  708. display: flex;
  709. justify-content: space-between;
  710. align-items: center;
  711. font-size: 22rpx;
  712. font-family: PingFang SC, PingFang SC-Bold;
  713. font-weight: 700;
  714. line-height: 33rpx;
  715. color: #1a1a1a;
  716. text+text {
  717. font-weight: 700;
  718. line-height: 33rpx;
  719. }
  720. }
  721. }
  722. }
  723. // <view class="nums-list">
  724. // <view class="nums-item">
  725. // <text class="nums-item-bg"></text>
  726. // <text class="item-num">28516.8</text>
  727. // <text class="item-num">28516.8</text>
  728. // </view>
  729. // </view>
  730. }
  731. .data-right {
  732. width: 365rpx;
  733. // background-color: green;
  734. .right-select {
  735. width: 100%;
  736. display: flex;
  737. justify-content: space-between;
  738. align-items: center;
  739. .select-box {
  740. width: 175rpx;
  741. height: 50rpx;
  742. display: flex;
  743. justify-content: space-between;
  744. align-items: center;
  745. background-color: #f1f1f1;
  746. padding: 0 3px;
  747. border-radius: 8rpx;
  748. .select-text {
  749. font-size: 26rpx;
  750. font-weight: 700;
  751. }
  752. .iconfont {
  753. font-size: 20rpx;
  754. color: $Theme-Color;
  755. }
  756. }
  757. .position-select {
  758. position: relative;
  759. .select-list {
  760. position: absolute;
  761. left: 0;
  762. top: 50rpx;
  763. width: 185rpx;
  764. display: flex;
  765. flex-direction: column;
  766. background-color: #fff;
  767. z-index: 1;
  768. .select-list-item {
  769. width: 100%;
  770. height: 70rpx;
  771. line-height: 70rpx;
  772. padding: 0 30rpx;
  773. font-size: 22rpx;
  774. font-weight: bold;
  775. color: #c1c1c1;
  776. }
  777. .active-select-item {
  778. background-color: #f1f1f1;
  779. color: #000;
  780. }
  781. }
  782. }
  783. // <view class="select-box">
  784. // <text class="select-text">限价委托</text>
  785. // <text class="iconfont">&#xe601;</text>
  786. // </view>
  787. // <view class="select-box">
  788. // <text class="select-text">限价委托</text>
  789. // <text class="iconfont">&#xe601;</text>
  790. // </view>
  791. // .select-item {
  792. // width: 175rpx !important;
  793. // height: 50rpx;
  794. // flex: 0;
  795. // ::v-deep .uni-stat-box {
  796. // width: 175rpx !important;
  797. // height: 48rpx;
  798. // .uni-select {
  799. // width: 175rpx !important;
  800. // height: 48rpx;
  801. // .uni-select__input-box {
  802. // width: 100%;
  803. // height: 48rpx !important;
  804. // }
  805. // .uniui-clear{
  806. // display: none;
  807. // }
  808. // }
  809. // }
  810. // }
  811. }
  812. .right-input {
  813. width: 100%;
  814. height: 76rpx;
  815. background: #efefef;
  816. border-radius: 10rpx;
  817. margin-top: 30rpx;
  818. display: flex;
  819. justify-content: space-between;
  820. align-items: center;
  821. padding: 0 20rpx;
  822. font-size: 24rpx;
  823. font-family: PingFang SC, PingFang SC-Bold;
  824. font-weight: 700;
  825. color: #808080;
  826. line-height: 40rpx;
  827. .input-item {
  828. height: 100%;
  829. font-size: 24rpx;
  830. flex: 1;
  831. color: #000;
  832. }
  833. .input-item-val {
  834. display: flex;
  835. justify-content: flex-end;
  836. align-items: center;
  837. }
  838. .placeholder-class {
  839. font-size: 24rpx;
  840. }
  841. .input-item-text {
  842. display: flex;
  843. align-items: center;
  844. }
  845. .input-item-p {
  846. font-size: 24rpx;
  847. font-family: PingFang SC, PingFang SC-Bold;
  848. font-weight: 700;
  849. color: #808080;
  850. line-height: 40rpx;
  851. opacity: 0.3;
  852. }
  853. .right-input-icon {
  854. flex-shrink: 0;
  855. font-size: 24rpx;
  856. font-family: PingFang SC, PingFang SC-Bold;
  857. // font-weight: 700;
  858. color: #808080;
  859. line-height: 40rpx;
  860. display: flex;
  861. align-items: center;
  862. text {
  863. &:first-child {
  864. font-size: 24rpx;
  865. }
  866. }
  867. .icon-link {
  868. font-size: 20rpx;
  869. margin: 0 15rpx;
  870. color: $Theme-Color;
  871. }
  872. .icon {
  873. width: 30rpx;
  874. height: 26rpx;
  875. font-size: 18rpx;
  876. }
  877. }
  878. // <view class="target-price">
  879. // <text class="target-price-tag">-</text>
  880. // <input class="input-item" v-model="target_price" type="number">
  881. // <text class="target-price-tag">+</text>
  882. // </view>
  883. .target-price {
  884. width: 100%;
  885. height: 100%;
  886. display: flex;
  887. justify-content: space-between;
  888. align-items: stretch;
  889. .target-price-tag {
  890. flex-shrink: 0;
  891. width: 50rpx;
  892. height: 100%;
  893. text-align: center;
  894. font-size: 26rpx;
  895. color: $Theme-Color;
  896. display: flex;
  897. align-items: center;
  898. &:last-child {
  899. justify-content: flex-end;
  900. }
  901. }
  902. .input-item {
  903. flex: 1;
  904. height: 100%;
  905. font-size: 24rpx;
  906. text-align: center;
  907. // .nums-inp {
  908. // width: 100%;
  909. // height: 100%;
  910. // text-align: center;
  911. // font-size: 28rpx;
  912. // font-weight: bold;
  913. // }
  914. // .nums-t {
  915. // position: absolute;
  916. // left: 0;
  917. // top: 0;
  918. // width: 100%;
  919. // height: 100%;
  920. // }
  921. // <input class="nums-inp" type="text" v-model="leverNum">
  922. // <text class="nums-inp-tag">X</text>
  923. }
  924. }
  925. }
  926. .step-content {
  927. padding: 24rpx 0 35rpx;
  928. }
  929. .set-node {
  930. width: 100%;
  931. display: flex;
  932. align-items: center;
  933. justify-content: space-between;
  934. .set-node-box {
  935. display: flex;
  936. align-items: center;
  937. }
  938. .set-node-high {
  939. font-size: 24rpx;
  940. font-family: PingFang SC, PingFang SC-Regular;
  941. font-weight: 400;
  942. color: $Theme-Color;
  943. line-height: 1.1;
  944. }
  945. .set-node-status {
  946. width: 27rpx;
  947. height: 27rpx;
  948. background: #e6e6e8;
  949. border-radius: 2rpx;
  950. }
  951. .active-set {
  952. background-color: $Theme-Color;
  953. display: flex;
  954. justify-content: center;
  955. align-items: center;
  956. .iconfont {
  957. font-size: 26rpx;
  958. color: #fff;
  959. }
  960. }
  961. .set-node-text {
  962. font-size: 24rpx;
  963. font-family: PingFang SC, PingFang SC-Regular;
  964. font-weight: 400;
  965. color: #808080;
  966. line-height: 1.1;
  967. margin-left: 14rpx;
  968. border-bottom: 2rpx dashed #707070;
  969. }
  970. }
  971. .info-item {
  972. width: 100%;
  973. display: flex;
  974. justify-content: space-between;
  975. align-items: center;
  976. font-size: 26rpx;
  977. padding: 32rpx 0 0;
  978. line-height: 1.1;
  979. .info-item-lable {
  980. color: $SizeColor3;
  981. border-bottom: 1rpx dashed #707070;
  982. }
  983. .info-item-val {
  984. font-size: 22rpx;
  985. font-weight: bold;
  986. display: flex;
  987. align-items: center;
  988. .info-item-icon {
  989. font-size: 20rpx;
  990. margin-left: 20rpx;
  991. width: 30rpx;
  992. height: 30rpx;
  993. background-color: $Theme-Color;
  994. color: #fff;
  995. text-align: center;
  996. line-height: 30rpx;
  997. border-radius: 6rpx;
  998. }
  999. }
  1000. }
  1001. .info-btns {
  1002. width: 100%;
  1003. padding-top: 16rpx;
  1004. .info-btn-info {
  1005. display: flex;
  1006. justify-content: space-between;
  1007. font-size: 24rpx;
  1008. padding-bottom: 10rpx;
  1009. .info-btn-lable {
  1010. color: $SizeColor3;
  1011. }
  1012. .info-btn-val {
  1013. font-weight: bold;
  1014. }
  1015. // <view class="info-btn-info">
  1016. // <text class="info-btn-lable">可做多</text>
  1017. // <text class="info-btn-val">33719张</text>
  1018. // </view>
  1019. }
  1020. .info-btn {
  1021. width: 100%;
  1022. height: 80rpx;
  1023. background-color: $Theme-Color;
  1024. text-align: center;
  1025. line-height: 80rpx;
  1026. font-size: 30rpx;
  1027. color: #fff;
  1028. border-radius: 10rpx;
  1029. font-weight: bold;
  1030. }
  1031. }
  1032. .err-btns {
  1033. .info-btn {
  1034. background-color: $Theme-Color3;
  1035. }
  1036. }
  1037. }
  1038. }
  1039. .switch-icon {
  1040. color: $Theme-Color;
  1041. font-size: 26rpx;
  1042. }
  1043. .lable-title {
  1044. width: 100%;
  1045. height: 100rpx;
  1046. border-bottom: 1rpx solid $border-color;
  1047. padding: 0 $pages-padding;
  1048. display: flex;
  1049. justify-content: space-between;
  1050. align-items: center;
  1051. .lable-text {
  1052. height: 100%;
  1053. display: flex;
  1054. align-items: stretch;
  1055. .lable-text-item {
  1056. height: 100%;
  1057. display: flex;
  1058. align-items: center;
  1059. font-size: 28rpx;
  1060. &:first-child {
  1061. margin-right: 40rpx;
  1062. }
  1063. }
  1064. .active-text-item {
  1065. font-size: 34rpx;
  1066. font-weight: bold;
  1067. color: $Theme-Color;
  1068. position: relative;
  1069. &::before {
  1070. content: '';
  1071. position: absolute;
  1072. left: 50%;
  1073. bottom: 0;
  1074. width: 40rpx;
  1075. height: 8rpx;
  1076. background-color: $Theme-Color;
  1077. transform: translateX(-50%);
  1078. border-radius: 4rpx;
  1079. }
  1080. }
  1081. }
  1082. }
  1083. .index-num-box {
  1084. height: 115rpx;
  1085. width: 100%;
  1086. border: 1rpx solid $border-color;
  1087. border-left: none;
  1088. border-right: none;
  1089. display: flex;
  1090. flex-direction: column;
  1091. justify-content: center;
  1092. .index-num-title {
  1093. height: 50rpx;
  1094. line-height: 50rpx;
  1095. display: flex;
  1096. justify-content: space-between;
  1097. font-family: PingFang SC, PingFang SC-Bold;
  1098. font-weight: 700;
  1099. color: #20b482;
  1100. text {
  1101. &:first-child {
  1102. font-size: 36rpx;
  1103. }
  1104. &:last-child {
  1105. font-size: 28rpx;
  1106. }
  1107. }
  1108. }
  1109. .index-title {
  1110. height: 28rpx;
  1111. display: flex;
  1112. justify-content: space-between;
  1113. font-family: PingFang SC, PingFang SC-Bold;
  1114. font-weight: 700;
  1115. text {
  1116. font-size: 20rpx;
  1117. line-height: 28rpx;
  1118. color: #808080;
  1119. border-bottom: 1px dashed #808080;
  1120. }
  1121. }
  1122. // .index-num-title {
  1123. // font-size: 36rpx;
  1124. // font-family: PingFang SC, PingFang SC-Bold;
  1125. // font-weight: 700;
  1126. // color: #20b482;
  1127. // line-height: 50rpx;
  1128. // text+text {
  1129. // font-size: 28rpx;
  1130. // font-family: PingFang SC, PingFang SC-Bold;
  1131. // font-weight: 700;
  1132. // color: #20b482;
  1133. // line-height: 40rpx;
  1134. // }
  1135. // }
  1136. // .index-title {
  1137. // font-size: 20rpx;
  1138. // color: #808080;
  1139. // line-height: 1.2;
  1140. // text {
  1141. // border-bottom: 2rpx dashed #707070;
  1142. // display: flex;
  1143. // align-items: center;
  1144. // }
  1145. // padding-bottom: 18rpx;
  1146. // border-bottom: 1px solid #f2f2f2;
  1147. // // &:first-child{
  1148. // // text-align: right;
  1149. // // }
  1150. // }
  1151. }
  1152. </style>