index.html 62 KB

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