(window.webpackJsonp=window.webpackJsonp||[]).push([[48],{640:function(t,e,s){t.exports={}},788:function(t,e,s){"use strict";s(640)},936:function(t,e,s){"use strict";s.r(e);var r=s(4),n=s.n(r);r={data:function(){return{unUseCount:0,currentPage:"",shopAuditStatus:null,shopId:0,isSetPassword:null,query:{status:0},navList:[{title:this.$t("userCenter.myOrders"),status:0,key:"",linkTo:"order"},{title:this.$t("userCenter.unPaidOrders"),status:1,linkTo:"order"},{title:this.$t("userCenter.processingOrders"),status:2,linkTo:"order"},{title:this.$t("userCenter.shippedOrders"),status:3,linkTo:"order"},{title:this.$t("userCenter.toBeInstalled"),status:8,linkTo:"order"},{title:this.$t("userCenter.completedOrders"),status:5,linkTo:"order"},{title:this.$t("userCenter.reviewOrders"),status:null,linkTo:"comments"},{title:this.$t("userCenter.returnOrders"),status:null,linkTo:"return"}]}},computed:{message:function(){return this.$store.state.websocket.messageValue}},watch:{$route:function(t,e){this.query=this.$route.query,"/user-center/uc-integral"===t.path&&(this.currentPage="integral")}},created:function(){this.query=this.$route.query},mounted:function(){n.a.get("token")&&(this.getCouponCount(),this.getUserCenterInfo()),this.currentPage=this.$route.query.currentPage||this.$route.path.substring(this.$route.path.lastIndexOf("-")+1)},updated:function(){this.currentPage=this.$route.query.currentPage||this.$route.path.substring(this.$route.path.lastIndexOf("-")+1)},methods:{toChat:function(){this.$store.commit("websocket/changeMessage",0);var t=this.$router.resolve({path:"/chat?shopId=1&chatType=1"});window.open(t.href,"view_window")},switchPage:function(t,e){"order"===t?this.$router.push({path:"/user-center/uc-"+t,query:e}):"coupons-center"==t?this.$router.push({path:"/coupons"}):"member-center"==t?this.$router.push({path:"/member-center/member-center"}):"comments"==t?this.$router.push({path:"/user-center/uc-comments"}):"balance"==t?this.$router.push({path:"/user-center/uc-balance"}):"myshop"==t?1==this.shopAuditStatus?this.$router.push({path:"/shopIndex?sid=".concat(this.shopId)}):this.$message({type:"warning",message:0==this.shopAuditStatus?this.$i18n.t("userCenter.storeProgress"):-1==this.shopAuditStatus?this.$i18n.t("userCenter.theAuditNotPass"):this.$i18n.t("userCenter.theStoreOffline")}):"shopaccount"==t?this.$router.push({path:"/user-center/uc-shopaccount",query:{isSetPassword:this.isSetPassword}}):"freeshop"==t?this.$router.push({path:"/user-center/uc-freeshop",query:{shopAuditStatus:this.shopAuditStatus}}):"cart"==t?this.$router.push({path:"/cart"}):this.$router.push({path:"/user-center/uc-"+t}),this.currentPage=t},getUserCenterInfo:function(){var t=this;this.$axios.get("/p/user/centerInfo",{}).then((function(e){e=e.data,t.isSetPassword=e.isSetPassword,t.orderCountData=e.orderCountData,t.shopAuditStatus=e.shopAuditStatus,t.shopId=e.shopId}))},getCouponCount:function(){var t=this;this.$axios.get("/p/myCoupon/getMyCouponsStatusCount",{}).then((function(e){e=e.data,t.unUseCount=e.unUseCount}))}}},s(788),s=s(6),s=Object(s.a)(r,(function(){var s=this,t=s._self._c;return t("div",{staticClass:"user-center"},[t("div",{staticClass:"main-content content flex-box"},[t("div",{class:["side-nav","en"==s.$store.state.locale?"side-nav-en":"side-nav-zh"]},[t("div",{staticClass:"item"},[t("div",{staticClass:"tit"},[s._v("\n          "+s._s(s.$t("userCenter.orderManagement"))+"\n        ")]),s._v(" "),s._l(s.navList,(function(e,r){return t("div",{key:"left-nav"+r},[t("a",{class:["item-a","order"==e.linkTo&&+s.query.status==e.status?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage(e.linkTo,{status:e.status})}}},[s._v(s._s(e.title))])])}))],2),s._v(" "),t("div",{staticClass:"item"},[t("div",{staticClass:"tit"},[s._v("\n          "+s._s(s.$t("userCenter.assetCenter"))+"\n        ")]),s._v(" "),t("a",{class:["item-a","coupons"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("coupons")}}},[s._v(s._s(s.$t("userCenter.myCoupons")))]),s._v(" "),t("a",{class:["item-a","vehicles"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("vehicles")}}},[s._v(s._s(s.$t("userCenter.myVehicles")))])]),s._v(" "),t("div",{staticClass:"item"},[t("div",{staticClass:"tit"},[s._v("\n          "+s._s(s.$t("userCenter.accountManagement"))+"\n        ")]),s._v(" "),t("a",{class:["item-a","cart"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("cart")}}},[s._v(s._s(s.$t("userCenter.accountCart")))]),s._v(" "),t("a",{class:["item-a","account"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("account")}}},[s._v(s._s(s.$t("userCenter.accountInformation")))]),s._v(" "),t("a",{class:["item-a","address"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("address")}}},[s._v(s._s(s.$t("userCenter.receivingAddress")))]),s._v(" "),t("a",{class:["item-a","footprint"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("footprint")}}},[s._v(s._s(s.$t("history.history")))]),s._v(" "),t("a",{class:["item-a","password"==s.currentPage?"active":""],attrs:{href:"javascript:void(0)"},on:{click:function(t){return s.switchPage("password")}}},[s._v(s._s(s.$t("userCenter.changePassword")))])])]),s._v(" "),t("nuxt-child",{on:{userCenterInfo:function(t){return s.getUserCenterInfo()}}})],1)])}),[],!1,null,"4de8bd22",null);e.default=s.exports}}]);