(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-8942d932"],{"365d":function(e,t,a){"use strict";var r=a("1da1"),n=a("d4ec"),i=a("bee2"),s=a("ade3"),c=a("5530"),o=(a("96cf"),a("d3b7"),a("25f0"),a("99af"),a("8bbf")),u=a.n(o),l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("transition",{attrs:{name:"recaptcha-fade"}},[a("div",{directives:[{name:"show",rawName:"v-show",value:e.visible,expression:"visible"}],staticClass:"recaptcha-modal-mask",on:{click:e.handleCancel}},[a("div",{ref:"recaptcha",staticClass:"recaptcha-modal",on:{click:function(e){e.stopPropagation()}}})])])},d=[],p={inheritAttrs:!1,data:function(){return{visible:!1,grecaptchaId:null,site_key:"",resolve:null,reject:null}},watch:{visible:function(e){e&&this.reset()}},mounted:function(){var e=this;window.grecaptcha.ready((function(){e.grecaptchaId=window.grecaptcha.render(e.$refs.recaptcha,{sitekey:e.site_key||"",callback:function(){var t=Object(r["a"])(regeneratorRuntime.mark((function t(a){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:e.resolve&&e.resolve({gorecaptcha_v_2_code:a}),e.visible=!1;case 2:case"end":return t.stop()}}),t)})));function a(e){return t.apply(this,arguments)}return a}(),"expired-callback":function(){e.resolve&&e.resolve({err:"expired"}),e.visible=!1},"error-callback":function(){e.resolve&&e.resolve({err:"error"}),e.visible=!1}})}))},methods:{reset:function(){null!==this.grecaptchaId&&window.grecaptcha.reset(this.grecaptchaId)},handleCancel:function(){this.visible=!1,this.resolve&&this.resolve({err:"cancel"})}}},_=p,m=a("2877"),f=Object(m["a"])(_,l,d,!1,null,null,null),h=f.exports,b=(a("6e98"),u.a.extend(h));function v(e){var t=new b({data:Object(c["a"])({},e)}).$mount();return document.body.appendChild(t.$el),t.visible=!0,t}var g={NONE:0,GEETEST:1,GOOGLEV2:2,GOOGLEV3:3},y=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(n["a"])(this,e),Object(s["a"])(this,"_site_key",""),Object(s["a"])(this,"_captcha_type",null),Object(s["a"])(this,"_lang","zh-CN"),Object(s["a"])(this,"_id",Math.random().toString().substring(2,10)),Object(s["a"])(this,"status",0),Object(s["a"])(this,"_v2_modal",null),Object(s["a"])(this,"_config",{url:"/api/m/n/captcha/type"}),this._config=Object(c["a"])(Object(c["a"])({},this._config),t)}return Object(i["a"])(e,[{key:"_init",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,fetch(this._config.url).then((function(e){return e.json()}));case 2:if(t=e.sent,t){e.next=5;break}return e.abrupt("return",this.status=2);case 5:this._captcha_type=t.captcha_type||0,e.t0=this._captcha_type,e.next=e.t0===g.GEETEST?9:e.t0===g.GOOGLEV2?10:e.t0===g.GOOGLEV3?21:32;break;case 9:return e.abrupt("break",33);case 10:return this._site_key=t.gorecaptcha_v_2_site_key||"",e.prev=11,e.next=14,this._loadRecaptchaScript();case 14:this.status=1,e.next=20;break;case 17:e.prev=17,e.t1=e["catch"](11),this.status=2;case 20:return e.abrupt("break",33);case 21:return this._site_key=t.gorecaptcha_v_3_site_key||"",e.prev=22,e.next=25,this._loadRecaptchaScript();case 25:this.status=1,e.next=31;break;case 28:e.prev=28,e.t2=e["catch"](22),this.status=2;case 31:return e.abrupt("break",33);case 32:return e.abrupt("return");case 33:case"end":return e.stop()}}),e,this,[[11,17],[22,28]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"_loadRecaptchaScript",value:function(){var e=this,t="recaptcha-script-id-".concat(this._captcha_type,"-").concat(this._lang),a=this._captcha_type===g.GOOGLEV3?this._site_key:"explicit";return new Promise((function(r,n){if(window.vueRecaptchaApiLoaded=r,document.getElementById(t))r();else{var i=document.createElement("script");i.id=t,i.src="https://recaptcha.net/recaptcha/api.js?onload=vueRecaptchaApiLoaded&render=".concat(a,"&hl=").concat(e._lang),i.async=!0,i.defer=!0,i.onerror=n,document.head.appendChild(i)}}))}},{key:"verify",value:function(){var e=Object(r["a"])(regeneratorRuntime.mark((function e(){var t=this;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(1===this.status){e.next=3;break}return e.next=3,this._init();case 3:return e.abrupt("return",new Promise((function(e){switch(t._captcha_type){case g.GOOGLEV2:t._v2_modal?(t._v2_modal.resolve=e,t._v2_modal.visible=!0):t._v2_modal=v({site_key:t._site_key,resolve:e});break;case g.GOOGLEV3:window.grecaptcha.ready(Object(r["a"])(regeneratorRuntime.mark((function a(){var r;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,window.grecaptcha.execute(t._site_key,{action:"click"});case 2:r=a.sent,e({gorecaptcha_v_3_code:r});case 4:case"end":return a.stop()}}),a)}))));break;default:e({})}})));case 4:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}]),e}(),w=y;new w({url:"/api/w/n/captcha/type"}),t["a"]=new w({url:"/api/r/n/captcha/type"})},"5ed7":function(e,t,a){"use strict";var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[a("order-steps"),a("div",{staticClass:"layout_main"},[a("el-row",{attrs:{gutter:e.$store.getters["client/lgAndUp"]?24:0,type:e.$store.getters["client/lgAndUp"]?"flex":"",justify:"finish"===e.step?"center":"start"}},[a("el-col",{attrs:{lg:17,md:24,sm:24,xs:24}},[e.hideTabs?e._e():a("CartTabs"),e._t("default")],2),"finish"!==e.step?a("el-col",{staticClass:"mt_20_md_down",attrs:{lg:7,md:24,sm:24,xs:24}},[a("el-card",{staticClass:"summary not_border",attrs:{shadow:"never"}},[a("h2",{staticClass:"title"},[e._v(e._s(e.$t("title.order_summary")))]),a("div",{staticClass:"flex"},[a("span",[e._v(e._s(e.$t(["","label.order_reg_count","label.order_renew_count","label.order_tran_count","label.order_redeem_count"][e.orderType])))]),a("b",{staticClass:"right"},[e._v(e._s(e.count)+" "+e._s(e.$t("unit.ge"))+" ")])]),a("hr"),"payment"===e.step?[a("div",{staticClass:"flex mb_10"},[a("h2",{staticClass:"title"},[e._v(e._s(e.$t("label.pay_amount")))]),a("div",{staticClass:"right"},[a("div",{staticClass:"amount"},[a("use-rate",{attrs:{currency:e.currency,value:e.$math.evaluate(e.total+"+"+(e.fee||0))}})],1)])]),a("div",{staticClass:"flex"},[a("span",[e._v(e._s(e.$t("title.order_total")))]),a("div",{staticClass:"right"},[a("span",{staticClass:"right"},[a("use-rate",{attrs:{currency:e.currency,value:e.total}})],1)])]),e.fee&&Number(e.fee)?a("div",{staticClass:"flex"},[a("span",[e._v(e._s(e.$t("label.pay_fee")))]),a("div",{staticClass:"right"},[a("span",{staticClass:"right"},[a("use-rate",{attrs:{currency:e.currency,value:e.fee}})],1)])]):e._e()]:a("div",{staticClass:"flex"},[a("h2",{staticClass:"title"},[e._v(e._s(e.$t("title.order_total")))]),a("div",{staticClass:"right"},[a("div",{staticClass:"amount"},[a("use-rate",{attrs:{currency:e.currency,value:e.total}})],1)])]),a("div",{staticClass:"btn_group"},[!1!==e.loginState?a("el-button",{staticClass:"size_big full_width",attrs:{type:"primary",loading:e.confirmLoading,disabled:!e.count},on:{click:function(t){return e.$emit("confirm")}}},[e._v(e._s(e.confirmText))]):a("el-button",{staticClass:"size_big full_width",attrs:{type:"primary"},on:{click:e.goLogin}},[e._v(e._s(e.$t("btn.login")))]),a("el-button",{staticClass:"border_bold size_big full_width",on:{click:e.cancel}},[e._v(e._s(e.cancelText)+" ")])],1)],2)],1):e._e()],1)],1)],1)},n=[],i=(a("a9e3"),a("caad"),a("ac1f"),a("5319"),a("b0c0"),function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"order_steps"},[a("div",{staticClass:"step",class:{ok:e.active>1,active:1===e.active}},[e.active>1?a("i",[a("iconfont",{attrs:{icon:"dagou2"}})],1):a("i",[e._v("1")]),3===e.orderType?a("span",[e._v(e._s(e.$t("title.order_tranin")))]):a("span",[e._v(e._s(e.$t("title.order_confirm")))])]),a("div",{staticClass:"step",class:{ok:e.active>2,active:2===e.active}},[e.active>2?a("i",[a("iconfont",{attrs:{icon:"dagou2"}})],1):a("i",[e._v("2")]),e._v(e._s(e.$t("title.order_pay"))+" ")]),a("div",{staticClass:"step",class:{ok:e.active>3,active:3===e.active}},[e.active>3?a("i",[a("iconfont",{attrs:{icon:"dagou2"}})],1):a("i",[e._v("3")]),e._v(e._s(e.$t("title.order_finish"))+" ")])])}),s=[],c={data:function(){return{}},computed:{active:function(){switch(this.$route.name){case"orderPayment":return 2;case"orderFinish":return 3;case"orderUncertain":return 3;default:return 1}},orderType:function(){return Number(this.$route.query.type||"1")}}},o=c,u=(a("9516"),a("2877")),l=Object(u["a"])(o,i,s,!1,null,"628c80f7",null),d=l.exports,p=a("c14e"),_=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-card",{staticClass:"not_border not_header_border",attrs:{shadow:"never","body-style":{padding:0}}},[a("el-tabs",{staticClass:"shopcart-tabs",on:{"tab-click":e.tabClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:e.$t("options.fin_type_reg")+" ("+e.count+")",name:e.TABS_ENUM.registrar}}),a("el-tab-pane",{attrs:{label:e.$t("options.fin_type_renew")+" ("+e.renewList.length+")",name:e.TABS_ENUM.renew}}),a("el-tab-pane",{attrs:{label:e.$t("options.fin_type_tranin")+" ("+e.transferList.length+")",name:e.TABS_ENUM.transfer}})],1)],1)},m=[],f=a("5530"),h=a("5880"),b={registrar:"orderConfirm",renew:"orderRenew",transfer:"orderTranin"},v={data:function(){return{TABS_ENUM:b,activeName:this.$route.name||b.registrar}},computed:Object(f["a"])(Object(f["a"])({},Object(h["mapGetters"])("shopcar",["count"])),Object(h["mapState"])("shopcarOther",["renewList","transferList"])),methods:{tabClick:function(e){var t=e.name;this.$router.replace({name:t})}}},g=v,y=(a("ae1d"),Object(u["a"])(g,_,m,!1,null,"467eebd4",null)),w=y.exports,k=a("d3a4"),x={props:{total:{type:Number,default:0},count:{type:Number,default:0},fee:{type:Number,default:0},currency:String,confirmText:{type:String,default:k["a"].t("btn.order_submit")},confirmLoading:Boolean,cancelText:{type:String,default:k["a"].t("btn.back")},hideTabs:Boolean,step:{type:String,default:"confirm",validator:function(e){return["confirm","payment","finish"].includes(e)}}},components:{orderSteps:d,CartTabs:w},data:function(){return{}},methods:{goLogin:p["b"],cancel:function(){if(history.length>1&&"confirm"!==this.step)this.$router.back();else{var e=["Register","dnManageBatchtaskRenew","dnTransferIn","dnManageBatchtaskRedeem"];this.$router.replace({name:e[this.orderType-1]})}this.$emit("cancel")}},computed:{loginState:function(){return p["i"].isLogined},orderType:function(){var e=this.$route.name;return"orderRenew"===e?2:"orderTranin"===e?3:"orderRedeem"===e?4:Number(this.$route.query.type||"1")}}},$=x,C=(a("f90b"),Object(u["a"])($,r,n,!1,null,"fdb5ea08",null));t["a"]=C.exports},"6e98":function(e,t,a){},"8a4a":function(e,t,a){},"8a53":function(e,t,a){"use strict";a("8a4a")},9516:function(e,t,a){"use strict";a("de1f")},"9cf3":function(e,t,a){"use strict";a.r(t);var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("CartLayout",{attrs:{total:e.total,count:e.dataList.length,currency:e.used.code,hideTabs:"",confirmLoading:e.confirmLoading},on:{confirm:e.orderSubmit}},[a("el-card",{staticClass:"not_border not_header_border",attrs:{shadow:"never"}},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("span",[e._v(e._s(e.$t("title.redeem_domain")))])]),a("custom-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"table_dninfo is_special",attrs:{value:e.dataList,pagination:{response:!1}}},[a("el-table-column",{attrs:{prop:"domain","min-width":"200",label:e.$t("label.domain")},scopedSlots:e._u([{key:"default",fn:function(e){return[a("str-split",{attrs:{type:"domain",value:e.row.domain}})]}}])}),a("el-table-column",{attrs:{width:"200",label:e.$t("label.total_price")},scopedSlots:e._u([{key:"default",fn:function(t){var r=t.row;return[r.price&&r.is_avail?a("use-rate",{staticClass:"text_primary_dark_2 bold",attrs:{value:r.price}}):a("span",{staticClass:"text_black_light_3"},[e._v(e._s(e.$t("options.disable")))])]}}])}),e.dataList.length>1?a("el-table-column",{attrs:{width:"60",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",{staticClass:"delbtn",on:{click:function(a){return e.del(t.row.domain)}}},[a("iconfont",{attrs:{icon:"shanchu"}})],1)]}}],null,!1,2502607691)}):e._e()],1)],1),a("el-card",{staticClass:"not_border",attrs:{shadow:"never"}},[a("div",{attrs:{slot:"header"},slot:"header"},[e._v(e._s(e.$t("label.agreement")))]),a("CustomAgreement",{staticClass:"mt_20",attrs:{agreements:"domain_renew"},model:{value:e.agree,callback:function(t){e.agree=t},expression:"agree"}})],1)],1)},n=[],i=a("1da1"),s=a("5530"),c=(a("96cf"),a("159b"),a("a9e3"),a("a15b"),a("4de4"),a("d81d"),a("ac1f"),a("1276"),a("99af"),a("d3b7"),a("5880")),o=a("bbbd"),u=a("5ed7"),l=a("365d"),d={components:{CartLayout:u["a"]},data:function(){return{batYear:-1,dataList:[],loading:!0,YEARS:o["Q"],agree:!1,confirmLoading:!1}},computed:Object(s["a"])(Object(s["a"])(Object(s["a"])({},Object(c["mapState"])("lowdb",["lowdb"])),Object(c["mapGetters"])("currency",["used","usedSettleCode"])),{},{total:function(){var e=[];return this.dataList.forEach((function(t){t.is_avail&&t.price&&e.push(t.price)})),Number(this.$math.evaluate(e.join("+")))}}),methods:{del:function(e){this.dataList=this.dataList.filter((function(t){return t.domain!==e})),this.lowdb.set("redeem_domain",this.dataList.map((function(e){return e.domain}))).write()},orderSubmit:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r,n,i,c,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!e.submitLock){t.next=2;break}return t.abrupt("return");case 2:if(e.submitLock=!0,setTimeout((function(){return e.submitLock=!1}),1e3),!(e.total<=0)){t.next=6;break}return t.abrupt("return",e.$message.error(e.$t("err.not_domain_redeem_avail")));case 6:if(e.agree){t.next=8;break}return t.abrupt("return",e.$message.error(e.$t("err.readagreement")));case 8:return t.next=10,e.selectCurrency();case 10:if(a=t.sent,a){t.next=13;break}return t.abrupt("return");case 13:return e.confirmLoading=!0,t.next=16,e.makeData(a);case 16:if(r=t.sent,n=r.data,i=r.total_amount,n.length&&i){t.next=22;break}return e.confirmLoading=!1,t.abrupt("return",e.$message.error(e.$t("err.not_domain_renew_avail")));case 22:if(n.length){t.next=24;break}return t.abrupt("return",e.$message.error(e.$t("err.not_domain_redeem_avail")));case 24:return e.confirmLoading=!0,t.next=27,l["a"].verify();case 27:return c=t.sent,t.next=30,e.$api.order.generate(Object(s["a"])(Object(s["a"])({},c),{},{order_type:4,data:n,total_amount:i,property_coin_type:a}));case 30:if(o=t.sent,e.confirmLoading=!1,!o.err){t.next=34;break}return t.abrupt("return",o.showError());case 34:e.$router.push({name:"orderPayment",query:{type:"4"},params:{data:o.data,total_amount:o.total_amount,main_order_uuid:o.main_order_uuid,property_coin_type:o.property_coin_type}});case 35:case"end":return t.stop()}}),t)})))()},getRenewDomain:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){var a,r;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.$route.params.domain,a?(Array.isArray(a)||(a=a.split(",")),a=a.filter((function(e){return!!e})),a.length&&e.lowdb.set("redeem_domain",a).write()):a=e.lowdb.get("redeem_domain").value()||[],e.loading=!0,t.next=5,e.$api.domain.price({domain_list:a,property_coin_type:e.used.settleCode});case 5:if(r=t.sent,e.loading=!1,!r.err){t.next=9;break}return t.abrupt("return",r.showError());case 9:a=r.data||[],a=a.map((function(e){return{domain:e.domain,is_avail:e.is_avail,year:1,price:e.actual_sell_price_redemption,is_can_redemption:e.is_can_redemption}})),e.dataList=a||[],e.confirmLoading=!1;case 13:case"end":return t.stop()}}),t)})))()},makeData:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var r,n,i,s;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(r=0,n=[],i=t.dataList.filter((function(e){return e.is_avail})).map((function(e){return{price:e.price,year:e.year,domain:e.domain}})),e===t.used.settleCode){a.next=11;break}return a.next=6,t.$api.domain.price({domain_list:i.map((function(e){return e.domain})),property_coin_type:e});case 6:if(s=a.sent,!s.err){a.next=10;break}return s.showError(),a.abrupt("return",{total_amount:r,data:n});case 10:s.data.forEach((function(e,t){i[t].price=e.actual_sell_price_redemption}));case 11:return i.forEach((function(e){var a=t.$math.evaluate("".concat(e.price," * ").concat(e.year));r=t.$math.evaluate("".concat(r,"+").concat(a)),n.push({product_content:e.domain,sell_amount:a,year:e.year})})),a.abrupt("return",{total_amount:r,data:n});case 13:case"end":return a.stop()}}),a)})))()},getDnInfo:function(e){var t=this;return Object(i["a"])(regeneratorRuntime.mark((function a(){var r,n;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.$api.dnManage.list({domains:e});case 2:if(r=a.sent,!r.err){a.next=6;break}return r.showError(),a.abrupt("return",{});case 6:return n={},r.data.forEach((function(e){n[e.domain]=e})),a.abrupt("return",n);case 9:case"end":return a.stop()}}),a)})))()},selectCurrency:function(){var e=this;return Object(i["a"])(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.$customDialog.selectCurrency({callback:function(){var e=Object(i["a"])(regeneratorRuntime.mark((function e(a,r){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if("confirm"===a){e.next=2;break}return e.abrupt("return",t(0));case 2:t(r);case 3:case"end":return e.stop()}}),e)})));function a(t,a){return e.apply(this,arguments)}return a}()})})));case 1:case"end":return t.stop()}}),t)})))()},culeNewExpire:function(e){if(!e)return"";var t=e.expire_date;return e.year||(e.year=1),t=new Date(Number(t+"000")),t=t.setFullYear(t.getFullYear()+e.year),t}},mounted:function(){var e=this;this.$store.commit("lowdb/WAIT",(function(){e.getRenewDomain()}))}},p=d,_=(a("8a53"),a("2877")),m=Object(_["a"])(p,r,n,!1,null,"30e76c11",null);t["default"]=m.exports},ae1d:function(e,t,a){"use strict";a("faa5")},de1f:function(e,t,a){},f90b:function(e,t,a){"use strict";a("fa21")},fa21:function(e,t,a){},faa5:function(e,t,a){}}]);