transinfo.html 50 KB

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