b4d1d46e803d2b415d7cc6135d7f0b38.php 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232
  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:#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:70%;height:40px;line-height:40px;float:left;}
  24. .content_title_r{width:30%;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:400px;background:#fff;}
  28. .tradebox_l{width:58%;height:400px;float:left;}
  29. .tradebox_r{width:40%;height:400px;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:160px;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%;clear:both;padding:10px 0px;}
  84. .tlistbox_1{width:100%;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:33.33%;height:60px;}
  91. .tlistbox_8{width:100%;height:30px;line-height:30px;}
  92. .tlistbox_9{width:100%;height:30px;line-height:20px;}
  93. </style>
  94. </head>
  95. <body style="background:#fff;">
  96. <div class="container-fluid " style="padding:0px;width:100vw;">
  97. <div class="no_header">
  98. <div class="fl allhg txtl">
  99. <span style="font-size:20px;font-weight:bold;color:#000;"><?php echo L('币币交易');?></span>
  100. </div>
  101. <div class="fl allhg" style="width:30%;"></div>
  102. <div class="fr allhg txtr" style="line-height:50px;width:10%;"></div>
  103. </div>
  104. <div class="content_title">
  105. <div class="content_title_l tleft">
  106. <i class="bi bi-text-indent-left fch" style="font-size:22px;" id="centerbox"></i>
  107. <span style="font-size:18px;font-weight:bold;color:#000;" id="marketbox"><?php echo ($coinname); ?></span>
  108. <span style="color:#f5465c;" id="changebox">--</span>
  109. </div>
  110. <a href="/Trade/trans.html?sytx=<?php echo ($coinname); ?>" >
  111. <div class="content_title_r tright">
  112. <i class="bi bi-bar-chart-line" style="font-size:22px;color:#FCD535;"></i>
  113. </div>
  114. </a>
  115. </div>
  116. <div class="contentbox" style="margin-top:90px;">
  117. <div class="tradebox">
  118. <div class="tradebox_l">
  119. <div class="tradebox_l_btn">
  120. <div class="tradebox_l_buybtn bggreen" id="buybtn">
  121. <span class="fzmm cfff" id="buybtnspan"><?php echo L('买入');?></span>
  122. </div>
  123. <div class="tradebox_l_sellbtn bghc" id="sellbtn">
  124. <span class="fzmm c000" id="sellbtnspan"><?php echo L('卖出');?></span>
  125. </div>
  126. </div>
  127. <!--买入框-->
  128. <div class="formbox" id="buycoinbox" style="display:block;">
  129. <div class="formbox_op">
  130. <div class="formbox_op_list" id="buyxjbtn">
  131. <span class="fzmm fcy" id="xjspan"><?php echo L('限价委托');?></span>
  132. </div>
  133. <div class="formbox_op_list" id="buysjbtn">
  134. <span class="fzmm fcc" id="sjspan"><?php echo L('市价委托');?></span>
  135. </div>
  136. </div>
  137. <!--限价委托单价框-->
  138. <div class="inputbox" id="xjbox">
  139. <div class="inputbox_float">
  140. <input type="text" id="newprice" class="fcc xjinput" value="" />
  141. </div>
  142. <div class="inputbox_float" style="width:40%;">
  143. <div class="input_bi borderright" id="dash_buyprice">
  144. <i class="bi bi-dash bistyle"></i>
  145. </div>
  146. <div class="input_bi" id="plus_buyprice">
  147. <i class="bi bi-plus bistyle"></i>
  148. </div>
  149. </div>
  150. </div>
  151. <div class="inputbox" style="background: #f5f5f5;display:none" id="sjbox">
  152. <div class="inputbox_float">
  153. <input type="text" class="fcc xjinput" placeholder="<?php echo L('按市场最优价');?>" style="background:#f5f5f5;" />
  154. </div>
  155. </div>
  156. <div class="inputbox" id="sjnumbox" style="display:none;border:none;"></div>
  157. <div class="inputbox" id="xjnumbox" style="display:block;">
  158. <div class="inputbox_float">
  159. <input type="text" id="buynum" oninput="buynumfc();" class="fcc xjinput" value="" placeholder="<?php echo L('输入数量');?>" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,6})?/) ? this.value.match(/\d+(\.\d{0,6})?/)[0] : ''" />
  160. </div>
  161. <div class="inputbox_float" style="width:40%;">
  162. <div class="input_bi borderright" id="dash_buynum">
  163. <i class="bi bi-dash bistyle"></i>
  164. </div>
  165. <div class="input_bi" id="plus_buynum">
  166. <i class="bi bi-plus bistyle"></i>
  167. </div>
  168. </div>
  169. </div>
  170. <div class="blbox">
  171. <div class="blbox_1" onclick="buyblfc(1,25);">
  172. <div class="blbox_3 bgf5" id="buybl_1"></div>
  173. <div class="blbox_4">
  174. <span class="fzm fcc">25%</span>
  175. </div>
  176. </div>
  177. <div class="blbox_1" onclick="buyblfc(2,50);">
  178. <div class="blbox_3 bgf5" id="buybl_2"></div>
  179. <div class="blbox_4">
  180. <span class="fzm fcc">50%</span>
  181. </div>
  182. </div>
  183. <div class="blbox_1" onclick="buyblfc(3,75);">
  184. <div class="blbox_3 bgf5" id="buybl_3"></div>
  185. <div class="blbox_4">
  186. <span class="fzm fcc">75%</span>
  187. </div>
  188. </div>
  189. <div class="blbox_2" onclick="buyblfc(4,100);">
  190. <div class="blbox_3 bgf5" id="buybl_4"></div>
  191. <div class="blbox_4">
  192. <span class="fzm fcc">100%</span>
  193. </div>
  194. </div>
  195. </div>
  196. <div style="width:100%;height:30px;margin-top:20px;">
  197. <div style="width:30%;height:30px;line-height:30px;float:left;">
  198. <span class="fzm fcc"><?php echo L('可用');?></span>
  199. </div>
  200. <div style="width:70%;height:30px;line-height:30px;float:left;text-align:right;">
  201. <span class="fzm fcc"><?php echo ($usdt_blance); ?></span>
  202. <span class="fzm fcc">USDT</span>
  203. </div>
  204. </div>
  205. <div class="inputbox">
  206. <div class="inputbox_float">
  207. <input type="text" id="buyusdt" oninput="buyusdtfc();" class="fcc xjinput" value="" placeholder="<?php echo L('交易额');?>" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,6})?/) ? this.value.match(/\d+(\.\d{0,6})?/)[0] : ''" />
  208. </div>
  209. <div class="inputbox_float" style="width:40%;text-align:center;line-height:36px;">
  210. <span class="fzmm fcc">USDT</span>
  211. </div>
  212. </div>
  213. <?php if($uid >= 1): ?><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:20px;">
  214. <span class="fzmm" style="color:#fff;"><?php echo L('买入');?></span>
  215. </div>
  216. <?php else: ?>
  217. <a href="<?php echo U('Login/index');?>">
  218. <div style="width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
  219. <span class="fzmm" style="color:#fff;"><?php echo L('登陆');?></span>
  220. </div>
  221. </a><?php endif; ?>
  222. </div>
  223. <!--卖出框-->
  224. <div class="formbox" id="sellcoinbox" style="display:none;">
  225. <div class="formbox_op">
  226. <div class="formbox_op_list" id="sell_xjbtn">
  227. <span class="fzmm fcy" id="sell_xjspan"><?php echo L('限价委托');?></span>
  228. </div>
  229. <div class="formbox_op_list" id="sell_sjbtn">
  230. <span class="fzmm fcc" id="sell_sjspan"><?php echo L('市价委托');?></span>
  231. </div>
  232. </div>
  233. <!--限价委托单价框-->
  234. <div class="inputbox" id="sell_xjbox">
  235. <div class="inputbox_float">
  236. <input type="text" id="sell_newprice" class="fcc xjinput" value="" />
  237. </div>
  238. <div class="inputbox_float" style="width:40%;">
  239. <div class="input_bi borderright" id="dash_sellprice">
  240. <i class="bi bi-dash bistyle"></i>
  241. </div>
  242. <div class="input_bi" id="plus_sellprice">
  243. <i class="bi bi-plus bistyle"></i>
  244. </div>
  245. </div>
  246. </div>
  247. <div class="inputbox" style="background: #f5f5f5;display:none" id="sell_sjbox">
  248. <div class="inputbox_float">
  249. <input type="text" class="fcc xjinput" placeholder="<?php echo L('按市场最优价');?>" style="background:#f5f5f5;" />
  250. </div>
  251. </div>
  252. <div class="inputbox" id="sell_sjnumbox" style="display:none;border:none;"></div>
  253. <div class="inputbox" id="sell_xjnumbox" style="display:block;">
  254. <div class="inputbox_float">
  255. <input type="text" id="sell_num" oninput="sellnumfc();" class="fcc xjinput" value="" placeholder="<?php echo L('输入数量');?>" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,6})?/) ? this.value.match(/\d+(\.\d{0,6})?/)[0] : ''" />
  256. </div>
  257. <div class="inputbox_float" style="width:40%;">
  258. <div class="input_bi borderright" id="dash_sellnum">
  259. <i class="bi bi-dash bistyle"></i>
  260. </div>
  261. <div class="input_bi" id="plus_sellnum">
  262. <i class="bi bi-plus bistyle"></i>
  263. </div>
  264. </div>
  265. </div>
  266. <div class="blbox">
  267. <div class="blbox_1" onclick="sellblfc(1,25);">
  268. <div class="blbox_3 bgf5" id="sellbl_1"></div>
  269. <div class="blbox_4">
  270. <span class="fzm fcc">25%</span>
  271. </div>
  272. </div>
  273. <div class="blbox_1" onclick="sellblfc(2,50);">
  274. <div class="blbox_3 bgf5" id="sellbl_2"></div>
  275. <div class="blbox_4">
  276. <span class="fzm fcc">50%</span>
  277. </div>
  278. </div>
  279. <div class="blbox_1" onclick="sellblfc(3,75);">
  280. <div class="blbox_3 bgf5" id="sellbl_3"></div>
  281. <div class="blbox_4">
  282. <span class="fzm fcc">75%</span>
  283. </div>
  284. </div>
  285. <div class="blbox_2" onclick="sellblfc(4,100);">
  286. <div class="blbox_3 bgf5" id="sellbl_4"></div>
  287. <div class="blbox_4">
  288. <span class="fzm fcc">100%</span>
  289. </div>
  290. </div>
  291. </div>
  292. <div style="width:100%;height:30px;margin-top:20px;">
  293. <div style="width:30%;height:30px;line-height:30px;float:left;">
  294. <span class="fzm fcc"><?php echo L('可用');?></span>
  295. </div>
  296. <div style="width:70%;height:30px;line-height:30px;float:left;text-align:right;">
  297. <span class="fzm fcc"><?php echo ($coin_blance); ?></span>
  298. <span class="fzm fcc"><?php echo ($symbol); ?></span>
  299. </div>
  300. </div>
  301. <div class="inputbox" id="sellxjusdt">
  302. <div class="inputbox_float">
  303. <input type="text" id="sell_usdt" oninput="sellusdtfc();" class="fcc xjinput" value="" placeholder="<?php echo L('交易额');?>" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,6})?/) ? this.value.match(/\d+(\.\d{0,6})?/)[0] : ''" />
  304. </div>
  305. <div class="inputbox_float" style="width:40%;text-align:center;line-height:36px;">
  306. <span class="fzmm fcc">USDT</span>
  307. </div>
  308. </div>
  309. <div class="inputbox" id="sellxjcoin" style="display:none;">
  310. <div class="inputbox_float">
  311. <input type="text" id="sell_coin" oninput="sellcoinfc();" class="fcc xjinput" value="" placeholder="<?php echo L('交易额');?>" autocomplete="off" step="1" min="0" onkeyup="this.value= this.value.match(/\d+(\.\d{0,6})?/) ? this.value.match(/\d+(\.\d{0,6})?/)[0] : ''" />
  312. </div>
  313. <div class="inputbox_float" style="width:40%;text-align:center;line-height:36px;">
  314. <span class="fzmm fcc"><?php echo ($symbol); ?></span>
  315. </div>
  316. </div>
  317. <?php if($uid >= 1): ?><div onclick="bb_sellcoin(2);" style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
  318. <span class="fzmm" style="color:#fff;"><?php echo L('卖出');?></span>
  319. </div>
  320. <?php else: ?>
  321. <a href="<?php echo U('Login/index');?>">
  322. <div style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
  323. <span class="fzmm" style="color:#fff;"><?php echo L('登陆');?></span>
  324. </div>
  325. </a><?php endif; ?>
  326. </div>
  327. </div>
  328. <div class="tradebox_r">
  329. <div style="width:100%;height:20px;padding:0px 5px;">
  330. <div class="tradebox_title tl">
  331. <span class="fcc fzm"><?php echo L('价格');?></span>
  332. </div>
  333. <div class="tradebox_title tr">
  334. <span class="fcc fzm"><?php echo L('数量');?></span>
  335. </div>
  336. </div>
  337. <div class="trade_listbox" id="tradesellbox">
  338. <div style="width:100%;height:30px;">
  339. <div class="trade_list tl">
  340. <span class="red fzm">--</span>
  341. </div>
  342. <div class="trade_list tr">
  343. <span class="red fzm">--</span>
  344. </div>
  345. </div>
  346. </div>
  347. <div class="trade_listpricebox" id="closeprice">
  348. <span>--</span>
  349. </div>
  350. <div class="trade_listbox" id="tradebuybox">
  351. <div style="width:100%;height:30px;">
  352. <div class="trade_list tl">
  353. <span class="green fzm">--</span>
  354. </div>
  355. <div class="trade_list tr">
  356. <span class="green fzm">--</span>
  357. </div>
  358. </div>
  359. </div>
  360. </div>
  361. </div>
  362. </div>
  363. <div class="fccbox"></div>
  364. <div class="wtlistbox">
  365. <div class="o_title_box fl">
  366. <span class="fzmmm order_title FCD535"><?php echo L('限价委托');?></span>
  367. </div>
  368. <div class="o_title_box fr tr">
  369. <a href="<?php echo U('Trade/tradebill');?>">
  370. <i class="bi bi-journal-text fccm" style="font-weight:bold;font-size:18px;"></i>
  371. <span class="fzmm fcc"><?php echo L('全部委托');?></span>
  372. </a>
  373. </div>
  374. <?php if(empty($list)): ?><div style="width:100%;height:200px;line-height:200px;text-align:center;">
  375. <span class="fcc fzmmm"><?php echo L('没有委托订单');?></span>
  376. </div>
  377. <?php else: ?>
  378. <?php if(is_array($list)): foreach($list as $key=>$vo): ?><div class="tlistbox">
  379. <div class="tlistbox_1">
  380. <div class="tlistbox_2">
  381. <div class="tlistbox_3 fl">
  382. <?php if($vo["type"] == 1): ?><span class="fzmmm green"><?php echo L('购买');?></span>
  383. <?php elseif($vo["type"] == 2): ?>
  384. <span class="fzmmm red"><?php echo L('出售');?></span><?php endif; ?>
  385. <span class="fzmmm fch" style="font-weight:bold;"><?php echo ($vo["symbol"]); ?></span>
  386. <span class="fzm fcc"><?php echo ($vo["addtime"]); ?></span>
  387. </div>
  388. <div class="tlistbox_4 fr tr" onclick="clearorder(<?php echo ($vo["id"]); ?>);">
  389. <span class="tlistbox_5 fcy"><?php echo L('取消');?></span>
  390. </div>
  391. </div>
  392. <div class="tlistbox_6">
  393. <div class="tlistbox_7 fl">
  394. <div class="tlistbox_8 tl">
  395. <span class="fzm fcc"><?php echo L('价格');?>(USDT)</span>
  396. </div>
  397. <div class="tlistbox_9 tl">
  398. <span class="fzmm fcc"><?php echo ($vo["xjprice"]); ?></span>
  399. </div>
  400. </div>
  401. <?php if($vo["type"] == 1): ?><div class="tlistbox_7 fl">
  402. <div class="tlistbox_8 tc">
  403. <span class="fzm fcc"><?php echo L('数量');?>(USDT)</span>
  404. </div>
  405. <div class="tlistbox_9 tc">
  406. <span class="fzmm fcc"><?php echo ($vo["usdtnum"]); ?></span>
  407. </div>
  408. </div>
  409. <?php elseif($vo["type"] == 2): ?>
  410. <div class="tlistbox_7 fl">
  411. <div class="tlistbox_8 tc">
  412. <span class="fzm fcc"><?php echo L('数量');?>(<?php echo ($vo["coin"]); ?>)</span>
  413. </div>
  414. <div class="tlistbox_9 tc">
  415. <span class="fzmm fcc"><?php echo ($vo["coinnum"]); ?></span>
  416. </div>
  417. </div><?php endif; ?>
  418. <div class="tlistbox_7 fl">
  419. <div class="tlistbox_8 tr">
  420. <span class="fzm fcc"><?php echo L('实际成交');?>(<?php echo ($vo["coin"]); ?>)</span>
  421. </div>
  422. <div class="tlistbox_9 tr">
  423. <span class="fzmm fcc"><?php echo ($vo["coinnum"]); ?></span>
  424. </div>
  425. </div>
  426. </div>
  427. </div>
  428. </div><?php endforeach; endif; endif; ?>
  429. </div>
  430. <div style="width:100%;height:120px;"></div>
  431. </div>
  432. <!---------交易选择弹窗---------->
  433. <div class="dongbox" id="showdong" style="display:none;">
  434. <div class="dong_con">
  435. <div style="width:100%;position:relative;z-index:9999999;top:0px;">
  436. <div class="dong_title">
  437. <span class="dong_title_span" style="font-weight: bold;"><?php echo L('币币市场');?></span>
  438. </div>
  439. <div class="dong_sel_box">
  440. <span class="fcc dong_sel_span"><?php echo L('全部');?></span>
  441. </div>
  442. </div>
  443. <div class="symbol_list" id="smybolbox">
  444. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  445. <span class="fzmm fcc"><?php echo L('没有获取数据');?></span>
  446. </div>
  447. </div>
  448. </div>
  449. <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
  450. </div>
  451. <input type="hidden" id="buy_usermoney" value="<?php echo ($usdt_blance); ?>" />
  452. <input type="hidden" id="buy_usercoin" value="<?php echo ($coin_blance); ?>" />
  453. <input type="hidden" id="symbolbox" value="<?php echo ($coinname); ?>" />
  454. <!--交易限价单价-->
  455. <input type="hidden" id="mprice" value="" />
  456. <!--交易限价买卖币的数量-->
  457. <input type="hidden" id="mnum" value="" />
  458. <!--交易限价买卖USDT的数量-->
  459. <input type="hidden" id="musdt" value="" />
  460. <!--购买类型,1限价2市价-->
  461. <input type="hidden" id="buytype" value="1" />
  462. <!--底部-->
  463. <div class="footer">
  464. <a href="<?php echo U('Index/index');?>">
  465. <div class="footer_op">
  466. <div class="f_op_t">
  467. <span class="iconfont icon-shouye" style="font-size:22px;"></span>
  468. </div>
  469. <div class="f_op_b">
  470. <span class="fzm fcc"><?php echo L('首页');?></span>
  471. </div>
  472. </div>
  473. </a>
  474. <a href="<?php echo U('Trade/index');?>">
  475. <div class="footer_op">
  476. <div class="f_op_t" style="line-height:35px;">
  477. <svg class="icon fticon" aria-hidden="true"><use xlink:href="#icon-fukuan"></use></svg>
  478. </div>
  479. <div class="f_op_b">
  480. <span class="fzm fcy"><?php echo L('交易');?></span>
  481. </div>
  482. </div>
  483. </a>
  484. <a href="<?php echo U('Orepool/index');?>">
  485. <div class="footer_op">
  486. <div class="f_op_t" style="line-height:35px;">
  487. <span class="iconfont icon-ziyuan14" style="font-size:22px;"></span>
  488. </div>
  489. <div class="f_op_b">
  490. <span class="fzm fcc"><?php echo L('矿机');?></span>
  491. </div>
  492. </div>
  493. </a>
  494. <a href="<?php echo U('Levertade/index');?>">
  495. <div class="footer_op">
  496. <div class="f_op_t" style="line-height:35px;">
  497. <span class="iconfont icon-xuanxiang" style="font-size:22px;"></span>
  498. </div>
  499. <div class="f_op_b">
  500. <span class="fzm fcc"><?php echo L('合约');?></span>
  501. </div>
  502. </div>
  503. </a>
  504. <a href="<?php echo U('User/index');?>">
  505. <div class="footer_op">
  506. <div class="f_op_t" style="line-height:35px;">
  507. <span class="iconfont icon-ziyuan24" style="font-size:22px;"></span>
  508. </div>
  509. <div class="f_op_b">
  510. <span class="fzm fcc"><?php echo L('资产');?></span>
  511. </div>
  512. </div>
  513. </a>
  514. </div>
  515. <div class="dongbox" id="gotaxbox" style="display:none;">
  516. <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:15px;">
  517. <div style="width:100%;height:100px;line-height:100px;text-align:center;">
  518. <i class="bi bi-exclamation-circle" style="font-size:56px;font-weight:bold;color:#f5465c;"></i>
  519. </div>
  520. <div style="width:100%;height:60px;text-align:center;color:#000;font-size:14px;">
  521. <?php echo L('请先缴纳税金');?>
  522. </div>
  523. <div style="width:100%;height:60px;">
  524. <a href="<?php echo U('Finance/cztax');?>" target="__blank">
  525. <div style="width:45%;height:36px;line-height:36px;text-align:center;float:left;font-size:14px;color:#fff;background:#0ecb81;border-radius:10px;"><?php echo L('缴税');?></div></a>
  526. <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;"><?php echo L('取消');?></div>
  527. </div>
  528. </div>
  529. </div>
  530. </body>
  531. <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
  532. <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
  533. <script type="text/javascript">
  534. function hidetaxbox(){
  535. $("#gotaxbox").hide();
  536. }
  537. function clearorder(id){
  538. var oid = id;
  539. $.post("<?php echo U('Trade/clearorder');?>",
  540. {"oid":oid},
  541. function(data){
  542. if(data.code == 1){
  543. layer.msg(data.info);
  544. setTimeout(function(args){
  545. window.location.reload();
  546. },2000);
  547. }else{
  548. layer.msg(data.info);return false;
  549. }
  550. });
  551. }
  552. </script>
  553. <script type="text/javascript">
  554. function bb_sellcoin(type){
  555. var type = type;
  556. if(type <= 0){
  557. layer.msg("<?php echo L('缺少重要参数');?>");return false;
  558. }
  559. var symbol = $("#symbolbox").val();
  560. var mprice = $("#sell_newprice").val();
  561. var musdt = $("#musdt").val();
  562. var selltype = $("#buytype").val();
  563. if(selltype == 1){
  564. var mnum = $("#sell_num").val();
  565. if(mprice < 0){
  566. layer.msg("<?php echo L('缺少重要参数');?>");return false;
  567. }
  568. if(mnum <= 0){
  569. layer.msg("<?php echo L('请输入出售数量');?>");return false;
  570. }
  571. }else if(selltype == 2){
  572. var mnum = $("#sell_coin").val();
  573. if(mnum <= 0){
  574. layer.msg("<?php echo L('请输入出售数量');?>");return false;
  575. }
  576. }
  577. $.post("<?php echo U('Trade/upbbsell');?>",
  578. {'symbol':symbol,'mprice':mprice,'mnum':mnum,'musdt':musdt,'selltype':selltype,'type':type},
  579. function(data){
  580. if(data.code == 1){
  581. layer.msg(data.info);
  582. setTimeout(function(args){
  583. window.location.reload();
  584. },2000);
  585. }else if(data.code == 3){
  586. $("#gotaxbox").show();
  587. }else{
  588. layer.msg(data.info);return false;
  589. }
  590. });
  591. }
  592. </script>
  593. <script type="text/javascript">
  594. function bb_buycoin(type){
  595. var type = type;
  596. if(type <= 0){
  597. layer.msg("<?php echo L('缺少重要参数');?>");return false;
  598. }
  599. var symbol = $("#symbolbox").val();
  600. var mprice = $("#newprice").val();
  601. var mnum = $("#mnum").val();
  602. var musdt = $("#musdt").val();
  603. var buytype = $("#buytype").val();
  604. if(buytype == 1){
  605. if(mnum <= 0){
  606. layer.msg("<?php echo L('输入数量');?>");return false;
  607. }
  608. }else if(buytype == 2){
  609. if(musdt <= 0){
  610. layer.msg("<?php echo L('输入USDT数量');?>");return false;
  611. }
  612. }
  613. $.post("<?php echo U('Trade/upbbbuy');?>",
  614. {'symbol':symbol,'mprice':mprice,'mnum':mnum,'musdt':musdt,'buytype':buytype,'type':type},
  615. function(data){
  616. if(data.code == 1){
  617. layer.msg(data.info);
  618. setTimeout(function(args){
  619. window.location.reload();
  620. },2000);
  621. }else if(data.code == 3){
  622. $("#gotaxbox").show();
  623. }else{
  624. layer.msg(data.info);return false;
  625. }
  626. });
  627. }
  628. </script>
  629. <script type="text/javascript">
  630. function getallsmybol(){
  631. $.post("<?php echo U('Ajaxtrade/getallcoin');?>",
  632. function(data){
  633. if(data.code == 1){
  634. $("#smybolbox").empty();
  635. var html = '';
  636. if(data.data == '' || data.data == null){
  637. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  638. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  639. '</div>';
  640. $("#smybolbox").append(html);
  641. }else{
  642. $.each(data.data,function(key,val){
  643. html += '<a href="/Trade/transinfo.html?symbol='+ val.coin +'&type=buy">'+
  644. '<div class="sy_list_box">'+
  645. '<div class="sy_list_boxl">'+
  646. '<span class="fzmm fcc">'+ val.cname +'</span>'+
  647. '</div>'+
  648. '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
  649. '<div class="sy_list_boxr">' + val.change +'</div>'+
  650. '</div>'+
  651. '</a>';
  652. });
  653. $("#smybolbox").append(html);
  654. }
  655. }else{
  656. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  657. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  658. '</div>';
  659. $("#smybolbox").append(html);
  660. }
  661. });
  662. }
  663. </script>
  664. <script type="text/javascript">
  665. $("#hidedong").click(function(){
  666. $("#showdong").fadeOut("slow");
  667. });
  668. $("#centerbox").click(function(){
  669. getallsmybol()
  670. $("#showdong").fadeIn("slow");
  671. });
  672. </script>
  673. <script type="text/javascript">
  674. $(function(){
  675. gettradbuy();
  676. gettradsell();
  677. setInterval("gettradbuy()",2000);
  678. setInterval("gettradsell()",2000);
  679. });
  680. </script>
  681. <script type="text/javascript">
  682. function gettradsell(){
  683. var symbol = $("#symbolbox").val();
  684. $.post("<?php echo U('Ajaxtrade/gettradsell');?>",
  685. {'symbol':symbol},
  686. function(data){
  687. if(data.code == 1){
  688. $("#tradebuybox").empty();
  689. var html = '';
  690. if(data.data == '' || data.data == null){
  691. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  692. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  693. '</div>';
  694. $("#tradebuybox").append(html);
  695. }else{
  696. $.each(data.data,function(key,val){
  697. html += '<div style="width:100%;height:30px;">'+
  698. '<div class="trade_list tl">'+
  699. '<span class="red fzm">'+ val.price +'</span>'+
  700. '</div>'+
  701. '<div class="trade_list tr">'+
  702. '<span class="red fzm">'+ val.amount +'</span>'+
  703. '</div>'+
  704. '</div>';
  705. });
  706. $("#tradebuybox").append(html);
  707. }
  708. }
  709. });
  710. }
  711. </script>
  712. <script type="text/javascript">
  713. function gettradbuy(){
  714. var symbol = $("#symbolbox").val();
  715. $.post("<?php echo U('Ajaxtrade/gettradbuy');?>",
  716. {'symbol':symbol},
  717. function(data){
  718. if(data.code == 1){
  719. $("#tradesellbox").empty();
  720. var html = '';
  721. if(data.data == '' || data.data == null){
  722. html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
  723. '<span class="fzmm fcc">' + "<?php echo L('没有获取数据');?>" + '</span>'+
  724. '</div>';
  725. $("#tradesellbox").append(html);
  726. }else{
  727. $.each(data.data,function(key,val){
  728. html += '<div style="width:100%;height:30px;">'+
  729. '<div class="trade_list tl">'+
  730. '<span class="green fzm">'+ val.price +'</span>'+
  731. '</div>'+
  732. '<div class="trade_list tr">'+
  733. '<span class="green fzm">'+ val.amount +'</span>'+
  734. '</div>'+
  735. '</div>';
  736. });
  737. $("#tradesellbox").append(html);
  738. }
  739. }
  740. });
  741. }
  742. </script>
  743. <script type="text/javascript">
  744. $(function(){
  745. getcoinprice();
  746. setInterval("getcoinprice()",2000);
  747. });
  748. </script>
  749. <script type="text/javascript">
  750. function getcoinprice(){
  751. var symbol = $("#symbolbox").val();
  752. $.post("<?php echo U('Ajaxtrade/getcoinprice');?>",
  753. {'symbol':symbol},
  754. function(data){
  755. if(data.code == 1){
  756. $("#changebox").html(data.change);
  757. $("#closeprice").html(data.price);
  758. }else{
  759. console.log("<?php echo L('未获取数据');?>");
  760. }
  761. });
  762. }
  763. </script>
  764. <script type="text/javascript">
  765. $("#buybtn").click(function(){
  766. $("#buybtn").addClass("bggreen");
  767. $("#buybtn").removeClass("bghc");
  768. $("#sellbtn").addClass("bghc");
  769. $("#sellbtn").removeClass("bggreen");
  770. $("#buycoinbox").show();
  771. $("#sellcoinbox").hide();
  772. $("#buybtnspan").addClass("cfff");
  773. $("#buybtnspan").removeClass("c000");
  774. $("#sellbtnspan").addClass("c000");
  775. $("#sellbtnspan").removeClass("cfff");
  776. });
  777. $("#sellbtn").click(function(){
  778. $("#buybtn").removeClass("bgred");
  779. $("#buybtn").addClass("bghc");
  780. $("#sellbtn").removeClass("bghc");
  781. $("#sellbtn").addClass("bgred");
  782. $("#buycoinbox").hide();
  783. $("#sellcoinbox").show();
  784. $("#buybtnspan").addClass("c000");
  785. $("#buybtnspan").removeClass("cfff");
  786. $("#sellbtnspan").addClass("cfff");
  787. $("#sellbtnspan").removeClass("c000");
  788. });
  789. </script>
  790. <script type="text/javascript">
  791. //出售框
  792. $("#sell_xjbtn").click(function(){
  793. $("#sell_xjspan").addClass("fcy");
  794. $("#sell_xjspan").removeClass("fcc");
  795. $("#sell_sjspan").addClass("fcc");
  796. $("#sell_sjspan").removeClass("fcy");
  797. $("#sell_xjbox").show();
  798. $("#sell_sjbox").hide();
  799. $("#buytype").val(1);
  800. $("#sell_sjnumbox").hide();
  801. $("#sell_xjnumbox").show();
  802. $("#sellxjusdt").show();
  803. $("#sellxjcoin").hide();
  804. });
  805. $("#sell_sjbtn").click(function(){
  806. $("#sell_sjspan").addClass("fcy");
  807. $("#sell_sjspan").removeClass("fcc");
  808. $("#sell_xjspan").addClass("fcc");
  809. $("#sell_xjspan").removeClass("fcy");
  810. $("#sell_sjbox").show();
  811. $("#sell_xjbox").hide();
  812. $("#buytype").val(2);
  813. $("#sell_xjnumbox").hide();
  814. $("#sell_sjnumbox").show();
  815. $("#sellxjusdt").hide();
  816. $("#sellxjcoin").show();
  817. });
  818. //买入框
  819. $("#buyxjbtn").click(function(){
  820. $("#xjspan").addClass("fcy");
  821. $("#xjspan").removeClass("fcc");
  822. $("#sjspan").addClass("fcc");
  823. $("#sjspan").removeClass("fcy");
  824. $("#xjbox").show();
  825. $("#sjbox").hide();
  826. $("#buytype").val(1);
  827. $("#sjnumbox").hide();
  828. $("#xjnumbox").show();
  829. });
  830. $("#buysjbtn").click(function(){
  831. $("#sjspan").addClass("fcy");
  832. $("#sjspan").removeClass("fcc");
  833. $("#xjspan").addClass("fcc");
  834. $("#xjspan").removeClass("fcy");
  835. $("#sjbox").show();
  836. $("#xjbox").hide();
  837. $("#buytype").val(2);
  838. $("#xjnumbox").hide();
  839. $("#sjnumbox").show();
  840. });
  841. </script>
  842. <script type="text/javascript">
  843. function sellusdtfc(){
  844. var newprice = parseFloat($("#newprice").val()); //单价
  845. var buyusdt = parseFloat($("#sell_usdt").val()); //输入的USDT数量
  846. var usermoney = parseFloat($("#buy_usercoin").val());//币的数量
  847. var coinnum = parseFloat(buyusdt / newprice).toFixed(4);
  848. if(coinnum > usermoney){
  849. layer.msg("<?php echo L('余额不足');?>");return false;
  850. }else{
  851. $("#sell_num").val(coinnum);
  852. $("#musdt").val(buyusdt);
  853. }
  854. }
  855. function buyusdtfc(){
  856. var newprice = parseFloat($("#newprice").val());
  857. var buyusdt = parseFloat($("#buyusdt").val());
  858. var usermoney = parseFloat($("#buy_usermoney").val());
  859. var num = parseFloat(buyusdt / newprice).toFixed(4);
  860. if(buyusdt > usermoney){
  861. layer.msg("<?php echo L('余额不足');?>");return false;
  862. }else{
  863. var buynum = parseFloat(buyusdt / newprice).toFixed(4);
  864. $("#buynum").val(buynum);
  865. $("#musdt").val(buyusdt);
  866. $("#mnum").val(num);
  867. }
  868. }
  869. </script>
  870. <script type="text/javascript">
  871. function sellnumfc(){
  872. var newbuynum = $("#sell_num").val();
  873. var newprice = $("#sell_newprice").val();
  874. var buyusdt = parseFloat((newprice * newbuynum)).toFixed(4);
  875. var usermoney = parseFloat($("#buy_usercoin").val());
  876. if(newbuynum > usermoney){
  877. layer.msg("<?php echo L('余额不足');?>");return false;
  878. }else{
  879. $("#sell_usdt").val(buyusdt);
  880. $("#mnum").val(newbuynum);
  881. $("#musdt").val(buyusdt);
  882. }
  883. }
  884. function buynumfc(){
  885. var newbuynum = $("#buynum").val();
  886. var newprice = $("#newprice").val();
  887. var buyusdt = parseFloat((newprice * newbuynum)).toFixed(4);
  888. var usermoney = parseFloat($("#buy_usermoney").val());
  889. if(buyusdt > usermoney){
  890. layer.msg("<?php echo L('余额不足');?>");return false;
  891. }else{
  892. $("#buyusdt").val(buyusdt);
  893. $("#mnum").val(newbuynum);
  894. $("#musdt").val(buyusdt);
  895. }
  896. }
  897. </script>
  898. <script type="text/javascript">
  899. $(function(){
  900. var symbol = $("#symbolbox").val();
  901. $.post("<?php echo U('Ajaxtrade/getnewprice');?>",
  902. {'symbol':symbol},
  903. function(data){
  904. if(data.code == 1){
  905. $("#newprice").val(data.price);
  906. $("#mprice").val(data.price);
  907. $("#sell_newprice").val(data.price);
  908. }else{
  909. console.log("<?php echo L('未获取数据');?>");
  910. }
  911. });
  912. });
  913. </script>
  914. <script type="text/javascript">
  915. function sellcoinfc(){
  916. var sell_coin = parseFloat($("#sell_coin").val());
  917. if(sell_coin < 0){
  918. layer.msg("<?php echo L('请输入正确数量');?>");return false;
  919. }
  920. var buy_usercoin = parseFloat($("#buy_usercoin").val());
  921. if(sell_coin > buy_usercoin){
  922. layer.msg("<?php echo L('余额不足');?>");return false;
  923. }
  924. }
  925. function sellblfc(type,num){
  926. var type = type;
  927. var num = num;
  928. var usermoney = $("#buy_usercoin").val();
  929. var musdt = parseFloat((usermoney * num / 100)).toFixed(4);
  930. var newprice = $("#newprice").val();
  931. var buynum = parseFloat((musdt * newprice)).toFixed(4);
  932. $("#sell_usdt").val(buynum);
  933. $("#sell_num").val(musdt);
  934. $("#musdt").val(buynum);
  935. $("#mnum").val(musdt);
  936. $("#sell_coin").val(musdt);
  937. if(type == 1){
  938. $('#sellbl_1').addClass("bgred");
  939. $('#sellbl_1').removeClass("bgf5");
  940. $('#sellbl_2').addClass("bgf5");
  941. $('#sellbl_2').removeClass("bgred");
  942. $('#sellbl_3').addClass("bgf5");
  943. $('#sellbl_3').removeClass("bgred");
  944. $('#sellbl_4').addClass("bgf5");
  945. $('#sellbl_4').removeClass("bgred");
  946. }else if(type == 2){
  947. $('#sellbl_2').addClass("bgred");
  948. $('#sellbl_2').removeClass("bgf5");
  949. $('#sellbl_1').addClass("bgf5");
  950. $('#sellbl_1').removeClass("bgred");
  951. $('#sellbl_3').addClass("bgf5");
  952. $('#sellbl_3').removeClass("bgred");
  953. $('#sellbl_4').addClass("bgf5");
  954. $('#sellbl_4').removeClass("bgred");
  955. }else if(type == 3){
  956. $('#sellbl_3').addClass("bgred");
  957. $('#sellbl_3').removeClass("bgf5");
  958. $('#sellbl_1').addClass("bgf5");
  959. $('#sellbl_1').removeClass("bgred");
  960. $('#sellbl_2').addClass("bgf5");
  961. $('#sellbl_2').removeClass("bgred");
  962. $('#sellbl_4').addClass("bgf5");
  963. $('#sellbl_4').removeClass("bgred");
  964. }else if(type == 4){
  965. $('#sellbl_4').addClass("bgred");
  966. $('#sellbl_4').removeClass("bgf5");
  967. $('#sellbl_1').addClass("bgf5");
  968. $('#sellbl_1').removeClass("bgred");
  969. $('#sellbl_2').addClass("bgf5");
  970. $('#sellbl_2').removeClass("bgred");
  971. $('#sellbl_3').addClass("bgf5");
  972. $('#sellbl_3').removeClass("bgred");
  973. }
  974. }
  975. function buyblfc(type,num){
  976. var type = type;
  977. var num = num;
  978. var usermoney = $("#buy_usermoney").val();
  979. var musdt = parseFloat((usermoney * num / 100)).toFixed(4);
  980. var newprice = $("#newprice").val();
  981. var buynum = parseFloat((musdt / newprice)).toFixed(4);
  982. $("#buyusdt").val(musdt);
  983. $("#buynum").val(buynum);
  984. $("#musdt").val(musdt);
  985. $("#mnum").val(buynum);
  986. if(type == 1){
  987. $('#buybl_1').addClass("bggreen");
  988. $('#buybl_1').removeClass("bgf5");
  989. $('#buybl_2').addClass("bgf5");
  990. $('#buybl_2').removeClass("bggreen");
  991. $('#buybl_3').addClass("bgf5");
  992. $('#buybl_3').removeClass("bggreen");
  993. $('#buybl_4').addClass("bgf5");
  994. $('#buybl_4').removeClass("bggreen");
  995. }else if(type == 2){
  996. $('#buybl_2').addClass("bggreen");
  997. $('#buybl_2').removeClass("bgf5");
  998. $('#buybl_1').addClass("bgf5");
  999. $('#buybl_1').removeClass("bggreen");
  1000. $('#buybl_3').addClass("bgf5");
  1001. $('#buybl_3').removeClass("bggreen");
  1002. $('#buybl_4').addClass("bgf5");
  1003. $('#buybl_4').removeClass("bggreen");
  1004. }else if(type == 3){
  1005. $('#buybl_3').addClass("bggreen");
  1006. $('#buybl_3').removeClass("bgf5");
  1007. $('#buybl_1').addClass("bgf5");
  1008. $('#buybl_1').removeClass("bggreen");
  1009. $('#buybl_2').addClass("bgf5");
  1010. $('#buybl_2').removeClass("bggreen");
  1011. $('#buybl_4').addClass("bgf5");
  1012. $('#buybl_4').removeClass("bggreen");
  1013. }else if(type == 4){
  1014. $('#buybl_4').addClass("bggreen");
  1015. $('#buybl_4').removeClass("bgf5");
  1016. $('#buybl_1').addClass("bgf5");
  1017. $('#buybl_1').removeClass("bggreen");
  1018. $('#buybl_2').addClass("bgf5");
  1019. $('#buybl_2').removeClass("bggreen");
  1020. $('#buybl_3').addClass("bgf5");
  1021. $('#buybl_3').removeClass("bggreen");
  1022. }
  1023. }
  1024. </script>
  1025. <script type="text/javascript">
  1026. $("#dash_sellprice").click(function(){
  1027. var newprice = parseFloat($("#sell_newprice").val());
  1028. if(newprice > 0){
  1029. var buyprice = (newprice - 0.001).toFixed(4);
  1030. }else{
  1031. var buyprice = 0;
  1032. }
  1033. $("#sell_newprice").val(buyprice);
  1034. $("#mprice").val(buyprice);
  1035. });
  1036. $("#plus_sellprice").click(function(){
  1037. var newprice = parseFloat($("#sell_newprice").val());
  1038. var buyprice = (newprice + 0.001).toFixed(4);
  1039. $("#sell_newprice").val(buyprice);
  1040. $("#mprice").val(buyprice);
  1041. });
  1042. $("#dash_sellnum").click(function(){
  1043. var buynum = parseFloat($("#sell_num").val());
  1044. if(buynum > 0){
  1045. var newbuynum = (buynum - 0.001).toFixed(4);
  1046. }else{
  1047. newbuynum = 0
  1048. }
  1049. $("#sell_num").val(newbuynum);
  1050. $("#mnum").val(newbuynum);
  1051. var newprice = $("#newprice").val();
  1052. var buyusdt = (newprice * newbuynum).toFixed(4);
  1053. $("#sell_usdt").val(buyusdt);
  1054. $("#musdt").val(buyusdt);
  1055. });
  1056. $("#plus_sellnum").click(function(){
  1057. var buynum = parseFloat($("#sell_num").val());
  1058. if(buynum > 0){
  1059. var newbuynum = (buynum + 0.001).toFixed(4);
  1060. }else{
  1061. var newbuynum = 0.01;
  1062. }
  1063. $("#sell_num").val(newbuynum);
  1064. $("#mnum").val(newbuynum);
  1065. var newprice = $("#newprice").val();
  1066. var usermoney = parseFloat($("#buy_usercoin").val());
  1067. var buyusdt = parseFloat((newprice * newbuynum)).toFixed(4);
  1068. if(newbuynum > usermoney){
  1069. layer.msg("<?php echo L('余额不足');?>");return false;
  1070. }else{
  1071. $("#sell_usdt").val(buyusdt);
  1072. $("#musdt").val(buyusdt);
  1073. }
  1074. });
  1075. $("#dash_buyprice").click(function(){
  1076. var newprice = parseFloat($("#newprice").val());
  1077. if(newprice > 0){
  1078. var buyprice = (newprice - 0.001).toFixed(4);
  1079. }else{
  1080. var buyprice = 0;
  1081. }
  1082. $("#newprice").val(buyprice);
  1083. $("#mprice").val(buyprice);
  1084. });
  1085. $("#plus_buyprice").click(function(){
  1086. var newprice = parseFloat($("#newprice").val());
  1087. var buyprice = (newprice + 0.001).toFixed(4);
  1088. $("#newprice").val(buyprice);
  1089. $("#mprice").val(buyprice);
  1090. });
  1091. $("#dash_buynum").click(function(){
  1092. var buynum = parseFloat($("#buynum").val());
  1093. if(buynum > 0){
  1094. var newbuynum = (buynum - 0.001).toFixed(4);
  1095. }else{
  1096. newbuynum = 0
  1097. }
  1098. $("#buynum").val(newbuynum);
  1099. $("#mnum").val(newbuynum);
  1100. var newprice = $("#newprice").val();
  1101. var buyusdt = (newprice * newbuynum).toFixed(4);
  1102. $("#buyusdt").val(buyusdt);
  1103. $("#musdt").val(buyusdt);
  1104. });
  1105. $("#plus_buynum").click(function(){
  1106. var buynum = parseFloat($("#buynum").val());
  1107. if(buynum > 0){
  1108. var newbuynum = (buynum + 0.001).toFixed(4);
  1109. }else{
  1110. var newbuynum = 0.01;
  1111. }
  1112. $("#buynum").val(newbuynum);
  1113. $("#mnum").val(newbuynum);
  1114. var newprice = $("#newprice").val();
  1115. var usermoney = parseFloat($("#buy_usermoney").val());
  1116. var buyusdt = parseFloat((newprice * newbuynum)).toFixed(4);
  1117. if(buyusdt > usermoney){
  1118. layer.msg("<?php echo L('余额不足');?>");return false;
  1119. }else{
  1120. $("#buyusdt").val(buyusdt);
  1121. $("#musdt").val(buyusdt);
  1122. }
  1123. });
  1124. </script>
  1125. <script type="text/javascript">
  1126. function goback(){
  1127. window.history.go(-1);
  1128. }
  1129. </script>
  1130. </html>