<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-480056f4"],{"0049":function(e,t,a){"use strict";(function(e){var s=a("1da1"),i=a("5530"),n=(a("96cf"),a("d81d"),a("7db0"),a("a9e3"),a("b680"),a("2f62")),r=a("ed08"),o=a("933b"),c=a("aff8");t["a"]={mixins:[c["b"]],filters:{dateTimeFormat:o["dateTimeFormat"]},data:function(){return{platform:r["c"],walletCoins:[],isLoading:!1,submiting:!1,expandedBalance:0,receivedBalance:0,expandedCoin:null,receivedCoin:null,recordList:[],listLoading:!1,amount:"",formData:{expendCoin:"",expendAmount:0,receivedCoin:"",receivedAmount:0}}},computed:Object(i["a"])({},Object(n["c"])(["coinList","walletList"])),methods:Object(i["a"])(Object(i["a"])({},Object(n["b"])({getMarketCoinList:"market/getCoinList",getWalletList:"wallet/getWalletList"})),{},{changePage:function(e){this.setPage(e),this.getRecord(e)},getCoinList:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.getWalletList().then((function(t){e.walletCoins=e.walletList.map((function(e){var t=e.coinId;return{value:t,label:t,balance:e.balance}})),console.log(e.walletCoins)}));case 1:case"end":return t.stop()}}),t)})))()},changeFrom:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function a(){var s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t.expandedCoin=t.getMarketCoin(e),t.formData.expendCoin=e,console.log(t.expandedCoin),t.amount="",!t.checkSame()){a.next=7;break}return t.formData.expendCoin="",a.abrupt("return");case 7:return a.next=9,t.api.wallet.getWallet(e);case 9:s=a.sent,0==s.code&amp;&amp;(t.expandedBalance=s.data.balance,console.log(s.data));case 11:case"end":return a.stop()}}),a)})))()},changeTo:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function a(){var s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(t.receivedCoin=t.getMarketCoin(e),t.formData.receivedCoin=e,console.log(t.receivedCoin),t.amount="",!t.checkSame()){a.next=7;break}return t.formData.receivedCoin="",a.abrupt("return");case 7:if(t.expandedBalance){a.next=11;break}return t.$message.error(t.$t("flashEx.noBala")),t.formData.receivedCoin="",a.abrupt("return");case 11:return a.next=13,t.api.wallet.getWallet(e);case 13:s=a.sent,0==s.code&amp;&amp;(t.receivedBalance=s.data.balance,console.log(s.data));case 15:case"end":return a.stop()}}),a)})))()},getMarketCoin:function(t){if("USDT"!=t){var a=e.find(this.coinList,{coin:t.toUpperCase()});return a}return{coin:"USDT",close:1}},checkSame:function(){return this.formData.expendCoin==this.formData.receivedCoin&amp;&amp;(this.$message.error(this.$t("flashEx.cannotSame")),!0)},updateAmount:function(e){var t=e.target?e.target.value:e,a=Number(t||"0"),s=this.expandedCoin?this.expandedCoin.close:1,i=this.receivedCoin?this.receivedCoin.close:1;this.formData.expendAmount=a,this.formData.receivedAmount=(a*s/i).toFixed(4)},useAll:function(){var e=this.expandedBalance;this.amount=e+"",this.updateAmount(this.amount)},flashExchange:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,s,i,n,r,o,c;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(a=Number(e.amount||"0"),s=e.formData,i=s.expendCoin,n=s.expendAmount,r=s.receivedCoin,o=s.receivedAmount,a){t.next=5;break}return e.$message.error(e.$t("flashEx.inputAmount")),t.abrupt("return");case 5:return e.submiting=!0,console.log(e.formData),t.prev=7,t.next=10,e.api.wallet.flashExchange({expendCoin:i.toLowerCase(),expendAmount:n,receivedCoin:r.toLowerCase(),receivedAmount:o});case 10:c=t.sent,e.submiting=!1,0==c.code&amp;&amp;(e.$message.success(e.$t("flashEx.exSuccess")),e.reload()),t.next=18;break;case 15:t.prev=15,t.t0=t["catch"](7),e.submiting=!1;case 18:case"end":return t.stop()}}),t,null,[[7,15]])})))()},reload:function(){this.amount="",this.formData={expendCoin:"",expendAmount:0,receivedCoin:"",receivedAmount:0},this.expandedBalance=0,this.receivedBalance=0,this.getWalletList()},getRecord:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function a(){var s,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return s={total:0,size:10,current:e||0,params:{}},t.listLoading=!0,a.prev=2,a.next=5,t.api.wallet.getExRecord(s);case 5:i=a.sent,t.listLoading=!1,console.log(i),0==i.code&amp;&amp;(t.recordList=i.data.records),a.next=14;break;case 11:a.prev=11,a.t0=a["catch"](2),t.listLoading=!1;case 14:case"end":return a.stop()}}),a,null,[[2,11]])})))()}}),created:function(){this.getCoinList(),this.getMarketCoinList(),this.getRecord()}}}).call(this,a("2ef0"))},"67eb":function(e,t,a){"use strict";a.r(t);var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("detail-layout",{attrs:{title:e.$t("uc.finance.record.quickExchange")}},[a("div",{staticClass:" lg:px-10 text-white lg:bg-card lg:p-4 lg:rounded-lg"},[a("div",{staticClass:"lg:mx-auto lg:w-2/3"},[a("el-form",[a("div",{staticClass:"p-4 card bg-card bg-opacity-50 text-white border-none lg:border lg:border-gray-600"},[a("div",{staticClass:"text-sm mb-2 font-bold"},[e._v(" "+e._s(e.$t("flashEx.consume"))+" ")]),a("div",{},[a("el-form-item",{class:"darker-form-item"},[a("el-select",{staticClass:"w-full form-input",attrs:{placeholder:e.$t("common.pleaseselect"),filterable:""},on:{change:e.changeFrom},model:{value:e.formData.expendCoin,callback:function(t){e.$set(e.formData,"expendCoin",t)},expression:"formData.expendCoin"}},[a("div",{staticStyle:{color:"#c0c4cc","text-align":"center","line-height":"50px"},attrs:{slot:"empty"},slot:"empty"},[e._v(" "+e._s(e.$t("common.noData"))+" ")]),e._l(e.walletCoins,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}))],2)],1)],1),a("div",{staticClass:"mt-2 text-sm"},[a("div",{staticClass:"flex items-center py-1.5 "},[a("div",{staticClass:"flex-1",class:" text-gray-400 "},[e._v(" "+e._s(e.$t("flashEx.transBala"))+"("+e._s(e.formData.expendCoin.toUpperCase()||"--")+"): ")]),a("div",{class:" text-gray-400 "},[e._v(e._s(e.expandedBalance))])]),a("div",{staticClass:"flex items-center py-1.5 "},[a("div",{staticClass:"flex-1",class:" text-gray-400 "},[e._v(" "+e._s(e.$t("flashEx.consBala"))+" ")]),a("div",{staticClass:"text-down font-bold"},[e._v(" "+e._s(e.formData.expendAmount||0)+" ")])])])]),a("div",{staticClass:"card p-4 mt-4 bg-card bg-opacity-50 text-white border-none lg:border lg:border-gray-600"},[a("div",{staticClass:"text-sm mb-2 font-bold"},[e._v(e._s(e.$t("flashEx.recive")))]),a("div",{},[a("el-form-item",{class:"darker-form-item"},[a("el-select",{staticClass:"w-full form-input",attrs:{placeholder:e.$t("common.pleaseselect"),filterable:""},on:{change:e.changeTo},model:{value:e.formData.receivedCoin,callback:function(t){e.$set(e.formData,"receivedCoin",t)},expression:"formData.receivedCoin"}},[a("div",{staticStyle:{color:"#c0c4cc","text-align":"center","line-height":"50px"},attrs:{slot:"empty"},slot:"empty"},[e._v(" "+e._s(e.$t("common.noData"))+" ")]),e._l(e.walletCoins,(function(e,t){return a("el-option",{key:t,attrs:{label:e.label,value:e.value}})}))],2)],1)],1),a("div",{staticClass:"mt-2 text-sm"},[a("div",{staticClass:"flex items-center py-1.5 "},[a("div",{staticClass:"flex-1",class:" text-gray-400 "},[e._v(" "+e._s(e.$t("flashEx.transBala"))+"("+e._s(e.formData.receivedCoin.toUpperCase()||"--")+"): ")]),a("div",{class:" text-gray-400 "},[e._v(e._s(e.receivedBalance))])]),a("div",{staticClass:"flex items-center py-1.5 "},[a("div",{staticClass:"flex-1",class:" text-gray-400 "},[e._v(" "+e._s(e.$t("flashEx.reciveBala"))+" ")]),a("div",{staticClass:"text-up font-bold"},[e._v(" "+e._s(e.formData.receivedAmount||0)+" ")])])])]),a("div",{staticClass:"text-sm mb-2 mt-4 font-bold text-white"},[e._v(" "+e._s(e.$t("flashEx.exAmount"))+" ")]),a("div",{staticClass:"relative"},[a("el-form-item",{class:"darker-form-item"},[a("el-input",{attrs:{placeholder:e.$t("flashEx.inputAmount"),oninput:"value = value.replace(/[^\\d.]/g, '')"},on:{input:e.updateAmount},model:{value:e.amount,callback:function(t){e.amount=t},expression:"amount"}}),a("span",{staticClass:"right-center right-2 text-secondary px-2 text-sm",on:{click:e.useAll}},[e._v(" "+e._s(e.$t("flashEx.all"))+" ")])],1)],1),a("div",{staticClass:"pt-8"},[a("button",{staticClass:"btn bg-primary  py-3 text-base w-full",attrs:{disabled:e.submiting},on:{click:e.flashExchange}},[e._v(" "+e._s(e.$t("flashEx.confirmEx"))+" ")])])])],1)]),a("div",{staticClass:"py-4 mt-3 text-xl font-bold"},[e._v(" "+e._s(e.$t("uc.promotion.subtitle2"))+" ")]),a("div",{staticClass:"card lg:p-4 mt-4 hidden lg:block"},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticClass:"table-wrap "},[a("div",{staticClass:"lg:grid grid-cols-5 text-gray-400 p-4 text-right text-sm"},[a("div",{staticClass:"text-left"},[e._v(e._s(e.$t("common.time")))]),a("div",[e._v(e._s(e.$t("flashEx.consume")))]),a("div",[e._v(e._s(e.$t("flashEx.recive")))]),a("div",[e._v(e._s(e.$t("flashEx.receivedPrice")))]),a("div",{},[e._v(e._s(e.$t("flashEx.expendPrice")))])]),e.recordList.length?a("div",e._l(e.recordList,(function(t,s){return a("div",{key:s,staticClass:"table-item grid-cols-5 text-right text-sm text-gray-200",class:s%2==0?"bg-bgcolor bg-opacity-50":""},[a("div",{staticClass:"flex text-left"},[e._v(" "+e._s(e._f("dateTimeFormat")(t.createTime))+" ")]),a("div",{},[a("span",{staticClass:"text-red-500"},[e._v(e._s(t.expendAmount))]),e._v(" "+e._s(t.expendCoin.toUpperCase())+" ")]),a("div",{},[a("span",{staticClass:"text-green-500"},[e._v(e._s(t.receivedAmount))]),e._v(" "+e._s(t.receivedCoin.toUpperCase())+" ")]),a("div",{},[e._v(e._s(t.receivedPrice))]),a("div",{},[e._v(e._s(t.expendPrice))])])})),0):a("t-empty"),e.recordList.length?a("t-pager",{attrs:{size:e.page.pageSize,total:e.page.total},on:{change:e.changePage}}):e._e()],1)]),a("div",{staticClass:"block lg:hidden"},[e.recordList.length?a("div",{staticClass:" "},e._l(e.recordList,(function(t,s){return a("div",{key:s,staticClass:"px-4 py-2 card rounded-lg mb-3 ",class:e.platform().mobile?"bg-card text-white border border-dark border-opacity-10":" text-white"},[a("div",{staticClass:"flex py-2"},[a("div",{staticClass:"flex-1 text-sm text-gray-300"},[e._v(" "+e._s(e.$t("common.time"))+" ")]),a("div",{staticClass:"ml-4 text-sm"},[e._v(" "+e._s(e._f("dateTimeFormat")(t.createTime))+" ")])]),a("div",{staticClass:"flex py-2"},[a("div",{staticClass:"flex-1 text-sm text-gray-300"},[e._v(" "+e._s(e.$t("flashEx.consume"))+" ")]),a("div",{staticClass:"ml-4 text-sm"},[a("span",{staticClass:"text-red-500"},[e._v(e._s(t.expendAmount))]),e._v(" "+e._s(t.expendCoin.toUpperCase())+" ")])]),a("div",{staticClass:"flex py-2"},[a("div",{staticClass:"flex-1 text-sm text-gray-300"},[e._v(" "+e._s(e.$t("flashEx.recive"))+" ")]),a("div",{staticClass:"ml-4 text-sm"},[a("span",{staticClass:"text-green-500"},[e._v(e._s(t.receivedAmount))]),e._v(" "+e._s(t.receivedCoin.toUpperCase())+" ")])]),a("div",{staticClass:"flex py-2"},[a("div",{staticClass:"flex-1 text-sm text-gray-300"},[e._v(" "+e._s(e.$t("flashEx.receivedPrice"))+" ")]),a("div",{staticClass:"ml-4 text-sm"},[e._v(e._s(t.receivedPrice))])]),a("div",{staticClass:"flex py-2"},[a("div",{staticClass:"flex-1 text-sm text-gray-400"},[e._v(" "+e._s(e.$t("flashEx.expendPrice"))+" ")]),a("div",{staticClass:"ml-4 text-sm"},[e._v(e._s(t.expendPrice))])])])})),0):a("t-empty"),e.recordList.length?a("t-pager",{attrs:{size:e.page.pageSize,total:e.page.total},on:{change:e.changePage}}):e._e()],1)])},i=[],n=a("0049"),r=n["a"],o=a("0c7c"),c=Object(o["a"])(r,s,i,!1,null,null,null);t["default"]=c.exports},aff8:function(e,t,a){"use strict";a.d(t,"b",(function(){return r})),a.d(t,"a",(function(){return o}));var s=a("1da1"),i=a("5530"),n=(a("96cf"),a("2f62")),r={data:function(){return{page:{pageNo:1,pageSize:15,total:0}}},methods:{setPage:function(e){this.page.pageNo=e,console.log(this.page.pageNo)}}},o={data:function(){return{countryList:[],codeLoading:!1,countryLoading:!1}},computed:Object(i["a"])({},Object(n["c"])(["canClick","countDownTime"])),methods:Object(i["a"])(Object(i["a"])({},Object(n["d"])({startCountDown:"app/COUNT_DOWN"})),{},{getCountry:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var a,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.countryLoading=!0,t.next=3,e.api.user.getCountry();case 3:a=t.sent,s=a.data,e.countryLoading=!1,e.countryList=s;case 7:case"end":return t.stop()}}),t)})))()}}),created:function(){this.getCountry()}}}}]);</pre></body></html>