trans.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304
  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:#f5f5f5;outline: 1px solid #f5f5f5;}
  18. a:hover,a:link,a:visited,a:active{color:#707A8A;text-decoration:none;}
  19. .no_header{position: fixed;z-index: 9999;background:#fff;padding:0px 10px;top:0px;box-shadow: 0 2px 10px 0 rgb(0 0 0 / 10%);}
  20. .txtl{line-height:50px;width:10%;}
  21. .klinebox{width:100%;height:550px;margin-top:55px;}
  22. .klinetitle{width:100%;height:80px;background:#fff;padding:0px 20px;box-shadow: 0 2px 10px 0 rgb(0 0 0 / 5%);}
  23. .klinetitle_l{width:45%;height:80px;float:left;}
  24. .klinetitle_r{width:55%;height:80px;float:left;}
  25. .newpricebox{height:40px;line-height:60px;margin-bottom:0px;color:#2ebd85;font-size:22px;font-weight:bold;}
  26. .changebox{height:40px;line-height:40px;margin-bottom:0px;color:#2ebd85;font-weight:bold;}
  27. .klr3_box{width:100%;height:30px;}
  28. .klr2_box{width:100%;height:25px;}
  29. .klr3_box_dl{width:45%;height:30px;line-height:40px;float:left;text-align:left;}
  30. .klr3_box_dr{width:55%;height:30px;line-height:40px;float:right;text-align:right;}
  31. .klr2_box_dl{width:45%;height:25px;line-height:25px;float:left;text-align:left;}
  32. .klr2_box_dr{width:55%;height:25px;line-height:25px;float:right;text-align:right;}
  33. .dongbox{position:fixed;z-index:9999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
  34. .dong_con{width:80%;height:86vh;background:#fff;margin-top:20px;border-top-right-radius:20px;border-bottom-right-radius:20px;padding:20px 15px 10px 20px;float:left;}
  35. .dong_title{width:100%;height:40px;line-height:40px;}
  36. .dong_title_span{font-size:18px;font-weight:500;}
  37. .dong_find_box{width:100%;height:30px;background:#f5f5f5;border-radius:10px;}
  38. .dong_find_box_img{width:20%;height:30px;line-height:30px;float:left;text-align:center;}
  39. .dong_input_box{width:80%;height:30px;float:left;}
  40. .dong_symbox{width:90%;height:20px;border:none;background:#f5f5f5;margin-top:5px;}
  41. .dong_sel_box{width:100%;height:30px;border-bottom:1px solid #f5f5f5;}
  42. .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;}
  43. .symbol_list{width:100%;height:450px;overflow-y: scroll;margin-top:10px;}
  44. .sy_list_box{width:100%;height:30px;}
  45. .sy_list_boxl{width:35%;height:30px;line-height:30px;float:left;text-align:left;}
  46. .sy_list_boxr{width:30%;height:30px;line-height:30px;float:right;text-align:right;}
  47. .btnbox{width:100%;height:40px;padding:10px 20px;}
  48. .btnbox_l{width:45%;height:40px;line-height:40px;float:left;text-align:center;border-radius:10px;background:#0ecb81;}
  49. .btnbox_r{width:45%;height:40px;line-height:40px;float:right;text-align:center;border-radius:10px;background:#f5465c;}
  50. .dong_order_c{width:90%;height:450px;background:#fff;margin:60px auto;border-radius:10px;padding:10px;}
  51. .dong_order_x{width:100%;height:20px;line-height:20px;text-align:right;}
  52. .dong_order_title{width:100%;height:30px;line-height:20px;text-align:center;border-bottom: 1px solid #f5f5f5;}
  53. .dong_order_option{width:100%;height:80px;;overflow: hidden;overflow-x: scroll;margin-top:5px;}
  54. .dong_order_option_list{width:100px;height:80px;background:#f5f5f5;float:left;margin-right:10px;border-radius:10px;padding:5px;}
  55. .option_list_active{border:1px solid #FCD535;}
  56. .dong_order_p{width:100%;margin-bottom: 0rem;margin-top:10px;padding-left:5px;}
  57. .dong_money_list{width:100%;height:40px;}
  58. .dong_money_list_box{width:70%;height:40px;float:left;overflow: hidden;overflow-x: scroll;}
  59. .dong_money_list_box_l{width:1000px;height:40px;}
  60. .dong_money_list_box_option{width:70px;height:40px;line-height:40px;background:#f5f5f5;float:left;margin-right:5px;border-radius:5px;text-align:center;}
  61. .green{color:#0ecb81;}
  62. .red{color:#f5465c;}
  63. .bggreen{background:#0ecb81;}
  64. .bgred{background:#f5465c;}
  65. .transbtnbox{width:100%;height:60px;position: fixed;bottom: 0px;padding:0px 15px;background:#fff;box-shadow:0px 0px 8px 0px #ccc;line-height:60px;text-align:right;}
  66. .transbtn{width:45%;height:40px;line-height:40px;text-align:center;margin-top:10px;border-radius:10px;}
  67. .tradlist{width:100%;margin-top:10px;}
  68. .tradetitle{width:33.33%;height:30px;line-height:30px;float:left;}
  69. .tleft{text-align:left;}
  70. .tright{text-align:right;}
  71. .tcenter{text-align:center;}
  72. </style>
  73. </head>
  74. <body style="background:#fff;">
  75. <div class="container-fluid " style="padding:0px;width:100vw;">
  76. <div class="no_header">
  77. <div class="fl allhg txtl">
  78. <i class="bi bi-arrow-left fcc fw" onclick="goback()" style="font-size: 24px;"></i>
  79. </div>
  80. <div class="fl allhg" id="centerbox" style="width:80%;text-align:center;line-height:50px;">
  81. <i class="bi bi-text-indent-left fw" style="font-size:22px;color:#000;"></i>
  82. <span class="fzmmm fw" style="color:#000;" id="symbolbox">{$upmarket}</span>
  83. <span class="fzmmm fw" style="color:#000;"> {:L('U本位永续合约')}</span>
  84. </div>
  85. <div class="fr allhg txtr" style="line-height:50px;width:10%;">
  86. </div>
  87. </div>
  88. <div class="klinebox">
  89. <div class="klinetitle">
  90. <div class="klinetitle_l">
  91. <p class="newpricebox" id="newpricebox" style="font-size:24px;">--</p>
  92. <p class="changebox" id="changebox">--</p>
  93. </div>
  94. <div class="klinetitle_r">
  95. <div class="klr3_box">
  96. <div class="klr3_box_dl">
  97. <span class="fzmm fcc">{:L('最低')}</span>
  98. </div>
  99. <div class="klr3_box_dr">
  100. <span class="fzmm fch" id="minmoney">--</span>
  101. </div>
  102. </div>
  103. <div class="klr2_box">
  104. <div class="klr2_box_dl">
  105. <span class="fzmm fcc">{:L('最高')}</span>
  106. </div>
  107. <div class="klr2_box_dr">
  108. <span class="fzmm fch" id="maxmoney">--</span>
  109. </div>
  110. </div>
  111. <div class="klr2_box">
  112. <div class="klr2_box_dl">
  113. <span class="fzmm fcc">24h{:L('量')}</span>
  114. </div>
  115. <div class="klr2_box_dr">
  116. <span class="fzmm fch" id="allvol">--</span>
  117. </div>
  118. </div>
  119. </div>
  120. </div>
  121. <input type="hidden" id="coinname" value="{$smybol}" />
  122. <div style="width:100%;height:540px;">
  123. <iframe id="iframeid" width="100%" scrolling="no" height="540" src="/Trade/ordinary?market={$market}" noresize="noresize" frameborder="0" >不支持IFRAME,请升级</iframe>
  124. </div>
  125. <div style="width:100%;height:500px;background:#fff;padding:5px 15px;">
  126. <div style="width:100%;height:30px;line-height:30px;">
  127. <span class="fzmmm fch" style="padding:5px 0px;border-bottom:2px solid #FCD535;">{:L('最近成交')}</span>
  128. </div>
  129. <div class="tradlist">
  130. <div style="width:100%;height:30px;">
  131. <div class="tradetitle tleft">
  132. <span calss="fzm fcc">{:L('时间')}</span>
  133. </div>
  134. <div class="tradetitle tcenter">
  135. <span calss="fzm fcc">{:L('价格')}</span>
  136. </div>
  137. <div class="tradetitle tright">
  138. <span calss="fzm fcc">{:L('数量')}</span>
  139. </div>
  140. </div>
  141. <!--最新交易记录-->
  142. <div style="width:100%;height:30px;" id="tradbox"></div>
  143. </div>
  144. </div>
  145. <if condition="$state eq 1">
  146. <a href="/Levertade/index.html?symbol={$smybol}">
  147. <div class="transbtnbox">
  148. <span style="font-size:16px;font-weight:bold;">{:L('去交易')} <i class="bi bi-chevron-double-right" style="color:#FCD535;font-size:20px;"></i></span>
  149. </div>
  150. </a>
  151. <elseif condition="$state eq 2" />
  152. </if>
  153. </div>
  154. <!---------交易选择弹窗---------->
  155. <div class="dongbox" id="showdong">
  156. <div class="dong_con">
  157. <div style="width:100%;position:relative;z-index:9999999;top:0px;">
  158. <div class="dong_title">
  159. <span class="dong_title_span">{:L('U本位永续合约')}</span>
  160. </div>
  161. <div class="dong_sel_box">
  162. <span class="fcc dong_sel_span">{:L('全部')}</span>
  163. </div>
  164. </div>
  165. <div class="symbol_list" id="smybolbox">
  166. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  167. <span class="fzmm fcc">{:L('没有获取数据')}</span>
  168. </div>
  169. </div>
  170. </div>
  171. <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
  172. </div>
  173. </div>
  174. </body>
  175. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  176. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  177. <script type="text/javascript">
  178. function getcoin_data(){
  179. var coinname = $("#coinname").val();
  180. $.post("{:U('Ajaxtrade/getcoin_data')}",
  181. {'coinname':coinname},
  182. function(data){
  183. if(data.code == 1){
  184. $("#newpricebox").html(data.close);
  185. $("#ordernewprice").html(data.close);
  186. $("#changebox").html(data.change);
  187. $("#minmoney").html(data.low);
  188. $("#maxmoney").html(data.high);
  189. $("#allvol").html(data.amount);
  190. }
  191. });
  192. }
  193. </script>
  194. <script type="text/javascript">
  195. function gettradlist(){
  196. var coinname = $("#coinname").val();
  197. $.post("{:U('Ajaxtrade/gettradlist')}",
  198. {'coinname':coinname},
  199. function(data){
  200. if(data.code == 1){
  201. $("#tradbox").empty();
  202. var html = '';
  203. if(data.data == '' || data.data == null){
  204. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  205. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  206. '</div>';
  207. $("#tradbox").append(html);
  208. }else{
  209. $.each(data.data,function(key,val){
  210. html += '<div class="tradetitle tleft">'+ val.strtype +'</div>'+
  211. '<div class="tradetitle tcenter">' + val.price + '</div>'+
  212. '<div class="tradetitle tright">' + val.amount + '</div>';
  213. });
  214. $("#tradbox").append(html);
  215. }
  216. }
  217. });
  218. }
  219. </script>
  220. <script type="text/javascript">
  221. $(function(){
  222. gettradlist();
  223. setInterval("gettradlist()",3000);
  224. getcoin_data();
  225. setInterval("getcoin_data()",2000);
  226. });
  227. </script>
  228. <script type="text/javascript">
  229. function getallsmybol(){
  230. $.post("{:U('Ajaxtrade/getallcoin')}",
  231. function(data){
  232. if(data.code == 1){
  233. $("#smybolbox").empty();
  234. var html = '';
  235. if(data.data == '' || data.data == null){
  236. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  237. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  238. '</div>';
  239. $("#smybolbox").append(html);
  240. }else{
  241. $.each(data.data,function(key,val){
  242. html += '<a href="/Levertade/trans.html?sytx='+ val.cname +'">'+
  243. '<div class="sy_list_box">'+
  244. '<div class="sy_list_boxl">'+
  245. '<span class="fzmm fcc">'+ val.cname +'</span>'+
  246. '</div>'+
  247. '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
  248. '<div class="sy_list_boxr">' + val.change +'</div>'+
  249. '</div>'+
  250. '</a>';
  251. });
  252. $("#smybolbox").append(html);
  253. }
  254. }else{
  255. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  256. '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
  257. '</div>';
  258. $("#smybolbox").append(html);
  259. }
  260. });
  261. }
  262. </script>
  263. <script type="text/javascript">
  264. $("#hidedong").click(function(){
  265. $("#showdong").fadeOut("slow");
  266. });
  267. $("#centerbox").click(function(){
  268. getallsmybol();
  269. $("#showdong").fadeIn("slow");
  270. });
  271. </script>
  272. <script type="text/javascript">
  273. function goback(){
  274. window.location.href = "/Levertade/index.html";
  275. }
  276. </script>
  277. </html>