/*************************************************** ** @Desc : This file for 首页js ** @Time : 19.12.2 14:46 ** @Author : Joker ** @File : index ** @Last Modified by : Joker ** @Last Modified time: 19.12.2 14:46 ** @Software: GoLand ****************************************************/ let index={getAccountInfo:function(){$.ajax({type:"GET",url:"/index/loadInfo/",success:function(result){$("#balanceAmt").text(result["balanceAmt"]);$("#settAmount").text(result["settAmount"]);$("#freezeAmt").text(result["freezeAmt"]);$("#amountFrozen").text(result["amountFrozen"])},error:function(XMLHttpRequest){toastr.info('something is wrong, code: '+XMLHttpRequest.status)}})},getOrdersInfo:function(){$.ajax({type:"GET",url:"/index/loadOrders",success:function(result){$("#orders").text(result["orders"]);$("#suc_orders").text(result["suc_orders"]);$("#suc_rate").text((result["suc_rate"]*100).toFixed(2)+"%")},error:function(XMLHttpRequest){toastr.info('something is wrong, code: '+XMLHttpRequest.status)}})},get_account_balance:function(){$.ajax({type:"GET",url:"/withdraw/balance",success:function(resp){$("#balance").val(resp.balance);$("#sett_fee").html(resp.fee)},error:function(XMLHttpRequest){toastr.info('something is wrong, code: '+XMLHttpRequest.status)}})},loadTradeRecord:function(){$.ajax({type:"GET",url:"/index/load_count_order",success:function(res){let con="";$.each(res,function(index,item){if(item.PayWayName===""){return true}con+=`
`+(index+1)+`
`+item.PayWayName+`
`+item.OrderCount+`
`+item.SucOrderCount+`
`+(item.SucRate*100).toFixed(2)+`%
`});$("#your_showtime").html(con)},error:function(XMLHttpRequest){toastr.info('something is wrong, code: '+XMLHttpRequest.status)}})},loadPayWay:function(){$.ajax({type:"GET",url:"/index/pay_way",success:function(res){let con="";$.each(res,function(index,item){if(item.Name===""){return true}con+=`
`+(index+1)+`
`+item.Name+`
`+item.Rate+`%
`});$("#your_showtime").html(con)},error:function(XMLHttpRequest){toastr.info('something is wrong, code: '+XMLHttpRequest.status)}})},};