text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-home-market","pages-market-market"],{"0130":function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{class:["vh100",{dark:"dark"==t.theme}]},[0==t.current?i("v-uni-view",{},[i("homePart",{attrs:{lod:t.lod}})],1):t._e(),1==t.current?i("v-uni-view",{},[i("marketPart")],1):t._e()],1)},a=[];i.d(e,"a",function(){return s}),i.d(e,"b",function(){return a})},2547:function(t,e,i){var s=i("8392");"string"===typeof s&&(s=[[t.i,s,""]]),s.locals&&(t.exports=s.locals);var a=i("4f06").default;a("baba69fe",s,!0,{sourceMap:!1,shadowMode:!1})},"2cd4":function(t,e,i){"use strict";i.r(e);var s=i("0130"),a=i("f5bd");for(var n in a)"default"!==n&&function(t){i.d(e,t,function(){return a[t]})}(n);var r=i("2877"),c=Object(r["a"])(a["default"],s["a"],s["b"],!1,null,"718cd3fc",null);e["default"]=c.exports},"3f21":function(t,e,i){"use strict";var s=i("288e");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=s(i("cebc")),n=i("2f62"),r=s(i("51e3")),c=s(i("4749")),l={components:{homePart:r.default,marketPart:c.default},data:function(){return{current:1,lod:0}},computed:(0,a.default)({},(0,n.mapState)({theme:function(t){return t.theme}})),filters:{},onLoad:function(){},onShow:function(){this.$utils.setTheme(this.theme),this.lod=this.lod+1,"dark"==this.theme?uni.setTabBarStyle({color:"#a2a6a5",selectedColor:"#1881d2",backgroundColor:"#16263e",borderStyle:"black"}):uni.setTabBarStyle({color:"#8b97a0",selectedColor:"#238ee1",backgroundColor:"#ffffff",borderStyle:"black"})},methods:{change:function(t){this.current!=t&&(this.current=t)}}};e.default=l},4749:function(t,e,i){"use strict";i.r(e);var s=i("ae26"),a=i("9f3c");for(var n in a)"default"!==n&&function(t){i.d(e,t,function(){return a[t]})}(n);i("8bc4");var r=i("2877"),c=Object(r["a"])(a["default"],s["a"],s["b"],!1,null,"184f0926",null);e["default"]=c.exports},"61ab":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("7f7f"),i("55dd"),i("c5f6");var s={data:function(){return{isActive:0,marketLists:[],fiat_convert_cny:6.8,legal_name:"",isfilter1:0,isfilter2:0,isfilter3:0}},filters:{toFixed2:function(t){return t=Number(t),t.toFixed(2)},toFixed3:function(t){return t=Number(t),t.toFixed(3)},toFixed4:function(t){return t=Number(t),t.toFixed(4)}},onLoad:function(){this.changeFooter()},mounted:function(){var t=this;this.getList(),this.$socket.listenFun([{event:"sub",params:"daymarket"}],function(e){e=JSON.parse(e);if(-1!=t.isActive){if(e.legal_name==t.legal_name){console.log(t.marketLists[t.isActive].quotation);var i=t.marketLists[t.isActive].quotation;for(var s in i)i[s].currency_name==e.currency_name&&(i[s].volume=e.volume-0,i[s].now_price=e.now_price-0,i[s].change=e.change)}}else{console.log(e,t.isActive);i=t.marketLists;for(var s in i){var a=i[s].quotation;for(var n in a)a[n].currency_name==e.currency_name&&a[n].legal_name==e.legal_name&&(a[n].volume=e.volume-0,a[n].now_price=e.now_price-0,a[n].change=e.change)}}})},onHide:function(){this.$socket.closeSocket()},onPullDownRefresh:function(){this.getList()},methods:{changeFooter:function(){uni.setTabBarItem({index:0,text:this.$t("market.home")}),uni.setTabBarItem({index:1,text:this.$t("market.market")}),uni.setTabBarItem({index:2,text:this.$t("trade.bibi")}),uni.setTabBarItem({index:3,text:this.$t("assets.lever")}),uni.setTabBarItem({index:4,text:this.$t("assets.assets")})},filterList:function(t,e){this.marketLists[this.isActive].quotation.sort(function(i,s){return"currency_name"==t?1==e?i[t].charCodeAt(0)-s[t].charCodeAt(0):s[t].charCodeAt(0)-i[t].charCodeAt(0):1==e?i[t]-s[t]:s[t]-i[t]})},tapFilters:function(t,e){console.log(t,e),1==t&&(this.isfilter2=0,this.isfilter3=0,this.isfilter1=1==this.isfilter1?2:1,this.filterList(e,this.isfilter1)),2==t&&(this.isfilter1=0,this.isfilter3=0,this.isfilter2=1==this.isfilter2?2:1,this.filterList(e,this.isfilter2)),3==t&&(this.isfilter2=0,this.isfilter1=0,this.isfilter3=1==this.isfilter3?2:1,this.filterList(e,this.isfilter3))},getList:function(){var t=this;this.$utils.initDataToken({url:"currency/quotation_new"},function(e){uni.stopPullDownRefresh(),t.marketLists=e,e.length>0&&(t.legal_name=e[0].name)})},getCollectList:function(){this.$utils.initDataToken({url:"user/zixuan_list"},function(t){uni.stopPullDownRefresh()})},changeTab:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";this.isfilter3=0,this.isfilter2=0,this.isfilter1=0,-1==t?(this.isActive=t,this.getList()):(this.isActive=t,this.legal_name=e)}}};e.default=s},8392:function(t,e,i){e=t.exports=i("2350")(!1),e.push([t.i,"uni-page-body[data-v-184f0926]{background:#fff}.bgHeader uni-view[data-v-184f0926]{border:%?1?% solid #e5e5e5;padding:%?15?% %?40?%}.bgHeader uni-view[data-v-184f0926]:nth-of-type(2){border-left:0}.bgHeader uni-view[data-v-184f0926]:nth-of-type(3){border-left:0}.blue_active[data-v-184f0926]{background-color:#007aff;color:#fff;border:none}body.?%PAGE?%[data-v-184f0926]{background:#fff}",""])},"8bc4":function(t,e,i){"use strict";var s=i("2547"),a=i.n(s);a.a},"9f3c":function(t,e,i){"use strict";i.r(e);var s=i("61ab"),a=i.n(s);for(var n in s)"default"!==n&&function(t){i.d(e,t,function(){return s[t]})}(n);e["default"]=a.a},ae26:function(t,e,i){"use strict";var s=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{},[i("v-uni-view",{staticClass:"bgHeader pb10 pb5  flex alcenter bdb1f pt50 around",staticStyle:{"padding-top":"20upx","justify-content":"center"}},[i("v-uni-view",{staticClass:"pt10 pb5 ft16 bold  posRelt",class:{blue_active:-1==t.isActive},on:{click:function(e){e=t.$handleEvent(e),t.changeTab(-1)}}},[-1==t.isActive?i("v-uni-image",{staticClass:"myline",attrs:{src:"/static/line_blue.png"}}):t._e(),t._v(t._s(t.$t("market.myadd")))],1),t._l(t.marketLists,function(e,s){return i("v-uni-view",{key:s,staticClass:"pt10 pb5 ft16 bold  posRelt",class:{blue_active:t.isActive==s},on:{click:function(i){i=t.$handleEvent(i),t.changeTab(s,e.name)}}},[t.isActive==s?i("v-uni-image",{staticClass:"myline",attrs:{src:"/static/line_blue.png"}}):t._e(),t._v(t._s(e.name))],1)})],2),i("v-uni-view",{staticClass:"plr10 "},[i("v-uni-view",{staticClass:"flex alcenter ft12 blue3 pt10"},[i("v-uni-view",{staticClass:"flex alcenter",staticStyle:{flex:"1.5"}},[i("v-uni-view",{staticClass:"flex alcenter",on:{click:function(e){e=t.$handleEvent(e),t.tapFilters(1,"currency_name")}}},[i("v-uni-text",{staticClass:"pr5"},[t._v(t._s(t.$t("home.name")))]),t.isActive>=0?i("v-uni-view",{},[0==t.isfilter1?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown0.png"}}):1==t.isfilter1?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown1.png"}}):i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown2.png"}})],1):t._e()],1)],1),i("v-uni-view",{staticClass:"flex1 flex alcenter"},[i("v-uni-view",{staticClass:"flex alcenter",on:{click:function(e){e=t.$handleEvent(e),t.tapFilters(2,"now_price")}}},[i("v-uni-text",{staticClass:"pr5"},[t._v(t._s(t.$t("home.new_price")))]),t.isActive>=0?i("v-uni-view",{},[0==t.isfilter2?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown0.png"}}):1==t.isfilter2?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown1.png"}}):i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown2.png"}})],1):t._e()],1)],1),i("v-uni-view",{staticClass:"wt70 flex alcenter jsend"},[i("v-uni-view",{staticClass:"flex alcenter",on:{click:function(e){e=t.$handleEvent(e),t.tapFilters(3,"change")}}},[i("v-uni-text",{staticClass:"pr5"},[t._v(t._s(t.$t("home.fu")))]),t.isActive>=0?i("v-uni-view",{},[0==t.isfilter3?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown0.png"}}):1==t.isfilter3?i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown1.png"}}):i("v-uni-image",{staticClass:"wt8 h10",attrs:{src:"../../static/image/updown2.png"}})],1):t._e()],1)],1)],1),-1==t.isActive?t._l(t.marketLists,function(e,s){return i("v-uni-view",{},t._l(e.quotation,function(s,a){return 1==s.is_display&&1==s.optional_status?i("v-uni-navigator",{key:a,staticClass:"mb10 flex alcenter bdb1f ptb10",attrs:{url:"/pages/market/kline?legal_id="+s.legal_id+"&currency_id="+s.currency_id+"&symbol="+s.currency_name+"/"+s.legal_name+"&collected="+s.optional_status}},[i("v-uni-view",{staticStyle:{flex:"1.5"}},[i("v-uni-view",[i("v-uni-text",{staticClass:"ft14 bold"},[t._v(t._s(s.currency_name))]),i("v-uni-text",{staticClass:"ft12 blue pl5"},[t._v("/"+t._s(s.legal_name))])],1),i("v-uni-view",{staticClass:"gray9 blue pt5 ft12"},[t._v("24H量 "+t._s(t._f("toFixed4")(s.volume)))])],1),i("v-uni-view",{staticClass:"flex1"},[i("v-uni-view",{},[i("v-uni-text",{staticClass:"ft14 bold"},[t._v(t._s(s.now_price))]),i("v-uni-view",{staticClass:"pt5 ft12 blue"},[t._v("￥"+t._s(Math.floor(s.now_price*e.fiat_convert_cny*100)/100))])],1)],1),i("v-uni-view",{staticClass:"wt70"},[i("v-uni-view",{staticClass:"tc h30 lh30 white wt70 radius2",class:["-"==s.change.substr(0,1)?"bgRed":"bgGreen"]},[t._v(t._s("-"==s.change.substr(0,1)?"":"+")+t._s(t._f("toFixed2")(s.change-0))+"%")])],1)],1):t._e()}),1)}):t._l(t.marketLists[t.isActive].quotation,function(e,s){return t.marketLists[t.isActive]?i("v-uni-navigator",{directives:[{name:"show",rawName:"v-show",value:t.marketLists&&t.marketLists[t.isActive],expression:"marketLists&&marketLists[isActive]"}],key:s,staticClass:"mb10 flex alcenter bdb1f ptb10",attrs:{url:"/pages/market/kline?legal_id="+e.legal_id+"&currency_id="+e.currency_id+"&symbol="+e.currency_name+"/"+e.legal_name+"&collected="+e.optional_status}},[i("v-uni-view",{staticStyle:{flex:"1.5"}},[i("v-uni-view",[i("v-uni-text",{staticClass:"ft14 bold"},[t._v(t._s(e.currency_name))]),i("v-uni-text",{staticClass:"ft12 blue pl5"},[t._v("/"+t._s(e.legal_name))])],1),i("v-uni-view",{staticClass:"gray9 blue pt5 ft12"},[t._v("24H量 "+t._s(t._f("toFixed4")(e.volume)))])],1),i("v-uni-view",{staticClass:"flex1"},[i("v-uni-view",{},[i("v-uni-text",{staticClass:"ft14 bold"},[t._v(t._s(e.now_price))]),i("v-uni-view",{staticClass:"pt5 ft12 blue"},[t._v("￥"+t._s(Math.floor(e.now_price*t.marketLists[t.isActive].fiat_convert_cny*100)/100))])],1)],1),i("v-uni-view",{staticClass:"wt70"},[i("v-uni-view",{staticClass:"tc h30 lh30 white wt70 radius2",class:["-"==e.change.substr(0,1)?"bgRed":"bgGreen"]},[t._v(t._s("-"==e.change.substr(0,1)?"":"+")+t._s(t._f("toFixed2")(e.change-0))+"%")])],1)],1):t._e()})],2)],1)},a=[];i.d(e,"a",function(){return s}),i.d(e,"b",function(){return a})},f5bd:function(t,e,i){"use strict";i.r(e);var s=i("3f21"),a=i.n(s);for(var n in s)"default"!==n&&function(t){i.d(e,t,function(){return s[t]})}(n);e["default"]=a.a}}]);