559b24d436f48cc2cbe19d91f8efb03a.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298
  1. <?php if (!defined('THINK_PATH')) exit();?><!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><?php echo ($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"><?php echo ($upmarket); ?></span>
  83. <span class="fzmmm fw" style="color:#000;"> <?php echo 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"><?php echo 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"><?php echo 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<?php echo 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="<?php echo ($smybol); ?>" />
  122. <div style="width:100%;height:540px;">
  123. <iframe id="iframeid" width="100%" scrolling="no" height="540" src="/Trade/ordinary?market=<?php echo ($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;"><?php echo 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"><?php echo L('时间');?></span>
  133. </div>
  134. <div class="tradetitle tcenter">
  135. <span calss="fzm fcc"><?php echo L('价格');?></span>
  136. </div>
  137. <div class="tradetitle tright">
  138. <span calss="fzm fcc"><?php echo L('数量');?></span>
  139. </div>
  140. </div>
  141. <!--最新交易记录-->
  142. <div style="width:100%;height:30px;" id="tradbox"></div>
  143. </div>
  144. </div>
  145. <?php if($state == 1): ?><a href="/Levertade/index.html?symbol=<?php echo ($smybol); ?>">
  146. <div class="transbtnbox">
  147. <span style="font-size:16px;font-weight:bold;"><?php echo L('去交易');?> <i class="bi bi-chevron-double-right" style="color:#FCD535;font-size:20px;"></i></span>
  148. </div>
  149. </a>
  150. <?php elseif($state == 2): endif; ?>
  151. </div>
  152. <!---------交易选择弹窗---------->
  153. <div class="dongbox" id="showdong">
  154. <div class="dong_con">
  155. <div style="width:100%;position:relative;z-index:9999999;top:0px;">
  156. <div class="dong_title">
  157. <span class="dong_title_span"><?php echo L('U本位永续合约');?></span>
  158. </div>
  159. <div class="dong_sel_box">
  160. <span class="fcc dong_sel_span"><?php echo L('全部');?></span>
  161. </div>
  162. </div>
  163. <div class="symbol_list" id="smybolbox">
  164. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  165. <span class="fzmm fcc"><?php echo L('没有获取数据');?></span>
  166. </div>
  167. </div>
  168. </div>
  169. <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
  170. </div>
  171. </div>
  172. </body>
  173. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  174. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  175. <script type="text/javascript">
  176. function getcoin_data(){
  177. var coinname = $("#coinname").val();
  178. $.post("<?php echo U('Ajaxtrade/getcoin_data');?>",
  179. {'coinname':coinname},
  180. function(data){
  181. if(data.code == 1){
  182. $("#newpricebox").html(data.close);
  183. $("#ordernewprice").html(data.close);
  184. $("#changebox").html(data.change);
  185. $("#minmoney").html(data.low);
  186. $("#maxmoney").html(data.high);
  187. $("#allvol").html(data.amount);
  188. }
  189. });
  190. }
  191. </script>
  192. <script type="text/javascript">
  193. function gettradlist(){
  194. var coinname = $("#coinname").val();
  195. $.post("<?php echo U('Ajaxtrade/gettradlist');?>",
  196. {'coinname':coinname},
  197. function(data){
  198. if(data.code == 1){
  199. $("#tradbox").empty();
  200. var html = '';
  201. if(data.data == '' || data.data == null){
  202. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  203. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  204. '</div>';
  205. $("#tradbox").append(html);
  206. }else{
  207. $.each(data.data,function(key,val){
  208. html += '<div class="tradetitle tleft">'+ val.strtype +'</div>'+
  209. '<div class="tradetitle tcenter">' + val.price + '</div>'+
  210. '<div class="tradetitle tright">' + val.amount + '</div>';
  211. });
  212. $("#tradbox").append(html);
  213. }
  214. }
  215. });
  216. }
  217. </script>
  218. <script type="text/javascript">
  219. $(function(){
  220. gettradlist();
  221. setInterval("gettradlist()",3000);
  222. getcoin_data();
  223. setInterval("getcoin_data()",2000);
  224. });
  225. </script>
  226. <script type="text/javascript">
  227. function getallsmybol(){
  228. $.post("<?php echo U('Ajaxtrade/getallcoin');?>",
  229. function(data){
  230. if(data.code == 1){
  231. $("#smybolbox").empty();
  232. var html = '';
  233. if(data.data == '' || data.data == null){
  234. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  235. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  236. '</div>';
  237. $("#smybolbox").append(html);
  238. }else{
  239. $.each(data.data,function(key,val){
  240. html += '<a href="/Levertade/trans.html?sytx='+ val.cname +'">'+
  241. '<div class="sy_list_box">'+
  242. '<div class="sy_list_boxl">'+
  243. '<span class="fzmm fcc">'+ val.cname +'</span>'+
  244. '</div>'+
  245. '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
  246. '<div class="sy_list_boxr">' + val.change +'</div>'+
  247. '</div>'+
  248. '</a>';
  249. });
  250. $("#smybolbox").append(html);
  251. }
  252. }else{
  253. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  254. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  255. '</div>';
  256. $("#smybolbox").append(html);
  257. }
  258. });
  259. }
  260. </script>
  261. <script type="text/javascript">
  262. $("#hidedong").click(function(){
  263. $("#showdong").fadeOut("slow");
  264. });
  265. $("#centerbox").click(function(){
  266. getallsmybol();
  267. $("#showdong").fadeIn("slow");
  268. });
  269. </script>
  270. <script type="text/javascript">
  271. function goback(){
  272. window.location.href = "/Levertade/index.html";
  273. }
  274. </script>
  275. </html>