text: (window.webpackJsonp=window.webpackJsonp||[]).push([[36],{1272:function(i,l,a){var s=a(1336);s.__esModule&&(s=s.default),typeof s=="string"&&(s=[[i.i,s,""]]),s.locals&&(i.exports=s.locals);var _=a(2).default,v=_("0a5b81f4",s,!0,{sourceMap:!1})},1335:function(i,l,a){"use strict";var s=a(1272),_=a.n(s)},1336:function(i,l,a){var s=a(1),_=s(!1);_.push([i.i,".buy-premium-data-container{height:100vh;padding:1.5rem .5rem 0;position:relative}.buy-premium-data-container h1,.buy-premium-data-container h2,.buy-premium-data-container h3,.buy-premium-data-container h4,.buy-premium-data-container h5,.buy-premium-data-container p,.buy-premium-data-container span{color:#f4f7fc}.buy-premium-data-container .all-pre{display:flex;align:middle;justify:center;font-size:1rem;position:absolute;right:0}.buy-premium-data-container .all-pre span{margin-right:.5rem;display:inline-block}.buy-premium-data-container .selection .el-row{margin-bottom:2rem}.buy-premium-data-container .el-input{margin-top:2rem;width:100%;margin-bottom:1rem;border:none}.buy-premium-data-container .el-input input{text-align:center;border:none;border-bottom:1px solid #95a5a6;padding:1.5rem 0 2rem;border-radius:0;background:#fff;color:#fff;font-size:3rem;background:transparent}.buy-premium-data-container .el-input input:focus,.buy-premium-data-container .el-input input:hover{border-color:#1abc9c}.buy-premium-data-container .el-input input:focus:disabled,.buy-premium-data-container .el-input input:hover:disabled{background:transparent}.buy-premium-data-container .round-margin{margin:.3rem}.buy-premium-data-container .dashboard-link,.buy-premium-data-container .switch-service{position:fixed;bottom:.5rem;z-index:999}.buy-premium-data-container .dashboard-link{right:.5rem}.buy-premium-data-container hr{margin-top:1rem;margin-bottom:1rem}.buy-premium-data-container hr.short{margin-left:5rem;margin-right:5rem}",""]),i.exports=_},1482:function(i,l,a){"use strict";a.r(l);var s=function(){var e=this,r=e.$createElement,t=e._self._c||r;return t("div",{staticClass:"buy-premium-data-container"},[e.buyServiceResult?e._e():t("div",{staticClass:"selection"},[t("el-row",[t("h3",[e._v(e._s(e.$t("buy_premium_data.input_title")))]),t("el-input",{attrs:{type:"number",disabled:e.all_pre},model:{value:e.gbToBuy,callback:function(n){e.gbToBuy=e._n(n)},expression:"gbToBuy"}}),t("el-tooltip",{staticClass:"item",attrs:{effect:"light",content:e.$t("buy_premium_data.all_pre_condition"),placement:"top"}},[t("p",{staticClass:"all-pre"},[t("span",[e._v(e._s(e.$t("buy_premium_data.all_pre_hint")))]),t("el-switch",{model:{value:e.all_pre,callback:function(n){e.all_pre=n},expression:"all_pre"}})],1)])],1),t("el-row",[t("el-button",{staticClass:"cal-fee full-width",attrs:{disabled:e.gbToBuy<=0,type:"success",loading:e.confirming},on:{click:function(n){return e.confirmPrice(!1)}}},[e._v(e._s(e.$t("billing.purchase")))])],1),t("el-row",[t("h5",[e._v("1. "+e._s(e.$t("buy_premium_data.explains.a")))]),t("h5",[e._v("2. "+e._s(e.$t("buy_premium_data.explains.b")))]),t("h5",[e._v("3. "+e._s(e.$t("buy_premium_data.explains.c")))]),t("h5",[e._v("4. "+e._s(e.$t("buy_premium_data.explains.d")))]),t("el-table",{staticStyle:{width:"100%"},attrs:{data:e.tableData,fit:!0}},[t("el-table-column",{attrs:{prop:"a",label:""}}),t("el-table-column",{attrs:{prop:"b",label:e.$t("plan_names.2")}}),t("el-table-column",{attrs:{prop:"c",label:e.$t("plan_names.4")}})],1),t("br"),t("h4",{staticClass:"right warning"},[e._v(e._s(e.$t("buy_premium_data.all_pre_condition")))])],1)],1),e.buyServiceResult?t("div",{staticClass:"payment"},[t("Payment")],1):e._e(),e.buyServiceResult?e._e():t("nuxt-link",{staticClass:"dashboard-link smooth",attrs:{to:"/dashboard/"}},[e._v(e._s(e.$t("back")))])],1)},_=[],v=a(63),C=a(38),B=a(26),E=a(22),T=a(39),S=a(107),R=a(9),w=a(206),g=a(18),h=a(52),j=a(1196),O=void 0;function f(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),t.push.apply(t,n)}return t}function x(e){for(var r=1;r<arguments.length;r++){var t=arguments[r]!=null?arguments[r]:{};r%2?f(Object(t),!0).forEach(function(n){Object(g.a)(e,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):f(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}return e}var $={components:{Payment:j.default},middleware:["load-rt-data","authenticated"],data:function(){return console.log("this:",O),{confirmed_extend_info:{fee:0},gbToBuy:10,confirming:!1,all_pre:!1,confirmedInfo:null,currency:"rmb"}},computed:x({tableData:function(){return[{a:this.$t("buy_premium_data.price_table.a"),b:this.$t("buy_premium_data.price_table.b"),c:this.$t("buy_premium_data.price_table.c")}]}},Object(h.b)(["buyServiceResult"])),beforeMount:function(){this.$store.dispatch("setConfirmedInfo",{}),this.$store.dispatch("setBuyServiceResult",!1)},mounted:function(){console.log("buy-premium-data...")},methods:{confirmPrice:function(){var r=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;if(!(this.gbToBuy<=0)){this.confirming=!0;var n=this,u={plan_id:"pre",buy_length:Number(this.gbToBuy),promocode:null,dry_run:t,all_pre:this.all_pre};console.log("opt:",u),this.$store.dispatch("confirmPrice",u).then(function(o){console.log("confirmPrice-->:",o),n.$message({type:"success",message:"\u64CD\u4F5C\u6210\u529F\uFF01\u60A8\u5DF2\u8D2D\u4E70 ".concat(r.gbToBuy,"GB \u9AD8\u7EA7\u6D41\u91CF")})}).catch(function(o){var d,m,c,p;console.log("confirm failed:",o);var y="\u62B1\u6B49\uFF0C\u670D\u52A1\u5668\u5F00\u5C0F\u5DEE\u4E86\uFF0C\u8BF7\u7A0D\u540E\u518D\u8BD5..."+((o==null||(d=o.data)===null||d===void 0?void 0:d.message)||o);((m=o.data)===null||m===void 0?void 0:m.message)==="not valid"&&(y="\u60A8\u5DF2\u83B7\u5F97\u65E0\u9650\u9AD8\u7EA7\u6D41\u91CF\uFF0C\u65E0\u9700\u8D2D\u4E70"),(c=o.data)!==null&&c!==void 0&&(p=c.message)!==null&&p!==void 0&&p.startsWith("moneyNotEnough")?(o.data.selected_plan_id="pre",o.data.fee=o.data.eur_amount,console.log(Number(r.gbToBuy)),o.data.auto_buy_month=Number(r.gbToBuy),o.data.buy_length=Number(r.gbToBuy),console.log(o.data),r.$store.dispatch("setConfirmedInfo",o.data),r.$store.dispatch("setBuyServiceResult",!0),n.confirmed_extend_info=o.data,n.confirmedInfo=o.data):n.$message({type:"error",message:y})}).finally(function(){n.confirming=!1})}}}},P=$,M=a(1335),D=a(51),b=Object(D.a)(P,s,_,!1,null,null,null),A=l.default=b.exports;installComponents(b,{Payment:a(1196).default})}}]);
  