webpackJsonp([12],{"+OAH":function(t,s){},Zxu2:function(t,s,e){"use strict";Object.defineProperty(s,"__esModule",{value:!0});var i=e("woOf"),a=e.n(i),n={data:function(){return{current:0,token:"",sellerId:"",info:{lists:{data:[]}},showWhich:"none",isShow:!1,showDetail:!1,detail:{money:"",num:""},timer:"",rate:"--",filterPms:{id:"",page:1,wasDone:0,type:"sell"},list:[],submitPms:{type:"sell"},typeList:[{name:this.$t("td.sell"),type:"sell"},{name:this.$t("fat.wantBuy"),type:"buy"}],type:"sell",way:-1,price:"",total_number:"",min_number:"",max_number:"",password:"",coin:-1}},filters:{toFixeds:function(t){return(t=Number(t)).toFixed(3)}},created:function(){this.token=window.localStorage.getItem("token")||"",this.token&&(this.sellerId=this.$route.query.id||"",this.getSellerInfo(),this.getList())},methods:{changeType:function(t,s){this.current=t,this.type=s,this.way=-1,this.price="",this.min_number="",this.max_number="",this.password="",this.total_number="",this.coin=-1},getSellerInfo:function(t){var s=this;this.showWhich="none",t||(this.page=1);var e=layer.load();this.$http({url:"/api/seller_info",params:{id:this.sellerId,page:1},headers:{Authorization:this.token}}).then(function(t){if(layer.close(e),"ok"==t.data.type){s.info=a()({},t.data.message);var i=(t.data.message.done/t.data.message.total*100).toFixed(2);s.rate="NaN"==i?"0.00":i+"%",s.currency_id=t.data.message.currency_id}})},getList:function(){var t=this,s=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this,i={};s||(this.filterPms.page=1),i.page=this.filterPms.page,"none"!=this.filterPms.type&&(i.type=this.filterPms.type),i.is_done=this.filterPms.wasDone,i.id=this.sellerId;var a=layer.load();this.$http({url:"/api/seller_trade",params:i,headers:{Authorization:this.token}}).then(function(i){if(layer.close(a),"ok"==i.data.type){var n=i.data.message;s?n.data.length?(t.list=n.data.concat(t.list),t.filterPms.page+=1):layer.msg(e.$t("td.nomore")):(t.list=n.data,n.data.length&&(t.filterPms.page+=1))}})},changeOrder:function(t,s){var e=this;t=t,s=s;layer.prompt({title:e.$t("td.pwd"),formType:1,btn:[e.$t("td.confirm"),e.$t("td.canceil")]},function(i,a){e.password=i,e.$http({url:"/api/"+t,method:"post",data:{id:s,password:e.password},headers:{Authorization:e.token}}).then(function(t){"ok"==t.data.type?(layer.msg(t.data.message),e.getList()):layer.msg(t.data.message)}),layer.close(a)})},setDetail:function(t){this.detail=a()({which:"money",money:"",num:""},t),this.showDetail=!0;var s=60,e=this;e.timer=setInterval(function(){s--,e.$refs.remainTime.innerHTML=s,0==s&&(e.showDetail=!1,clearInterval(e.timer))},1e3)},buySell:function(){var t=this,s="";if("money"==this.detail.which){if(""==(s=this.detail.money))return;if(s-0-this.detail.limitation.min<0)return void layer.msg(this.$t("fat.notlow"));if(s-0-this.detail.limitation.max>0)return void layer.msg(this.$t("fat.nothigh"))}else{if(""==(s=this.detail.num))return;if(s>this.detail.surplus_number)return void layer.msg(this.$t("fat.notnum"))}this.$http({url:"/api/do_legal_deal",method:"post",data:{means:this.detail.which,value:s,id:this.detail.id},headers:{Authorization:this.token}}).then(function(s){if(t.showDetail=!1,"ok"==s.data.type){var e=s.data.message;layer.msg(e.msg),"sell"==t.detail.type?t.$router.push({path:"/legalPay",query:{id:msg.data.id}}):t.$router.push({path:"/components/payCannel",query:{id:msg.data.id}})}})},cancel:function(){clearInterval(this.timer),this.showDetail=!1},fb:function(){this.isShow=!0,this.way=-1,this.price="",this.min_number="",this.max_number="",this.password="",this.total_number="",this.coin=-1},close:function(){this.isShow=!1},fabu:function(){var t=this,s=(this.type,this.way),e=this.coin,i=this.price,a=this.total_number,n=this.min_number-0,r=this.max_number-0,l=(this.currency_id,this.password);return s<0?layer.msg(this.$t("ctc.payway")):e<0?layer.msg(this.$t("td.pcoin")):!i||i<=0?layer.msg(this.$t("ctc.pprice")):!a||a<=0?layer.msg(this.$t("fat.pnums")):!n||n<=0?layer.msg(this.$t("fat.pmin")):!r||r<=0?layer.msg(this.$t("fat.pmax")):r