1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570 |
- <!DOCTYPE html>
- <html lang="zh-CN" style="background:#fff;">
- <head>
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.3.0/font/bootstrap-icons.css">
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/base2.css" />
- <link rel="stylesheet" type="text/css" href="/Public/Static/css/nologed.css" />
- <link rel="stylesheet" href="/Public/Static/Icoinfont/iconfont.css">
- <script src="/Public/Static/Icoinfont/iconfont.js"></script>
- <title>{$webname}</title>
- <style>
- ::-webkit-input-placeholder {color: #b5b5b5;font-size: 12px;}
- ::-moz-placeholder {color: #b5b5b5;font-size: 12px;}
- input:focus{background:#fff;outline: 1px solid #fff;}
- a:hover,a:link,a:visited,a:active{color:#707A8A;text-decoration:none;}
- .no_header{position: fixed;z-index: 9999;padding:0px 10px;top:0px;background: #fff;}
- .txtl{line-height:50px;width:30%;}
- .contentbox{width:100%;background:#fff;padding:10px;}
- .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;}
- .content_title_l{width:80%;height:40px;line-height:40px;float:left;}
- .content_title_r{width:20%;height:40px;line-height:40px;float:right;padding:0px 5px;}
- .tleft{text-align:left;}
- .tright{text-align:right;}
- .tradebox{width:100%;height:620px;background:#fff;}
- .tradebox_l{width:58%;height:620px;float:left;}
- .tradebox_r{width:40%;height:620px;float:right;}
- .tradebox_l_btn{width:100%;height:36px;}
- .tradebox_l_buybtn{width:48%;height:36px;line-height:36px;float:left;text-align:center;border-radius:5px;}
- .tradebox_l_sellbtn{width:48%;height:36px;line-height:36px;float:right;text-align:center;border-radius:5px;}
- .bggreen{background:#0ecb81;}
- .green{color:#0ecb81;}
- .bgred{background:#f5465c;}
- .red{color:#f5465c;}
- .bghc{background:#f5f5f5;}
- .cfff{color:#fff;}
- .c000{color:#000;}
- .formbox{width:100%;height:350px;margin-top:15px;}
- .formbox_op{width:100%;height:30px;}
- .formbox_op_list{width:50%;height:30px;line-height:30px;float:left;text-align:center;}
- .inputbox{width:100%;height:36px;border:1px solid #f5f5f5;border-radius:5px;margin-top:10px;}
- .inputbox_float{width:60%;height:36px;float:left;}
- .xjinput{width:90%;background:#fff;border:#fff;margin-top:7px;padding:0px 10px;}
- .input_bi{width:50%;height:26px;line-height:26px;float:left;text-align:center;margin-top:5px;}
- .borderright{border-right:1px solid #f5f5f5;}
- .bistyle{font-size:24px;font-weight:bold;}
- .blbox{width:100%;height:30px;margin-top:15px;}
- .blbox_1{width:20%;height:30px;float:left;margin-right:6%;}
- .blbox_2{width:20%;height:30px;float:left;}
- .blbox_3{width:100%;height:10px;}
- .bgf5{background:#f5f5f5;}
- .blbox_4{width:100%;height:20x;line-height:20px;text-align:center;}
- .tradebox_title{width:50%;height:20px;line-height:20px;float:left;}
- .tl{text-align:left;}
- .tr{text-align:right;}
- .tc{text-align:center;}
- .fl{float:left;}
- .fr{float:right;}
- .trade_listbox{width:100%;height:255px;padding:5px;overflow:hidden;}
- .trade_listpricebox{width:100%;height:40px;line-height:40px;padding:0px 10px;}
- .trade_list{width:50%;height:30px;line-height:30px;float:left;}
- .dongbox{position:fixed;z-index:9999;display:none;top:0px;width:100%;height:100vh;background:rgba(0,0,0,0.2);}
- .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;}
- .dong_title{width:100%;height:40px;line-height:40px;}
- .dong_title_span{font-size:18px;font-weight:500;}
- .dong_find_box{width:100%;height:30px;background:#f5f5f5;border-radius:10px;}
- .dong_find_box_img{width:20%;height:30px;line-height:30px;float:left;text-align:center;}
- .dong_input_box{width:80%;height:30px;float:left;}
- .dong_symbox{width:90%;height:20px;border:none;background:#f5f5f5;margin-top:5px;}
- .dong_sel_box{width:100%;height:30px;border-bottom:1px solid #f5f5f5;}
- .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;}
- .symbol_list{width:100%;height:450px;overflow-y: scroll;margin-top:10px;}
- .sy_list_box{width:100%;height:30px;}
- .sy_list_boxl{width:35%;height:30px;line-height:30px;float:left;text-align:left;}
- .sy_list_boxr{width:30%;height:30px;line-height:30px;float:right;text-align:right;}
- .order_title{display: inline-block;margin-right: 20px;font-weight: 1000;}
- .FCD535{border-bottom: 2px solid #FCD535;}
- .fccbox{width:100%;height:15px;background:#f5f5f5;}
- .wtlistbox{width:100%;padding:0px 10px;}
- .o_title_box{width:50%;height:40px;line-height:40px;border-bottom:1px solid #f5f5f5;}
- .tlistbox{width:100%;overflow:hidden;min-height:100px;clear:both;padding:10px 0px;}
- .tlistbox_1{width:100%;overflow:hidden;min-height:100px;border-bottom:1px solid #f5f5f5;}
- .tlistbox_2{width:100%;height:30px;}
- .tlistbox_3{width:80%;height:30px;line-height:30px;}
- .tlistbox_4{width:20%;height:30px;line-height:30px;}
- .tlistbox_5{padding:5px 10px;background:#fcfcfc;border-radius:5px;}
- .tlistbox_6{width:100%;height:60px;}
- .tlistbox_7{width:22.22%;height:60px;}
- .tlistbox_8{width:100%;height:30px;line-height:30px;}
- .tlistbox_9{width:100%;height:30px;line-height:20px;}
- .trade_lots_title{width:100%;height:30px;line-height:30px;text-align:left;padding-left:10px;}
- .trade_lots_title_txt{font-size:14px;font-weight:bold;}
- .trade_lots_op_box{width:100%;height:30px;}
- .trade_lots_op_list{width:22%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;}
- .trade_ggan_op_list{width:18%;height:30px;line-height:30px;border:1px solid #f5f5f5;float:left;text-align:center;color:#000;}
- .active_lots{background:#f5f5f5;color:#000;font-size:16px;font-weight:bold;}
- .buy_zs_box{width:100%;height:30px;margin-bottom:5px;}
- .buy_zs_boxl{width:30%;height:30px;line-height:30px;float:left;color:#000;text-align:center;font-size:14px;}
- .buy_zs_boxr{width:65%;height:30px;line-height:30px;float:right;border:1px solid #f5f5f5;border-radius:5px;font-size:14px;}
- .buy_zs_input_lr{width:15%;height:30px;line-height:30px;text-align:center;float:left;}
- .buy_zs_input_box{width:70%;height:30px;line-height:30px;text-align:center;float:left;}
- .buy_zs_input{width:100%;height:20px;background:#fff;border:none;padding-left:5px;text-align:center;}
- .up_txt_box{width:100%;height:25px;margin-bottom:5px;}
- .up_txt_box_l{width:60%;height:25px;line-height:25px;float:left;font-size:14px;}
- .up_txt_box_r{width:40%;height:25px;line-height:25px;float:left;text-align:right;}
- </style>
- </head>
- <body style="background:#fff;">
- <div class="container-fluid " style="padding:0px;width:100vw;">
- <div class="no_header">
- <div class="fl allhg txtl" style="width:100%;">
- <span style="font-size:20px;font-weight:bold;color:#000;">{:L('合约交易')}</span>
- </div>
- </div>
- <div class="content_title">
- <div class="content_title_l tleft">
- <i class="bi bi-text-indent-left fch" style="font-size:22px;" id="centerbox"></i>
- <span style="font-size:18px;font-weight:bold;color:#000;" id="marketbox">{$coinname}</span>
- <span style="color:#f5465c;" class="closeprice">--</span>
- <span style="color:#f5465c;" id="changebox">--</span>
- </div>
- <a href="/Levertade/trans.html?sytx={$coinname}" >
- <div class="content_title_r tright">
- <i class="bi bi-bar-chart-line" style="font-size:22px;color:#FCD535;"></i>
- </div>
- </a>
- </div>
- <div class="contentbox" style="margin-top:90px;">
- <div class="tradebox">
- <div class="tradebox_l">
- <div style="width:100%;height:30px;line-height:30px;text-align:left;padding-left:10px;">
- <span style="font-size:14px;font-weight:bold;">{:L('交易方向')}</span>
- </div>
- <div class="tradebox_l_btn">
- <div class="tradebox_l_buybtn bggreen" id="buybtn">
- <span class="fzmm cfff" id="buybtnspan">{:L('上涨')}</span>
- </div>
- <div class="tradebox_l_sellbtn bghc" id="sellbtn">
- <span class="fzmm c000" id="sellbtnspan">{:L('下跌')}</span>
- </div>
- </div>
- <!--买入框-->
- <div class="formbox" id="buycoinbox" style="display:block;">
- <div class="formbox_op">
- <div class="formbox_op_list" id="buyxjbtn">
- <span class="fzmm fcy" id="xjspan">{:L('限价委托')}</span>
- </div>
- <div class="formbox_op_list" id="buysjbtn">
- <span class="fzmm fcc" id="sjspan">{:L('市价委托')}</span>
- </div>
- </div>
- <!--限价委托单价框-->
- <div class="inputbox" id="xjbox">
- <div class="inputbox_float">
- <input type="text" id="newprice" onblur="up_price();" class="fcc xjinput" value="" />
- </div>
- <div class="inputbox_float" style="width:40%;">
- <div class="input_bi borderright" id="dash_buyprice">
- <i class="bi bi-dash bistyle"></i>
- </div>
- <div class="input_bi" id="plus_buyprice">
- <i class="bi bi-plus bistyle"></i>
- </div>
- </div>
- </div>
- <div class="trade_lots_box" style="width:100%;height:110px;">
- <div class="trade_lots_title">
- <span class="trade_lots_title_txt">{:L('交易手数')}</span>
- </div>
- <!-- <div class="trade_lots_op_box">-->
- <!-- <div class="trade_lots_op_list active_lots" id="up_lots_1" onclick="set_up_lotsnum(25,1,1)" style="margin-right:4%;">25%</div>-->
- <!-- <div class="trade_lots_op_list" id="up_lots_2" onclick="set_up_lotsnum(50,1,2)" style="margin-right:4%;">50%</div>-->
- <!-- <div class="trade_lots_op_list" id="up_lots_3" onclick="set_up_lotsnum(75,1,3)" style="margin-right:4%;">75%</div>-->
- <!-- <div class="trade_lots_op_list" id="up_lots_4" onclick="set_up_lotsnum(100,1,4)">100%</div>-->
- <!-- </div>-->
- <div class="inputbox" id="xjbox">
- <div class="inputbox_float">
- <input type="number" id="lotsnum" class="fcc xjinput" value="0" />
- </div>
- <div class="inputbox_float" style="width:40%;">
- <div class="input_bi borderright" id="dash_lotsnum">
- <i class="bi bi-dash bistyle"></i>
- </div>
- <div class="input_bi" id="plus_lotsnum">
- <i class="bi bi-plus bistyle"></i>
- </div>
- </div>
- </div>
- </div>
- <div class="trade_lots_box" style="width:100%;height:110px;">
- <div class="trade_lots_title">
- <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
- </div>
- <div class="trade_lots_op_box">
- <div class="trade_ggan_op_list active_lots" id="up_ggan_1" onclick="set_up_ggan(5,1,1)" style="margin-right:2%;">5</div>
- <div class="trade_ggan_op_list" id="up_ggan_2" onclick="set_up_ggan(10,1,2)" style="margin-right:2%;">10</div>
- <div class="trade_ggan_op_list" id="up_ggan_3" onclick="set_up_ggan(20,1,3)" style="margin-right:2%;">20</div>
- <div class="trade_ggan_op_list" id="up_ggan_4" onclick="set_up_ggan(50,1,4)" style="margin-right:2%;">50</div>
- <div class="trade_ggan_op_list" id="up_ggan_5" onclick="set_up_ggan(100,1,5)">100</div>
- </div>
- <div class="inputbox" id="xjbox">
- <div class="inputbox_float">
- <input type="number" id="upggan" class="fcc xjinput" value="5" />
- </div>
- </div>
- </div>
- <div class="buy_zs_box">
- <div class="buy_zs_boxl">{:L('止损价')}</div>
- <div class="buy_zs_boxr">
- <div class="buy_zs_input_lr">
- <i class="bi bi-dash bistyle" id="dash_up_zsprice"></i>
- </div>
- <div class="buy_zs_input_box">
- <input type="text" id="up_zsprice" class="buy_zs_input" value="0" />
- </div>
- <div class="buy_zs_input_lr">
- <i class="bi bi-plus bistyle" id="plus_up_zsprice"></i>
- </div>
- </div>
- </div>
- <div class="buy_zs_box">
- <div class="buy_zs_boxl">{:L('止盈价')}</div>
- <div class="buy_zs_boxr">
- <div class="buy_zs_input_lr">
- <i class="bi bi-dash bistyle" id="dash_up_zyprice"></i>
- </div>
- <div class="buy_zs_input_box">
- <input type="text" id="up_zyprice" class="buy_zs_input" value="0" />
- </div>
- <div class="buy_zs_input_lr">
- <i class="bi bi-plus bistyle" id="plus_up_zyprice"></i>
- </div>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('保證金')}:</div>
- <div class="up_txt_box_r">
- <span class="upbondmoney">0</span>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
- <div class="up_txt_box_r">
- <span class="bzjmoney">{$levermoney}</span>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('手续费')}:</div>
- <div class="up_txt_box_r">
- <span id="fee" class="upsxf">0.1</span>
- </div>
- </div>
- <!--<div class="up_txt_box">-->
- <!-- <div class="up_txt_box_l">{:L('可用余额')}:</div>-->
- <!-- <div class="up_txt_box_r">-->
- <!-- <span id="upbalance">{$usdt_blance}</span>-->
- <!-- </div>-->
- <!--</div>-->
- <if condition="$uid egt 1">
- <div onclick="bb_buycoin(1);" style="width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:10px;">
- <span class="fzmm" style="color:#fff;">{:L('做多')}</span>
- </div>
- <else />
- <a href="{:U('Login/index')}">
- <div style="width:100%;height:36px;line-height:36px;background:#0ecb81;text-align:center;color:#fff;border-radius:5px;margin-top:10px;">
- <span class="fzmm" style="color:#fff;">{:L('登陆')}</span>
- </div>
- </a>
- </if>
- </div>
- <!--卖出框-->
- <div class="formbox" id="sellcoinbox" style="display:none;">
- <div class="formbox_op">
- <div class="formbox_op_list" id="sell_xjbtn">
- <span class="fzmm fcy" id="sell_xjspan">{:L('限价委托')}</span>
- </div>
- <div class="formbox_op_list" id="sell_sjbtn">
- <span class="fzmm fcc" id="sell_sjspan">{:L('市价委托')}</span>
- </div>
- </div>
- <!--限价委托单价框-->
- <div class="inputbox" id="sell_xjbox">
- <div class="inputbox_float">
- <input type="text" id="sell_newprice" onblur="down_price();" class="fcc xjinput" value="" />
- </div>
- <div class="inputbox_float" style="width:40%;">
- <div class="input_bi borderright" id="dash_sellprice">
- <i class="bi bi-dash bistyle"></i>
- </div>
- <div class="input_bi" id="plus_sellprice">
- <i class="bi bi-plus bistyle"></i>
- </div>
- </div>
- </div>
- <div class="trade_lots_box" style="width:100%;height:110px;">
- <div class="trade_lots_title">
- <span class="trade_lots_title_txt">{:L('交易手数')}</span>
- </div>
- <!-- <div class="trade_lots_op_box">-->
- <!-- <div class="trade_lots_op_list active_lots" id="down_lots_1" onclick="set_down_lotsnum(25,1,1)" style="margin-right:4%;">25%</div>-->
- <!-- <div class="trade_lots_op_list" id="down_lots_2" onclick="set_down_lotsnum(50,1,2)" style="margin-right:4%;">50%</div>-->
- <!-- <div class="trade_lots_op_list" id="down_lots_3" onclick="set_down_lotsnum(75,1,3)" style="margin-right:4%;">75%</div>-->
- <!-- <div class="trade_lots_op_list" id="down_lots_4" onclick="set_down_lotsnum(100,1,4)">100%</div>-->
- <!-- </div>-->
- <div class="inputbox" id="xjbox">
- <div class="inputbox_float">
- <input type="text" id="lots_down_num" class="fcc xjinput" value="0" />
- </div>
- <div class="inputbox_float" style="width:40%;">
- <div class="input_bi borderright" id="dash_lots_down_num">
- <i class="bi bi-dash bistyle"></i>
- </div>
- <div class="input_bi" id="plus_lots_down_num">
- <i class="bi bi-plus bistyle"></i>
- </div>
- </div>
- </div>
- </div>
- <div class="trade_lots_box" style="width:100%;height:110px;">
- <div class="trade_lots_title">
- <span class="trade_lots_title_txt">{:L('杠杆倍数')}</span>
- </div>
- <div class="trade_lots_op_box">
- <div class="trade_ggan_op_list active_lots" id="down_ggan_1" onclick="set_down_ggan(5,1,1)" style="margin-right:2%;">5</div>
- <div class="trade_ggan_op_list" id="down_ggan_2" onclick="set_down_ggan(10,1,2)" style="margin-right:2%;">10</div>
- <div class="trade_ggan_op_list" id="down_ggan_3" onclick="set_down_ggan(20,1,3)" style="margin-right:2%;">20</div>
- <div class="trade_ggan_op_list" id="down_ggan_4" onclick="set_down_ggan(50,1,4)" style="margin-right:2%;">50</div>
- <div class="trade_ggan_op_list" id="down_ggan_5" onclick="set_down_ggan(100,1,5)">100</div>
- </div>
- <div class="inputbox" id="xjbox">
- <div class="inputbox_float">
- <input type="text" id="downggan" class="fcc xjinput" value="5" />
- </div>
- </div>
- </div>
- <div class="buy_zs_box">
- <div class="buy_zs_boxl">{:L('止损价')}</div>
- <div class="buy_zs_boxr">
- <div class="buy_zs_input_lr">
- <i class="bi bi-dash bistyle" id="dash_down_zsprice"></i>
- </div>
- <div class="buy_zs_input_box">
- <input type="text" id="down_zsprice" class="buy_zs_input" value="0" />
- </div>
- <div class="buy_zs_input_lr">
- <i class="bi bi-plus bistyle" id="plus_down_zsprice"></i>
- </div>
- </div>
- </div>
- <div class="buy_zs_box">
- <div class="buy_zs_boxl">{:L('止盈价')}</div>
- <div class="buy_zs_boxr">
- <div class="buy_zs_input_lr">
- <i class="bi bi-dash bistyle" id="dash_down_zyprice"></i>
- </div>
- <div class="buy_zs_input_box">
- <input type="text" id="down_zyprice" class="buy_zs_input" value="0" />
- </div>
- <div class="buy_zs_input_lr">
- <i class="bi bi-plus bistyle" id="plus_down_zyprice"></i>
- </div>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('保證金')}:</div>
- <div class="up_txt_box_r">
- <span class="upbondmoney">0</span>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('可用合约账户')}:</div>
- <div class="up_txt_box_r">
- <span class="bzjmoney">{$levermoney}</span>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('手续费')}:</div>
- <div class="up_txt_box_r">
- <span class="upsxf">0.1</span>
- </div>
- </div>
- <div class="up_txt_box">
- <div class="up_txt_box_l">{:L('可用余额')}:</div>
- <div class="up_txt_box_r">
- <span id="upbalance">{$usdt_blance}</span>
- </div>
- </div>
- <if condition="$uid egt 1">
- <div onclick="bb_buycoin(2);" style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
- <span class="fzmm" style="color:#fff;">{:L('做空')}</span>
- </div>
- <else />
- <a href="{:U('Login/index')}">
- <div style="width:100%;height:36px;line-height:36px;background:#f5465c;text-align:center;color:#fff;border-radius:5px;margin-top:20px;">
- <span class="fzmm" style="color:#fff;">{:L('登陆')}</span>
- </div>
- </a>
- </if>
- </div>
- </div>
- <div class="tradebox_r">
- <div style="width:100%;height:20px;padding:0px 5px;">
- <div class="tradebox_title tl">
- <span class="fcc fzm">{:L('价格')}</span>
- </div>
- <div class="tradebox_title tr">
- <span class="fcc fzm">{:L('数量')}</span>
- </div>
- </div>
- <div class="trade_listbox" id="tradesellbox">
- <div style="width:100%;height:30px;">
- <div class="trade_list tl">
- <span class="red fzm">--</span>
- </div>
- <div class="trade_list tr">
- <span class="red fzm">--</span>
- </div>
- </div>
- </div>
- <div class="trade_listpricebox closeprice" id="closeprice">
- <span>--</span>
- </div>
- <div class="trade_listbox" id="tradebuybox">
- <div style="width:100%;height:30px;">
- <div class="trade_list tl">
- <span class="green fzm">--</span>
- </div>
- <div class="trade_list tr">
- <span class="green fzm">--</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="fccbox"></div>
- <div class="wtlistbox">
- <div class="o_title_box fl" style="width:70%">
- <span class="fzmmm order_title" id="wtbtn">{:L('限价委托')}</span>
- <span class="fzmmm order_title FCD535" id="ccbtn">{:L('持仓')}</span>
- </div>
- <div class="o_title_box fr tr" style="width:30%">
- <a href="{:U('Levertade/tradlist')}">
- <i class="bi bi-journal-text fccm" style="font-weight:bold;font-size:18px;"></i>
- <span class="fzmm fcc">{:L('全部订单')}</span>
- </a>
- </div>
- <div style="width:100%;overflow:hidden;min-height:300px;padding:10px;display:none;" id="wtbox">
- <empty name="wtlist">
- <div style="width:100%;height:200px;line-height:200px;text-align:center;">
- <span class="fcc fzmmm">{:L('没有委托订单')}</span>
- </div>
- <else />
- <foreach name="wtlist" item="vo">
- <div class="tlistbox">
- <div class="tlistbox_1">
- <div class="tlistbox_2">
- <div class="tlistbox_3 fl">
- <if condition="$vo.direction eq 1">
- <span class="fzmmm green">{:L('做多')}</span>
- <elseif condition="$vo.direction eq 2" />
- <span class="fzmmm red">{:L('做空')}</span>
- </if>
- <span class="fzmmm fch" style="font-weight:bold;"><?php echo strtoupper($vo['symbol']);?></span>
- </div>
- <div class="tlistbox_4 fr tr" onclick="clearorder({$vo.id});">
- <span class="tlistbox_5 fcy">{:L('撤消')}</span>
- </div>
- </div>
- <div class="tlistbox_2">
- <div class="tlistbox_3 fl">
- <span class="fzmm fcc"><?php echo $vo['wttime'];?></span>
- </div>
- </div>
- <div class="tlistbox_6">
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tl">
- <span class="fzm fcc">{:L('限价')}</span>
- </div>
- <div class="tlistbox_9 tl">
- <span class="fzmm fcc">{$vo.wt_price}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tr">
- <span class="fzm fcc">{:L('保證金')}</span>
- </div>
- <div class="tlistbox_9 tr">
- <span class="fzmm fcc">{$vo.bond}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tc">
- <span class="fzm fcc">{:L('委托手数')}</span>
- </div>
- <div class="tlistbox_9 tc">
- <span class="fzmm fcc">{$vo.num}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tr">
- <span class="fzm fcc">{:L('杠杆倍数')}</span>
- </div>
- <div class="tlistbox_9 tr">
- <span class="fzmm fcc">{$vo.ggan}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </foreach>
- </empty>
- </div>
- <div style="width:100%;overflow:hidden;min-height:300px;padding:10px;display:block;" id="ccbox">
- <empty name="cclist">
- <div style="width:100%;height:200px;line-height:200px;text-align:center;">
- <span class="fcc fzmmm">{:L('没有订单')}</span>
- </div>
- <else />
- <foreach name="cclist" item="vo">
- <div class="tlistbox">
- <div class="tlistbox_1">
- <div class="tlistbox_2">
- <div class="tlistbox_3 fl" style="width:65%;">
- <if condition="$vo.direction eq 1">
- <span class="fzmmm green">{:L('做多')}</span>
- <elseif condition="$vo.direction eq 2" />
- <span class="fzmmm red">{:L('做空')}</span>
- </if>
- <span class="fzmmm fch" style="font-weight:bold;"><?php echo strtoupper($vo['symbol']);?></span>
- <span class="fzmmm fch pro{$vo.id}" style="font-weight:bold;">{$vo.profit}</span>
- </div>
- <div class="tlistbox_4 fr tr" style="width:35%;" onclick="closeorder({$vo.id});">
- <span class="tlistbox_5 fcy">{:L('一键平仓')}</span>
- </div>
- </div>
- <div class="tlistbox_2">
- <div class="tlistbox_3 fl">
- <span class="fzmm fcc">{:L('开仓时间')}:<?php echo $vo['addtime'];?></span>
- </div>
- </div>
- <div class="tlistbox_6">
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tl">
- <span class="fzm fcc">{:L('开仓单价')}</span>
- </div>
- <div class="tlistbox_9 tl">
- <span class="fzmm fcc">{$vo.price}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tr">
- <span class="fzm fcc">{:L('保證金')}</span>
- </div>
- <div class="tlistbox_9 tr">
- <span class="fzmm fcc">{$vo.bond}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tc">
- <span class="fzm fcc">{:L('合约手数')}</span>
- </div>
- <div class="tlistbox_9 tc">
- <span class="fzmm fcc">{$vo.num}</span>
- </div>
- </div>
- <div class="tlistbox_7 fl">
- <div class="tlistbox_8 tr">
- <span class="fzm fcc">{:L('杠杆倍数')}</span>
- </div>
- <div class="tlistbox_9 tr">
- <span class="fzmm fcc">{$vo.ggan}</span>
- </div>
- </div>
- </div>
- </div>
- </div>
- </foreach>
- </empty>
- </div>
- </div>
- <div style="width:100%;height:120px;"></div>
- </div>
- <!---------交易选择弹窗---------->
- <div class="dongbox" id="showdong" style="display:none;">
- <div class="dong_con">
- <div style="width:100%;position:relative;z-index:9999999;top:0px;">
- <div class="dong_title">
- <span class="dong_title_span" style="font-weight: bold;">{:L('合约市场')}</span>
- </div>
- <div class="dong_sel_box">
- <span class="fcc dong_sel_span">{:L('全部')}</span>
- </div>
- </div>
- <div class="symbol_list" id="smybolbox">
- <div style="width:100%;height:100px;line-height:100px;text-align:center;">
- <span class="fzmm fcc">{:L('没有获取数据')}</span>
- </div>
- </div>
- </div>
- <div style="width:20%;height:100vh;float:left;" id="hidedong"></div>
- </div>
- <input type="hidden" id="flag" value="1" />
- <input type="hidden" id="buy_usermoney" value="{$usdt_blance}" />
- <input type="hidden" id="buy_usercoin" value="{$coin_blance}" />
- <input type="hidden" id="symbolbox" value="{$coinname}" />
- <!--手续费率-->
- <input type="hidden" id="t_rate" value="0" />
- <!--止盈价格-->
- <input type="hidden" id="zyprice" value="0" />
- <!--止损价格-->
- <input type="hidden" id="zsprice" value="0" />
- <!--账户合约账户-->
- <input type="hidden" id="bondmoney" value="{$levermoney}" />
- <!--占用合约账户-->
- <input type="hidden" id="yj_bondmoney" value="0" />
- <!--杠杆倍数-->
- <input type="hidden" id="tradeggnum" value="5" />
- <!--交易手数-->
- <input type="hidden" id="tradelotsnum" value="0" />
- <!--交易限价单价-->
- <input type="hidden" id="mprice" value="" />
- <!--交易限价买卖币的数量-->
- <input type="hidden" id="mnum" value="" />
- <!--交易限价买卖USDT的数量-->
- <input type="hidden" id="musdt" value="" />
- <!--购买类型,1限价2市价-->
- <input type="hidden" id="buytype" value="1" />
- <!--交易费率-->
- <input type="hidden" id="lever_fee" value="{$sysinfo.lever_fee}" />
- <!--交易开关-->
- <input type="hidden" id="lever_kg" value="{$sysinfo.lever_kg}" />
- <!--底部-->
- <div class="footer">
- <a href="{:U('Index/index')}">
- <div class="footer_op">
- <div class="f_op_t">
- <span class="iconfont icon-shouye" style="font-size:22px;"></span>
- </div>
- <div class="f_op_b">
- <span class="fzm fcc">{:L('首页')}</span>
- </div>
- </div>
- </a>
- <a href="{:U('Trade/index')}">
- <div class="footer_op">
- <div class="f_op_t" style="line-height:35px;">
- <span class="iconfont icon-fukuan" style="font-size:22px;"></span>
- </div>
- <div class="f_op_b">
- <span class="fzm fcc">{:L('交易')}</span>
- </div>
- </div>
- </a>
- <a href="{:U('Orepool/index')}">
- <div class="footer_op">
- <div class="f_op_t" style="line-height:35px;">
- <span class="iconfont icon-ziyuan14" style="font-size:22px;"></span>
- </div>
- <div class="f_op_b">
- <span class="fzm fcc">{:L('矿机')}</span>
- </div>
- </div>
- </a>
- <a href="{:U('Levertade/index')}">
- <div class="footer_op">
- <div class="f_op_t" style="line-height:35px;">
- <svg class="icon fticon" aria-hidden="true"><use xlink:href="#icon-xuanxiang"></use></svg>
- </div>
- <div class="f_op_b">
- <span class="fzm fcy">{:L('合约')}</span>
- </div>
- </div>
- </a>
- <a href="{:U('User/index')}">
- <div class="footer_op">
- <div class="f_op_t" style="line-height:35px;">
- <span class="iconfont icon-ziyuan24" style="font-size:22px;"></span>
- </div>
- <div class="f_op_b">
- <span class="fzm fcc">{:L('资产')}</span>
- </div>
- </div>
- </a>
- </div>
- <div class="dongbox" id="pcconfim" style="display:none;">
- <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:20px;">
- <div style="width:100%;height:30px;line-height:30px;text-align:center;">
- <span style="font-size:16px;font-weight:bold;">{:L('操作提示')}</span>
- </div>
- <div style="width:100%;overflow:hidden;min-height:140px;text-align:center;padding:15px;" id="confim_txt">
- </div>
- <input type="hidden" id="pcoid" value="" />
- <div style="width:100%;height:60px;">
- <div onclick="pcorder()" 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>
- <div onclick="hidepcconfim()" 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>
- </div>
- </div>
- </div>
- <div class="dongbox" id="gotaxbox" style="display:none;">
- <div style="width:300px;height:260px;background:#fff;margin:50% auto;border-radius:10px;padding:15px;">
- <div style="width:100%;height:100px;line-height:100px;text-align:center;">
- <i class="bi bi-exclamation-circle" style="font-size:56px;font-weight:bold;color:#f5465c;"></i>
- </div>
- <div style="width:100%;height:60px;text-align:center;color:#000;font-size:14px;">
- {:L('请先缴纳税金')}
- </div>
- <div style="width:100%;height:60px;">
- <a href="{:U('Finance/cztax')}" target="__blank">
- <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>
- <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>
- </div>
- </div>
- </div>
- </body>
- <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
- <script type="text/javascript" src="/Public/Static/js/layer/layer.js" ></script>
- <script type="text/javascript">
- function closeorder(id){
- var oid = id;
- if(oid == '' || oid <= 0){
- layer.msg("{:L('缺少重要参数')}");return false;
- }
- $.post("{:U('Levertade/confimclose')}",{'id':oid},function(data){
- if(data.code == 1){
- $("#confim_txt").empty();
- $("#pcoid").val(data.id);
- $("#confim_txt").html(data.txt);
- $("#pcconfim").show();
- }
- });
- }
- function pcorder(){
- var flag = $("#flag").val();
- if(flag == 2){
- return false;
- }
- var oid = $("#pcoid").val();
- if(oid == '' || oid <= 0){
- layer.msg("{:L('缺少重要参数')}");return false;
- }
- $("#flag").val(2);
- $.post("{:U('Levertade/closeorder')}",{'id':oid},function(data){
- if(data.code == 1){
- layer.msg(data.info);
- setTimeout(function(args){
- window.location.reload();
- },2000);
- }else{
- layer.msg(data.info);return false;
- }
- });
- }
- function clearorder(id){
- var flag = $("#flag").val();
- if(flag == 2){
- return false;
- }
- var oid = id;
- if(oid == '' || oid <= 0){
- layer.msg("{:L('缺少重要参数')}");return false;
- }
- $("#flag").val(2);
- $.post("{:U('Levertade/clearorder')}",{'id':oid},function(data){
- if(data.code == 1){
- layer.msg(data.info);
- setTimeout(function(args){
- $("#pcconfim").hide();
- window.location.reload();
- },2000);
- }else{
- layer.msg(data.info);return false;
- }
- });
- }
- function hidetaxbox(){
- $("#gotaxbox").hide();
- }
- function hidepcconfim(){
- $("#pcconfim").hide();
- }
- function up_price(){
- var newprice = $("#newprice").val();
- $("#mprice").val(newprice);
- }
- function down_price(){
- var newprice = $("#sell_newprice").val();
- $("#mprice").val(newprice);
- }
- $("#ccbtn").click(function(){
- $("#ccbtn").addClass('FCD535');
- $("#wtbtn").removeClass('FCD535');
- $("#ccbox").show();
- $("#wtbox").hide();
- });
- $("#wtbtn").click(function(){
- $("#wtbtn").addClass('FCD535');
- $("#ccbtn").removeClass('FCD535');
- $("#wtbox").show();
- $("#ccbox").hide();
- });
- </script>
- <script type="text/javascript">
- function bb_buycoin(direction){
- var flag = $("#flag").val();
- if(flag == 2){
- return false;
- }
- var direction = direction;
- if(direction <= 0){
- layer.msg("{:L('缺少重要参数')}");return false;
- }
- var lever_kg = $("#lever_kg").val();
- if(lever_kg != 0){
- layer.msg("{:L('暂停交易')}");return false;
- }
- var yj_bondmoney = parseFloat($("#yj_bondmoney").val()); //占用合约账户
- var bondmoney = parseFloat($("#bondmoney").val()); //可用合约账户
- if(bondmoney < yj_bondmoney){
- layer.msg("{:L('可用合约账户不足,请先从资金账户划转')}");return false;
- }
- var type = $("#buytype").val(); //限价,市价
- var symbol = $("#symbolbox").val();
- var mprice = $("#mprice").val(); //输入价格(限价)
- var num = $("#tradelotsnum").val(); //手数
- var ggan = $("#tradeggnum").val(); //杠杆倍数
- var zyprice = $("#zyprice").val(); //止盈价;
- var zsprice = $("#zsprice").val(); //止损价;
- var fee = $(".upsxf").html();//手续费
- var upbondmoney = $(".upbondmoney").html();//手续费
- $("#flag").val(2);
- $.post("{:U('Levertade/UpOrderHandle')}",
- {'direction':direction,'type':type,'symbol':symbol,'mprice':mprice,'num':num,'ggan':ggan,'zyprice':zyprice,'zsprice':zsprice,'fee':fee, 'upbondmoney':upbondmoney},
- function(data){
- if(data.code == 1){
- layer.msg(data.info);
- setTimeout(function(args){
- window.location.reload();
- },2000);
- }else{
- layer.msg(data.info);return false;
- }
- });
- }
- </script>
- <script type="text/javascript">
- function getallsmybol(){
- $.post("{:U('Ajaxtrade/getallcoin')}",
- function(data){
- if(data.code == 1){
- $("#smybolbox").empty();
- var html = '';
- if(data.data == '' || data.data == null){
- html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
- '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
- '</div>';
- $("#smybolbox").append(html);
- }else{
- $.each(data.data,function(key,val){
- html += '<a href="/Levertade/index.html?symbol='+ val.coin +'&type=buy">'+
- '<div class="sy_list_box">'+
- '<div class="sy_list_boxl">'+
- '<span class="fzmm fcc">'+ val.cname +'</span>'+
- '</div>'+
- '<div class="sy_list_boxl" style="text-align:center;">' + val.open + '</div>'+
- '<div class="sy_list_boxr">' + val.change +'</div>'+
- '</div>'+
- '</a>';
- });
- $("#smybolbox").append(html);
- }
- }else{
- html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
- '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
- '</div>';
- $("#smybolbox").append(html);
- }
- });
- }
- </script>
- <script type="text/javascript">
- $("#hidedong").click(function(){
- $("#showdong").fadeOut("slow");
- });
- $("#centerbox").click(function(){
- getallsmybol()
- $("#showdong").fadeIn("slow");
- });
- </script>
- <script type="text/javascript">
- var types = 2;
- var price = 0;
- $(function(){
- gettradbuy();
- gettradsell();
- CountBond();
- CountSouxf();
- setInterval("real_time()",2000);
- setInterval("gettradbuy()",2000);
- setInterval("gettradsell()",2000);
- setInterval("CountBond()",1000);
- setInterval("CountSouxf()",1000);
- setInterval("getmoney_lever()",1000);
- });
- function real_time(){
- $.post("{:U('Levertade/real_time')}",function(data){
- $.each(data,function(index,value){
- $('.pro'+value.id).html(value.profit)
- });
- });
- }
- function getmoney_lever(){
- var coin = "Futures-USDT";
- $.post("{:U('User/getmoneylever')}",
- {'coin':coin},
- function(data){
- if(data.code == 1){
- $('.bzjmoney').html(data.num);
- }else{
- console.log("error");
- }
- }
- );
- }
- //前台计算合约账户
- function CountBond(){
- var mprice = {$levermoney};
- var tradelotsnum = $("#tradelotsnum").val();
- var tradeggnum = $("#tradeggnum").val();
- if (types == 1){
- var bond = parseFloat(((mprice * (tradelotsnum/100))/tradeggnum));
- }else if (types == 2){
- var bond = parseFloat((price*tradelotsnum)/tradeggnum);
- }
- $(".upbondmoney").html(bond.toFixed(2));
- $("#yj_bondmoney").val(bond.toFixed(2));
- }
- $('#lotsnum').bind('input propertychange', function() {
- var mprice = {$levermoney};
- var tradelotsnum = $('#lotsnum').val();
- $("#tradelotsnum").val(tradelotsnum);
- types = 2;
- });
- $('#lots_down_num').bind('input propertychange', function() {
- var mprice = {$levermoney};
- var tradelotsnum = $('#lots_down_num').val();
- $("#tradelotsnum").val(tradelotsnum);
- types = 2;
- });
- //前台手续费计算(开仓价格 * 开仓数量 * 手续费率)
- function CountSouxf(){
- var mprice = {$levermoney};
- var tradelotsnum = $("#tradelotsnum").val();
- var lever_fee = $("#lever_fee").val();
- var upbondmoney = $('.upbondmoney').html();
- if (types == 1){
- var sxf = parseFloat((lever_fee * (price * tradelotsnum))).toFixed(2);
- }else if (types == 2){
- var sxf = parseFloat(lever_fee * (price * tradelotsnum)).toFixed(2);
- }
- $(".upsxf").html(sxf);
- }
- function set_up_lotsnum(num,st,lots){
- var lotsnum = num;
- var type = st;
- var number = lots;
- if(number == 1){
- $("#up_lots_1").addClass('active_lots');
- $("#up_lots_2").removeClass('active_lots');
- $("#up_lots_3").removeClass('active_lots');
- $("#up_lots_4").removeClass('active_lots');
- }else if(number == 2){
- $("#up_lots_2").addClass('active_lots');
- $("#up_lots_1").removeClass('active_lots');
- $("#up_lots_3").removeClass('active_lots');
- $("#up_lots_4").removeClass('active_lots');
- }else if(number == 3){
- $("#up_lots_3").addClass('active_lots');
- $("#up_lots_2").removeClass('active_lots');
- $("#up_lots_1").removeClass('active_lots');
- $("#up_lots_4").removeClass('active_lots');
- }else if(number == 4){
- $("#up_lots_4").addClass('active_lots');
- $("#up_lots_2").removeClass('active_lots');
- $("#up_lots_3").removeClass('active_lots');
- $("#up_lots_1").removeClass('active_lots');
- }
- types = 1;
- // $("#lotsnum").val(lotsnum);
- $("#tradelotsnum").val(lotsnum);
- }
- function set_down_lotsnum(num,st,lots){
- var lotsnum = num;
- var type = st;
- var number = lots;
- if(number == 1){
- $("#down_lots_1").addClass('active_lots');
- $("#down_lots_2").removeClass('active_lots');
- $("#down_lots_3").removeClass('active_lots');
- $("#down_lots_4").removeClass('active_lots');
- }else if(number == 2){
- $("#down_lots_2").addClass('active_lots');
- $("#down_lots_1").removeClass('active_lots');
- $("#down_lots_3").removeClass('active_lots');
- $("#down_lots_4").removeClass('active_lots');
- }else if(number == 3){
- $("#down_lots_3").addClass('active_lots');
- $("#down_lots_2").removeClass('active_lots');
- $("#down_lots_1").removeClass('active_lots');
- $("#down_lots_4").removeClass('active_lots');
- }else if(number == 4){
- $("#down_lots_4").addClass('active_lots');
- $("#down_lots_2").removeClass('active_lots');
- $("#down_lots_3").removeClass('active_lots');
- $("#down_lots_1").removeClass('active_lots');
- }
- types = 1;
- // $("#lots_down_num").val(lotsnum);
- $("#tradelotsnum").val(lotsnum);
- }
- </script>
- <script type="text/javascript">
- function gettradsell(){
- var symbol = $("#symbolbox").val();
- $.post("{:U('Ajaxtrade/gettradsell')}",
- {'symbol':symbol},
- function(data){
- if(data.code == 1){
- $("#tradebuybox").empty();
- var html = '';
- if(data.data == '' || data.data == null){
- html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
- '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
- '</div>';
- $("#tradebuybox").append(html);
- }else{
- $.each(data.data,function(key,val){
- html += '<div style="width:100%;height:30px;">'+
- '<div class="trade_list tl">'+
- '<span class="red fzm">'+ val.price +'</span>'+
- '</div>'+
- '<div class="trade_list tr">'+
- '<span class="red fzm">'+ val.amount +'</span>'+
- '</div>'+
- '</div>';
- });
- $("#tradebuybox").append(html);
- }
- }
- });
- }
- </script>
- <script type="text/javascript">
- function gettradbuy(){
- var symbol = $("#symbolbox").val();
- $.post("{:U('Ajaxtrade/gettradbuy')}",
- {'symbol':symbol},
- function(data){
- if(data.code == 1){
- $("#tradesellbox").empty();
- var html = '';
- if(data.data == '' || data.data == null){
- html = '<div style="width:100%;height:100px;line-height:100px;text-align:center;">'+
- '<span class="fzmm fcc">' + "{:L('没有获取数据')}" + '</span>'+
- '</div>';
- $("#tradesellbox").append(html);
- }else{
- $.each(data.data,function(key,val){
- html += '<div style="width:100%;height:30px;">'+
- '<div class="trade_list tl">'+
- '<span class="green fzm">'+ val.price +'</span>'+
- '</div>'+
- '<div class="trade_list tr">'+
- '<span class="green fzm">'+ val.amount +'</span>'+
- '</div>'+
- '</div>';
- });
- $("#tradesellbox").append(html);
- }
- }
- });
- }
- </script>
- <script type="text/javascript">
- $(function(){
- getcoinprice();
- setInterval("getcoinprice()",2000);
- });
- </script>
- <script type="text/javascript">
- function getcoinprice(){
- var symbol = $("#symbolbox").val();
- $.post("{:U('Ajaxtrade/getcoinprice')}",
- {'symbol':symbol},
- function(data){
- if(data.code == 1){
- price = data.ot_price;
- $("#changebox").html(data.change);
- $(".closeprice").html(data.price);
- }else{
- console.log("{:L('未获取数据')}");
- }
- });
- }
- </script>
- <script type="text/javascript">
- $("#buybtn").click(function(){
- $("#buybtn").addClass("bggreen");
- $("#buybtn").removeClass("bghc");
- $("#sellbtn").addClass("bghc");
- $("#sellbtn").removeClass("bggreen");
- $("#buycoinbox").show();
- $("#sellcoinbox").hide();
- $("#buybtnspan").addClass("cfff");
- $("#buybtnspan").removeClass("c000");
- $("#sellbtnspan").addClass("c000");
- $("#sellbtnspan").removeClass("cfff");
- $("#buytype").val(1);
- });
- $("#sellbtn").click(function(){
- $("#buybtn").removeClass("bgred");
- $("#buybtn").addClass("bghc");
- $("#sellbtn").removeClass("bghc");
- $("#sellbtn").addClass("bgred");
- $("#buycoinbox").hide();
- $("#sellcoinbox").show();
- $("#buybtnspan").addClass("c000");
- $("#buybtnspan").removeClass("cfff");
- $("#sellbtnspan").addClass("cfff");
- $("#sellbtnspan").removeClass("c000");
- $("#buytype").val(1);
- });
- </script>
- <script type="text/javascript">
- //出售框
- $("#sell_xjbtn").click(function(){
- $("#sell_xjspan").addClass("fcy");
- $("#sell_xjspan").removeClass("fcc");
- $("#sell_sjspan").addClass("fcc");
- $("#sell_sjspan").removeClass("fcy");
- $("#sell_xjbox").show();
- $("#buytype").val(1);
- $("#sellxjcoin").hide();
- });
- $("#sell_sjbtn").click(function(){
- $("#sell_sjspan").addClass("fcy");
- $("#sell_sjspan").removeClass("fcc");
- $("#sell_xjspan").addClass("fcc");
- $("#sell_xjspan").removeClass("fcy");
- $("#sell_sjbox").show();
- $("#sell_xjbox").hide();
- $("#buytype").val(2);
- $("#sellxjcoin").show();
- });
- //买入框
- $("#buyxjbtn").click(function(){
- $("#xjspan").addClass("fcy");
- $("#xjspan").removeClass("fcc");
- $("#sjspan").addClass("fcc");
- $("#sjspan").removeClass("fcy");
- $("#xjbox").show();
- $("#buytype").val(1);
- $("#xjnumbox").show();
- });
- $("#buysjbtn").click(function(){
- $("#sjspan").addClass("fcy");
- $("#sjspan").removeClass("fcc");
- $("#xjspan").addClass("fcc");
- $("#xjspan").removeClass("fcy");
- $("#xjbox").hide();
- $("#buytype").val(2);
- $("#xjnumbox").hide();
- });
- </script>
- <script type="text/javascript">
- $(function(){
- var symbol = $("#symbolbox").val();
- $.post("{:U('Ajaxtrade/getnewprice')}",
- {'symbol':symbol},
- function(data){
- if(data.code == 1){
- $("#newprice").val(data.price);
- $("#mprice").val(data.price);
- $("#sell_newprice").val(data.price);
- }else{
- console.log("{:L('未获取数据')}");
- }
- });
- });
- </script>
- <script type="text/javascript">
- $("#dash_sellprice").click(function(){
- var newprice = parseFloat($("#sell_newprice").val());
- if(newprice > 0){
- var buyprice = (newprice - 0.001).toFixed(4);
- }else{
- var buyprice = 0;
- }
- $("#sell_newprice").val(buyprice);
- $("#mprice").val(buyprice);
- });
- $("#plus_sellprice").click(function(){
- var newprice = parseFloat($("#sell_newprice").val());
- var buyprice = (newprice + 0.001).toFixed(4);
- $("#sell_newprice").val(buyprice);
- $("#mprice").val(buyprice);
- });
- $("#dash_buyprice").click(function(){
- var newprice = parseFloat($("#newprice").val());
- if(newprice > 0){
- var buyprice = (newprice - 0.001).toFixed(4);
- }else{
- var buyprice = 0;
- }
- $("#newprice").val(buyprice);
- $("#mprice").val(buyprice);
- });
- $("#plus_buyprice").click(function(){
- var newprice = parseFloat($("#newprice").val());
- var buyprice = (newprice + 0.001).toFixed(4);
- $("#newprice").val(buyprice);
- $("#mprice").val(buyprice);
- });
- $("#dash_lotsnum").click(function(){
- var lotsnum = parseInt($("#lotsnum").val());
- if(lotsnum <= 1){
- var newlotsnum = 1;
- }else{
- var newlotsnum = lotsnum - 1;
- }
- $("#lotsnum").val(newlotsnum);
- $("#tradelotsnum").val(newlotsnum);
- });
- $("#dash_lots_down_num").click(function(){
- var lotsnum = parseInt($("#lots_down_num").val());
- if(lotsnum <= 1){
- var newlotsnum = 1;
- }else{
- var newlotsnum = lotsnum - 1;
- }
- $("#lots_down_num").val(newlotsnum);
- $("#tradelotsnum").val(newlotsnum);
- });
- $("#dash_up_zsprice").click(function(){
- var up_zsprice = parseFloat($("#up_zsprice").val());
- if(up_zsprice <= 1){
- var new_up_zsprice = up_zsprice;
- }else{
- var new_up_zsprice = up_zsprice - 1;
- }
- $("#up_zsprice").val(new_up_zsprice);
- $("#zsprice").val(up_zsprice);
- });
- $("#dash_down_zsprice").click(function(){
- var down_zsprice = parseFloat($("#down_zsprice").val());
- if(down_zsprice <= 1){
- var new_down_zsprice = down_zsprice;
- }else{
- var new_down_zsprice = down_zsprice - 1;
- }
- $("#down_zsprice").val(new_down_zsprice);
- $("#zsprice").val(up_zsprice);
- });
- $("#dash_down_zyprice").click(function(){
- var down_zyprice = parseFloat($("#down_zyprice").val());
- if(down_zyprice <= 1){
- var new_down_zyprice = down_zyprice;
- }else{
- var new_down_zyprice = down_zyprice - 1;
- }
- $("#down_zyprice").val(new_down_zyprice);
- $("#zyprice").val(up_zsprice);
- });
- $("#dash_up_zyprice").click(function(){
- var up_zyprice = parseFloat($("#up_zyprice").val());
- if(up_zyprice <= 1){
- var new_up_zyprice = up_zyprice;
- }else{
- var new_up_zyprice = up_zyprice - 1;
- }
- $("#up_zyprice").val(new_up_zyprice);
- $("#zyprice").val(new_up_zyprice);
- });
- $("#plus_up_zsprice").click(function(){
- var up_zsprice = parseFloat($("#up_zsprice").val());
- var new_up_zsprice = up_zsprice + 1;
- $("#up_zsprice").val(new_up_zsprice);
- $("#zsprice").val(new_up_zsprice);
- });
- $("#plus_up_zyprice").click(function(){
- var up_zyprice = parseFloat($("#up_zyprice").val());
- var new_up_zyprice = up_zyprice + 1;
- $("#up_zyprice").val(new_up_zyprice);
- $("#zyprice").val(new_up_zyprice);
- });
- $("#plus_down_zsprice").click(function(){
- var down_zsprice = parseFloat($("#down_zsprice").val());
- var new_down_zsprice = down_zsprice + 1;
- $("#down_zsprice").val(new_down_zsprice);
- $("#zsprice").val(new_down_zsprice);
- });
- $("#plus_down_zyprice").click(function(){
- var down_zyprice = parseFloat($("#down_zyprice").val());
- var new_down_zyprice = down_zyprice + 1;
- $("#down_zyprice").val(new_down_zyprice);
- $("#zyprice").val(new_down_zyprice);
- });
- $("#plus_lotsnum").click(function(){
- var lotsnum = parseInt($("#lotsnum").val());
- var newlotsnum = lotsnum + 1;
- $("#lotsnum").val(newlotsnum);
- $("#tradelotsnum").val(newlotsnum);
- });
- $("#plus_lots_down_num").click(function(){
- var lotsnum = parseInt($("#lots_down_num").val());
- var newlotsnum = lotsnum + 1;
- $("#lots_down_num").val(newlotsnum);
- $("#tradelotsnum").val(newlotsnum);
- });
- function set_up_ggan(num,st,gg){
- var lotsnum = num;
- var type = st;
- var number = gg;
- if(number == 1){
- $("#up_ggan_1").addClass('active_lots');
- $("#up_ggan_2").removeClass('active_lots');
- $("#up_ggan_3").removeClass('active_lots');
- $("#up_ggan_4").removeClass('active_lots');
- $("#up_ggan_5").removeClass('active_lots');
- }else if(number == 2){
- $("#up_ggan_2").addClass('active_lots');
- $("#up_ggan_1").removeClass('active_lots');
- $("#up_ggan_3").removeClass('active_lots');
- $("#up_ggan_4").removeClass('active_lots');
- $("#up_ggan_5").removeClass('active_lots');
- }else if(number == 3){
- $("#up_ggan_3").addClass('active_lots');
- $("#up_ggan_2").removeClass('active_lots');
- $("#up_ggan_1").removeClass('active_lots');
- $("#up_ggan_4").removeClass('active_lots');
- $("#up_ggan_5").removeClass('active_lots');
- }else if(number == 4){
- $("#up_ggan_4").addClass('active_lots');
- $("#up_ggan_2").removeClass('active_lots');
- $("#up_ggan_3").removeClass('active_lots');
- $("#up_ggan_1").removeClass('active_lots');
- $("#up_ggan_5").removeClass('active_lots');
- }else if(number == 5){
- $("#up_ggan_5").addClass('active_lots');
- $("#up_ggan_2").removeClass('active_lots');
- $("#up_ggan_3").removeClass('active_lots');
- $("#up_ggan_4").removeClass('active_lots');
- $("#up_ggan_1").removeClass('active_lots');
- }
- $("#upggan").val(lotsnum);
- $("#tradeggnum").val(lotsnum);
- }
- function set_down_ggan(num,st,gg){
- var lotsnum = num;
- var type = st;
- var number = gg;
- if(number == 1){
- $("#down_ggan_1").addClass('active_lots');
- $("#down_ggan_2").removeClass('active_lots');
- $("#down_ggan_3").removeClass('active_lots');
- $("#down_ggan_4").removeClass('active_lots');
- $("#down_ggan_5").removeClass('active_lots');
- }else if(number == 2){
- $("#down_ggan_2").addClass('active_lots');
- $("#down_ggan_1").removeClass('active_lots');
- $("#down_ggan_3").removeClass('active_lots');
- $("#down_ggan_4").removeClass('active_lots');
- $("#down_ggan_5").removeClass('active_lots');
- }else if(number == 3){
- $("#down_ggan_3").addClass('active_lots');
- $("#down_ggan_2").removeClass('active_lots');
- $("#down_ggan_1").removeClass('active_lots');
- $("#down_ggan_4").removeClass('active_lots');
- $("#down_ggan_5").removeClass('active_lots');
- }else if(number == 4){
- $("#down_ggan_4").addClass('active_lots');
- $("#down_ggan_2").removeClass('active_lots');
- $("#down_ggan_3").removeClass('active_lots');
- $("#down_ggan_1").removeClass('active_lots');
- $("#down_ggan_5").removeClass('active_lots');
- }else if(number == 5){
- $("#down_ggan_5").addClass('active_lots');
- $("#down_ggan_2").removeClass('active_lots');
- $("#down_ggan_3").removeClass('active_lots');
- $("#down_ggan_4").removeClass('active_lots');
- $("#down_ggan_1").removeClass('active_lots');
- }
- $("#downggan").val(lotsnum);
- $("#tradeggnum").val(lotsnum);
- }
- </script>
- <script type="text/javascript">
- function goback(){
- window.history.go(-1);
- }
- </script>
- </html>
|