trans.html 14 KB

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