index.html 66 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  5. <meta name="viewport" content="width=device-width,minimum-scale=1,maximum-scale=1.0,initial-scale=1,user-scalable=no,viewport-fit=true" data-shuvi-head="true">
  6. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
  8. <link rel="stylesheet" type="text/css" href="/Public/Home/static/css/base.css" />
  9. <title>{$webname}</title>
  10. <style>
  11. .css-1wr4jig {
  12. box-sizing: border-box;
  13. margin: 0;
  14. min-width: 0;
  15. display: -webkit-box;
  16. display: -webkit-flex;
  17. display: -ms-flexbox;
  18. display: flex;
  19. -webkit-flex-direction: column;
  20. -ms-flex-direction: column;
  21. flex-direction: column;
  22. -webkit-flex: 1;
  23. -ms-flex: 1;
  24. flex: 1;
  25. }
  26. .css-wp2li4 {
  27. box-sizing: border-box;
  28. margin: 0;
  29. min-width: 0;
  30. display: -webkit-box;
  31. display: -webkit-flex;
  32. display: -ms-flexbox;
  33. display: flex;
  34. overflow-x: hidden;
  35. -webkit-flex-direction: column;
  36. -ms-flex-direction: column;
  37. flex-direction: column;
  38. }
  39. .klinetitle{width:100%;height:80px;background:#fff;padding:0px 20px;}
  40. .klinetitle_l{width:33.33%;height:80px;float:left;}
  41. .klinetitle_r{width:33.33%;height:80px;float:left;}
  42. .newpricebox{height:40px;line-height:60px;margin-bottom:0px;color:#2ebd85;font-size:22px;font-weight:bold;}
  43. .changebox{height:40px;line-height:40px;margin-bottom:0px;color:#2ebd85;font-weight:bold;}
  44. .klr3_box{width:100%;height:30px;}
  45. .klr2_box{width:100%;height:25px;}
  46. .klr3_box_dl{width:45%;height:30px;line-height:40px;float:left;text-align:left;}
  47. .klr3_box_dr{width:55%;height:30px;line-height:40px;float:right;text-align:right;}
  48. .klr2_box_dl{width:45%;height:25px;line-height:25px;float:left;text-align:left;}
  49. .klr2_box_dr{width:55%;height:25px;line-height:25px;float:right;text-align:right;}
  50. .dong_con{width:80%;height:100vh;background:#fff;margin-top:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;padding:20px 15px 10px 20px;float:left;}
  51. .dong_title{width:100%;height:40px;line-height:40px;}
  52. .dong_title_span{font-size:18px;font-weight:500;}
  53. .dong_find_box{width:100%;height:30px;background:#f5f5f5;border-radius:10px;}
  54. .dong_find_box_img{width:20%;height:30px;line-height:30px;float:left;text-align:center;}
  55. .dong_input_box{width:80%;height:30px;float:left;}
  56. .dong_symbox{width:90%;height:20px;border:none;background:#f5f5f5;margin-top:5px;}
  57. .dong_sel_box{width:100%;height:30px;border-bottom:1px solid #f5f5f5;}
  58. .dong_sel_span{display:block;width:35px;height:30px;line-height:30px;border-bottom:2px solid #FCD535;font-size:14px;text-align:center;font-size:14px;}
  59. .symbol_list{width:100%;height:1120px;margin-top:10px;}
  60. .no_header{position: fixed;z-index: 9999;padding:0px 10px;top:0px;background: #fff;}
  61. .txtl{line-height:50px;width:30%;}
  62. .contentbox{width:100%;background:#fff;padding:10px;}
  63. .content_title{width:100%;height:40px;line-height:40px;margin-top:50px;position: fixed;z-index: 9999;top:0px;padding:0px 10px;background:#fff;border-bottom:1px solid #f5f5f5;}
  64. .content_title_l{width:70%;height:40px;line-height:40px;float:left;}
  65. .content_title_r{width:30%;height:40px;line-height:40px;float:right;padding:0px 5px;}
  66. .tleft{text-align:left;}
  67. .tright{text-align:right;}
  68. .tradebox{width:100%;height:400px;background:#fff;}
  69. .tradebox_l{width:58%;height:400px;float:left;}
  70. .tradebox_r{width:40%;height:400px;float:right;}
  71. .tradebox_l_btn{width:100%;height:36px;}
  72. .tradebox_l_buybtn{width:48%;height:36px;line-height:36px;float:left;text-align:center;border-radius:5px;}
  73. .tradebox_l_sellbtn{width:48%;height:36px;line-height:36px;float:right;text-align:center;border-radius:5px;}
  74. .bggreen{background:#0ecb81;}
  75. .green{color:#0ecb81;}
  76. .bgred{background:#f5465c;}
  77. .red{color:#f5465c;}
  78. .bghc{background:#f5f5f5;}
  79. .cfff{color:#fff;}
  80. .c000{color:#000;}
  81. .formbox{width:100%;height:350px;margin-top:15px;}
  82. .formbox_op{width:100%;height:30px;}
  83. .formbox_op_list{width:20%;height:30px;line-height:30px;float:left;text-align:center;cursor:pointer;}
  84. .inputbox{width:100%;height:36px;border:1px solid #f5f5f5;border-radius:5px;margin:10px 0px 20px;}
  85. .inputbox_float{width:60%;height:36px;float:left;}
  86. .xjinput{width:90%;background:#fff;border:#fff;margin-top:7px;padding:0px 10px;}
  87. .input_bi{width:50%;height:26px;line-height:26px;float:left;text-align:center;margin-top:5px;cursor:pointer;}
  88. .borderright{border-right:1px solid #f5f5f5;}
  89. .bistyle{font-size:16px;cursor: pointer;}
  90. .blbox{width:100%;height:30px;margin-top:15px;}
  91. .blbox_1{width:20%;height:30px;float:left;margin-right:6%;}
  92. .blbox_2{width:20%;height:30px;float:left;}
  93. .blbox_3{width:100%;height:10px;}
  94. .bgf5{background:#f5f5f5;border-radius:5px;cursor: pointer;}
  95. .blbox_4{width:100%;height:20x;line-height:20px;text-align:center;}
  96. .tradebox_title{width:50%;height:20px;line-height:20px;float:left;}
  97. .tl{text-align:left;}
  98. .tr{text-align:right;}
  99. .tc{text-align:center;}
  100. .fl{float:left;}
  101. .fr{float:right;}
  102. .trade_listbox{width:100%;height:300px;padding:5px;overflow:hidden;}
  103. .trade_listpricebox{width:100%;height:40px;line-height:40px;padding:0px 10px;}
  104. .trade_list{width:50%;height:30px;line-height:30px;float:left;}
  105. .dongbox{position:fixed;z-index:9999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
  106. .dong_con{width:80%;height:100vh;background:#fff;margin-top:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;padding:20px 15px 10px 20px;float:left;}
  107. .dong_title{width:100%;height:40px;line-height:40px;}
  108. .dong_title_span{font-size:18px;font-weight:500;}
  109. .dong_find_box{width:100%;height:30px;background:#f5f5f5;border-radius:10px;}
  110. .dong_find_box_img{width:20%;height:30px;line-height:30px;float:left;text-align:center;}
  111. .dong_input_box{width:80%;height:30px;float:left;}
  112. .dong_symbox{width:90%;height:20px;border:none;background:#f5f5f5;margin-top:5px;}
  113. .dong_sel_box{width:100%;height:30px;border-bottom:1px solid #f5f5f5;}
  114. .dong_sel_span{display:block;width:35px;height:30px;line-height:30px;border-bottom:2px solid #FCD535;font-size:14px;text-align:center;font-size:14px;}
  115. .symbol_list{width:100%;margin-top:10px;}
  116. .sy_list_box{width:100%;height:30px;}
  117. .sy_list_boxl{width:35%;height:30px;line-height:30px;float:left;text-align:left;}
  118. .sy_list_boxr{width:30%;height:30px;line-height:30px;float:right;text-align:right;}
  119. .order_title{display: inline-block;margin-right: 20px;font-weight: 1000;}
  120. .FCD535{border-bottom: 2px solid #FCD535;}
  121. .fccbox{width:100%;height:15px;background:#f5f5f5;}
  122. .wtlistbox{width:100%;padding:0px 10px;}
  123. .o_title_box{width:50%;height:40px;line-height:40px;border-bottom:1px solid #f5f5f5;}
  124. .tlistbox{width:100%;clear:both;padding:10px 0px;}
  125. .tlistbox_1{width:100%;height:100px;border-bottom:1px solid #f5f5f5;}
  126. .tlistbox_2{width:100%;height:30px;}
  127. .tlistbox_3{width:80%;height:30px;line-height:30px;}
  128. .tlistbox_4{width:20%;height:30px;line-height:30px;}
  129. .tlistbox_5{padding:5px 10px;background:#fcfcfc;border-radius:5px;}
  130. .tlistbox_6{width:100%;height:60px;}
  131. .tlistbox_7{width:33.33%;height:60px;}
  132. .tlistbox_8{width:100%;height:30px;line-height:30px;}
  133. .tlistbox_9{width:100%;height:30px;line-height:20px;}
  134. .dongbox {position: fixed;z-index: 99999;display: none;top: 0px;width: 100%;height: 100vh;background: rgba(0,0,0,0.4);}
  135. .t_contentbox{width:100%;overflow:hidden;min-height:400px;padding:5px 25px;}
  136. .t_content_title{width:100%;height:40px;margin-bottom:15px;}
  137. .t_content_title_l{width:50%;height:40px;line-height:40px;float:left;text-align:left;color:#000;font-size:16px;font-weight:bold;}
  138. .t_content_title_r{width:50%;height:40px;line-height:40px;float:left;text-align:right;font-size:16px;color:#FCD535;cursor:pointer;}
  139. .up_content_box{width:48%;overflow:hidden;min-height:380px;float:left;padding:15px 20px;border: 1px solid #f5f5f5;border-radius: 10px;box-shadow: 0px 0px 5px 0px #f5f5f5;}
  140. .down_content_box{width:48%;overflow:hidden;min-height:380px;float:right;padding:15px 20px;border: 1px solid #f5f5f5;border-radius: 10px;box-shadow: 0px 0px 5px 0px #f5f5f5;}
  141. .c_title_up{width:100%;height:40px;line-height:40px;text-align:center;font-size:14px;color:#fff;font-weight:bold;background: #0ecb81;border-radius: 5px;margin-bottom:10px;cursor:pointer;}
  142. .c_title_down{width:100%;height:40px;line-height:40px;text-align:center;font-size:14px;color:#fff;font-weight:bold;background: #f5465c;border-radius: 5px;margin-bottom:10px;cursor:pointer;}
  143. .up_type_box{width:100%;height:40px;}
  144. .up_type_box_op{width:30%;height:40px;line-height:40px;text-align:left;font-size:14px;color:#707A8A;cursor:pointer;}
  145. .up_type_box_op_ac{width:30%;height:40px;line-height:40px;text-align:left;font-size:14px;color:#FCD535;cursor:pointer;}
  146. .down_type_box{width:100%;height:40px;}
  147. .down_type_box_op{width:30%;height:40px;line-height:40px;text-align:left;font-size:14px;color:#707A8A;cursor:pointer;}
  148. .down_type_box_op_ac{width:30%;height:40px;line-height:40px;text-align:left;font-size:14px;color:#FCD535;cursor:pointer;}
  149. .trade_lots_title{width:100%;height:30px;line-height:30px;text-align:left;padding-left:10px;}
  150. .trade_lots_title_txt{font-size:14px;font-weight:bold;}
  151. .trade_lots_op_box{width:100%;height:30px;}
  152. .trade_lots_op_list{width:22%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;cursor:pointer;}
  153. .trade_ggan_op_list{width:18%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;cursor:pointer;}
  154. .active_lots{background:#f5f5f5;color:#000;font-size:16px;font-weight:bold;}
  155. .buy_zs_box{width:100%;height:30px;margin-bottom:5px;}
  156. .buy_zs_boxl{width:30%;height:30px;line-height:30px;float:left;color:#000;text-align:left;font-size:14px;}
  157. .buy_zs_boxr{width:65%;height:30px;line-height:30px;float:right;border:1px solid #f5f5f5;border-radius:5px;font-size:14px;}
  158. .buy_zs_input_lr{width:15%;height:30px;line-height:30px;text-align:center;float:left;}
  159. .buy_zs_input_box{width:70%;height:30px;line-height:30px;text-align:center;float:left;}
  160. .buy_zs_input{width:100%;height:20px;background:#fff;border:none;padding-left:5px;text-align:center;}
  161. .up_txt_box{width:100%;height:40px;border-bottom: 1px solid #f5f5f5;}
  162. .up_txt_box_l{width:60%;height:40px;line-height:40px;float:left;font-size:14px;}
  163. .up_txt_box_r{width:40%;height:40px;line-height:40px;float:left;text-align:right;}
  164. .buyduo_btn{width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:10px;cursor:pointer;}
  165. .buykong_btn{width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:10px;cursor:pointer;}
  166. </style>
  167. </head>
  168. <body>
  169. <div class="App">
  170. <div class="css-tq0shg">
  171. <include file="Public:header"/>
  172. <div class="css-ogtd7z">
  173. <div class="css-jrzkh7">
  174. <div id="header_global_js_wxgy34nj" class="css-1aac2e"></div>
  175. </div>
  176. </div>
  177. <main class="css-1wr4jig">
  178. <div style="width:100%;overflow:hidden;min-height:1450px;background:#f5f5f5;padding:10px 0px 0px 0px;">
  179. <div style="width:100%;overflow:hidden;min-height:1450px;">
  180. <div style="width:20%;overflow:hidden;min-height:1450px;float:left;padding:0px 10px 0px 0px;">
  181. <div style="width:100%;overflow:hidden;min-height:1450px;background:#fff;">
  182. <div style="width:100%;height:100%;padding:0px;padding:0px 10px;">
  183. <div style="width:100%;top:0px;">
  184. <div class="dong_title">
  185. <span class="dong_title_span" style="font-weight: bold;">{:L('永续合约')}</span>
  186. </div>
  187. <div class="dong_sel_box">
  188. <span class="fcc dong_sel_span">{:L('全部')}</span>
  189. </div>
  190. </div>
  191. <div class="symbol_list" id="smybolbox">
  192. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  193. <span class="f14 fcc">{:L('没有获取数据')}</span>
  194. </div>
  195. </div>
  196. </div>
  197. </div>
  198. </div>
  199. <div style="width:60%;overflow:hidden;min-height:1450px;background:#fff;float:left;">
  200. <div style="width:100%;height:90px;border-bottom:3px solid #f5f5f5;">
  201. <div class="klinetitle">
  202. <div class="klinetitle_l">
  203. <p class="fch" style="font-size:18px;margin:0px;height:40px;line-height:60px;">{$coinname}</p>
  204. <p class="fch" style="font-size:12px;margin:0px;height:40px;">{:L('永续合约')}</p>
  205. </div>
  206. <div class="klinetitle_l">
  207. <p class="newpricebox closeprice" id="newpricebox" style="font-size:24px;">--</p>
  208. <p class="changebox" id="changebox">--</p>
  209. </div>
  210. <div class="klinetitle_r">
  211. <div class="klr3_box">
  212. <div class="klr3_box_dl">
  213. <span class="f14 fcc">{:L('最低')}</span>
  214. </div>
  215. <div class="klr3_box_dr">
  216. <span class="f14 fch" id="minmoney">--</span>
  217. </div>
  218. </div>
  219. <div class="klr2_box">
  220. <div class="klr2_box_dl">
  221. <span class="f14 fcc">{:L('最高')}</span>
  222. </div>
  223. <div class="klr2_box_dr">
  224. <span class="f14 fch" id="maxmoney">--</span>
  225. </div>
  226. </div>
  227. <div class="klr2_box">
  228. <div class="klr2_box_dl">
  229. <span class="f14 fcc">24h{:L('量')}</span>
  230. </div>
  231. <div class="klr2_box_dr">
  232. <span class="f14 fch" id="allvol">--</span>
  233. </div>
  234. </div>
  235. </div>
  236. </div>
  237. </div>
  238. <div style="width:100%;overflow:hidden;min-height:600px;padding:5px;">
  239. <div style="width:100%;overflow:hidden;min-height:600px;">
  240. <div style="width:100%;overflow:hidden;min-height:600px;">
  241. <?php if($market == "ukbusdt"){?>
  242. <iframe id="iframeid" width="100%" scrolling="no" height="600px" src="<?php echo U('Levertade/ordinaryh',array('market'=>$market));?>" noresize="noresize" frameborder="0" >{:L('不支持IFRAME,请升级')}</iframe>
  243. </eq>
  244. <?php }else{ ?>
  245. <iframe id="iframeid" width="100%" scrolling="no" height="600px" src="<?php echo U('Levertade/ordinary',array('market'=>$market));?>" noresize="noresize" frameborder="0" >{:L('不支持IFRAME,请升级')}</iframe>
  246. </eq>
  247. <?php }?>
  248. </div>
  249. </div>
  250. </div>
  251. <div class="t_contentbox">
  252. <div class="t_content_title">
  253. <div class="t_content_title_l">{:L('合约交易')}</div>
  254. <a href="{:U('Levertade/cclist')}">
  255. <div class="t_content_title_r">
  256. <i class="bi bi-funnel-fill"></i>{:L('我的订单')}
  257. </div>
  258. </a>
  259. </div>
  260. <div class="up_content_box">
  261. <div class="c_title_up" id="buybtn">{:L('上涨')}</div>
  262. <div class="up_type_box">
  263. <div class="up_type_box_op_ac fl" id="buyxjbtn">
  264. <span id="xjspan">{:L('限价委托')}</span>
  265. </div>
  266. <div class="up_type_box_op fl" id="buysjbtn">
  267. <span id="sjspan">{:L('市价委托')}</span>
  268. </div>
  269. </div>
  270. <!--限价委托单价框-->
  271. <div class="inputbox" id="xjbox">
  272. <div class="inputbox_float">
  273. <input type="text" id="newprice" onblur="up_price();" class="fcc xjinput" value="" />
  274. </div>
  275. <div class="inputbox_float" style="width:40%;">
  276. <div class="input_bi borderright" id="dash_buyprice">
  277. <i class="bi bi-dash bistyle"></i>
  278. </div>
  279. <div class="input_bi" id="plus_buyprice">
  280. <i class="bi bi-plus bistyle"></i>
  281. </div>
  282. </div>
  283. </div>
  284. <div class="trade_lots_box" style="width:100%;height:110px;">
  285. <div class="trade_lots_title">
  286. <span class="trade_lots_title_txt">{:L('交易手数')}</span>
  287. </div>
  288. <div class="trade_lots_op_box">
  289. <div class="trade_lots_op_list active_lots" id="up_lots_1" onclick="set_up_lotsnum(1,1,1)" style="margin-right:4%;">1</div>
  290. <div class="trade_lots_op_list" id="up_lots_2" onclick="set_up_lotsnum(5,1,2)" style="margin-right:4%;">5</div>
  291. <div class="trade_lots_op_list" id="up_lots_3" onclick="set_up_lotsnum(10,1,3)" style="margin-right:4%;">10</div>
  292. <div class="trade_lots_op_list" id="up_lots_4" onclick="set_up_lotsnum(20,1,4)">20</div>
  293. </div>
  294. <div class="inputbox" id="xjbox">
  295. <div class="inputbox_float">
  296. <input type="text" id="lotsnum" readonly="readonly" class="fcc xjinput" value="1" />
  297. </div>
  298. <div class="inputbox_float" style="width:40%;">
  299. <div class="input_bi borderright" id="dash_lotsnum">
  300. <i class="bi bi-dash bistyle"></i>
  301. </div>
  302. <div class="input_bi" id="plus_lotsnum">
  303. <i class="bi bi-plus bistyle"></i>
  304. </div>
  305. </div>
  306. </div>
  307. </div>
  308. <div class="trade_lots_box" style="width:100%;height:110px;">
  309. <div class="trade_lots_title">
  310. <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
  311. </div>
  312. <div class="trade_lots_op_box">
  313. <div class="trade_ggan_op_list active_lots" id="up_ggan_1" onclick="set_up_ggan(5,1,1)" style="margin-right:2%;">5</div>
  314. <div class="trade_ggan_op_list" id="up_ggan_2" onclick="set_up_ggan(10,1,2)" style="margin-right:2%;">10</div>
  315. <div class="trade_ggan_op_list" id="up_ggan_3" onclick="set_up_ggan(20,1,3)" style="margin-right:2%;">20</div>
  316. <div class="trade_ggan_op_list" id="up_ggan_4" onclick="set_up_ggan(50,1,4)" style="margin-right:2%;">50</div>
  317. <div class="trade_ggan_op_list" id="up_ggan_5" onclick="set_up_ggan(100,1,5)">100</div>
  318. </div>
  319. <div class="inputbox" id="xjbox">
  320. <div class="inputbox_float">
  321. <input type="text" id="upggan" readonly="readonly" class="fcc xjinput" value="5" />
  322. </div>
  323. </div>
  324. </div>
  325. <div class="buy_zs_box">
  326. <div class="buy_zs_boxl">{:L('止损价')}:</div>
  327. <div class="buy_zs_boxr">
  328. <div class="buy_zs_input_lr">
  329. <i class="bi bi-dash bistyle" id="dash_up_zsprice"></i>
  330. </div>
  331. <div class="buy_zs_input_box">
  332. <input type="text" id="up_zsprice" class="buy_zs_input" value="0" />
  333. </div>
  334. <div class="buy_zs_input_lr">
  335. <i class="bi bi-plus bistyle" id="plus_up_zsprice"></i>
  336. </div>
  337. </div>
  338. </div>
  339. <div class="buy_zs_box">
  340. <div class="buy_zs_boxl">{:L('止盈价')}:</div>
  341. <div class="buy_zs_boxr">
  342. <div class="buy_zs_input_lr">
  343. <i class="bi bi-dash bistyle" id="dash_up_zyprice"></i>
  344. </div>
  345. <div class="buy_zs_input_box">
  346. <input type="text" id="up_zyprice" class="buy_zs_input" value="0" />
  347. </div>
  348. <div class="buy_zs_input_lr">
  349. <i class="bi bi-plus bistyle" id="plus_up_zyprice"></i>
  350. </div>
  351. </div>
  352. </div>
  353. <div class="up_txt_box">
  354. <div class="up_txt_box_l">{:L('占用合约账户')}:</div>
  355. <div class="up_txt_box_r">
  356. <span class="upbondmoney">0</span>
  357. </div>
  358. </div>
  359. <div class="up_txt_box">
  360. <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
  361. <div class="up_txt_box_r">
  362. <span class="bzjmoney">{$levermoney}</span>
  363. </div>
  364. </div>
  365. <div class="up_txt_box">
  366. <div class="up_txt_box_l">{:L('手续费')}:</div>
  367. <div class="up_txt_box_r">
  368. <span class="upsxf">0.1</span>
  369. </div>
  370. </div>
  371. <div class="up_txt_box">
  372. <div class="up_txt_box_l">{:L('可用余额')}:</div>
  373. <div class="up_txt_box_r">
  374. <span id="upbalance">{$usdt_blance}</span>
  375. </div>
  376. </div>
  377. <div onclick="bb_buycoin(1);" class="buyduo_btn">
  378. <span class="fzmm" style="color:#fff;">{:L('做多')}</span>
  379. </div>
  380. </div>
  381. <div class="down_content_box">
  382. <div class="c_title_down" id="sellbtn">{:L('下跌')}</div>
  383. <div class="down_type_box">
  384. <div class="down_type_box_op_ac fl" id="sell_xjbtn">
  385. <span id="sell_xjspan">{:L('限价委托')}</span>
  386. </div>
  387. <div class="down_type_box_op fl" id="sell_sjbtn">
  388. <span id="sell_sjspan">{:L('市价委托')}</span>
  389. </div>
  390. </div>
  391. <!--限价委托单价框-->
  392. <div class="inputbox" id="sell_xjbox">
  393. <div class="inputbox_float">
  394. <input type="text" id="sell_newprice" onblur="down_price();" class="fcc xjinput" value="" />
  395. </div>
  396. <div class="inputbox_float" style="width:40%;">
  397. <div class="input_bi borderright" id="dash_sellprice">
  398. <i class="bi bi-dash bistyle"></i>
  399. </div>
  400. <div class="input_bi" id="plus_sellprice">
  401. <i class="bi bi-plus bistyle"></i>
  402. </div>
  403. </div>
  404. </div>
  405. <div class="trade_lots_box" style="width:100%;height:110px;">
  406. <div class="trade_lots_title">
  407. <span class="trade_lots_title_txt">{:L('交易手数')}</span>
  408. </div>
  409. <div class="trade_lots_op_box">
  410. <div class="trade_lots_op_list active_lots" id="down_lots_1" onclick="set_down_lotsnum(1,1,1)" style="margin-right:4%;">1</div>
  411. <div class="trade_lots_op_list" id="down_lots_2" onclick="set_down_lotsnum(5,1,2)" style="margin-right:4%;">5</div>
  412. <div class="trade_lots_op_list" id="down_lots_3" onclick="set_down_lotsnum(10,1,3)" style="margin-right:4%;">10</div>
  413. <div class="trade_lots_op_list" id="down_lots_4" onclick="set_down_lotsnum(20,1,4)">20</div>
  414. </div>
  415. <div class="inputbox" id="xjbox">
  416. <div class="inputbox_float">
  417. <input type="text" id="lots_down_num" readonly="readonly" class="fcc xjinput" value="1" />
  418. </div>
  419. <div class="inputbox_float" style="width:40%;">
  420. <div class="input_bi borderright" id="dash_lots_down_num">
  421. <i class="bi bi-dash bistyle"></i>
  422. </div>
  423. <div class="input_bi" id="plus_lots_down_num">
  424. <i class="bi bi-plus bistyle"></i>
  425. </div>
  426. </div>
  427. </div>
  428. </div>
  429. <div class="trade_lots_box" style="width:100%;height:110px;">
  430. <div class="trade_lots_title">
  431. <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
  432. </div>
  433. <div class="trade_lots_op_box">
  434. <div class="trade_ggan_op_list active_lots" id="down_ggan_1" onclick="set_down_ggan(5,1,1)" style="margin-right:2%;">5</div>
  435. <div class="trade_ggan_op_list" id="down_ggan_2" onclick="set_down_ggan(10,1,2)" style="margin-right:2%;">10</div>
  436. <div class="trade_ggan_op_list" id="down_ggan_3" onclick="set_down_ggan(20,1,3)" style="margin-right:2%;">20</div>
  437. <div class="trade_ggan_op_list" id="down_ggan_4" onclick="set_down_ggan(50,1,4)" style="margin-right:2%;">50</div>
  438. <div class="trade_ggan_op_list" id="down_ggan_5" onclick="set_down_ggan(100,1,5)">100</div>
  439. </div>
  440. <div class="inputbox" id="xjbox">
  441. <div class="inputbox_float">
  442. <input type="text" id="downggan" readonly="readonly" class="fcc xjinput" value="5" />
  443. </div>
  444. </div>
  445. </div>
  446. <div class="buy_zs_box">
  447. <div class="buy_zs_boxl">{:L('止损价')}</div>
  448. <div class="buy_zs_boxr">
  449. <div class="buy_zs_input_lr">
  450. <i class="bi bi-dash bistyle" id="dash_down_zsprice"></i>
  451. </div>
  452. <div class="buy_zs_input_box">
  453. <input type="text" id="down_zsprice" class="buy_zs_input" value="0" />
  454. </div>
  455. <div class="buy_zs_input_lr">
  456. <i class="bi bi-plus bistyle" id="plus_down_zsprice"></i>
  457. </div>
  458. </div>
  459. </div>
  460. <div class="buy_zs_box">
  461. <div class="buy_zs_boxl">{:L('止盈价')}</div>
  462. <div class="buy_zs_boxr">
  463. <div class="buy_zs_input_lr">
  464. <i class="bi bi-dash bistyle" id="dash_down_zyprice"></i>
  465. </div>
  466. <div class="buy_zs_input_box">
  467. <input type="text" id="down_zyprice" class="buy_zs_input" value="0" />
  468. </div>
  469. <div class="buy_zs_input_lr">
  470. <i class="bi bi-plus bistyle" id="plus_down_zyprice"></i>
  471. </div>
  472. </div>
  473. </div>
  474. <div class="up_txt_box">
  475. <div class="up_txt_box_l">{:L('占用合约账户')}:</div>
  476. <div class="up_txt_box_r">
  477. <span class="upbondmoney">0</span>
  478. </div>
  479. </div>
  480. <div class="up_txt_box">
  481. <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
  482. <div class="up_txt_box_r">
  483. <span class="bzjmoney">{$levermoney}</span>
  484. </div>
  485. </div>
  486. <div class="up_txt_box">
  487. <div class="up_txt_box_l">{:L('手续费')}:</div>
  488. <div class="up_txt_box_r">
  489. <span class="upsxf">0.1</span>
  490. </div>
  491. </div>
  492. <div class="up_txt_box">
  493. <div class="up_txt_box_l">{:L('可用余额')}:</div>
  494. <div class="up_txt_box_r">
  495. <span id="upbalance">{$usdt_blance}</span>
  496. </div>
  497. </div>
  498. <div onclick="bb_buycoin(2);" class="buykong_btn">
  499. <span class="fzmm" style="color:#fff;">{:L('做空')}</span>
  500. </div>
  501. </div>
  502. <div style="width:100%;height:100px;"></div>
  503. </div>
  504. </div>
  505. <div style="width:20%;overflow:hidden;min-height:1450px;float:left;padding:0px 0px 0px 10px;">
  506. <div style="width:100%;overflow:hidden;min-height:1450px;background:#fff;">
  507. <div style="width:100%;height:40px;padding:0px 15px;">
  508. <div style="min-width:20%;height:40px;line-height:40px;border-bottom:2px solid #FCD535">
  509. <span class="f14 fch">{:L('盘口')}</span>
  510. </div>
  511. <div style="width:100%;margin-top:20px;">
  512. <div style="width:100%;">
  513. <div style="width:100%;height:20px;padding:0px 5px;">
  514. <div class="tradebox_title tl">
  515. <span class="fch f12">{:L('价格')}</span>
  516. </div>
  517. <div class="tradebox_title tr">
  518. <span class="fch f12">{:L('数量')}</span>
  519. </div>
  520. </div>
  521. <div class="trade_listbox" id="tradesellbox">
  522. <div style="width:100%;height:30px;">
  523. <div class="trade_list tl">
  524. <span class="red f12">--</span>
  525. </div>
  526. <div class="trade_list tr">
  527. <span class="red f12">--</span>
  528. </div>
  529. </div>
  530. </div>
  531. <div class="trade_listpricebox closeprice" id="closeprice">
  532. <span>--</span>
  533. </div>
  534. <div class="trade_listbox" id="tradebuybox">
  535. <div style="width:100%;height:30px;">
  536. <div class="trade_list tl">
  537. <span class="green f12">--</span>
  538. </div>
  539. <div class="trade_list tr">
  540. <span class="green f12">--</span>
  541. </div>
  542. </div>
  543. </div>
  544. </div>
  545. </div>
  546. </div>
  547. </div>
  548. </div>
  549. </div>
  550. </div>
  551. </main>
  552. <input type="hidden" id="flag" value="1" />
  553. <input type="hidden" id="buy_usermoney" value="{$usdt_blance}" />
  554. <input type="hidden" id="buy_usercoin" value="{$coin_blance}" />
  555. <input type="hidden" id="symbolbox" value="{$coinname}" />
  556. <!--手续费率-->
  557. <input type="hidden" id="t_rate" value="0" />
  558. <!--止盈价格-->
  559. <input type="hidden" id="zyprice" value="0" />
  560. <!--止损价格-->
  561. <input type="hidden" id="zsprice" value="0" />
  562. <!--账户合约账户-->
  563. <input type="hidden" id="bondmoney" value="{$levermoney}" />
  564. <!--占用合约账户-->
  565. <input type="hidden" id="yj_bondmoney" value="0" />
  566. <!--杠杆倍数-->
  567. <input type="hidden" id="tradeggnum" value="5" />
  568. <!--交易手数-->
  569. <input type="hidden" id="tradelotsnum" value="1" />
  570. <!--交易限价单价-->
  571. <input type="hidden" id="mprice" value="" />
  572. <!--交易限价买卖币的数量-->
  573. <input type="hidden" id="mnum" value="" />
  574. <!--交易限价买卖USDT的数量-->
  575. <input type="hidden" id="musdt" value="" />
  576. <!--购买类型,1限价2市价-->
  577. <input type="hidden" id="buytype" value="1" />
  578. <!--交易费率-->
  579. <input type="hidden" id="lever_fee" value="{$sysinfo.lever_fee}" />
  580. <!--交易开关-->
  581. <input type="hidden" id="lever_kg" value="{$sysinfo.lever_kg}" />
  582. <include file="Public:footer"/>
  583. </div>
  584. </div>
  585. <div class="dongbox" id="gotaxbox" style="display:none;">
  586. <div style="width:300px;height:260px;background:#fff;margin:18% auto;border-radius:10px;padding:15px;">
  587. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  588. <i class="bi bi-exclamation-circle" style="font-size:56px;font-weight:bold;color:#f5465c;"></i>
  589. </div>
  590. <div style="width:100%;height:60px;text-align:center;color:#000;font-size:14px;">
  591. {:L('请先缴纳税金')}
  592. </div>
  593. <div style="width:100%;height:60px;">
  594. <a href="{:U('Finance/cztax')}" target="__blank">
  595. <div style="width:45%;height:36px;line-height:36px;text-align:center;float:left;font-size:14px;color:#fff;background:#0ecb81;border-radius:10px;">{:L('缴税')}</div></a>
  596. <div onclick="hidetaxbox()" style="width:45%;height:36px;line-height:36px;text-align:center;float:right;font-size:14px;color:#fff;background:#f5465c;border-radius:10px;">{:L('取消')}</div>
  597. </div>
  598. </div>
  599. </div>
  600. </body>
  601. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  602. <script type="text/javascript" src="/Public/Home/static/js/layer/layer.js" ></script>
  603. <script type="text/javascript" src="/Public/Home/static/js/jquery.SuperSlide.2.1.1.js" ></script>
  604. <script type="text/javascript">
  605. function bb_buycoin(direction){
  606. var flag = $("#flag").val();
  607. if(flag == 2){
  608. return false;
  609. }
  610. var direction = direction;
  611. if(direction <= 0){
  612. layer.msg("{:L('缺少重要参数')}");return false;
  613. }
  614. var lever_kg = $("#lever_kg").val();
  615. if(lever_kg != 0){
  616. layer.msg("{:L('暂停交易')}");return false;
  617. }
  618. var yj_bondmoney = parseFloat($("#yj_bondmoney").val()); //占用合约账户
  619. var bondmoney = parseFloat($("#bondmoney").val()); //可用合约账户
  620. if(bondmoney < yj_bondmoney){
  621. layer.msg("{:L('可用合约账户不足,请先从资金账户划转')}");return false;
  622. }
  623. var type = $("#buytype").val(); //限价,市价
  624. var symbol = $("#symbolbox").val();
  625. var mprice = $("#mprice").val(); //输入价格(限价)
  626. var num = $("#tradelotsnum").val(); //手数
  627. var ggan = $("#tradeggnum").val(); //杠杆倍数
  628. var zyprice = $("#zyprice").val(); //止盈价;
  629. var zsprice = $("#zsprice").val(); //止损价;
  630. $("#flag").val(2);
  631. $.post("{:U('Levertade/UpOrderHandle')}",
  632. {'direction':direction,'type':type,'symbol':symbol,'mprice':mprice,'num':num,'ggan':ggan,'zyprice':zyprice,'zsprice':zsprice},
  633. function(data){
  634. if(data.code == 1){
  635. layer.msg(data.info);
  636. setTimeout(function(args){
  637. window.location.reload();
  638. },2000);
  639. }else{
  640. layer.msg(data.info);return false;
  641. }
  642. });
  643. }
  644. $(function(){
  645. CountBond();
  646. CountSouxf();
  647. setInterval("CountBond()",1000);
  648. setInterval("CountSouxf()",1000);
  649. var symbol = $("#symbolbox").val();
  650. $.post("{:U('Ajaxtrade/getnewprice')}",
  651. {'symbol':symbol},
  652. function(data){
  653. if(data.code == 1){
  654. $("#newprice").val(data.price);
  655. $("#mprice").val(data.price);
  656. $("#sell_newprice").val(data.price);
  657. }else{
  658. console.log("{:L('未获取数据')}");
  659. }
  660. });
  661. });
  662. function up_price(){
  663. var newprice = $("#newprice").val();
  664. $("#mprice").val(newprice);
  665. }
  666. function down_price(){
  667. var newprice = $("#sell_newprice").val();
  668. $("#mprice").val(newprice);
  669. }
  670. //前台计算合约账户
  671. function CountBond(){
  672. var mprice = $("#mprice").val();
  673. var tradelotsnum = $("#tradelotsnum").val();
  674. var tradeggnum = $("#tradeggnum").val();
  675. var bond = parseFloat((mprice * tradelotsnum) / tradeggnum)+'哈哈';
  676. $(".upbondmoney").html(bond.toFixed(2));
  677. $("#yj_bondmoney").val(bond.toFixed(2));
  678. }
  679. //前台手续费计算(开仓价格 * 开仓数量 * 手续费率)
  680. function CountSouxf(){
  681. var mprice = $("#mprice").val();
  682. var tradelotsnum = $("#tradelotsnum").val();
  683. var lever_fee = $("#lever_fee").val();
  684. var sxf = parseFloat(lever_fee * mprice * tradelotsnum / 100).toFixed(2);
  685. $(".upsxf").html(sxf);
  686. }
  687. $("#dash_sellprice").click(function(){
  688. var newprice = parseFloat($("#sell_newprice").val());
  689. if(newprice > 0){
  690. var buyprice = (newprice - 0.001).toFixed(4);
  691. }else{
  692. var buyprice = 0;
  693. }
  694. $("#sell_newprice").val(buyprice);
  695. $("#mprice").val(buyprice);
  696. });
  697. $("#plus_sellprice").click(function(){
  698. var newprice = parseFloat($("#sell_newprice").val());
  699. var buyprice = (newprice + 0.001).toFixed(4);
  700. $("#sell_newprice").val(buyprice);
  701. $("#mprice").val(buyprice);
  702. });
  703. $("#dash_buyprice").click(function(){
  704. var newprice = parseFloat($("#newprice").val());
  705. if(newprice > 0){
  706. var buyprice = (newprice - 0.001).toFixed(4);
  707. }else{
  708. var buyprice = 0;
  709. }
  710. $("#newprice").val(buyprice);
  711. $("#mprice").val(buyprice);
  712. });
  713. $("#plus_buyprice").click(function(){
  714. var newprice = parseFloat($("#newprice").val());
  715. var buyprice = (newprice + 0.001).toFixed(4);
  716. $("#newprice").val(buyprice);
  717. $("#mprice").val(buyprice);
  718. });
  719. $("#dash_lotsnum").click(function(){
  720. var lotsnum = parseInt($("#lotsnum").val());
  721. if(lotsnum <= 1){
  722. var newlotsnum = 1;
  723. }else{
  724. var newlotsnum = lotsnum - 1;
  725. }
  726. $("#lotsnum").val(newlotsnum);
  727. $("#tradelotsnum").val(newlotsnum);
  728. });
  729. $("#dash_lots_down_num").click(function(){
  730. var lotsnum = parseInt($("#lots_down_num").val());
  731. if(lotsnum <= 1){
  732. var newlotsnum = 1;
  733. }else{
  734. var newlotsnum = lotsnum - 1;
  735. }
  736. $("#lots_down_num").val(newlot snum);
  737. $("#tradelotsnum").val(newlotsnum);
  738. });
  739. $("#dash_up_zsprice").click(function(){
  740. var up_zsprice = parseFloat($("#up_zsprice").val());
  741. if(up_zsprice <= 1){
  742. var new_up_zsprice = up_zsprice;
  743. }else{
  744. var new_up_zsprice = up_zsprice - 1;
  745. }
  746. $("#up_zsprice").val(new_up_zsprice);
  747. $("#zsprice").val(up_zsprice);
  748. });
  749. $("#dash_down_zsprice").click(function(){
  750. var down_zsprice = parseFloat($("#down_zsprice").val());
  751. if(down_zsprice <= 1){
  752. var new_down_zsprice = down_zsprice;
  753. }else{
  754. var new_down_zsprice = down_zsprice - 1;
  755. }
  756. $("#down_zsprice").val(new_down_zsprice);
  757. $("#zsprice").val(up_zsprice);
  758. });
  759. $("#dash_down_zyprice").click(function(){
  760. var down_zyprice = parseFloat($("#down_zyprice").val());
  761. if(down_zyprice <= 1){
  762. var new_down_zyprice = down_zyprice;
  763. }else{
  764. var new_down_zyprice = down_zyprice - 1;
  765. }
  766. $("#down_zyprice").val(new_down_zyprice);
  767. $("#zyprice").val(up_zsprice);
  768. });
  769. $("#dash_up_zyprice").click(function(){
  770. var up_zyprice = parseFloat($("#up_zyprice").val());
  771. if(up_zyprice <= 1){
  772. var new_up_zyprice = up_zyprice;
  773. }else{
  774. var new_up_zyprice = up_zyprice - 1;
  775. }
  776. $("#up_zyprice").val(new_up_zyprice);
  777. $("#zyprice").val(new_up_zyprice);
  778. });
  779. $("#plus_up_zsprice").click(function(){
  780. var up_zsprice = parseFloat($("#up_zsprice").val());
  781. var new_up_zsprice = up_zsprice + 1;
  782. $("#up_zsprice").val(new_up_zsprice);
  783. $("#zsprice").val(new_up_zsprice);
  784. });
  785. $("#plus_up_zyprice").click(function(){
  786. var up_zyprice = parseFloat($("#up_zyprice").val());
  787. var new_up_zyprice = up_zyprice + 1;
  788. $("#up_zyprice").val(new_up_zyprice);
  789. $("#zyprice").val(new_up_zyprice);
  790. });
  791. $("#plus_down_zsprice").click(function(){
  792. var down_zsprice = parseFloat($("#down_zsprice").val());
  793. var new_down_zsprice = down_zsprice + 1;
  794. $("#down_zsprice").val(new_down_zsprice);
  795. $("#zsprice").val(new_down_zsprice);
  796. });
  797. $("#plus_down_zyprice").click(function(){
  798. var down_zyprice = parseFloat($("#down_zyprice").val());
  799. var new_down_zyprice = down_zyprice + 1;
  800. $("#down_zyprice").val(new_down_zyprice);
  801. $("#zyprice").val(new_down_zyprice);
  802. });
  803. $("#plus_lotsnum").click(function(){
  804. var lotsnum = parseInt($("#lotsnum").val());
  805. var newlotsnum = lotsnum + 1;
  806. $("#lotsnum").val(newlotsnum);
  807. $("#tradelotsnum").val(newlotsnum);
  808. });
  809. $("#plus_lots_down_num").click(function(){
  810. var lotsnum = parseInt($("#lots_down_num").val());
  811. var newlotsnum = lotsnum + 1;
  812. $("#lots_down_num").val(newlotsnum);
  813. $("#tradelotsnum").val(newlotsnum);
  814. });
  815. function set_up_lotsnum(num,st,lots){
  816. var lotsnum = num;
  817. var type = st;
  818. var number = lots;
  819. if(number == 1){
  820. $("#up_lots_1").addClass('active_lots');
  821. $("#up_lots_2").removeClass('active_lots');
  822. $("#up_lots_3").removeClass('active_lots');
  823. $("#up_lots_4").removeClass('active_lots');
  824. }else if(number == 2){
  825. $("#up_lots_2").addClass('active_lots');
  826. $("#up_lots_1").removeClass('active_lots');
  827. $("#up_lots_3").removeClass('active_lots');
  828. $("#up_lots_4").removeClass('active_lots');
  829. }else if(number == 3){
  830. $("#up_lots_3").addClass('active_lots');
  831. $("#up_lots_2").removeClass('active_lots');
  832. $("#up_lots_1").removeClass('active_lots');
  833. $("#up_lots_4").removeClass('active_lots');
  834. }else if(number == 4){
  835. $("#up_lots_4").addClass('active_lots');
  836. $("#up_lots_2").removeClass('active_lots');
  837. $("#up_lots_3").removeClass('active_lots');
  838. $("#up_lots_1").removeClass('active_lots');
  839. }
  840. $("#lotsnum").val(lotsnum);
  841. $("#tradelotsnum").val(lotsnum);
  842. }
  843. function set_down_lotsnum(num,st,lots){
  844. var lotsnum = num;
  845. var type = st;
  846. var number = lots;
  847. if(number == 1){
  848. $("#down_lots_1").addClass('active_lots');
  849. $("#down_lots_2").removeClass('active_lots');
  850. $("#down_lots_3").removeClass('active_lots');
  851. $("#down_lots_4").removeClass('active_lots');
  852. }else if(number == 2){
  853. $("#down_lots_2").addClass('active_lots');
  854. $("#down_lots_1").removeClass('active_lots');
  855. $("#down_lots_3").removeClass('active_lots');
  856. $("#down_lots_4").removeClass('active_lots');
  857. }else if(number == 3){
  858. $("#down_lots_3").addClass('active_lots');
  859. $("#down_lots_2").removeClass('active_lots');
  860. $("#down_lots_1").removeClass('active_lots');
  861. $("#down_lots_4").removeClass('active_lots');
  862. }else if(number == 4){
  863. $("#down_lots_4").addClass('active_lots');
  864. $("#down_lots_2").removeClass('active_lots');
  865. $("#down_lots_3").removeClass('active_lots');
  866. $("#down_lots_1").removeClass('active_lots');
  867. }
  868. $("#lots_down_num").val(lotsnum);
  869. $("#tradelotsnum").val(lotsnum);
  870. }
  871. function set_up_ggan(num,st,gg){
  872. var lotsnum = num;
  873. var type = st;
  874. var number = gg;
  875. if(number == 1){
  876. $("#up_ggan_1").addClass('active_lots');
  877. $("#up_ggan_2").removeClass('active_lots');
  878. $("#up_ggan_3").removeClass('active_lots');
  879. $("#up_ggan_4").removeClass('active_lots');
  880. $("#up_ggan_5").removeClass('active_lots');
  881. }else if(number == 2){
  882. $("#up_ggan_2").addClass('active_lots');
  883. $("#up_ggan_1").removeClass('active_lots');
  884. $("#up_ggan_3").removeClass('active_lots');
  885. $("#up_ggan_4").removeClass('active_lots');
  886. $("#up_ggan_5").removeClass('active_lots');
  887. }else if(number == 3){
  888. $("#up_ggan_3").addClass('active_lots');
  889. $("#up_ggan_2").removeClass('active_lots');
  890. $("#up_ggan_1").removeClass('active_lots');
  891. $("#up_ggan_4").removeClass('active_lots');
  892. $("#up_ggan_5").removeClass('active_lots');
  893. }else if(number == 4){
  894. $("#up_ggan_4").addClass('active_lots');
  895. $("#up_ggan_2").removeClass('active_lots');
  896. $("#up_ggan_3").removeClass('active_lots');
  897. $("#up_ggan_1").removeClass('active_lots');
  898. $("#up_ggan_5").removeClass('active_lots');
  899. }else if(number == 5){
  900. $("#up_ggan_5").addClass('active_lots');
  901. $("#up_ggan_2").removeClass('active_lots');
  902. $("#up_ggan_3").removeClass('active_lots');
  903. $("#up_ggan_4").removeClass('active_lots');
  904. $("#up_ggan_1").removeClass('active_lots');
  905. }
  906. $("#upggan").val(lotsnum);
  907. $("#tradeggnum").val(lotsnum);
  908. }
  909. function set_down_ggan(num,st,gg){
  910. var lotsnum = num;
  911. var type = st;
  912. var number = gg;
  913. if(number == 1){
  914. $("#down_ggan_1").addClass('active_lots');
  915. $("#down_ggan_2").removeClass('active_lots');
  916. $("#down_ggan_3").removeClass('active_lots');
  917. $("#down_ggan_4").removeClass('active_lots');
  918. $("#down_ggan_5").removeClass('active_lots');
  919. }else if(number == 2){
  920. $("#down_ggan_2").addClass('active_lots');
  921. $("#down_ggan_1").removeClass('active_lots');
  922. $("#down_ggan_3").removeClass('active_lots');
  923. $("#down_ggan_4").removeClass('active_lots');
  924. $("#down_ggan_5").removeClass('active_lots');
  925. }else if(number == 3){
  926. $("#down_ggan_3").addClass('active_lots');
  927. $("#down_ggan_2").removeClass('active_lots');
  928. $("#down_ggan_1").removeClass('active_lots');
  929. $("#down_ggan_4").removeClass('active_lots');
  930. $("#down_ggan_5").removeClass('active_lots');
  931. }else if(number == 4){
  932. $("#down_ggan_4").addClass('active_lots');
  933. $("#down_ggan_2").removeClass('active_lots');
  934. $("#down_ggan_3").removeClass('active_lots');
  935. $("#down_ggan_1").removeClass('active_lots');
  936. $("#down_ggan_5").removeClass('active_lots');
  937. }else if(number == 5){
  938. $("#down_ggan_5").addClass('active_lots');
  939. $("#down_ggan_2").removeClass('active_lots');
  940. $("#down_ggan_3").removeClass('active_lots');
  941. $("#down_ggan_4").removeClass('active_lots');
  942. $("#down_ggan_1").removeClass('active_lots');
  943. }
  944. $("#downggan").val(lotsnum);
  945. $("#tradeggnum").val(lotsnum);
  946. }
  947. $("#sell_xjbtn").click(function(){
  948. $("#sell_xjspan").addClass("fcy");
  949. $("#sell_xjspan").removeClass("fcc");
  950. $("#sell_sjspan").addClass("fcc");
  951. $("#sell_sjspan").removeClass("fcy");
  952. $("#sell_xjbox").show();
  953. $("#buytype").val(1);
  954. $("#sellxjcoin").hide();
  955. });
  956. $("#sell_sjbtn").click(function(){
  957. $("#sell_sjspan").addClass("fcy");
  958. $("#sell_sjspan").removeClass("fcc");
  959. $("#sell_xjspan").addClass("fcc");
  960. $("#sell_xjspan").removeClass("fcy");
  961. $("#sell_sjbox").show();
  962. $("#sell_xjbox").hide();
  963. $("#buytype").val(2);
  964. $("#sellxjcoin").show();
  965. });
  966. //买入框
  967. $("#buyxjbtn").click(function(){
  968. $("#buyxjbtn").addClass('up_type_box_op_ac');
  969. $("#buyxjbtn").removeClass('up_type_box_op');
  970. $("#buysjbtn").addClass('up_type_box_op');
  971. $("#buysjbtn").removeClass('up_type_box_op_ac');
  972. $("#xjbox").show();
  973. $("#buytype").val(1);
  974. $("#xjnumbox").show();
  975. });
  976. $("#buysjbtn").click(function(){
  977. $("#buysjbtn").addClass('up_type_box_op_ac');
  978. $("#buysjbtn").removeClass('up_type_box_op');
  979. $("#buyxjbtn").addClass('up_type_box_op');
  980. $("#buyxjbtn").removeClass('up_type_box_op_ac');
  981. $("#xjbox").hide();
  982. $("#buytype").val(2);
  983. $("#xjnumbox").hide();
  984. });
  985. function hidetaxbox(){
  986. $("#gotaxbox").hide();
  987. }
  988. $("#buybtn").click(function(){
  989. $("#buytype").val(1);
  990. });
  991. $("#sellbtn").click(function(){
  992. $("#buytype").val(1);
  993. });
  994. </script>
  995. <script type="text/javascript">
  996. $(function(){
  997. getallsmybol();
  998. gettradbuy();
  999. gettradsell();
  1000. setInterval("getallsmybol()",3000);
  1001. setInterval("gettradbuy()",2000);
  1002. setInterval("gettradsell()",2000);
  1003. });
  1004. function getallsmybol(){
  1005. $.post("{:U('Ajaxtrade/getallcoin')}",
  1006. function(data){
  1007. if(data.code == 1){
  1008. $("#smybolbox").empty();
  1009. var html = '';
  1010. if(data.data == '' || data.data == null){
  1011. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1012. '<span class="f14 fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1013. '</div>';
  1014. $("#smybolbox").append(html);
  1015. }else{
  1016. $.each(data.data,function(key,val){
  1017. html += '<a href="/Levertade/index.html?symbol='+ val.coin +'&type=buy">'+
  1018. '<div class="sy_list_box">'+
  1019. '<div class="sy_list_boxl">'+
  1020. '<span class="f12 fch">'+ val.cname +'</span>'+
  1021. '</div>'+
  1022. '<div class="sy_list_boxl" style="text-align:center;font-size:12px;">' + val.open + '</div>'+
  1023. '<div class="sy_list_boxr" style="font-size:12px;">' + val.change +'</div>'+
  1024. '</div>'+
  1025. '</a>';
  1026. });
  1027. $("#smybolbox").append(html);
  1028. }
  1029. }else{
  1030. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1031. '<span class="f14 fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1032. '</div>';
  1033. $("#smybolbox").append(html);
  1034. }
  1035. });
  1036. }
  1037. function gettradsell(){
  1038. var symbol = $("#symbolbox").val();
  1039. $.post("{:U('Ajaxtrade/gettradsellten')}",
  1040. {'symbol':symbol},
  1041. function(data){
  1042. if(data.code == 1){
  1043. $("#tradebuybox").empty();
  1044. var html = '';
  1045. if(data.data == '' || data.data == null){
  1046. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1047. '<span class="f14 fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1048. '</div>';
  1049. $("#tradebuybox").append(html);
  1050. }else{
  1051. $.each(data.data,function(key,val){
  1052. html += '<div style="width:100%;height:30px;">'+
  1053. '<div class="trade_list tl">'+
  1054. '<span class="red f12">'+ val.price +'</span>'+
  1055. '</div>'+
  1056. '<div class="trade_list tr">'+
  1057. '<span class="red f12">'+ val.amount +'</span>'+
  1058. '</div>'+
  1059. '</div>';
  1060. });
  1061. $("#tradebuybox").append(html);
  1062. }
  1063. }
  1064. });
  1065. }
  1066. function gettradbuy(){
  1067. var symbol = $("#symbolbox").val();
  1068. $.post("{:U('Ajaxtrade/gettradbuyten')}",
  1069. {'symbol':symbol},
  1070. function(data){
  1071. if(data.code == 1){
  1072. $("#tradesellbox").empty();
  1073. var html = '';
  1074. if(data.data == '' || data.data == null){
  1075. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1076. '<span class="f14 fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1077. '</div>';
  1078. $("#tradesellbox").append(html);
  1079. }else{
  1080. $.each(data.data,function(key,val){
  1081. html += '<div style="width:100%;height:30px;">'+
  1082. '<div class="trade_list tl">'+
  1083. '<span class="green f12">'+ val.price +'</span>'+
  1084. '</div>'+
  1085. '<div class="trade_list tr">'+
  1086. '<span class="green f12">'+ val.amount +'</span>'+
  1087. '</div>'+
  1088. '</div>';
  1089. });
  1090. $("#tradesellbox").append(html);
  1091. }
  1092. }
  1093. });
  1094. }
  1095. </script>
  1096. <script type="text/javascript">
  1097. $(function(){
  1098. getcoinprice();
  1099. setInterval("getcoinprice()",2000);
  1100. });
  1101. function getcoinprice(){
  1102. var symbol = $("#symbolbox").val();
  1103. $.post("{:U('Ajaxtrade/getcoinprice')}",
  1104. {'symbol':symbol},
  1105. function(data){
  1106. if(data.code == 1){
  1107. $("#changebox").html(data.change);
  1108. $(".closeprice").html(data.price);
  1109. $("#minmoney").html(data.low);
  1110. $("#maxmoney").html(data.high);
  1111. $("#allvol").html(data.amount);
  1112. }else{
  1113. console.log("{:L('未获取数据')}");
  1114. }
  1115. });
  1116. }
  1117. </script>
  1118. <script type="text/javascript">
  1119. $("#nav").slide({
  1120. type:"menu",// 效果类型,针对菜单/导航而引入的参数(默认slide)
  1121. titCell:".nLi", //鼠标触发对象
  1122. targetCell:".sub", //titCell里面包含的要显示/消失的对象
  1123. effect:"slideDown", //targetCell下拉效果
  1124. delayTime:300 , //效果时间
  1125. triggerTime:0, //鼠标延迟触发时间(默认150)
  1126. returnDefault:true //鼠标移走后返回默认状态,例如默认频道是“预告片”,鼠标移走后会返回“预告片”(默认false)
  1127. });
  1128. </script>
  1129. </html>