zzzz
2024-04-15 136d5835ef62ecfb9932526c5f48a434988b1be7
1
"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[5448],{45484:function(t,s,e){e.d(s,{A:function(){return d}});var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",[t._l(t.listData,(function(s){return i("div",{key:s.order_no,class:[t.isStyle?"border-b-color":""]},[i("div",{staticClass:"flex justify-between pt-44 pb-44"},[i("div",{staticClass:"flex flex-col"},[i("div",{staticClass:"flex items-center"},[i("div",{staticClass:"pl-29 pr-29 pt-11 pb-11 text-white open-btn",class:"buy"==s.direction?" bg-green":"bg-red"},[t._v(" "+t._s("buy"==s.direction?t.$t("开多"):t.$t("开空"))+" ")]),i("div",{staticClass:"ml-22 font-31 font-600 "},[i("span",{class:[t.isStyle?"textColor1 ":"textColor"]},[t._v(t._s(s.name)+" "+t._s(t.$t("永续")))]),i("span",{staticClass:"text-grey font-28 font-400 ml-17 mr-17"},[t._v(t._s(t.$t("全仓"))+" "+t._s(s.lever_rate)+"x")])]),"buy"==s.direction?i("img",{staticClass:"w-32 h-32",attrs:{src:e(33861),alt:""}}):i("img",{staticClass:"w-32 h-32",attrs:{src:e(64517),alt:""}})])])]),i("div",{staticClass:"flex justify-between"},[i("div",[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("未实现盈亏(USDT)")))]),i("div",{staticClass:"mt-20",class:s.profit>0?"text-green":"text-red"},[t._v(" "+t._s(s.profit>0?"+"+s.profit:s.profit))])]),i("div",[i("div",{staticClass:"text-grey"},[t._v("ROE")]),i("div",{staticClass:"mt-20",class:s.change_ratio/1>0?"text-green":"text-red"},[t._v(t._s(s.change_ratio)+"% ")])])]),i("div",{staticClass:"flex pt-44 pb-32"},[i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("持仓数量")))]),i("div",{staticClass:"mt-20",class:[t.isStyle?"textColor1 ":"textColor"]},[t._v(t._s(s.volume/(s.lever_rate?s.lever_rate:1))+"*"+t._s(s.lever_rate?s.lever_rate:1)+"x")])]),i("div",{staticClass:"flex-1 text-center"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("保证金"))+" (USDT)")]),i("div",{staticClass:"mt-20",class:[t.isStyle?"textColor1 ":"textColor"]},[t._v(t._s(s.deposit))])]),i("div",{staticClass:"flex-1 flex flex-col items-end"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("开仓价格")))]),i("div",{staticClass:"mt-20",class:[t.isStyle?"textColor1 ":"textColor"]},[t._v(t._s(s.trade_avg_price))])])]),i("div",{staticClass:"flex  pb-32"},[i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("标记价格")))]),i("div",{staticClass:"mt-20 ",class:[t.isStyle?"textColor1 ":"textColor"]},[t._v(t._s(s.mark_price))])]),i("div",{staticClass:"flex-1 flex flex-col items-center justify-end"},[i("button",{staticClass:"font-30 border-light-blue  detail-btn colorMain w-125 h-60",on:{click:function(e){return t.goDetail(s)}}},[t._v(t._s(t.$t("详情")))])]),i("div",{staticClass:"flex-1 flex flex-col items-end justify-end"},[i("button",{staticClass:" greyBg  border-none pl-34 pr-34 pt-10 pb-10 rounded",on:{click:function(e){return t.onSell(s.order_no)}}},[t._v(" "+t._s(t.$t("平仓")))])])])])})),t.listData.length?t._e():i("div",{staticClass:"text-grey text-center py-300"},[t._v(t._s(t.$t("您目前没有持仓")))])],2)},a=[],l=(e(69437),e(46579)),r=(e(44114),e(93068)),o={name:"perpetualPositionList",data(){return{iconShow:!1,isStyle:!0}},props:{type:{type:String,default:"2"},listData:{type:Array,default(){return[]}}},mounted(){"/funds"==this.$route.path&&(this.isStyle=!1)},methods:{changeIcon(){this.iconShow=!this.iconShow},goDetail(t){this.$router.push({path:"/orderDetail?order_no="+t.order_no})},onSell(t){l.A.confirm({confirmButtonText:this.$t("确定"),cancelButtonText:this.$t("取消"),title:this.$t("平仓提示"),message:this.$t("是否平仓?")}).then((()=>{(0,r._j)({order_no:t}).then((()=>{this.$toast(this.$t("平仓成功")),this.$emit("sell",t)}))})).catch((()=>{}))},onSellAll(){(0,r.AM)().then((()=>{this.$toast(this.$t("平仓成功")),this.$emit("sell")}))}}},c=o,n=e(81656),A=(0,n.A)(c,i,a,!1,null,"105face8",null),d=A.exports},18191:function(t,s,e){e.d(s,{A:function(){return C}});var i=function(){var t=this,s=t.$createElement,i=t._self._c||s;return i("div",[t._l(t.listData,(function(s){return i("div",{key:s.order_no},[i("div",{staticClass:"flex justify-between pt-44 pb-44"},[i("div",{staticClass:"flex flex-col"},[i("div",{staticClass:"flex items-center"},[i("div",{staticClass:"pl-10 pr-11 pt-5 pb-5 text-white open-btn",class:"buy"==s.direction?" bg-green":"bg-red"},[t._v(" "+t._s("buy"==s.direction?t.$t("开多"):t.$t("开空"))+" ")]),i("div",{staticClass:"ml-22 font-31 font-600"},[i("span",{staticClass:"textColor"},[t._v(t._s(s.name)+" "+t._s(t.$t("交割")))]),i("span",{staticClass:"text-grey font-28 font-400 ml-17 mr-17"},[t._v(t._s(t.$t("全仓"))+" "+t._s(s.lever_rate)+"x")])]),"buy"==s.direction?i("img",{staticClass:"w-32 h-32",attrs:{src:e(33861),alt:""}}):i("img",{staticClass:"w-32 h-32",attrs:{src:e(64517),alt:""}})])])]),i("div",{staticClass:"flex justify-between"},[i("div",{staticClass:"fexl-1"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("购买价"))+"(USDT)")]),i("div",{staticClass:"mt-20 textColor"},[t._v(t._s(s.open_price))])]),i("div",[i("div",{staticClass:"text-grey text-right"},[t._v(t._s(t.$t("现价")))]),i("div",{staticClass:"mt-20 text-right",class:s.close_price>s.open_price?"text-green":"text-red"},[t._v(" "+t._s(s.close_price))])])]),i("div",{staticClass:"flex pt-40 pb-40"},[i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("方向")))]),i("div",{staticClass:"mt-20",class:"buy"===s.direction?"text-green":"text-red"},[t._v(t._s("buy"===s.direction?t.$t("开多"):t.$t("开空")))])]),i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey text-center"},[t._v(t._s(t.$t("数量")))]),i("div",{staticClass:"mt-20 text-center textColor"},[t._v(t._s(s.volume))])]),i("div",{staticClass:"flex-1 flex flex-col items-end"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("盈亏")))]),i("div",{staticClass:"mt-20",class:s.profit/1>0?"text-green":"text-red"},[t._v(" "+t._s(s.profit/1>0?"+"+s.profit:s.profit)+" ")])])]),i("div",{staticClass:"flex pb-32"},[i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("剩余时间")))]),i("div",{staticClass:"mt-20 textColor"},[t._v(t._s(t.fomatTime(s.remain_time)))])]),i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey  text-center"},[t._v(t._s(t.$t("交割时间")))]),i("div",{staticClass:"mt-20  text-center textColor"},[t._v(t._s(s.time_num+s.time_unit))])]),i("div",{staticClass:"flex-1"},[i("div",{staticClass:"text-grey text-right"},[t._v(t._s(t.$t("操作")))]),i("div",{staticClass:"mt-20 colorMain text-right",on:{click:function(e){return t.goDetail(s)}}},[t._v(t._s(t.$t("详情")))])])]),i("div",{staticClass:"w-full h-1 bgDark"})])})),t.listData.length||"perpetualContract"!=t.$route.name?t._e():i("div",{staticClass:"text-grey text-center py-300"},[t._v(t._s(t.$t("您目前没有持仓")))]),i("van-popup",{model:{value:t.show,callback:function(s){t.show=s},expression:"show"}},[i("popup-delivery",{key:t.detailData.order_no,attrs:{showBtns:!0,price:t.price,detailData:t.detailData},on:{close:t.onClose}})],1)],2)},a=[],l=(e(93093),e(75187)),r=e(31022),o=e(93068),c=e(94348),n={name:"deliveryHoldList",data(){return{show:!1,iconShow:!1,detailData:{}}},components:{[l.A.name]:l.A,PopupDelivery:r.A},props:{listData:{type:Array,default(){return[]}},price:{type:[Number,String],default:"0.00"}},methods:{clearTimeout(){clearTimeout(this.timeout),this.timeout=null},handleTimeEnd(t){(0,o.ob)(t).then((s=>{this.clearTimeout(),this.detailData=s,"created"!==s.state&&(this.timeout=setTimeout((()=>{this.handleTimeEnd(t)}),1e3))}))},fomatTime(t){let s=t.split(":"),e=Math.floor(s[0]/24),i=s[0]%24>=10?s[0]%24:"0"+s[0]%24;c.log(i);let a=s[1]>=10?s[1]:"0"+s[1],l=s[2]>=10?s[2]:"0"+s[2];return e>=1?e+this.$t("天")+" "+i+":"+a+":"+l:i+":"+a+":"+l},changeIcon(){this.iconShow=!this.iconShow},goDetail(t){this.detailData=t,this.show=!0},onClose(){this.show=!1}}},A=n,d=e(81656),v=(0,d.A)(A,i,a,!1,null,"50d2067f",null),C=v.exports},37886:function(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAACXBIWXMAACE3AAAhNwEzWJ96AAAAvElEQVRIie3UsQ3CMBCF4T8ormEDMkKYADaADUjrJjOwAYqLpIUNGMEbkGzAHHFDQTrA6KJESJZPcnXSfbJ9ekld9QWQMXOlQAFs54YWcwMRitD/oNTT64CbcF4GHKXQQZfqIVEa41bADlhLoLYxrpVAvG70hvyClkwYTT7oClyE83LgLIWsLpWVKMMffaykrnpLSOnte7qNLpVo6xrjcuAuhU4j1jv/1vBB++FMUuGFaoQiFDCUAtKYGVVPLTUiQ9f2hBEAAAAASUVORK5CYII="},33861:function(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAEOSURBVHgB7ZdBSsNAFIb/9xw8R07QM0TEAwTcW1EX8QoiBsS1C+mqqLlAia5FmiOUnmCO4AHiTFPoCzPTQrdZvG+R8D/ezHybgXk0+X3xSFifP1CYZx/NkjzysEYOZ+Vd0Q4980VFzE9RD1CXN8W15Ld5k58wlslxljECVEJQCUElBJUQVEJQCUElBJUQVEJQCWEUEsZ71Mea/D++mWHDmvP4CzMRr7ZP/GgdcRvmzsAal/Qg3kdRRgNNfp6rtLi+eIxqs/fFFA5ZWOOO67IsrOTtsMtwebQ5+dX97eWX5NfPJjvt3DTq6W+HQTJJ76hiVb4ijqdyGLT91w5SvcChqbz/DRKmQ0b7541jKt8AVuFF8QU9ykYAAAAASUVORK5CYII="},64517:function(t){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACEAAAAgCAYAAACcuBHKAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAELSURBVHgB7ZcxTsNAEEX/DCsKuISPYpr0lihBBAGFuUR8AwqUKgIsQRsZ2jTxEXKEPQINVGaXTTHW7oKU1sW8wtYffduvsbRD37NLj4yTzSvFefncbcmjjGfkcFbfVf3YWa0bYl4kHaCtb6pryY+rrjxibLPPWcYEUAlBJQSVEFRCUAlBJQSVEFRCUAlBJYRJSJhwlG8PlfwPPphh45nz+IwzEe/2R/zkOeI+zoOBNS7rIH2PokwG+ppdNPnwdPOWzJZP6zkcinjGA7d1XVnJ+2WX4crk5eR397fn75IfXrrieHDzpBP+DkOgBf7SJIn4ijjdymHQh6sdpYLAf1t5uI0SZkCRdzCVrfwXuHBE8eSHlwUAAAAASUVORK5CYII="}}]);