zzzz
2024-04-15 136d5835ef62ecfb9932526c5f48a434988b1be7
1
"use strict";(self["webpackChunkexchange"]=self["webpackChunkexchange"]||[]).push([[4658],{3717:function(t,e,s){s.d(e,{A:function(){return c}});var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"assetsHead"}},[s("van-nav-bar",{attrs:{border:!1,title:t.title,"left-arrow":t.showLeft},on:{"click-left":t.onClickLeft},scopedSlots:t._u([{key:"right",fn:function(){return[t._t("default")]},proxy:!0}],null,!0)})],1)},a=[],l=(s(44114),{name:"assets-head",props:{title:{type:String,default:""},goHome:{type:Boolean,default:!1},goAssetsCenter:{type:Boolean,default:!1},goPerpetualContract:{type:Boolean,default:!1},showLeft:{type:Boolean,default:!0},backFunc:{type:Function},clickFunc:{type:Function}},methods:{onClickLeft(){this.goHome?this.$router.push("/"):this.goAssetsCenter?this.$router.push("/assetsCenter/assets"):this.goPerpetualContract?this.$router.go(-2):this.backFunc?this.backFunc():this.clickFunc?this.clickFunc():this.$router.go(-1)}}}),r=l,d=s(81656),o=(0,d.A)(r,i,a,!1,null,"77f40d14",null),c=o.exports},11922:function(t,e,s){s.r(e),s.d(e,{default:function(){return v}});var i=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"orderDetail"},[s("assets-head",{attrs:{title:t.$t("订单详情")}}),s("div",{staticClass:"pl-32 pr-32 pt-54 pb-58 textColor"},[s("div",{staticClass:"text-center"},[t._v(t._s(t.$t("盈亏金额")))]),s("div",{staticClass:"text-center mt-44 font-56",class:{"text-green":t.detail.profit/1>0,"text-red":t.detail.profit/1<0}},[t._v(t._s(t.detail.profit/1>0?"+"+t.detail.profit:t.detail.profit)+" ("+t._s(t.detail.change_ratio)+" %)")]),s("div",{staticClass:"flex justify-between pb-68 mt-90"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("操作")))]),s("div",{staticClass:"font-600"},[t._v(" "+t._s(t.handleWord(t.detail.direction,t.detail.state,t.detail.price_type))+" "+t._s(t.detail.name?t.detail.name:"--"))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("状态")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.state?t.handleText(t.detail.state):"--"))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("开仓金额")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.amount_open))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("可平金额")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.amount_open))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("保证金")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.deposit))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("手续费")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.fee))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("建仓成本")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.trade_avg_price))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("平仓价格")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.close_avg_price))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("止盈")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.stop_price_profit))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("止损")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.stop_price_loss))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("订单号")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.order_no))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("开仓时间")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.create_time))])]),s("div",{staticClass:"flex justify-between pb-68"},[s("div",{staticClass:"text-grey"},[t._v(t._s(t.$t("平仓时间")))]),s("div",{staticClass:"textColor"},[t._v(t._s(t.detail.close_time))])])])],1)},a=[],l=s(93068),r=s(3717),d={name:"orderDetail",data(){return{detail:{},timer:null}},components:{assetsHead:r.A},created(){let t=this.$route.query.order_no;this.timer=setInterval((()=>{this.fetchDetail(t)}),1e3)},methods:{handleText(t){let e="";return e="created"==t?this.$t("已平仓"):this.$t("持仓"),e},handleWord(t,e,s){let i="",a="";return i="limit"===s?this.$t("限价"):this.$t("市价"),a="buy"===t&&"submitted"===e?this.$t("开多"):"sell"===t&&"submitted"===e?this.$t("开空"):"buy"===t&&"created"===e?this.$t("平多"):this.$t("平空"),i+"/"+a},onClickLeft(){this.$router.go(-1)},fetchDetail(t){(0,l.Ug)(t).then((t=>{this.detail=t}))},clearTimer(){clearInterval(this.timer),this.timer=null}},beforeDestroy(){this.clearTimer()}},o=d,c=s(81656),n=(0,c.A)(o,i,a,!1,null,"34c77db8",null),v=n.exports}}]);