2f00edc64a7cb58cdaba724a6580653c.php 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310
  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;background:rgb(245, 245, 245);position: fixed;bottom: 0px;padding:0px 15px;}
  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('币币交易');?></span>
  84. </div>
  85. <a href="<?php echo U('Trade/tradebill');?>">
  86. <div class="fr allhg txtr" style="line-height:50px;width:10%;">
  87. <i class="bi bi-funnel fcy fw" style="font-size:20px;"></i>
  88. </div>
  89. </a>
  90. </div>
  91. <div class="klinebox">
  92. <div class="klinetitle">
  93. <div class="klinetitle_l">
  94. <p class="newpricebox" id="newpricebox" style="font-size:24px;">--</p>
  95. <p class="changebox" id="changebox">--</p>
  96. </div>
  97. <div class="klinetitle_r">
  98. <div class="klr3_box">
  99. <div class="klr3_box_dl">
  100. <span class="fzmm fcc"><?php echo L('最低');?></span>
  101. </div>
  102. <div class="klr3_box_dr">
  103. <span class="fzmm fch" id="minmoney">--</span>
  104. </div>
  105. </div>
  106. <div class="klr2_box">
  107. <div class="klr2_box_dl">
  108. <span class="fzmm fcc"><?php echo L('最高');?></span>
  109. </div>
  110. <div class="klr2_box_dr">
  111. <span class="fzmm fch" id="maxmoney">--</span>
  112. </div>
  113. </div>
  114. <div class="klr2_box">
  115. <div class="klr2_box_dl">
  116. <span class="fzmm fcc">24h<?php echo L('量');?></span>
  117. </div>
  118. <div class="klr2_box_dr">
  119. <span class="fzmm fch" id="allvol">--</span>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <input type="hidden" id="coinname" value="<?php echo ($smybol); ?>" />
  125. <div style="width:100%;height:540px;">
  126. <iframe id="iframeid" width="100%" scrolling="no" height="540" src="/Trade/ordinary?market=<?php echo ($market); ?>" noresize="noresize" frameborder="0" >不支持IFRAME,请升级</iframe>
  127. </div>
  128. <div style="width:100%;height:500px;background:#fff;padding:5px 15px;">
  129. <div style="width:100%;height:30px;line-height:30px;">
  130. <span class="fzmmm fch" style="padding:5px 0px;border-bottom:2px solid #FCD535;"><?php echo L('最近成交');?></span>
  131. </div>
  132. <div class="tradlist">
  133. <div style="width:100%;height:30px;">
  134. <div class="tradetitle tleft">
  135. <span calss="fzm fcc"><?php echo L('时间');?></span>
  136. </div>
  137. <div class="tradetitle tcenter">
  138. <span calss="fzm fcc"><?php echo L('价格');?></span>
  139. </div>
  140. <div class="tradetitle tright">
  141. <span calss="fzm fcc"><?php echo L('数量');?></span>
  142. </div>
  143. </div>
  144. <!--最新交易记录-->
  145. <div style="width:100%;height:30px;" id="tradbox"></div>
  146. </div>
  147. </div>
  148. <?php if($state == 1): ?><div class="transbtnbox">
  149. <a href="/Trade/transinfo.html?symbol=<?php echo ($smybol); ?>&type=buy">
  150. <div class="transbtn bggreen fl">
  151. <span class="fzmm" style="color:#fff;"><?php echo L('买入');?></span>
  152. </div>
  153. </a>
  154. <a href="/Trade/transinfo.html?symbol=<?php echo ($smybol); ?>&type=sell">
  155. <div class="transbtn bgred fr">
  156. <span class="fzmm" style="color:#fff;"><?php echo L('卖出');?></span>
  157. </div>
  158. </a>
  159. </div>
  160. <?php elseif($state == 2): endif; ?>
  161. </div>
  162. <!---------交易选择弹窗---------->
  163. <div class="dongbox" id="showdong">
  164. <div class="dong_con">
  165. <div style="width:100%;position:relative;z-index:9999999;top:0px;">
  166. <div class="dong_title">
  167. <span class="dong_title_span">USDT <?php echo L('币币市场');?></span>
  168. </div>
  169. <div class="dong_sel_box">
  170. <span class="fcc dong_sel_span"><?php echo L('全部');?></span>
  171. </div>
  172. </div>
  173. <div class="symbol_list" id="smybolbox">
  174. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  175. <span class="fzmm fcc"><?php echo L('没有获取数据');?></span>
  176. </div>
  177. </div>
  178. </div>
  179. <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
  180. </div>
  181. </div>
  182. </body>
  183. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  184. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  185. <script type="text/javascript">
  186. function getcoin_data(){
  187. var coinname = $("#coinname").val();
  188. $.post("<?php echo U('Ajaxtrade/getcoin_data');?>",
  189. {'coinname':coinname},
  190. function(data){
  191. if(data.code == 1){
  192. $("#newpricebox").html(data.close);
  193. $("#ordernewprice").html(data.close);
  194. $("#changebox").html(data.change);
  195. $("#minmoney").html(data.low);
  196. $("#maxmoney").html(data.high);
  197. $("#allvol").html(data.amount);
  198. }
  199. });
  200. }
  201. </script>
  202. <script type="text/javascript">
  203. function gettradlist(){
  204. var coinname = $("#coinname").val();
  205. $.post("<?php echo U('Ajaxtrade/gettradlist');?>",
  206. {'coinname':coinname},
  207. function(data){
  208. if(data.code == 1){
  209. $("#tradbox").empty();
  210. var html = '';
  211. if(data.data == '' || data.data == null){
  212. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  213. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  214. '</div>';
  215. $("#tradbox").append(html);
  216. }else{
  217. $.each(data.data,function(key,val){
  218. html += '<div class="tradetitle tleft">'+ val.strtype +'</div>'+
  219. '<div class="tradetitle tcenter">' + val.price + '</div>'+
  220. '<div class="tradetitle tright">' + val.amount + '</div>';
  221. });
  222. $("#tradbox").append(html);
  223. }
  224. }
  225. });
  226. }
  227. </script>
  228. <script type="text/javascript">
  229. $(function(){
  230. gettradlist();
  231. setInterval("gettradlist()",3000);
  232. getcoin_data();
  233. setInterval("getcoin_data()",2000);
  234. });
  235. </script>
  236. <script type="text/javascript">
  237. function getallsmybol(){
  238. $.post("<?php echo U('Ajaxtrade/getallcoin');?>",
  239. function(data){
  240. if(data.code == 1){
  241. $("#smybolbox").empty();
  242. var html = '';
  243. if(data.data == '' || data.data == null){
  244. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  245. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  246. '</div>';
  247. $("#smybolbox").append(html);
  248. }else{
  249. $.each(data.data,function(key,val){
  250. html += '<a href="/Trade/trans.html?sytx='+ val.cname +'">'+
  251. '<div class="sy_list_box">'+
  252. '<div class="sy_list_boxl">'+
  253. '<span class="fzmm fcc">'+ val.cname +'</span>'+
  254. '</div>'+
  255. '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
  256. '<div class="sy_list_boxr">' + val.change +'</div>'+
  257. '</div>'+
  258. '</a>';
  259. });
  260. $("#smybolbox").append(html);
  261. }
  262. }else{
  263. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  264. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  265. '</div>';
  266. $("#smybolbox").append(html);
  267. }
  268. });
  269. }
  270. </script>
  271. <script type="text/javascript">
  272. $("#hidedong").click(function(){
  273. $("#showdong").fadeOut("slow");
  274. });
  275. $("#centerbox").click(function(){
  276. getallsmybol();
  277. $("#showdong").fadeIn("slow");
  278. });
  279. </script>
  280. <script type="text/javascript">
  281. function goback(){
  282. window.location.href = "/Trade/index.html";
  283. }
  284. </script>
  285. </html>