index.html 52 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570
  1. <!DOCTYPE html>
  2. <html lang="zh-CN" style="background:#fff;">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  7. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
  8. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
  9. <link rel="stylesheet" type="text/css" href="/Public/Static/css/base2.css" />
  10. <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
  11. <link rel="stylesheet" href="/Public/Static/Icoinfont/iconfont.css">
  12. <script src="/Public/Static/Icoinfont/iconfont.js"></script>
  13. <title>{$webname}</title>
  14. <style>
  15. ::-webkit-input-placeholder {color: #b5b5b5;font-size: 12px;}
  16. ::-moz-placeholder {color: #b5b5b5;font-size: 12px;}
  17. input:focus{background:#fff;outline: 1px solid #fff;}
  18. a:hover,a:link,a:visited,a:active{color:#707A8A;text-decoration:none;}
  19. .no_header{position: fixed;z-index: 9999;padding:0px 10px;top:0px;background: #fff;}
  20. .txtl{line-height:50px;width:30%;}
  21. .contentbox{width:100%;background:#fff;padding:10px;}
  22. .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;}
  23. .content_title_l{width:80%;height:40px;line-height:40px;float:left;}
  24. .content_title_r{width:20%;height:40px;line-height:40px;float:right;padding:0px 5px;}
  25. .tleft{text-align:left;}
  26. .tright{text-align:right;}
  27. .tradebox{width:100%;height:620px;background:#fff;}
  28. .tradebox_l{width:58%;height:620px;float:left;}
  29. .tradebox_r{width:40%;height:620px;float:right;}
  30. .tradebox_l_btn{width:100%;height:36px;}
  31. .tradebox_l_buybtn{width:48%;height:36px;line-height:36px;float:left;text-align:center;border-radius:5px;}
  32. .tradebox_l_sellbtn{width:48%;height:36px;line-height:36px;float:right;text-align:center;border-radius:5px;}
  33. .bggreen{background:#0ecb81;}
  34. .green{color:#0ecb81;}
  35. .bgred{background:#f5465c;}
  36. .red{color:#f5465c;}
  37. .bghc{background:#f5f5f5;}
  38. .cfff{color:#fff;}
  39. .c000{color:#000;}
  40. .formbox{width:100%;height:350px;margin-top:15px;}
  41. .formbox_op{width:100%;height:30px;}
  42. .formbox_op_list{width:50%;height:30px;line-height:30px;float:left;text-align:center;}
  43. .inputbox{width:100%;height:36px;border:1px solid #f5f5f5;border-radius:5px;margin-top:10px;}
  44. .inputbox_float{width:60%;height:36px;float:left;}
  45. .xjinput{width:90%;background:#fff;border:#fff;margin-top:7px;padding:0px 10px;}
  46. .input_bi{width:50%;height:26px;line-height:26px;float:left;text-align:center;margin-top:5px;}
  47. .borderright{border-right:1px solid #f5f5f5;}
  48. .bistyle{font-size:24px;font-weight:bold;}
  49. .blbox{width:100%;height:30px;margin-top:15px;}
  50. .blbox_1{width:20%;height:30px;float:left;margin-right:6%;}
  51. .blbox_2{width:20%;height:30px;float:left;}
  52. .blbox_3{width:100%;height:10px;}
  53. .bgf5{background:#f5f5f5;}
  54. .blbox_4{width:100%;height:20x;line-height:20px;text-align:center;}
  55. .tradebox_title{width:50%;height:20px;line-height:20px;float:left;}
  56. .tl{text-align:left;}
  57. .tr{text-align:right;}
  58. .tc{text-align:center;}
  59. .fl{float:left;}
  60. .fr{float:right;}
  61. .trade_listbox{width:100%;height:255px;padding:5px;overflow:hidden;}
  62. .trade_listpricebox{width:100%;height:40px;line-height:40px;padding:0px 10px;}
  63. .trade_list{width:50%;height:30px;line-height:30px;float:left;}
  64. .dongbox{position:fixed;z-index:9999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
  65. .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;}
  66. .dong_title{width:100%;height:40px;line-height:40px;}
  67. .dong_title_span{font-size:18px;font-weight:500;}
  68. .dong_find_box{width:100%;height:30px;background:#f5f5f5;border-radius:10px;}
  69. .dong_find_box_img{width:20%;height:30px;line-height:30px;float:left;text-align:center;}
  70. .dong_input_box{width:80%;height:30px;float:left;}
  71. .dong_symbox{width:90%;height:20px;border:none;background:#f5f5f5;margin-top:5px;}
  72. .dong_sel_box{width:100%;height:30px;border-bottom:1px solid #f5f5f5;}
  73. .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;}
  74. .symbol_list{width:100%;height:450px;overflow-y: scroll;margin-top:10px;}
  75. .sy_list_box{width:100%;height:30px;}
  76. .sy_list_boxl{width:35%;height:30px;line-height:30px;float:left;text-align:left;}
  77. .sy_list_boxr{width:30%;height:30px;line-height:30px;float:right;text-align:right;}
  78. .order_title{display: inline-block;margin-right: 20px;font-weight: 1000;}
  79. .FCD535{border-bottom: 2px solid #FCD535;}
  80. .fccbox{width:100%;height:15px;background:#f5f5f5;}
  81. .wtlistbox{width:100%;padding:0px 10px;}
  82. .o_title_box{width:50%;height:40px;line-height:40px;border-bottom:1px solid #f5f5f5;}
  83. .tlistbox{width:100%;overflow:hidden;min-height:100px;clear:both;padding:10px 0px;}
  84. .tlistbox_1{width:100%;overflow:hidden;min-height:100px;border-bottom:1px solid #f5f5f5;}
  85. .tlistbox_2{width:100%;height:30px;}
  86. .tlistbox_3{width:80%;height:30px;line-height:30px;}
  87. .tlistbox_4{width:20%;height:30px;line-height:30px;}
  88. .tlistbox_5{padding:5px 10px;background:#fcfcfc;border-radius:5px;}
  89. .tlistbox_6{width:100%;height:60px;}
  90. .tlistbox_7{width:22.22%;height:60px;}
  91. .tlistbox_8{width:100%;height:30px;line-height:30px;}
  92. .tlistbox_9{width:100%;height:30px;line-height:20px;}
  93. .trade_lots_title{width:100%;height:30px;line-height:30px;text-align:left;padding-left:10px;}
  94. .trade_lots_title_txt{font-size:14px;font-weight:bold;}
  95. .trade_lots_op_box{width:100%;height:30px;}
  96. .trade_lots_op_list{width:22%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;}
  97. .trade_ggan_op_list{width:18%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;}
  98. .active_lots{background:#f5f5f5;color:#000;font-size:16px;font-weight:bold;}
  99. .buy_zs_box{width:100%;height:30px;margin-bottom:5px;}
  100. .buy_zs_boxl{width:30%;height:30px;line-height:30px;float:left;color:#000;text-align:center;font-size:14px;}
  101. .buy_zs_boxr{width:65%;height:30px;line-height:30px;float:right;border:1px solid #f5f5f5;border-radius:5px;font-size:14px;}
  102. .buy_zs_input_lr{width:15%;height:30px;line-height:30px;text-align:center;float:left;}
  103. .buy_zs_input_box{width:70%;height:30px;line-height:30px;text-align:center;float:left;}
  104. .buy_zs_input{width:100%;height:20px;background:#fff;border:none;padding-left:5px;text-align:center;}
  105. .up_txt_box{width:100%;height:25px;margin-bottom:5px;}
  106. .up_txt_box_l{width:60%;height:25px;line-height:25px;float:left;font-size:14px;}
  107. .up_txt_box_r{width:40%;height:25px;line-height:25px;float:left;text-align:right;}
  108. </style>
  109. </head>
  110. <body style="background:#fff;">
  111. <div class="container-fluid " style="padding:0px;width:100vw;">
  112. <div class="no_header">
  113. <div class="fl allhg txtl" style="width:100%;">
  114. <span style="font-size:20px;font-weight:bold;color:#000;">{:L('合约交易')}</span>
  115. </div>
  116. </div>
  117. <div class="content_title">
  118. <div class="content_title_l tleft">
  119. <i class="bi bi-text-indent-left fch" style="font-size:22px;" id="centerbox"></i>
  120. <span style="font-size:18px;font-weight:bold;color:#000;" id="marketbox">{$coinname}</span>
  121. <span style="color:#f5465c;" class="closeprice">--</span>
  122. <span style="color:#f5465c;" id="changebox">--</span>
  123. </div>
  124. <a href="/Levertade/trans.html?sytx={$coinname}" >
  125. <div class="content_title_r tright">
  126. <i class="bi bi-bar-chart-line" style="font-size:22px;color:#FCD535;"></i>
  127. </div>
  128. </a>
  129. </div>
  130. <div class="contentbox" style="margin-top:90px;">
  131. <div class="tradebox">
  132. <div class="tradebox_l">
  133. <div style="width:100%;height:30px;line-height:30px;text-align:left;padding-left:10px;">
  134. <span style="font-size:14px;font-weight:bold;">{:L('交易方向')}</span>
  135. </div>
  136. <div class="tradebox_l_btn">
  137. <div class="tradebox_l_buybtn bggreen" id="buybtn">
  138. <span class="fzmm cfff" id="buybtnspan">{:L('上涨')}</span>
  139. </div>
  140. <div class="tradebox_l_sellbtn bghc" id="sellbtn">
  141. <span class="fzmm c000" id="sellbtnspan">{:L('下跌')}</span>
  142. </div>
  143. </div>
  144. <!--买入框-->
  145. <div class="formbox" id="buycoinbox" style="display:block;">
  146. <div class="formbox_op">
  147. <div class="formbox_op_list" id="buyxjbtn">
  148. <span class="fzmm fcy" id="xjspan">{:L('限价委托')}</span>
  149. </div>
  150. <div class="formbox_op_list" id="buysjbtn">
  151. <span class="fzmm fcc" id="sjspan">{:L('市价委托')}</span>
  152. </div>
  153. </div>
  154. <!--限价委托单价框-->
  155. <div class="inputbox" id="xjbox">
  156. <div class="inputbox_float">
  157. <input type="text" id="newprice" onblur="up_price();" class="fcc xjinput" value="" />
  158. </div>
  159. <div class="inputbox_float" style="width:40%;">
  160. <div class="input_bi borderright" id="dash_buyprice">
  161. <i class="bi bi-dash bistyle"></i>
  162. </div>
  163. <div class="input_bi" id="plus_buyprice">
  164. <i class="bi bi-plus bistyle"></i>
  165. </div>
  166. </div>
  167. </div>
  168. <div class="trade_lots_box" style="width:100%;height:110px;">
  169. <div class="trade_lots_title">
  170. <span class="trade_lots_title_txt">{:L('交易手数')}</span>
  171. </div>
  172. <!-- <div class="trade_lots_op_box">-->
  173. <!-- <div class="trade_lots_op_list active_lots" id="up_lots_1" onclick="set_up_lotsnum(25,1,1)" style="margin-right:4%;">25%</div>-->
  174. <!-- <div class="trade_lots_op_list" id="up_lots_2" onclick="set_up_lotsnum(50,1,2)" style="margin-right:4%;">50%</div>-->
  175. <!-- <div class="trade_lots_op_list" id="up_lots_3" onclick="set_up_lotsnum(75,1,3)" style="margin-right:4%;">75%</div>-->
  176. <!-- <div class="trade_lots_op_list" id="up_lots_4" onclick="set_up_lotsnum(100,1,4)">100%</div>-->
  177. <!-- </div>-->
  178. <div class="inputbox" id="xjbox">
  179. <div class="inputbox_float">
  180. <input type="number" id="lotsnum" class="fcc xjinput" value="0" />
  181. </div>
  182. <div class="inputbox_float" style="width:40%;">
  183. <div class="input_bi borderright" id="dash_lotsnum">
  184. <i class="bi bi-dash bistyle"></i>
  185. </div>
  186. <div class="input_bi" id="plus_lotsnum">
  187. <i class="bi bi-plus bistyle"></i>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. <div class="trade_lots_box" style="width:100%;height:110px;">
  193. <div class="trade_lots_title">
  194. <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
  195. </div>
  196. <div class="trade_lots_op_box">
  197. <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>
  198. <div class="trade_ggan_op_list" id="up_ggan_2" onclick="set_up_ggan(10,1,2)" style="margin-right:2%;">10</div>
  199. <div class="trade_ggan_op_list" id="up_ggan_3" onclick="set_up_ggan(20,1,3)" style="margin-right:2%;">20</div>
  200. <div class="trade_ggan_op_list" id="up_ggan_4" onclick="set_up_ggan(50,1,4)" style="margin-right:2%;">50</div>
  201. <div class="trade_ggan_op_list" id="up_ggan_5" onclick="set_up_ggan(100,1,5)">100</div>
  202. </div>
  203. <div class="inputbox" id="xjbox">
  204. <div class="inputbox_float">
  205. <input type="number" id="upggan" class="fcc xjinput" value="5" />
  206. </div>
  207. </div>
  208. </div>
  209. <div class="buy_zs_box">
  210. <div class="buy_zs_boxl">{:L('止损价')}</div>
  211. <div class="buy_zs_boxr">
  212. <div class="buy_zs_input_lr">
  213. <i class="bi bi-dash bistyle" id="dash_up_zsprice"></i>
  214. </div>
  215. <div class="buy_zs_input_box">
  216. <input type="text" id="up_zsprice" class="buy_zs_input" value="0" />
  217. </div>
  218. <div class="buy_zs_input_lr">
  219. <i class="bi bi-plus bistyle" id="plus_up_zsprice"></i>
  220. </div>
  221. </div>
  222. </div>
  223. <div class="buy_zs_box">
  224. <div class="buy_zs_boxl">{:L('止盈价')}</div>
  225. <div class="buy_zs_boxr">
  226. <div class="buy_zs_input_lr">
  227. <i class="bi bi-dash bistyle" id="dash_up_zyprice"></i>
  228. </div>
  229. <div class="buy_zs_input_box">
  230. <input type="text" id="up_zyprice" class="buy_zs_input" value="0" />
  231. </div>
  232. <div class="buy_zs_input_lr">
  233. <i class="bi bi-plus bistyle" id="plus_up_zyprice"></i>
  234. </div>
  235. </div>
  236. </div>
  237. <div class="up_txt_box">
  238. <div class="up_txt_box_l">{:L('保證金')}:</div>
  239. <div class="up_txt_box_r">
  240. <span class="upbondmoney">0</span>
  241. </div>
  242. </div>
  243. <div class="up_txt_box">
  244. <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
  245. <div class="up_txt_box_r">
  246. <span class="bzjmoney">{$levermoney}</span>
  247. </div>
  248. </div>
  249. <div class="up_txt_box">
  250. <div class="up_txt_box_l">{:L('手续费')}:</div>
  251. <div class="up_txt_box_r">
  252. <span id="fee" class="upsxf">0.1</span>
  253. </div>
  254. </div>
  255. <!--<div class="up_txt_box">-->
  256. <!-- <div class="up_txt_box_l">{:L('可用余额')}:</div>-->
  257. <!-- <div class="up_txt_box_r">-->
  258. <!-- <span id="upbalance">{$usdt_blance}</span>-->
  259. <!-- </div>-->
  260. <!--</div>-->
  261. <if condition="$uid egt 1">
  262. <div onclick="bb_buycoin(1);" style="width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:10px;">
  263. <span class="fzmm" style="color:#fff;">{:L('做多')}</span>
  264. </div>
  265. <else />
  266. <a href="{:U('Login/index')}">
  267. <div style="width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:10px;">
  268. <span class="fzmm" style="color:#fff;">{:L('登陆')}</span>
  269. </div>
  270. </a>
  271. </if>
  272. </div>
  273. <!--卖出框-->
  274. <div class="formbox" id="sellcoinbox" style="display:none;">
  275. <div class="formbox_op">
  276. <div class="formbox_op_list" id="sell_xjbtn">
  277. <span class="fzmm fcy" id="sell_xjspan">{:L('限价委托')}</span>
  278. </div>
  279. <div class="formbox_op_list" id="sell_sjbtn">
  280. <span class="fzmm fcc" id="sell_sjspan">{:L('市价委托')}</span>
  281. </div>
  282. </div>
  283. <!--限价委托单价框-->
  284. <div class="inputbox" id="sell_xjbox">
  285. <div class="inputbox_float">
  286. <input type="text" id="sell_newprice" onblur="down_price();" class="fcc xjinput" value="" />
  287. </div>
  288. <div class="inputbox_float" style="width:40%;">
  289. <div class="input_bi borderright" id="dash_sellprice">
  290. <i class="bi bi-dash bistyle"></i>
  291. </div>
  292. <div class="input_bi" id="plus_sellprice">
  293. <i class="bi bi-plus bistyle"></i>
  294. </div>
  295. </div>
  296. </div>
  297. <div class="trade_lots_box" style="width:100%;height:110px;">
  298. <div class="trade_lots_title">
  299. <span class="trade_lots_title_txt">{:L('交易手数')}</span>
  300. </div>
  301. <!-- <div class="trade_lots_op_box">-->
  302. <!-- <div class="trade_lots_op_list active_lots" id="down_lots_1" onclick="set_down_lotsnum(25,1,1)" style="margin-right:4%;">25%</div>-->
  303. <!-- <div class="trade_lots_op_list" id="down_lots_2" onclick="set_down_lotsnum(50,1,2)" style="margin-right:4%;">50%</div>-->
  304. <!-- <div class="trade_lots_op_list" id="down_lots_3" onclick="set_down_lotsnum(75,1,3)" style="margin-right:4%;">75%</div>-->
  305. <!-- <div class="trade_lots_op_list" id="down_lots_4" onclick="set_down_lotsnum(100,1,4)">100%</div>-->
  306. <!-- </div>-->
  307. <div class="inputbox" id="xjbox">
  308. <div class="inputbox_float">
  309. <input type="text" id="lots_down_num" class="fcc xjinput" value="0" />
  310. </div>
  311. <div class="inputbox_float" style="width:40%;">
  312. <div class="input_bi borderright" id="dash_lots_down_num">
  313. <i class="bi bi-dash bistyle"></i>
  314. </div>
  315. <div class="input_bi" id="plus_lots_down_num">
  316. <i class="bi bi-plus bistyle"></i>
  317. </div>
  318. </div>
  319. </div>
  320. </div>
  321. <div class="trade_lots_box" style="width:100%;height:110px;">
  322. <div class="trade_lots_title">
  323. <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
  324. </div>
  325. <div class="trade_lots_op_box">
  326. <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>
  327. <div class="trade_ggan_op_list" id="down_ggan_2" onclick="set_down_ggan(10,1,2)" style="margin-right:2%;">10</div>
  328. <div class="trade_ggan_op_list" id="down_ggan_3" onclick="set_down_ggan(20,1,3)" style="margin-right:2%;">20</div>
  329. <div class="trade_ggan_op_list" id="down_ggan_4" onclick="set_down_ggan(50,1,4)" style="margin-right:2%;">50</div>
  330. <div class="trade_ggan_op_list" id="down_ggan_5" onclick="set_down_ggan(100,1,5)">100</div>
  331. </div>
  332. <div class="inputbox" id="xjbox">
  333. <div class="inputbox_float">
  334. <input type="text" id="downggan" class="fcc xjinput" value="5" />
  335. </div>
  336. </div>
  337. </div>
  338. <div class="buy_zs_box">
  339. <div class="buy_zs_boxl">{:L('止损价')}</div>
  340. <div class="buy_zs_boxr">
  341. <div class="buy_zs_input_lr">
  342. <i class="bi bi-dash bistyle" id="dash_down_zsprice"></i>
  343. </div>
  344. <div class="buy_zs_input_box">
  345. <input type="text" id="down_zsprice" class="buy_zs_input" value="0" />
  346. </div>
  347. <div class="buy_zs_input_lr">
  348. <i class="bi bi-plus bistyle" id="plus_down_zsprice"></i>
  349. </div>
  350. </div>
  351. </div>
  352. <div class="buy_zs_box">
  353. <div class="buy_zs_boxl">{:L('止盈价')}</div>
  354. <div class="buy_zs_boxr">
  355. <div class="buy_zs_input_lr">
  356. <i class="bi bi-dash bistyle" id="dash_down_zyprice"></i>
  357. </div>
  358. <div class="buy_zs_input_box">
  359. <input type="text" id="down_zyprice" class="buy_zs_input" value="0" />
  360. </div>
  361. <div class="buy_zs_input_lr">
  362. <i class="bi bi-plus bistyle" id="plus_down_zyprice"></i>
  363. </div>
  364. </div>
  365. </div>
  366. <div class="up_txt_box">
  367. <div class="up_txt_box_l">{:L('保證金')}:</div>
  368. <div class="up_txt_box_r">
  369. <span class="upbondmoney">0</span>
  370. </div>
  371. </div>
  372. <div class="up_txt_box">
  373. <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
  374. <div class="up_txt_box_r">
  375. <span class="bzjmoney">{$levermoney}</span>
  376. </div>
  377. </div>
  378. <div class="up_txt_box">
  379. <div class="up_txt_box_l">{:L('手续费')}:</div>
  380. <div class="up_txt_box_r">
  381. <span class="upsxf">0.1</span>
  382. </div>
  383. </div>
  384. <div class="up_txt_box">
  385. <div class="up_txt_box_l">{:L('可用余额')}:</div>
  386. <div class="up_txt_box_r">
  387. <span id="upbalance">{$usdt_blance}</span>
  388. </div>
  389. </div>
  390. <if condition="$uid egt 1">
  391. <div onclick="bb_buycoin(2);" style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
  392. <span class="fzmm" style="color:#fff;">{:L('做空')}</span>
  393. </div>
  394. <else />
  395. <a href="{:U('Login/index')}">
  396. <div style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
  397. <span class="fzmm" style="color:#fff;">{:L('登陆')}</span>
  398. </div>
  399. </a>
  400. </if>
  401. </div>
  402. </div>
  403. <div class="tradebox_r">
  404. <div style="width:100%;height:20px;padding:0px 5px;">
  405. <div class="tradebox_title tl">
  406. <span class="fcc fzm">{:L('价格')}</span>
  407. </div>
  408. <div class="tradebox_title tr">
  409. <span class="fcc fzm">{:L('数量')}</span>
  410. </div>
  411. </div>
  412. <div class="trade_listbox" id="tradesellbox">
  413. <div style="width:100%;height:30px;">
  414. <div class="trade_list tl">
  415. <span class="red fzm">--</span>
  416. </div>
  417. <div class="trade_list tr">
  418. <span class="red fzm">--</span>
  419. </div>
  420. </div>
  421. </div>
  422. <div class="trade_listpricebox closeprice" id="closeprice">
  423. <span>--</span>
  424. </div>
  425. <div class="trade_listbox" id="tradebuybox">
  426. <div style="width:100%;height:30px;">
  427. <div class="trade_list tl">
  428. <span class="green fzm">--</span>
  429. </div>
  430. <div class="trade_list tr">
  431. <span class="green fzm">--</span>
  432. </div>
  433. </div>
  434. </div>
  435. </div>
  436. </div>
  437. </div>
  438. <div class="fccbox"></div>
  439. <div class="wtlistbox">
  440. <div class="o_title_box fl" style="width:70%">
  441. <span class="fzmmm order_title" id="wtbtn">{:L('限价委托')}</span>
  442. <span class="fzmmm order_title FCD535" id="ccbtn">{:L('持仓')}</span>
  443. </div>
  444. <div class="o_title_box fr tr" style="width:30%">
  445. <a href="{:U('Levertade/tradlist')}">
  446. <i class="bi bi-journal-text fccm" style="font-weight:bold;font-size:18px;"></i>
  447. <span class="fzmm fcc">{:L('全部订单')}</span>
  448. </a>
  449. </div>
  450. <div style="width:100%;overflow:hidden;min-height:300px;padding:10px;display:none;" id="wtbox">
  451. <empty name="wtlist">
  452. <div style="width:100%;height:200px;line-height:200px;text-align:center;">
  453. <span class="fcc fzmmm">{:L('没有委托订单')}</span>
  454. </div>
  455. <else />
  456. <foreach name="wtlist" item="vo">
  457. <div class="tlistbox">
  458. <div class="tlistbox_1">
  459. <div class="tlistbox_2">
  460. <div class="tlistbox_3 fl">
  461. <if condition="$vo.direction eq 1">
  462. <span class="fzmmm green">{:L('做多')}</span>
  463. <elseif condition="$vo.direction eq 2" />
  464. <span class="fzmmm red">{:L('做空')}</span>
  465. </if>
  466. <span class="fzmmm fch" style="font-weight:bold;"><?php echo strtoupper($vo['symbol']);?></span>
  467. </div>
  468. <div class="tlistbox_4 fr tr" onclick="clearorder({$vo.id});">
  469. <span class="tlistbox_5 fcy">{:L('撤消')}</span>
  470. </div>
  471. </div>
  472. <div class="tlistbox_2">
  473. <div class="tlistbox_3 fl">
  474. <span class="fzmm fcc"><?php echo $vo['wttime'];?></span>
  475. </div>
  476. </div>
  477. <div class="tlistbox_6">
  478. <div class="tlistbox_7 fl">
  479. <div class="tlistbox_8 tl">
  480. <span class="fzm fcc">{:L('限价')}</span>
  481. </div>
  482. <div class="tlistbox_9 tl">
  483. <span class="fzmm fcc">{$vo.wt_price}</span>
  484. </div>
  485. </div>
  486. <div class="tlistbox_7 fl">
  487. <div class="tlistbox_8 tr">
  488. <span class="fzm fcc">{:L('保證金')}</span>
  489. </div>
  490. <div class="tlistbox_9 tr">
  491. <span class="fzmm fcc">{$vo.bond}</span>
  492. </div>
  493. </div>
  494. <div class="tlistbox_7 fl">
  495. <div class="tlistbox_8 tc">
  496. <span class="fzm fcc">{:L('委托手数')}</span>
  497. </div>
  498. <div class="tlistbox_9 tc">
  499. <span class="fzmm fcc">{$vo.num}</span>
  500. </div>
  501. </div>
  502. <div class="tlistbox_7 fl">
  503. <div class="tlistbox_8 tr">
  504. <span class="fzm fcc">{:L('杠杆倍数')}</span>
  505. </div>
  506. <div class="tlistbox_9 tr">
  507. <span class="fzmm fcc">{$vo.ggan}</span>
  508. </div>
  509. </div>
  510. </div>
  511. </div>
  512. </div>
  513. </foreach>
  514. </empty>
  515. </div>
  516. <div style="width:100%;overflow:hidden;min-height:300px;padding:10px;display:block;" id="ccbox">
  517. <empty name="cclist">
  518. <div style="width:100%;height:200px;line-height:200px;text-align:center;">
  519. <span class="fcc fzmmm">{:L('没有订单')}</span>
  520. </div>
  521. <else />
  522. <foreach name="cclist" item="vo">
  523. <div class="tlistbox">
  524. <div class="tlistbox_1">
  525. <div class="tlistbox_2">
  526. <div class="tlistbox_3 fl" style="width:65%;">
  527. <if condition="$vo.direction eq 1">
  528. <span class="fzmmm green">{:L('做多')}</span>
  529. <elseif condition="$vo.direction eq 2" />
  530. <span class="fzmmm red">{:L('做空')}</span>
  531. </if>
  532. <span class="fzmmm fch" style="font-weight:bold;"><?php echo strtoupper($vo['symbol']);?></span>
  533. <span class="fzmmm fch pro{$vo.id}" style="font-weight:bold;">{$vo.profit}</span>
  534. </div>
  535. <div class="tlistbox_4 fr tr" style="width:35%;" onclick="closeorder({$vo.id});">
  536. <span class="tlistbox_5 fcy">{:L('一键平仓')}</span>
  537. </div>
  538. </div>
  539. <div class="tlistbox_2">
  540. <div class="tlistbox_3 fl">
  541. <span class="fzmm fcc">{:L('开仓时间')}:<?php echo $vo['addtime'];?></span>
  542. </div>
  543. </div>
  544. <div class="tlistbox_6">
  545. <div class="tlistbox_7 fl">
  546. <div class="tlistbox_8 tl">
  547. <span class="fzm fcc">{:L('开仓单价')}</span>
  548. </div>
  549. <div class="tlistbox_9 tl">
  550. <span class="fzmm fcc">{$vo.price}</span>
  551. </div>
  552. </div>
  553. <div class="tlistbox_7 fl">
  554. <div class="tlistbox_8 tr">
  555. <span class="fzm fcc">{:L('保證金')}</span>
  556. </div>
  557. <div class="tlistbox_9 tr">
  558. <span class="fzmm fcc">{$vo.bond}</span>
  559. </div>
  560. </div>
  561. <div class="tlistbox_7 fl">
  562. <div class="tlistbox_8 tc">
  563. <span class="fzm fcc">{:L('合约手数')}</span>
  564. </div>
  565. <div class="tlistbox_9 tc">
  566. <span class="fzmm fcc">{$vo.num}</span>
  567. </div>
  568. </div>
  569. <div class="tlistbox_7 fl">
  570. <div class="tlistbox_8 tr">
  571. <span class="fzm fcc">{:L('杠杆倍数')}</span>
  572. </div>
  573. <div class="tlistbox_9 tr">
  574. <span class="fzmm fcc">{$vo.ggan}</span>
  575. </div>
  576. </div>
  577. </div>
  578. </div>
  579. </div>
  580. </foreach>
  581. </empty>
  582. </div>
  583. </div>
  584. <div style="width:100%;height:120px;"></div>
  585. </div>
  586. <!---------交易选择弹窗---------->
  587. <div class="dongbox" id="showdong" style="display:none;">
  588. <div class="dong_con">
  589. <div style="width:100%;position:relative;z-index:9999999;top:0px;">
  590. <div class="dong_title">
  591. <span class="dong_title_span" style="font-weight: bold;">{:L('合约市场')}</span>
  592. </div>
  593. <div class="dong_sel_box">
  594. <span class="fcc dong_sel_span">{:L('全部')}</span>
  595. </div>
  596. </div>
  597. <div class="symbol_list" id="smybolbox">
  598. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  599. <span class="fzmm fcc">{:L('没有获取数据')}</span>
  600. </div>
  601. </div>
  602. </div>
  603. <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
  604. </div>
  605. <input type="hidden" id="flag" value="1" />
  606. <input type="hidden" id="buy_usermoney" value="{$usdt_blance}" />
  607. <input type="hidden" id="buy_usercoin" value="{$coin_blance}" />
  608. <input type="hidden" id="symbolbox" value="{$coinname}" />
  609. <!--手续费率-->
  610. <input type="hidden" id="t_rate" value="0" />
  611. <!--止盈价格-->
  612. <input type="hidden" id="zyprice" value="0" />
  613. <!--止损价格-->
  614. <input type="hidden" id="zsprice" value="0" />
  615. <!--账户合约账户-->
  616. <input type="hidden" id="bondmoney" value="{$levermoney}" />
  617. <!--占用合约账户-->
  618. <input type="hidden" id="yj_bondmoney" value="0" />
  619. <!--杠杆倍数-->
  620. <input type="hidden" id="tradeggnum" value="5" />
  621. <!--交易手数-->
  622. <input type="hidden" id="tradelotsnum" value="0" />
  623. <!--交易限价单价-->
  624. <input type="hidden" id="mprice" value="" />
  625. <!--交易限价买卖币的数量-->
  626. <input type="hidden" id="mnum" value="" />
  627. <!--交易限价买卖USDT的数量-->
  628. <input type="hidden" id="musdt" value="" />
  629. <!--购买类型,1限价2市价-->
  630. <input type="hidden" id="buytype" value="1" />
  631. <!--交易费率-->
  632. <input type="hidden" id="lever_fee" value="{$sysinfo.lever_fee}" />
  633. <!--交易开关-->
  634. <input type="hidden" id="lever_kg" value="{$sysinfo.lever_kg}" />
  635. <!--底部-->
  636. <div class="footer">
  637. <a href="{:U('Index/index')}">
  638. <div class="footer_op">
  639. <div class="f_op_t">
  640. <span class="iconfont icon-shouye" style="font-size:22px;"></span>
  641. </div>
  642. <div class="f_op_b">
  643. <span class="fzm fcc">{:L('首页')}</span>
  644. </div>
  645. </div>
  646. </a>
  647. <a href="{:U('Trade/index')}">
  648. <div class="footer_op">
  649. <div class="f_op_t" style="line-height:35px;">
  650. <span class="iconfont icon-fukuan" style="font-size:22px;"></span>
  651. </div>
  652. <div class="f_op_b">
  653. <span class="fzm fcc">{:L('交易')}</span>
  654. </div>
  655. </div>
  656. </a>
  657. <a href="{:U('Orepool/index')}">
  658. <div class="footer_op">
  659. <div class="f_op_t" style="line-height:35px;">
  660. <span class="iconfont icon-ziyuan14" style="font-size:22px;"></span>
  661. </div>
  662. <div class="f_op_b">
  663. <span class="fzm fcc">{:L('矿机')}</span>
  664. </div>
  665. </div>
  666. </a>
  667. <a href="{:U('Levertade/index')}">
  668. <div class="footer_op">
  669. <div class="f_op_t" style="line-height:35px;">
  670. <svg class="icon fticon" aria-hidden="true"><use xlink:href="#icon-xuanxiang"></use></svg>
  671. </div>
  672. <div class="f_op_b">
  673. <span class="fzm fcy">{:L('合约')}</span>
  674. </div>
  675. </div>
  676. </a>
  677. <a href="{:U('User/index')}">
  678. <div class="footer_op">
  679. <div class="f_op_t" style="line-height:35px;">
  680. <span class="iconfont icon-ziyuan24" style="font-size:22px;"></span>
  681. </div>
  682. <div class="f_op_b">
  683. <span class="fzm fcc">{:L('资产')}</span>
  684. </div>
  685. </div>
  686. </a>
  687. </div>
  688. <div class="dongbox" id="pcconfim" style="display:none;">
  689. <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:20px;">
  690. <div style="width:100%;height:30px;line-height:30px;text-align:center;">
  691. <span style="font-size:16px;font-weight:bold;">{:L('操作提示')}</span>
  692. </div>
  693. <div style="width:100%;overflow:hidden;min-height:140px;text-align:center;padding:15px;" id="confim_txt">
  694. </div>
  695. <input type="hidden" id="pcoid" value="" />
  696. <div style="width:100%;height:60px;">
  697. <div onclick="pcorder()" 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>
  698. <div onclick="hidepcconfim()" 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>
  699. </div>
  700. </div>
  701. </div>
  702. <div class="dongbox" id="gotaxbox" style="display:none;">
  703. <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:15px;">
  704. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  705. <i class="bi bi-exclamation-circle" style="font-size:56px;font-weight:bold;color:#f5465c;"></i>
  706. </div>
  707. <div style="width:100%;height:60px;text-align:center;color:#000;font-size:14px;">
  708. {:L('请先缴纳税金')}
  709. </div>
  710. <div style="width:100%;height:60px;">
  711. <a href="{:U('Finance/cztax')}" target="__blank">
  712. <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>
  713. <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>
  714. </div>
  715. </div>
  716. </div>
  717. </body>
  718. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  719. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  720. <script type="text/javascript">
  721. function closeorder(id){
  722. var oid = id;
  723. if(oid == '' || oid <= 0){
  724. layer.msg("{:L('缺少重要参数')}");return false;
  725. }
  726. $.post("{:U('Levertade/confimclose')}",{'id':oid},function(data){
  727. if(data.code == 1){
  728. $("#confim_txt").empty();
  729. $("#pcoid").val(data.id);
  730. $("#confim_txt").html(data.txt);
  731. $("#pcconfim").show();
  732. }
  733. });
  734. }
  735. function pcorder(){
  736. var flag = $("#flag").val();
  737. if(flag == 2){
  738. return false;
  739. }
  740. var oid = $("#pcoid").val();
  741. if(oid == '' || oid <= 0){
  742. layer.msg("{:L('缺少重要参数')}");return false;
  743. }
  744. $("#flag").val(2);
  745. $.post("{:U('Levertade/closeorder')}",{'id':oid},function(data){
  746. if(data.code == 1){
  747. layer.msg(data.info);
  748. setTimeout(function(args){
  749. window.location.reload();
  750. },2000);
  751. }else{
  752. layer.msg(data.info);return false;
  753. }
  754. });
  755. }
  756. function clearorder(id){
  757. var flag = $("#flag").val();
  758. if(flag == 2){
  759. return false;
  760. }
  761. var oid = id;
  762. if(oid == '' || oid <= 0){
  763. layer.msg("{:L('缺少重要参数')}");return false;
  764. }
  765. $("#flag").val(2);
  766. $.post("{:U('Levertade/clearorder')}",{'id':oid},function(data){
  767. if(data.code == 1){
  768. layer.msg(data.info);
  769. setTimeout(function(args){
  770. $("#pcconfim").hide();
  771. window.location.reload();
  772. },2000);
  773. }else{
  774. layer.msg(data.info);return false;
  775. }
  776. });
  777. }
  778. function hidetaxbox(){
  779. $("#gotaxbox").hide();
  780. }
  781. function hidepcconfim(){
  782. $("#pcconfim").hide();
  783. }
  784. function up_price(){
  785. var newprice = $("#newprice").val();
  786. $("#mprice").val(newprice);
  787. }
  788. function down_price(){
  789. var newprice = $("#sell_newprice").val();
  790. $("#mprice").val(newprice);
  791. }
  792. $("#ccbtn").click(function(){
  793. $("#ccbtn").addClass('FCD535');
  794. $("#wtbtn").removeClass('FCD535');
  795. $("#ccbox").show();
  796. $("#wtbox").hide();
  797. });
  798. $("#wtbtn").click(function(){
  799. $("#wtbtn").addClass('FCD535');
  800. $("#ccbtn").removeClass('FCD535');
  801. $("#wtbox").show();
  802. $("#ccbox").hide();
  803. });
  804. </script>
  805. <script type="text/javascript">
  806. function bb_buycoin(direction){
  807. var flag = $("#flag").val();
  808. if(flag == 2){
  809. return false;
  810. }
  811. var direction = direction;
  812. if(direction <= 0){
  813. layer.msg("{:L('缺少重要参数')}");return false;
  814. }
  815. var lever_kg = $("#lever_kg").val();
  816. if(lever_kg != 0){
  817. layer.msg("{:L('暂停交易')}");return false;
  818. }
  819. var yj_bondmoney = parseFloat($("#yj_bondmoney").val()); //占用合约账户
  820. var bondmoney = parseFloat($("#bondmoney").val()); //可用合约账户
  821. if(bondmoney < yj_bondmoney){
  822. layer.msg("{:L('可用合约账户不足,请先从资金账户划转')}");return false;
  823. }
  824. var type = $("#buytype").val(); //限价,市价
  825. var symbol = $("#symbolbox").val();
  826. var mprice = $("#mprice").val(); //输入价格(限价)
  827. var num = $("#tradelotsnum").val(); //手数
  828. var ggan = $("#tradeggnum").val(); //杠杆倍数
  829. var zyprice = $("#zyprice").val(); //止盈价;
  830. var zsprice = $("#zsprice").val(); //止损价;
  831. var fee = $(".upsxf").html();//手续费
  832. var upbondmoney = $(".upbondmoney").html();//手续费
  833. $("#flag").val(2);
  834. $.post("{:U('Levertade/UpOrderHandle')}",
  835. {'direction':direction,'type':type,'symbol':symbol,'mprice':mprice,'num':num,'ggan':ggan,'zyprice':zyprice,'zsprice':zsprice,'fee':fee, 'upbondmoney':upbondmoney},
  836. function(data){
  837. if(data.code == 1){
  838. layer.msg(data.info);
  839. setTimeout(function(args){
  840. window.location.reload();
  841. },2000);
  842. }else{
  843. layer.msg(data.info);return false;
  844. }
  845. });
  846. }
  847. </script>
  848. <script type="text/javascript">
  849. function getallsmybol(){
  850. $.post("{:U('Ajaxtrade/getallcoin')}",
  851. function(data){
  852. if(data.code == 1){
  853. $("#smybolbox").empty();
  854. var html = '';
  855. if(data.data == '' || data.data == null){
  856. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  857. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  858. '</div>';
  859. $("#smybolbox").append(html);
  860. }else{
  861. $.each(data.data,function(key,val){
  862. html += '<a href="/Levertade/index.html?symbol='+ val.coin +'&type=buy">'+
  863. '<div class="sy_list_box">'+
  864. '<div class="sy_list_boxl">'+
  865. '<span class="fzmm fcc">'+ val.cname +'</span>'+
  866. '</div>'+
  867. '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
  868. '<div class="sy_list_boxr">' + val.change +'</div>'+
  869. '</div>'+
  870. '</a>';
  871. });
  872. $("#smybolbox").append(html);
  873. }
  874. }else{
  875. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  876. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  877. '</div>';
  878. $("#smybolbox").append(html);
  879. }
  880. });
  881. }
  882. </script>
  883. <script type="text/javascript">
  884. $("#hidedong").click(function(){
  885. $("#showdong").fadeOut("slow");
  886. });
  887. $("#centerbox").click(function(){
  888. getallsmybol()
  889. $("#showdong").fadeIn("slow");
  890. });
  891. </script>
  892. <script type="text/javascript">
  893. var types = 2;
  894. var price = 0;
  895. $(function(){
  896. gettradbuy();
  897. gettradsell();
  898. CountBond();
  899. CountSouxf();
  900. setInterval("real_time()",2000);
  901. setInterval("gettradbuy()",2000);
  902. setInterval("gettradsell()",2000);
  903. setInterval("CountBond()",1000);
  904. setInterval("CountSouxf()",1000);
  905. setInterval("getmoney_lever()",1000);
  906. });
  907. function real_time(){
  908. $.post("{:U('Levertade/real_time')}",function(data){
  909. $.each(data,function(index,value){
  910. $('.pro'+value.id).html(value.profit)
  911. });
  912. });
  913. }
  914. function getmoney_lever(){
  915. var coin = "Futures-USDT";
  916. $.post("{:U('User/getmoneylever')}",
  917. {'coin':coin},
  918. function(data){
  919. if(data.code == 1){
  920. $('.bzjmoney').html(data.num);
  921. }else{
  922. console.log("error");
  923. }
  924. }
  925. );
  926. }
  927. //前台计算合约账户
  928. function CountBond(){
  929. var mprice = {$levermoney};
  930. var tradelotsnum = $("#tradelotsnum").val();
  931. var tradeggnum = $("#tradeggnum").val();
  932. if (types == 1){
  933. var bond = parseFloat(((mprice * (tradelotsnum/100))/tradeggnum));
  934. }else if (types == 2){
  935. var bond = parseFloat((price*tradelotsnum)/tradeggnum);
  936. }
  937. $(".upbondmoney").html(bond.toFixed(2));
  938. $("#yj_bondmoney").val(bond.toFixed(2));
  939. }
  940. $('#lotsnum').bind('input propertychange', function() {
  941. var mprice = {$levermoney};
  942. var tradelotsnum = $('#lotsnum').val();
  943. $("#tradelotsnum").val(tradelotsnum);
  944. types = 2;
  945. });
  946. $('#lots_down_num').bind('input propertychange', function() {
  947. var mprice = {$levermoney};
  948. var tradelotsnum = $('#lots_down_num').val();
  949. $("#tradelotsnum").val(tradelotsnum);
  950. types = 2;
  951. });
  952. //前台手续费计算(开仓价格 * 开仓数量 * 手续费率)
  953. function CountSouxf(){
  954. var mprice = {$levermoney};
  955. var tradelotsnum = $("#tradelotsnum").val();
  956. var lever_fee = $("#lever_fee").val();
  957. var upbondmoney = $('.upbondmoney').html();
  958. if (types == 1){
  959. var sxf = parseFloat((lever_fee * (price * tradelotsnum))).toFixed(2);
  960. }else if (types == 2){
  961. var sxf = parseFloat(lever_fee * (price * tradelotsnum)).toFixed(2);
  962. }
  963. $(".upsxf").html(sxf);
  964. }
  965. function set_up_lotsnum(num,st,lots){
  966. var lotsnum = num;
  967. var type = st;
  968. var number = lots;
  969. if(number == 1){
  970. $("#up_lots_1").addClass('active_lots');
  971. $("#up_lots_2").removeClass('active_lots');
  972. $("#up_lots_3").removeClass('active_lots');
  973. $("#up_lots_4").removeClass('active_lots');
  974. }else if(number == 2){
  975. $("#up_lots_2").addClass('active_lots');
  976. $("#up_lots_1").removeClass('active_lots');
  977. $("#up_lots_3").removeClass('active_lots');
  978. $("#up_lots_4").removeClass('active_lots');
  979. }else if(number == 3){
  980. $("#up_lots_3").addClass('active_lots');
  981. $("#up_lots_2").removeClass('active_lots');
  982. $("#up_lots_1").removeClass('active_lots');
  983. $("#up_lots_4").removeClass('active_lots');
  984. }else if(number == 4){
  985. $("#up_lots_4").addClass('active_lots');
  986. $("#up_lots_2").removeClass('active_lots');
  987. $("#up_lots_3").removeClass('active_lots');
  988. $("#up_lots_1").removeClass('active_lots');
  989. }
  990. types = 1;
  991. // $("#lotsnum").val(lotsnum);
  992. $("#tradelotsnum").val(lotsnum);
  993. }
  994. function set_down_lotsnum(num,st,lots){
  995. var lotsnum = num;
  996. var type = st;
  997. var number = lots;
  998. if(number == 1){
  999. $("#down_lots_1").addClass('active_lots');
  1000. $("#down_lots_2").removeClass('active_lots');
  1001. $("#down_lots_3").removeClass('active_lots');
  1002. $("#down_lots_4").removeClass('active_lots');
  1003. }else if(number == 2){
  1004. $("#down_lots_2").addClass('active_lots');
  1005. $("#down_lots_1").removeClass('active_lots');
  1006. $("#down_lots_3").removeClass('active_lots');
  1007. $("#down_lots_4").removeClass('active_lots');
  1008. }else if(number == 3){
  1009. $("#down_lots_3").addClass('active_lots');
  1010. $("#down_lots_2").removeClass('active_lots');
  1011. $("#down_lots_1").removeClass('active_lots');
  1012. $("#down_lots_4").removeClass('active_lots');
  1013. }else if(number == 4){
  1014. $("#down_lots_4").addClass('active_lots');
  1015. $("#down_lots_2").removeClass('active_lots');
  1016. $("#down_lots_3").removeClass('active_lots');
  1017. $("#down_lots_1").removeClass('active_lots');
  1018. }
  1019. types = 1;
  1020. // $("#lots_down_num").val(lotsnum);
  1021. $("#tradelotsnum").val(lotsnum);
  1022. }
  1023. </script>
  1024. <script type="text/javascript">
  1025. function gettradsell(){
  1026. var symbol = $("#symbolbox").val();
  1027. $.post("{:U('Ajaxtrade/gettradsell')}",
  1028. {'symbol':symbol},
  1029. function(data){
  1030. if(data.code == 1){
  1031. $("#tradebuybox").empty();
  1032. var html = '';
  1033. if(data.data == '' || data.data == null){
  1034. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1035. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1036. '</div>';
  1037. $("#tradebuybox").append(html);
  1038. }else{
  1039. $.each(data.data,function(key,val){
  1040. html += '<div style="width:100%;height:30px;">'+
  1041. '<div class="trade_list tl">'+
  1042. '<span class="red fzm">'+ val.price +'</span>'+
  1043. '</div>'+
  1044. '<div class="trade_list tr">'+
  1045. '<span class="red fzm">'+ val.amount +'</span>'+
  1046. '</div>'+
  1047. '</div>';
  1048. });
  1049. $("#tradebuybox").append(html);
  1050. }
  1051. }
  1052. });
  1053. }
  1054. </script>
  1055. <script type="text/javascript">
  1056. function gettradbuy(){
  1057. var symbol = $("#symbolbox").val();
  1058. $.post("{:U('Ajaxtrade/gettradbuy')}",
  1059. {'symbol':symbol},
  1060. function(data){
  1061. if(data.code == 1){
  1062. $("#tradesellbox").empty();
  1063. var html = '';
  1064. if(data.data == '' || data.data == null){
  1065. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  1066. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  1067. '</div>';
  1068. $("#tradesellbox").append(html);
  1069. }else{
  1070. $.each(data.data,function(key,val){
  1071. html += '<div style="width:100%;height:30px;">'+
  1072. '<div class="trade_list tl">'+
  1073. '<span class="green fzm">'+ val.price +'</span>'+
  1074. '</div>'+
  1075. '<div class="trade_list tr">'+
  1076. '<span class="green fzm">'+ val.amount +'</span>'+
  1077. '</div>'+
  1078. '</div>';
  1079. });
  1080. $("#tradesellbox").append(html);
  1081. }
  1082. }
  1083. });
  1084. }
  1085. </script>
  1086. <script type="text/javascript">
  1087. $(function(){
  1088. getcoinprice();
  1089. setInterval("getcoinprice()",2000);
  1090. });
  1091. </script>
  1092. <script type="text/javascript">
  1093. function getcoinprice(){
  1094. var symbol = $("#symbolbox").val();
  1095. $.post("{:U('Ajaxtrade/getcoinprice')}",
  1096. {'symbol':symbol},
  1097. function(data){
  1098. if(data.code == 1){
  1099. price = data.ot_price;
  1100. $("#changebox").html(data.change);
  1101. $(".closeprice").html(data.price);
  1102. }else{
  1103. console.log("{:L('未获取数据')}");
  1104. }
  1105. });
  1106. }
  1107. </script>
  1108. <script type="text/javascript">
  1109. $("#buybtn").click(function(){
  1110. $("#buybtn").addClass("bggreen");
  1111. $("#buybtn").removeClass("bghc");
  1112. $("#sellbtn").addClass("bghc");
  1113. $("#sellbtn").removeClass("bggreen");
  1114. $("#buycoinbox").show();
  1115. $("#sellcoinbox").hide();
  1116. $("#buybtnspan").addClass("cfff");
  1117. $("#buybtnspan").removeClass("c000");
  1118. $("#sellbtnspan").addClass("c000");
  1119. $("#sellbtnspan").removeClass("cfff");
  1120. $("#buytype").val(1);
  1121. });
  1122. $("#sellbtn").click(function(){
  1123. $("#buybtn").removeClass("bgred");
  1124. $("#buybtn").addClass("bghc");
  1125. $("#sellbtn").removeClass("bghc");
  1126. $("#sellbtn").addClass("bgred");
  1127. $("#buycoinbox").hide();
  1128. $("#sellcoinbox").show();
  1129. $("#buybtnspan").addClass("c000");
  1130. $("#buybtnspan").removeClass("cfff");
  1131. $("#sellbtnspan").addClass("cfff");
  1132. $("#sellbtnspan").removeClass("c000");
  1133. $("#buytype").val(1);
  1134. });
  1135. </script>
  1136. <script type="text/javascript">
  1137. //出售框
  1138. $("#sell_xjbtn").click(function(){
  1139. $("#sell_xjspan").addClass("fcy");
  1140. $("#sell_xjspan").removeClass("fcc");
  1141. $("#sell_sjspan").addClass("fcc");
  1142. $("#sell_sjspan").removeClass("fcy");
  1143. $("#sell_xjbox").show();
  1144. $("#buytype").val(1);
  1145. $("#sellxjcoin").hide();
  1146. });
  1147. $("#sell_sjbtn").click(function(){
  1148. $("#sell_sjspan").addClass("fcy");
  1149. $("#sell_sjspan").removeClass("fcc");
  1150. $("#sell_xjspan").addClass("fcc");
  1151. $("#sell_xjspan").removeClass("fcy");
  1152. $("#sell_sjbox").show();
  1153. $("#sell_xjbox").hide();
  1154. $("#buytype").val(2);
  1155. $("#sellxjcoin").show();
  1156. });
  1157. //买入框
  1158. $("#buyxjbtn").click(function(){
  1159. $("#xjspan").addClass("fcy");
  1160. $("#xjspan").removeClass("fcc");
  1161. $("#sjspan").addClass("fcc");
  1162. $("#sjspan").removeClass("fcy");
  1163. $("#xjbox").show();
  1164. $("#buytype").val(1);
  1165. $("#xjnumbox").show();
  1166. });
  1167. $("#buysjbtn").click(function(){
  1168. $("#sjspan").addClass("fcy");
  1169. $("#sjspan").removeClass("fcc");
  1170. $("#xjspan").addClass("fcc");
  1171. $("#xjspan").removeClass("fcy");
  1172. $("#xjbox").hide();
  1173. $("#buytype").val(2);
  1174. $("#xjnumbox").hide();
  1175. });
  1176. </script>
  1177. <script type="text/javascript">
  1178. $(function(){
  1179. var symbol = $("#symbolbox").val();
  1180. $.post("{:U('Ajaxtrade/getnewprice')}",
  1181. {'symbol':symbol},
  1182. function(data){
  1183. if(data.code == 1){
  1184. $("#newprice").val(data.price);
  1185. $("#mprice").val(data.price);
  1186. $("#sell_newprice").val(data.price);
  1187. }else{
  1188. console.log("{:L('未获取数据')}");
  1189. }
  1190. });
  1191. });
  1192. </script>
  1193. <script type="text/javascript">
  1194. $("#dash_sellprice").click(function(){
  1195. var newprice = parseFloat($("#sell_newprice").val());
  1196. if(newprice > 0){
  1197. var buyprice = (newprice - 0.001).toFixed(4);
  1198. }else{
  1199. var buyprice = 0;
  1200. }
  1201. $("#sell_newprice").val(buyprice);
  1202. $("#mprice").val(buyprice);
  1203. });
  1204. $("#plus_sellprice").click(function(){
  1205. var newprice = parseFloat($("#sell_newprice").val());
  1206. var buyprice = (newprice + 0.001).toFixed(4);
  1207. $("#sell_newprice").val(buyprice);
  1208. $("#mprice").val(buyprice);
  1209. });
  1210. $("#dash_buyprice").click(function(){
  1211. var newprice = parseFloat($("#newprice").val());
  1212. if(newprice > 0){
  1213. var buyprice = (newprice - 0.001).toFixed(4);
  1214. }else{
  1215. var buyprice = 0;
  1216. }
  1217. $("#newprice").val(buyprice);
  1218. $("#mprice").val(buyprice);
  1219. });
  1220. $("#plus_buyprice").click(function(){
  1221. var newprice = parseFloat($("#newprice").val());
  1222. var buyprice = (newprice + 0.001).toFixed(4);
  1223. $("#newprice").val(buyprice);
  1224. $("#mprice").val(buyprice);
  1225. });
  1226. $("#dash_lotsnum").click(function(){
  1227. var lotsnum = parseInt($("#lotsnum").val());
  1228. if(lotsnum <= 1){
  1229. var newlotsnum = 1;
  1230. }else{
  1231. var newlotsnum = lotsnum - 1;
  1232. }
  1233. $("#lotsnum").val(newlotsnum);
  1234. $("#tradelotsnum").val(newlotsnum);
  1235. });
  1236. $("#dash_lots_down_num").click(function(){
  1237. var lotsnum = parseInt($("#lots_down_num").val());
  1238. if(lotsnum <= 1){
  1239. var newlotsnum = 1;
  1240. }else{
  1241. var newlotsnum = lotsnum - 1;
  1242. }
  1243. $("#lots_down_num").val(newlotsnum);
  1244. $("#tradelotsnum").val(newlotsnum);
  1245. });
  1246. $("#dash_up_zsprice").click(function(){
  1247. var up_zsprice = parseFloat($("#up_zsprice").val());
  1248. if(up_zsprice <= 1){
  1249. var new_up_zsprice = up_zsprice;
  1250. }else{
  1251. var new_up_zsprice = up_zsprice - 1;
  1252. }
  1253. $("#up_zsprice").val(new_up_zsprice);
  1254. $("#zsprice").val(up_zsprice);
  1255. });
  1256. $("#dash_down_zsprice").click(function(){
  1257. var down_zsprice = parseFloat($("#down_zsprice").val());
  1258. if(down_zsprice <= 1){
  1259. var new_down_zsprice = down_zsprice;
  1260. }else{
  1261. var new_down_zsprice = down_zsprice - 1;
  1262. }
  1263. $("#down_zsprice").val(new_down_zsprice);
  1264. $("#zsprice").val(up_zsprice);
  1265. });
  1266. $("#dash_down_zyprice").click(function(){
  1267. var down_zyprice = parseFloat($("#down_zyprice").val());
  1268. if(down_zyprice <= 1){
  1269. var new_down_zyprice = down_zyprice;
  1270. }else{
  1271. var new_down_zyprice = down_zyprice - 1;
  1272. }
  1273. $("#down_zyprice").val(new_down_zyprice);
  1274. $("#zyprice").val(up_zsprice);
  1275. });
  1276. $("#dash_up_zyprice").click(function(){
  1277. var up_zyprice = parseFloat($("#up_zyprice").val());
  1278. if(up_zyprice <= 1){
  1279. var new_up_zyprice = up_zyprice;
  1280. }else{
  1281. var new_up_zyprice = up_zyprice - 1;
  1282. }
  1283. $("#up_zyprice").val(new_up_zyprice);
  1284. $("#zyprice").val(new_up_zyprice);
  1285. });
  1286. $("#plus_up_zsprice").click(function(){
  1287. var up_zsprice = parseFloat($("#up_zsprice").val());
  1288. var new_up_zsprice = up_zsprice + 1;
  1289. $("#up_zsprice").val(new_up_zsprice);
  1290. $("#zsprice").val(new_up_zsprice);
  1291. });
  1292. $("#plus_up_zyprice").click(function(){
  1293. var up_zyprice = parseFloat($("#up_zyprice").val());
  1294. var new_up_zyprice = up_zyprice + 1;
  1295. $("#up_zyprice").val(new_up_zyprice);
  1296. $("#zyprice").val(new_up_zyprice);
  1297. });
  1298. $("#plus_down_zsprice").click(function(){
  1299. var down_zsprice = parseFloat($("#down_zsprice").val());
  1300. var new_down_zsprice = down_zsprice + 1;
  1301. $("#down_zsprice").val(new_down_zsprice);
  1302. $("#zsprice").val(new_down_zsprice);
  1303. });
  1304. $("#plus_down_zyprice").click(function(){
  1305. var down_zyprice = parseFloat($("#down_zyprice").val());
  1306. var new_down_zyprice = down_zyprice + 1;
  1307. $("#down_zyprice").val(new_down_zyprice);
  1308. $("#zyprice").val(new_down_zyprice);
  1309. });
  1310. $("#plus_lotsnum").click(function(){
  1311. var lotsnum = parseInt($("#lotsnum").val());
  1312. var newlotsnum = lotsnum + 1;
  1313. $("#lotsnum").val(newlotsnum);
  1314. $("#tradelotsnum").val(newlotsnum);
  1315. });
  1316. $("#plus_lots_down_num").click(function(){
  1317. var lotsnum = parseInt($("#lots_down_num").val());
  1318. var newlotsnum = lotsnum + 1;
  1319. $("#lots_down_num").val(newlotsnum);
  1320. $("#tradelotsnum").val(newlotsnum);
  1321. });
  1322. function set_up_ggan(num,st,gg){
  1323. var lotsnum = num;
  1324. var type = st;
  1325. var number = gg;
  1326. if(number == 1){
  1327. $("#up_ggan_1").addClass('active_lots');
  1328. $("#up_ggan_2").removeClass('active_lots');
  1329. $("#up_ggan_3").removeClass('active_lots');
  1330. $("#up_ggan_4").removeClass('active_lots');
  1331. $("#up_ggan_5").removeClass('active_lots');
  1332. }else if(number == 2){
  1333. $("#up_ggan_2").addClass('active_lots');
  1334. $("#up_ggan_1").removeClass('active_lots');
  1335. $("#up_ggan_3").removeClass('active_lots');
  1336. $("#up_ggan_4").removeClass('active_lots');
  1337. $("#up_ggan_5").removeClass('active_lots');
  1338. }else if(number == 3){
  1339. $("#up_ggan_3").addClass('active_lots');
  1340. $("#up_ggan_2").removeClass('active_lots');
  1341. $("#up_ggan_1").removeClass('active_lots');
  1342. $("#up_ggan_4").removeClass('active_lots');
  1343. $("#up_ggan_5").removeClass('active_lots');
  1344. }else if(number == 4){
  1345. $("#up_ggan_4").addClass('active_lots');
  1346. $("#up_ggan_2").removeClass('active_lots');
  1347. $("#up_ggan_3").removeClass('active_lots');
  1348. $("#up_ggan_1").removeClass('active_lots');
  1349. $("#up_ggan_5").removeClass('active_lots');
  1350. }else if(number == 5){
  1351. $("#up_ggan_5").addClass('active_lots');
  1352. $("#up_ggan_2").removeClass('active_lots');
  1353. $("#up_ggan_3").removeClass('active_lots');
  1354. $("#up_ggan_4").removeClass('active_lots');
  1355. $("#up_ggan_1").removeClass('active_lots');
  1356. }
  1357. $("#upggan").val(lotsnum);
  1358. $("#tradeggnum").val(lotsnum);
  1359. }
  1360. function set_down_ggan(num,st,gg){
  1361. var lotsnum = num;
  1362. var type = st;
  1363. var number = gg;
  1364. if(number == 1){
  1365. $("#down_ggan_1").addClass('active_lots');
  1366. $("#down_ggan_2").removeClass('active_lots');
  1367. $("#down_ggan_3").removeClass('active_lots');
  1368. $("#down_ggan_4").removeClass('active_lots');
  1369. $("#down_ggan_5").removeClass('active_lots');
  1370. }else if(number == 2){
  1371. $("#down_ggan_2").addClass('active_lots');
  1372. $("#down_ggan_1").removeClass('active_lots');
  1373. $("#down_ggan_3").removeClass('active_lots');
  1374. $("#down_ggan_4").removeClass('active_lots');
  1375. $("#down_ggan_5").removeClass('active_lots');
  1376. }else if(number == 3){
  1377. $("#down_ggan_3").addClass('active_lots');
  1378. $("#down_ggan_2").removeClass('active_lots');
  1379. $("#down_ggan_1").removeClass('active_lots');
  1380. $("#down_ggan_4").removeClass('active_lots');
  1381. $("#down_ggan_5").removeClass('active_lots');
  1382. }else if(number == 4){
  1383. $("#down_ggan_4").addClass('active_lots');
  1384. $("#down_ggan_2").removeClass('active_lots');
  1385. $("#down_ggan_3").removeClass('active_lots');
  1386. $("#down_ggan_1").removeClass('active_lots');
  1387. $("#down_ggan_5").removeClass('active_lots');
  1388. }else if(number == 5){
  1389. $("#down_ggan_5").addClass('active_lots');
  1390. $("#down_ggan_2").removeClass('active_lots');
  1391. $("#down_ggan_3").removeClass('active_lots');
  1392. $("#down_ggan_4").removeClass('active_lots');
  1393. $("#down_ggan_1").removeClass('active_lots');
  1394. }
  1395. $("#downggan").val(lotsnum);
  1396. $("#tradeggnum").val(lotsnum);
  1397. }
  1398. </script>
  1399. <script type="text/javascript">
  1400. function goback(){
  1401. window.history.go(-1);
  1402. }
  1403. </script>
  1404. </html>