(function(t){function e(e){for(var i,a,r=e[0],s=e[1],u=e[2],d=0,l=[];d1)for(var d in u){var l=parseInt(d)+1;l1)for(var f=1;f5}},t._l(t.cartList,(function(e,i){return n("li",{key:i,staticClass:"item"},[n("div",{staticClass:"img-wrap"},[n("img",{attrs:{src:t.$img(e.sku_image,{size:"mid"}),alt:e.sku_name},on:{error:function(e){return t.imageError(i)}}})]),n("div",{staticClass:"goods-name"},[t._v(t._s(e.sku_name))]),n("div",{staticClass:"operation"},[n("p",[t._v("¥"+t._s(e.discount_price)+"x"+t._s(e.num))]),n("span",{on:{click:function(e){return t.deleteCart(i)}}},[t._v("删除")])])])})),0)]),n("div",{staticClass:"total"},[n("span",[t._v(" 共 "),n("strong",[t._v(t._s(t.cartList.length))]),t._v(" 种商品,总金额 "),n("strong",[t._v(t._s(t.cartTotalPrice))]),t._v(" 元 ")]),n("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(e){return t.$router.push("/cart")}}},[t._v("去购物车")])],1)]:n("div",{staticClass:"empty"},[n("i",{staticClass:"iconfont icon-gouwuche"}),n("span",[t._v("您的购物车是空的,赶快去逛逛,挑选商品吧!")])])],2)],1)])],1)],1)},T=[],E=(n("159b"),n("b680"),n("25f0"),n("a434"),n("e6f0")),I=n("3177"),S={props:{},data:function(){return{searchType:"goods",searchTypeText:"商品",keyword:"",hotSearchWords:[],defaultSearchWords:"",cartList:[],cartTotalPrice:0}},components:{},computed:Object(p["a"])({},Object(_["b"])(["cartCount","siteInfo","defaultGoodsImage","member"])),created:function(){this.keyword=this.$route.query.keyword||"","street"==this.$route.name?this.searchType="shop":this.searchType="goods",this.$store.dispatch("site/siteInfo"),this.getHotSearchWords(),this.getDefaultSearchWords(),this.getCartList()},watch:{searchType:function(){this.searchTypeText="goods"==this.searchType?"商品":"店铺"},$route:function(t){this.keyword!==t.query.keyword&&(this.keyword=t.query.keyword),"street"==this.$route.name?this.searchType="shop":this.searchType="goods"},cartCount:function(){this.member&&this.getCartList()},member:function(){this.member||(this.$store.commit("cart/SET_CART_COUNT",0),this.cartList=[],this.cartTotalPrice=0)}},methods:{handleCommand:function(t){this.searchType=t},search:function(){"goods"==this.searchType?this.$router.push({path:"/list",query:{keyword:this.keyword?this.keyword:this.defaultSearchWords}}):this.$router.push({path:"/street",query:{keyword:this.keyword}})},getHotSearchWords:function(){var t=this;Object(E["b"])({}).then((function(e){0==e.code&&e.data.words&&(t.hotSearchWords=e.data.words.split(","))}))},getDefaultSearchWords:function(){var t=this;Object(E["a"])({}).then((function(e){0==e.code&&e.data.words&&(t.defaultSearchWords=e.data.words)}))},getCartList:function(){var t=this;Object(I["b"])({}).then((function(e){e.code>=0&&e.data.length&&(t.cartList=e.data,t.cartTotalPrice=0,t.cartList.forEach((function(e){console.log(e.discount_price,"单价");var n=parseFloat(e.discount_price)*parseInt(e.num);t.cartTotalPrice+=parseFloat(n),console.log(t.cartTotalPrice)})),t.cartTotalPrice=t.cartTotalPrice.toFixed(2))})).catch((function(t){}))},imageError:function(t){this.cartList[t].sku_image=this.defaultGoodsImage},deleteCart:function(t){var e=this;this.$store.dispatch("cart/delete_cart",{cart_id:this.cartList[t].cart_id.toString()}).then((function(n){n.code>=0&&(e.cartList.splice(t,1),e.cartList.forEach((function(t){var n=parseFloat(t.discount_price)*parseFloat(t.num);e.cartTotalPrice+=parseFloat(n)})),console.log(e.cartTotalPrice),e.cartTotalPrice=e.cartTotalPrice.toFixed(2),e.$forceUpdate())})).catch((function(t){}))}}},L=S,A=(n("78c4"),Object(j["a"])(L,w,T,!1,null,"2cbd3942",null)),x=A.exports,R=n("8894"),N=n("37cb"),z={props:{forceExpand:{type:Boolean,default:!1}},computed:Object(p["a"])({},Object(_["b"])(["is_show"])),data:function(){return{isShopHover:!1,isIndex:!1,thisRoute:"",goodsCategoryTree:[],categoryConfig:{},selectedCategory:-1,navList:[],navSelect:"",isHide:!1}},components:{NsHeaderTop:O,NsHeaderMid:x,mapGetters:_["b"]},beforeCreate:function(){},created:function(){this.$store.dispatch("cart/cart_count"),this.getCategoryConfig(),this.nav(),"/"!=this.$route.path&&"/index"!=this.$route.path||(this.isIndex=!0)},watch:{$route:function(t){this.initNav(t.path);localStorage.getItem("isAdList");"/"==this.$route.path||"/index"==this.$route.path?this.isIndex=!0:this.isIndex=!1,"/list"==t.path&&(this.navSelect="")}},methods:{getCategoryConfig:function(){var t=this;Object(R["a"])({}).then((function(e){0==e.code&&e.data&&(t.categoryConfig=e.data,t.getTree(e.data))})).catch((function(e){t.$message.error(e.message)}))},getTree:function(t){var e=this;Object(R["c"])({level:3,template:2}).then((function(t){if(0==t.code&&t.data){e.goodsCategoryTree=t.data||[];for(var n=0;n3&&(e.isHide=!0)}})).catch((function(t){e.$message.error(t.message)}))},nav:function(){var t=this;Object(N["f"])({}).then((function(e){if(0==e.code&&e.data){for(var n in t.navList=e.data,t.navList)t.navList[n]["url"]=JSON.parse(t.navList[n]["nav_url"]).url;t.initNav(t.$route.path)}})).catch((function(e){t.$message.error(e.message)}))},navUrl:function(t,e){t&&(-1==t.indexOf("http")?e?this.$router.pushToTab({path:t}):this.$router.push({path:t}):e?window.open(t):window.location.href=t)},initNav:function(t){for(var e in this.navList)this.navList[e]["url"]!=t||(this.navSelect=t)},shopHover:function(){this.isShopHover=!0},shopLeave:function(){this.isShopHover=!1}}},M=z,D=(n("0dd5"),Object(j["a"])(M,m,h,!1,null,"bf9af77e",null)),P=D.exports,$=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"footer"},[t.linkList.length>0?n("el-tabs",{staticClass:"friendly-link",model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[n("el-tab-pane",{attrs:{label:"友情链接",name:"first"}},[n("div",[t._l(t.linkList,(function(e,i){return n("div",{key:i,staticClass:"link-item",attrs:{title:e.link_title}},[n("span",{on:{click:function(n){return t.linkUrl(e.link_url,e.is_blank)}}},[n("img",{attrs:{src:t.$img(e.link_pic)}})])])})),n("div",{staticClass:"clear"})],2)])],1):t._e(),t.shopServiceList.length>0?n("div",{staticClass:"footer-top"},[n("ul",{staticClass:"service"},t._l(t.shopServiceList,(function(e,i){return n("li",{key:i},[n("div",[e.icon?n("img",{attrs:{src:t.$img(e.icon),alt:""}}):t._e()]),n("p",[t._v(t._s(e.service_name))])])})),0)]):t._e(),n("div",{staticClass:"footer-center"},[t.siteInfo.web_phone||t.siteInfo.web_email?n("div",{staticClass:"left"},[n("div",[t.siteInfo.web_phone?n("p",{staticClass:"left-phone"},[t._v(t._s(t.siteInfo.web_phone))]):t._e(),n("p",{staticClass:"left-email"},[t._v(t._s(t.siteInfo.web_email))])])]):t._e(),t.helpList.length?n("div",{staticClass:"center"},[n("div",{staticClass:"help"},[n("p",[t._v("服务热线")]),n("span",{staticClass:"help-phone"},[t._v(t._s(t.websiteInfo.site_tel))])]),t._l(t.helpList,(function(e,i){return n("div",{key:i,staticClass:"help"},[n("p",{on:{click:function(n){return t.clickToHelp(e.class_id)}}},[t._v(t._s(e.class_name))]),n("ul",{staticClass:"help-ul"},t._l(e.child_list,(function(e,i){return n("block",{key:i},[e.link_address?n("li",{staticClass:"help-li",on:{click:function(n){return t.clickJump(e.link_address)}}},[t._v(t._s(e.title))]):n("li",{staticClass:"help-li",on:{click:function(n){return t.clickToHelpDetail(e.id)}}},[t._v(t._s(e.title))])])})),1)])}))],2):t._e(),n("div",{staticClass:"right"},[t.qrcode?n("el-image",{attrs:{src:t.$img(t.qrcode)},on:{error:t.imageError}},[n("div",{staticClass:"image-slot",attrs:{slot:"error"},slot:"error"},[n("img",{attrs:{src:t.$img("upload/default/default_img/wxewm.png")}})])]):n("el-image",{attrs:{src:t.$img("upload/default/default_img/wxewm.png")}}),n("p",[t._v("微信小程序")])],1)]),n("div",{staticClass:"footer-bot"},[n("copy-right")],1)],1)},F=[],U=(n("9911"),n("fb6a"),function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"footer-bottom"},[i("div",{staticClass:"site-info"},[t.siteInfo.web_phone?i("p",[i("i",{staticClass:"iconfont icondianhua"}),t._v(t._s(t.siteInfo.web_phone))]):t._e(),t.siteInfo.web_email?i("p",[i("i",{staticClass:"iconfont iconyouxiang"}),i("el-link",{attrs:{href:"mailto:"+t.siteInfo.web_email}},[t._v(t._s(t.siteInfo.web_email))])],1):t._e()]),i("p",[t._v(" "+t._s(t.copyRight.copyright_desc)+" "),t.copyRight.icp?i("a",{staticClass:"footer-link",attrs:{href:"https://beian.miit.gov.cn",target:"_blank"}},[t._v("备案号:"+t._s(t.copyRight.icp))]):t._e()]),i("p",[t.copyRight.gov_record?i("a",{staticClass:"footer-link",attrs:{href:t.copyRight.gov_url,target:"_blank"}},[i("img",{attrs:{src:n("618d"),alt:"公安备案"}}),i("span",[t._v(t._s(t.copyRight.gov_record))])]):t._e()])])}),G=[],H=n("ade3"),B=Object(H["a"])({props:{},data:function(){return{}},computed:{},created:function(){this.$store.dispatch("site/copyRight")},mounted:function(){},watch:{},methods:{}},"computed",Object(p["a"])({},Object(_["b"])(["copyRight","siteInfo"]))),W=B,q=(n("8ffa"),Object(j["a"])(W,U,G,!1,null,"7a0b4eb4",null)),K=q.exports,Q=n("5c6b"),X={props:{},data:function(){return{shopServiceList:[],linkList:[],helpList:[],ishide:!1,activeName:"first",qrcode:"",websiteInfo:""}},computed:Object(p["a"])({},Object(_["b"])(["siteInfo"])),created:function(){this.getShopServiceLists(),this.link(),this.getHelpList(),this.getqrcodeimg(),this.getWebSiteInfo()},mounted:function(){},watch:{},methods:{getqrcodeimg:function(){var t=this;Object(N["k"])({}).then((function(e){0==e.code&&e.data&&(t.qrcode=e.data)})).catch((function(e){t.$message.error(e.message)}))},getShopServiceLists:function(){var t=this;Object(N["g"])({}).then((function(e){0==e.code&&e.data&&(t.shopServiceList=e.data)})).catch((function(e){t.shopServiceList=[]}))},link:function(){var t=this;Object(N["d"])({}).then((function(e){0==e.code&&e.data&&(t.linkList=e.data)})).catch((function(e){t.$message.error(e.message)}))},linkUrl:function(t,e){t&&(-1==t.indexOf("http")?e?this.$router.pushToTab({path:t}):this.$router.push({path:t}):e?window.open(t):window.location.href=t)},getHelpList:function(){var t=this;Object(Q["b"])().then((function(e){if(0==e.code&&e.data){var n=[];n=e.data.slice(0,4),console.log(n);for(var i=0;i300},shopServiceOpen:function(){var t=this;Object(N["h"])().then((function(e){0==e.code&&(t.serviceConfig=e.data)}))},toTop:function(){var t=setInterval((function(){var e=document.documentElement.scrollTop||document.body.scrollTop,n=Math.floor(-e/5);document.documentElement.scrollTop=document.body.scrollTop=e+n,this.isTop=!0,0===e&&clearInterval(t)}),20)},showServiceFn:function(){this.logined?0==this.serviceConfig.system&&1==this.serviceConfig.open_pc?window.open(this.serviceConfig.open_url,"_blank"):1==this.serviceConfig.system&&(this.hackReset=!0,this.$refs.servicer.show()):this.$message({message:"您还未登录",type:"warning"})}}},it=nt,at=(n("ac37"),Object(j["a"])(it,Z,tt,!1,null,"66784171",null)),ot=at.exports,ct={name:"Layout",components:{NsHeader:P,NsFooter:V,NsAside:ot},created:function(){this.getAdList()},data:function(){return{loadingAd:!0,adList:[],is_show:!0,indexTopAdNum:0,adv_position:{}}},mounted:function(){},computed:{},watch:{},methods:{getAdList:function(){var t=this;if(this.$store.state.app.indexTopAdNum>=3)return this.loadingAd=!1,void(this.is_show=!1);Object(N["a"])({keyword:"NS_PC_INDEX_TOP"}).then((function(e){t.adList=e.data.adv_list,t.adv_position=e.data.adv_position;for(var n=0;n0){var e=new Date;e.setTime(1e3*t);var n=e.getFullYear(),i=e.getMonth()+1;i=i<10?"0"+i:i;var a=e.getDate();a=a<10?"0"+a:a;var o=e.getHours();o=o<10?"0"+o:o;var c=e.getMinutes(),r=e.getSeconds();return c=c<10?"0"+c:c,r=r<10?"0"+r:r,n+"-"+i+"-"+a+" "+o+":"+c+":"+r}return""},countDown:function(t){var e=0,n=0,i=0,a=0;return t>0&&(e=Math.floor(t/86400),n=Math.floor(t/3600)-24*e,i=Math.floor(t/60)-24*e*60-60*n,a=Math.floor(t)-24*e*60*60-60*n*60-60*i),{d:e,h:n,i:i,s:a}},unique:function(t,e){var n=new Map;return t.filter((function(t){return!n.has(t[e])&&n.set(t[e],1)}))},inArray:function(t,e){return null==e?-1:e.indexOf(t)},getDay:function(t){var e=new Date,n=e.getTime()+864e5*t;e.setTime(n);var i=function(t){var e=t;return 1==t.toString().length&&(e="0"+t),e},a=e.getFullYear(),o=e.getMonth(),c=e.getDate(),r=e.getDay(),s=parseInt(e.getTime()/1e3);o=i(o+1),c=i(c);var u=["周日","周一","周二","周三","周四","周五","周六"];return{t:s,y:a,m:o,d:c,w:u[r]}},copy:function(t,e){var n=document.createElement("input");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("Copy"),n.className="oInput",n.style.display="none",vue.$message({message:"复制成功",type:"success"}),"function"==typeof e&&e()},deepClone:function(t){var e=function(t){return"object"==Object(Pe["a"])(t)};if(!e(t))throw new Error("obj 不是一个对象!");var n=Array.isArray(t),i=n?[]:{};for(var a in t)i[a]=e(t[a])?this.deepClone(t[a]):t[a];return i},filterPrice:function(t){return t.toFixed(2)}},Ue=null,Ge=function(t){Ue&&Ue.close(),Ue=Object(Te["Message"])(t)};["error","success","info","warning"].forEach((function(t){Ge[t]=function(e){return"string"===typeof e&&(e={message:e}),e.type=t,Ge(e)}})),a["default"].use(Ee.a),a["default"].prototype.$message=Ge,a["default"].prototype.$store=ve,a["default"].config.productionTip=!1,a["default"].prototype.$util=Fe,a["default"].prototype.$img=Fe.img,a["default"].prototype.$timeStampTurnTime=Fe.timeStampTurnTime,a["default"].prototype.$copy=Fe.copy,window.util=Fe,window.img=Fe.img,window.timeStampTurnTime=Fe.timeStampTurnTime,window.copy=Fe.copy,a["default"].prototype.$langConfig=s,a["default"].prototype.$lang=s.lang,window.langConfig=s,window.lang=s.lang,a["default"].prototype.$config=$e["a"],a["default"].use(Ae.a),a["default"].use(we["a"]),a["default"].use(Se.a),window.vue=new a["default"]({router:Oe,store:ve,metaInfo:function(){return{meta:[{name:"description",content:ve.getters.siteInfo.seo_description||""},{name:"keywords",content:ve.getters.siteInfo.seo_keywords||""}]}},render:function(t){return t(De)}}).$mount("#app")},"57a2":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"组合套餐"}},5859:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"帮助详情"}},5897:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAADIUlEQVRIibXWXYxdUxQH8N89HZOSvnRS0Sci/VAJgraU0ki8SMVXJaipVNSDJx8dQvVhSKiJ0gpeBA061McDKdo03lRUMGnSEBOdRniSoo0YaSPTqYe1jnvnZO65RnUlJ3vvddb6/8/Za++1VuO5F17SQRq4EtdiKeZiZr47jBF8jo+wG8frwLpq3hW4E+uSZDI5I5+leCjJn8JrGJ8K4dl4B4tbdGMYwj78im7MxnxclFhz8Sruwa344d8QXoX3MCvXBzGA13GozQf2YDUeFn+8GF/iZnzaalhUHK/BriQ7jk2Yg801ZPLdZvGHm9J3Fj5JzEkJz8k/68YR9KIPozVEVRlNn97E6E7MBVXCadiKGSLYt2HbFIiqsi0xxhNza3L8Q7ha84BsxPYTICtlO57O+SJx4hXinq3LFz/hsf+BrJTH8WPOH0GjwDLNe/YsjlacnsQfObaTdjZHxSGSHMsKLE/FGAYnAXtQxOHeGsI6m8HEhuUFLs/FkMmP/jP4E8/XENbZHEpsuKzAvFzsawO2Pr9+fQ1hJ5sSe36hmYh/qQE8USmxZ1YzzUmXQpQYOP0k8pTYhwvsz8UFFaOvRAJuTBH8ZbxY0Z2f4/cF9uRiocj6pcwW2ae1RHWSC3E3VrboekSmgT0FPs5FF1a1GL6d4waZBztIA0/k/N0Wfa9mGdxRiHo1koo+TM/5RnG6rsYbOK2G7FS8ItqQ30VKk1h9OR/B7kLUroFUnon+nB/ECpGybsd3WItzRdk5RVT7+/At7hKXfwV+Tox+nJXzAYw3somahi/EXo/jJs2KcR626BzLvViTI1yP98VNGMKlOFbew2O4QxTQQsSvDPw3WJLbNYgDorgeET3LW7ghP7YkW5kYRWKuSo4JPc0wbsEHIiZvJkh/Ou3Ip05miPg9IA7RX4k5XBpUM81O3JgEDRGz/QnQo7304P60XZu+o4m1s9Ww0aYRXiC2b2GLbgxfi0T8m2abOA8Xm7hbQ2Ibh1WkXV86jEtEW/Co6Ny6RCyXtPEh4rvBf2iEpcOWdL4C14naOcfEVv+AaPU/xGftiEr5G0ePtx+RSttCAAAAAElFTkSuQmCC"},"599d":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"查看物流"}},"599e":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"商品详情"}},"5a36":function(t,e,n){},"5b42":function(t,e,n){},"5c6b":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return c}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/helpclass/lists",data:t})}function o(t){return Object(i["a"])({url:"/api/help/info",data:t})}function c(t){return Object(i["a"])({url:"/api/help/page",data:t})}},"5f87":function(t,e,n){"use strict";n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return r})),n.d(e,"b",(function(){return s}));var i=n("a78e"),a=n.n(i),o="SDrxEA%_tWW6ezd3";function c(){return a.a.get(o)}function r(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e?a.a.set(o,t,{expires:e}):a.a.set(o,t)}function s(){return a.a.remove(o)}},6177:function(t,e,n){"use strict";n("ac66")},"618d":function(t,e){t.exports="data:image/png;base64,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"},"61dc":function(t,e,n){},"628a":function(t,e,n){"use strict";var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{staticClass:"service",attrs:{visible:t.showService,width:"48%","append-to-body":!0},on:{"update:visible":function(e){t.showService=e},close:t.closeDialog}},[i("div",{staticClass:"header-box ns-bg-color"},[i("div",{staticClass:"header-logo"},[i("img",{staticClass:"header-img",attrs:{src:n("7e62")}}),i("span",{staticClass:"serve-name"},[t._v("客服咨询")])])]),i("div",{staticClass:"service-box"},[i("div",{staticClass:"service-box-right"},[i("div",{staticClass:"service-box-right-top test-1"},[i("div",{staticClass:"content",attrs:{id:"content"}},[t.contentEmpty?i("div",{staticClass:"text-center"},[t._v("没有聊天记录了")]):i("div",{staticClass:"time text-center",staticStyle:{cursor:"pointer"},on:{click:t.getMessageList}},[t._v("点击加载")]),t._l(t.messageList,(function(e,n){return i("div",{key:n},[i("div",["online"==e.contentType?i("div",{staticClass:"onlineStatus"},[t._v("客服在线")]):t._e(),"noline"==e.contentType?i("div",{staticClass:"onlineStatus"},[t._v("客服不在线")]):t._e()]),e.isItMe?i("div",{staticClass:"message my-message"},[i("div",[i("div",{staticClass:"my-nickname"},[t._v(t._s(t.member.nickname))]),"goods"==e.contentType?i("goodsItem",{attrs:{skuId:e.sku_id},on:{sendMessage:function(e){return t.sendMessage("goods",n)}}}):t._e(),"order"==e.contentType?i("orderItem",{attrs:{orderId:e.order_id},on:{sendMessage:function(e){return t.sendMessage("order",n)}}}):t._e(),"string"==e.contentType?i("div",{staticClass:"word-message",domProps:{innerHTML:t._s(t.dealMessage(e.content))}}):t._e(),"image"==e.contentType?i("div",{staticClass:"word-message"},[i("el-image",{attrs:{src:t.$util.img(e.content),"preview-src-list":[t.$util.img(e.content)]}})],1):t._e()],1),i("div",{staticClass:"headimg",style:{backgroundImage:"url("+t.$util.img(t.member.headimg?t.member.headimg:t.defaultHeadImage)+")"}})]):!1===e.isItMe?i("div",{staticClass:"message your-message"},[i("div",{staticClass:"headimg",style:{backgroundImage:"url("+t.$util.img(t.shopinfo.logo)+")"}}),i("div",[i("div",{staticClass:"my-nickname"},[t._v(t._s(e.nickname)+" "),i("span",[t._v(t._s(e.time))])]),"image"==e.contentType?i("div",{staticClass:"word-message your-word-message"},[i("el-image",{attrs:{src:t.$util.img(e.content),"preview-src-list":[t.$util.img(e.content)]}})],1):t._e(),"goods"==e.contentType?i("goodsItem",{attrs:{skuId:e.sku_id},on:{sendMessage:function(e){return t.sendMessage("goods",n)}}}):t._e(),"order"==e.contentType?i("orderItem",{attrs:{orderId:e.order_id},on:{sendMessage:function(e){return t.sendMessage("order",n)}}}):t._e(),"string"==e.contentType?i("div",{staticClass:"word-message your-word-message",domProps:{innerHTML:t._s(t.dealMessage(e.content))}}):t._e()],1)]):t._e()])})),i("div",{staticStyle:{height:"40px"}})],2)]),i("div",{staticClass:"service-box-right-bottom"},[1==t.keyWordsConfig.is_open?i("div",{staticClass:"key-word"},t._l(t.keyWordsConfig.keyword_list,(function(e,n){return i("span",{key:n,on:{click:function(n){return t.sendMessage("string",-1,e.keyword)}}},[t._v(t._s(e.keyword))])})),0):t._e(),i("div",{staticClass:"operation"},[i("img",{staticClass:"emjoy",attrs:{src:n("5897")},on:{click:function(e){t.showEmoji=!t.showEmoji}}}),i("el-upload",{staticClass:"upload",attrs:{action:t.uploadActionUrl,"show-file-list":!1,"on-success":t.handleAvatarSuccess}},[i("img",{staticClass:"emjoy",attrs:{src:n("894f")},on:{click:function(e){t.showEmoji=!1}}})])],1),t.showEmoji?i("div",{staticClass:"emoji-box"},t._l(t.emjoyList,(function(e,n){return i("img",{key:n,staticClass:"text item",staticStyle:{cursor:"pointer"},attrs:{src:t.$util.img(e)},on:{click:function(i){return t.sendEmoji(n,e)}}})})),0):t._e(),i("div",{ref:"msgInputContainer",staticClass:"input-panel",class:1==t.keyWordsConfig.is_open?"":"active",attrs:{contenteditable:"true",spellcheck:"false"},on:{keydown:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?null:t.sendMessage()},input:function(e){return t.input(e)}}}),i("div",{staticClass:"num-box"},[t._v(" "+t._s(t.text_num)+"/150 ")]),i("el-button",{staticClass:"send-btn",attrs:{size:"small"},on:{click:function(e){return t.sendMessage()}}},[t._v("发送")])],1)])])])},a=[],o=n("5530"),c=(n("159b"),n("99af"),n("ac1f"),n("5319"),n("a434"),n("498a"),n("01ea")),r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods-info"},[n("div",{staticClass:"goods-box"},[n("div",{staticClass:"goods-img"},[n("img",{attrs:{src:t.goodsInfo.sku_image?t.$util.img(t.goodsInfo.sku_image):t.$util.img(t.defaultGoodsImage),alt:""}})]),n("div",{staticClass:"goods-desc"},[n("div",{staticClass:"text-hidden-two-row"},[t._v(t._s(t.goodsInfo.sku_name))]),n("div",{staticClass:"text-hidden-two-row"},[n("span",{staticClass:"sale-num"},[t._v("库存:"+t._s(t.goodsInfo.stock))]),t._v(" "),n("span",{staticClass:"sale-num"},[t._v("销量:"+t._s(t.goodsInfo.sale_num))])]),n("div",{staticClass:"price-box"},[n("span",{staticClass:"sale-num price-num"},[t._v("¥"+t._s(t.goodsInfo.price))]),n("span",{on:{click:function(e){return t.jump_shop()}}},[t._v("查看商品"),n("i",{staticClass:"el-icon-arrow-right"})])])])])])},s=[],u=n("a2a9"),d=n("2f62"),l={name:"goods_item",props:{skuId:0},data:function(){return{goodsInfo:{}}},computed:Object(o["a"])({},Object(d["b"])(["defaultGoodsImage"])),created:function(){this.skuId&&this.getGoodsInfo()},methods:{sendMessage:function(){this.$emit("sendMessage")},jump_shop:function(){this.$router.pushToTab("/sku-"+this.goodsInfo.sku_id)},getGoodsInfo:function(){var t=this;console.log(this.skuId,"商品ID"),Object(u["f"])({sku_id:this.skuId}).then((function(e){console.log(e,"res"),e.code>=0&&(t.goodsInfo=e.data.goods_sku_detail)}))}}},f=l,m=(n("4f527"),n("2877")),h=Object(m["a"])(f,r,s,!1,null,"d147fb86",null),p=h.exports,g=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"goods-info"},[n("div",{staticClass:"goods-box"},[n("div",{staticClass:"goods-img"},[n("img",{attrs:{src:t.orderInfo.order_goods[0].sku_image?t.$util.img(t.orderInfo.order_goods[0].sku_image):t.$util.img(t.defaultGoodsImage),alt:""}})]),n("div",{staticClass:"goods-desc"},[n("div",{staticClass:"text-hidden-two-row"},[t._v(t._s(t.orderInfo.order_name))]),n("div",[t._v("订单状态:"+t._s(t.orderInfo.order_status_name))]),n("div",{staticClass:"flex-box"},[n("span",{staticClass:"ns-text-color"},[t._v("¥"+t._s(t.orderInfo.order_money))]),t._v(" "),n("span",[t._v(t._s(t.orderInfo.delivery_type_name))])])])]),n("div",{staticClass:"more text-center"},[n("div",{staticClass:"order-num"},[t._v("订单号:454564645665")]),n("div",{staticClass:"see-order",on:{click:function(e){return t.jumo_order()}}},[t._v(" 查看订单"),n("i",{staticClass:"el-icon-arrow-right"})])])])},b=[],_=n("dea0"),v={name:"orderItem",props:{orderId:0,canSend:{type:Boolean,default:!1}},data:function(){return{orderInfo:{order_status_name:"",delivery_type_name:"",order_money:"",order_goods:[{sku_image:""}]}}},computed:Object(o["a"])({},Object(d["b"])(["defaultGoodsImage"])),created:function(){this.orderId&&this.getOrderInfo()},methods:{sendMessage:function(){this.$emit("sendMessage")},jumo_order:function(){this.$router.pushToTab("/member/order_detail?order_id="+this.orderId)},getOrderInfo:function(){var t=this;Object(_["b"])({order_id:this.orderId}).then((function(e){e.code>=0&&(console.log(e),t.orderInfo=e.data)}))}}},k=v,y=(n("7d8a"),Object(m["a"])(k,g,b,!1,null,"5bc39012",null)),j=y.exports,C=n("751a");function O(t){return Object(C["a"])({url:"/servicer/api/chat/say",data:t})}function w(t){return Object(C["a"])({url:"/servicer/api/chat/setRead",data:t})}function T(t){return Object(C["a"])({url:"/servicer/api/chat/bind",data:t})}function E(t){return Object(C["a"])({url:"/servicer/api/chat/dialogs",data:t})}function I(t){return Object(C["a"])({url:"/servicer/api/chat/hasServicers",data:t})}function S(t){return Object(C["a"])({url:"/servicer/api/chat/bye",data:t})}function L(){return Object(C["a"])({url:"/servicer/api/chat/keyword"})}function A(){return Object(C["a"])({url:"/api/site/info"})}n("4d63"),n("25f0");var x={emjoyList:{"[emjoy_01]":"public/static/img/emojy/emjoy_01.gif","[emjoy_02]":"public/static/img/emojy/emjoy_02.gif","[emjoy_03]":"public/static/img/emojy/emjoy_03.gif","[emjoy_04]":"public/static/img/emojy/emjoy_04.gif","[emjoy_05]":"public/static/img/emojy/emjoy_05.gif","[emjoy_06]":"public/static/img/emojy/emjoy_06.gif","[emjoy_07]":"public/static/img/emojy/emjoy_07.gif","[emjoy_08]":"public/static/img/emojy/emjoy_08.gif","[emjoy_09]":"public/static/img/emojy/emjoy_09.gif","[emjoy_10]":"public/static/img/emojy/emjoy_10.gif","[emjoy_11]":"public/static/img/emojy/emjoy_11.gif","[emjoy_12]":"public/static/img/emojy/emjoy_12.gif","[emjoy_13]":"public/static/img/emojy/emjoy_13.gif","[emjoy_14]":"public/static/img/emojy/emjoy_14.gif","[emjoy_15]":"public/static/img/emojy/emjoy_15.gif","[emjoy_16]":"public/static/img/emojy/emjoy_16.gif","[emjoy_17]":"public/static/img/emojy/emjoy_17.gif","[emjoy_18]":"public/static/img/emojy/emjoy_18.gif","[emjoy_19]":"public/static/img/emojy/emjoy_19.gif","[emjoy_20]":"public/static/img/emojy/emjoy_20.gif","[emjoy_21]":"public/static/img/emojy/emjoy_21.gif","[emjoy_22]":"public/static/img/emojy/emjoy_22.gif","[emjoy_23]":"public/static/img/emojy/emjoy_23.gif","[emjoy_24]":"public/static/img/emojy/emjoy_24.gif","[emjoy_25]":"public/static/img/emojy/emjoy_25.gif","[emjoy_26]":"public/static/img/emojy/emjoy_26.gif","[emjoy_27]":"public/static/img/emojy/emjoy_27.gif","[emjoy_28]":"public/static/img/emojy/emjoy_28.gif","[emjoy_29]":"public/static/img/emojy/emjoy_29.gif","[emjoy_30]":"public/static/img/emojy/emjoy_30.gif","[emjoy_31]":"public/static/img/emojy/emjoy_31.gif","[emjoy_32]":"public/static/img/emojy/emjoy_32.gif","[emjoy_33]":"public/static/img/emojy/emjoy_33.gif","[emjoy_34]":"public/static/img/emojy/emjoy_34.gif","[emjoy_35]":"public/static/img/emojy/emjoy_35.gif","[emjoy_36]":"public/static/img/emojy/emjoy_36.gif","[emjoy_37]":"public/static/img/emojy/emjoy_37.gif","[emjoy_38]":"public/static/img/emojy/emjoy_38.gif","[emjoy_39]":"public/static/img/emojy/emjoy_39.gif","[emjoy_40]":"public/static/img/emojy/emjoy_40.gif","[emjoy_41]":"public/static/img/emojy/emjoy_41.gif","[emjoy_42]":"public/static/img/emojy/emjoy_42.gif","[emjoy_43]":"public/static/img/emojy/emjoy_43.gif","[emjoy_44]":"public/static/img/emojy/emjoy_44.gif","[emjoy_45]":"public/static/img/emojy/emjoy_45.gif","[emjoy_46]":"public/static/img/emojy/emjoy_46.gif","[emjoy_47]":"public/static/img/emojy/emjoy_47.gif"},stringToEmjoy:function(t){var e=this;if(t){var n=t,i=new RegExp("\\[emjoy_(.+?)\\]","g"),a=n.replace(i,(function(t){var n="";for(var i in e.emjoyList)if(t==i){var a=util.img(e.emjoyList[i]);n=""}return n||t}));return a}}},R={components:{goodsItem:p,orderItem:j},props:{skuId:{default:0},orderId:{default:0},logo:{default:""},shop:{type:Object,default:function(){return{shop_name:"",shop_id:"",logo:""}}}},data:function(){return{isFirstInit:!0,showEmoji:!1,emjoyList:x.emjoyList,showService:!1,search_text:"",websock:null,messageList:[],servicerId:0,message:"",image:"",sendSwitch:!0,page:1,total:0,getSwitch:!0,contentEmpty:!1,sessionList:[],currShop:{shop_name:"",site_logo:""},keyWordsConfig:{},canSend:!0,siteIdMap:0,timeoutObj:null,uploadActionUrl:c["a"].baseUrl+"/api/upload/chatimg",text_num:0,is_first:!0,shopinfo:{name:"",logo:""}}},filters:{Time:function(t){var e=new Date,n=parseInt(t.substr(0,4)),i=parseInt(t.substr(5,2)),a=parseInt(t.substr(8,2)),o=e.getFullYear(),c=e.getMonth()+1,r=e.getDate(),s=new Date(n,i-1,a),u=(e=new Date(o,c-1,r),s.getTime()-e.getTime());return Math.abs(u)<864e5?"今天"+t.substr(11,5):u>0&&u<1728e5?"明天"+t.substr(11,5):u<0&&u>-1728e5?"昨天"+t.substr(11,5):t.substr(5,16)}},created:function(){this.siteIdMap=this.shop.shop_id,this.getKeywords(),this.getSiteInfo()},watch:{showService:function(t){!t&&this.websock&&this.websock.close()},groupId:function(t){this.group_id=this.groupId},servicerId:function(t){}},mounted:function(){},computed:Object(o["a"])({},Object(d["b"])(["token","defaultHeadImage","defaultShopImage","defaultGoodsImage","addonIsExit","locationRegion","member"])),beforeDestroy:function(){var t=this;clearInterval(this.timeoutObj),S().then((function(e){0==e.code&&t.websock&&t.websock.close()}))},methods:{dealMessage:function(t){return x.stringToEmjoy(t)},getSiteInfo:function(){var t=this;A().then((function(e){e.code>=0&&e.data&&(console.log(e,"getSiteInfogetSiteInfo"),t.shopinfo=e.data)}))},getKeywords:function(){var t=this;L().then((function(e){e.code>=0&&e.data&&(t.keyWordsConfig=e.data)}))},sendEmoji:function(t,e){this.showEmoji=!1,this.$refs.msgInputContainer.focus();var n=this.$util.img(e),i='');document.execCommand("insertHTML",!1,i)},show:function(){this.is_first=!0,this.siteIdMap=this.shop.shop_id,console.log("新版本"),this.is_first&&(this.currShop=this.shop),this.showService=!0,this.initWebSocket()},initData:function(){this.page=1,this.messageList.length=0,this.contentEmpty=!1},selectShop:function(t){var e=this;console.log("切换联系人"),this.initData(),this.siteIdMap=t.shop_id,this.currShop=t,this.servicerId=t.servicer_id,this.sessionList.forEach((function(n){n.shop_id==t.shop_id&&(n.unread=0,e.isRead(n))})),this.messageList=[],this.closeDialog(),this.initWebSocket(),this.getMessageList(),this.text_num=0,this.$refs.msgInputContainer.innerHTML=""},isRead:function(t){console.log(t,"item"),w({site_id:t.shop_id}).then((function(t){console.log(t,"res")})).catch((function(t){}))},test_online:function(){var t=this;I({site_id:this.currShop.shop_id}).then((function(e){e.data.online_count>0?(t.currShop.online=1,t.sessionList.forEach((function(e){e.shop_id==t.currShop.shop_id&&(e.online=1)}))):t.currShop.online=0}))},scrollBottom:function(){var t=document.getElementById("content");setTimeout((function(){t.scrollTop=t.scrollHeight}),0)},getMessageList:function(){var t=this;E({page:this.page,limit:4,servicer_id:this.servicerId,site_id:this.siteIdMap}).then((function(e){var n=e.code;e.data,e.messge;if(0==n){var i=[],a=e.data.list;a.forEach((function(t){var e={};0==t.content_type?(e.content=0==t.type?t.consumer_say:t.servicer_say,e.isItMe=0==t.type,e.contentType="string",e.nickname=t.nickname,e.shop_name=t.shop_name,e.time=t.create_day+" "+t.create_time,t.avatar?e.logo=t.avatar:e.logo=t.logo):1==t.content_type?(e.isItMe=0==t.type,e.contentType="goods",e.sku_id=t.goods_sku_id,e.nickname=t.nickname,e.shop_name=t.shop_name,e.time=t.create_day+" "+t.create_time,t.avatar?e.logo=t.avatar:e.logo=t.logo):2==t.content_type?(e.isItMe=0==t.type,e.contentType="order",e.order_id=t.order_id,e.nickname=t.nickname,e.shop_name=t.shop_name,e.time=t.create_day+" "+t.create_time,t.avatar?e.logo=t.avatar:e.logo=t.logo):3==t.content_type&&(e.isItMe=0==t.type,e.contentType="image",e.content=0==t.type?t.consumer_say:t.servicer_say,e.nickname=t.nickname,e.shop_name=t.shop_name,e.time=t.create_day+" "+t.create_time,t.avatar?e.logo=t.avatar:e.logo=t.logo),i.push(e)})),t.messageList=i.concat(t.contentEmpty?[]:t.messageList),console.log(t.messageList,"this.messageList"),1==t.page&&(t.skuId&&t.joinNewFakeMessage("mine","goods"),t.orderId&&t.joinNewFakeMessage("mine","order"),t.scrollBottom()),t.page>=e.data.page_count?t.contentEmpty=!0:t.page+=1}}))},joinNewFakeMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mine",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string",n={isItMe:"mine"==t,contentType:e};"string"==e&&(n.content=this.message),"goods"==e&&(n.sku_id=this.skuId,n.canSend=!0),"order"==e&&(n.order_id=this.orderId,n.canSend=!0),"image"==e&&(n.content=this.image),this.messageList.unshift(n),this.scrollBottom()},joinMessage:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"mine",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"string",n={isItMe:"mine"==t,contentType:e};"string"==e&&(n.content=this.message),"goods"==e&&(n.sku_id=this.skuId,n.canSend=!1),"order"==e&&(n.order_id=this.orderId,n.canSend=!1),"image"==e&&(n.content=this.image),this.messageList.push(n),this.scrollBottom()},input:function(t){var e=this.$refs.msgInputContainer.innerHTML,n=e.replace(/<\s?img.*?src\s*=\s*[\"|\']?(.*?)[\"|\']\s.*?>/gi,"0");this.text_num=n.length,this.text_num>=150&&this.$message({message:"最多一次可以发送150个字~",type:"warning"})},sendMessage:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"string",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(-1!=n&&this.messageList.splice(n,1),this.sendSwitch){this.sendSwitch=!1;var a,o={servicer_id:this.servicerId,site_id:this.siteIdMap};a=i||this.$refs.msgInputContainer.innerHTML;var c=a.replace(/
/g,""),r=c.replace(/<\/div>/g,""),s=r.replace(/
/g,"");if(this.message=s,"string"==e){if(!this.message.trim())return this.sendSwitch=!0,void this.$message({message:"不能发送空白内容",type:"warning"});Object.assign(o,{message:this.message,content_type:0})}"goods"==e&&Object.assign(o,{goods_id:this.skuId,content_type:1}),"order"==e&&Object.assign(o,{order_id:this.orderId,content_type:2}),"image"==e&&Object.assign(o,{message:this.image,content_type:3}),this.joinMessage("mine",e),O(o).then((function(e){t.sendSwitch=!0,t.message="",t.text_num=0,t.$refs.msgInputContainer.innerHTML=""})),this.scrollBottom()}},initWebSocket:function(){var t=c["a"].webSocket;this.websock=new WebSocket(t),this.websock.onmessage=this.websocketonmessage,this.websock.onopen=this.websocketonopen,this.websock.onerror=this.websocketonerror,this.websock.onclose=this.websocketclose},websocketonopen:function(){console.log("连接建立")},websocketonerror:function(){this.initWebSocket()},websocketonmessage:function(t){var e=this,n=JSON.parse(t.data),i=this;if(console.log(n,"data"),this.pingInterval=c["a"].pingInterval,"close"==n.type&&this.websock&&i.websock.close(),clearInterval(this.timeoutObj),this.reset(),"init"==n.type)this.messageList=[],T({client_id:n.data.client_id}).then((function(t){var n=t.code,i=t.data,a=(t.message,{});0==n?(e.servicerId=i.servicer_id,a={contentType:"online"},e.isFirstInit&&e.initData(),e.isFirstInit=!1):a={contentType:"noline"},e.messageList.unshift(a)})).catch((function(t){var n={contentType:"noline"};e.messageList.unshift(n)}));else if("connect"==n.type){if(n.data.shop_id==this.siteIdMap)if(n.data.shop_id){this.servicerId=n.servicer_id;var a={contentType:"online"};this.messageList.unshift(a)}else{this.servicerId=0;a={contentType:"noline"};this.messageList.unshift(a)}}else{var o={isItMe:!1};"string"==n.type?(o.content=n.data.servicer_say,o.time=n.data.create_day+n.data.create_time,o.logo=n.data.avatar,o.nickname=n.data.nickname,o.contentType="string"):"order"==n.type?(o.order_id=n.data.order_id,o.time=n.data.create_day+n.data.create_time,o.logo=n.data.avatar,o.nickname=n.data.nickname,o.contentType="order"):"goodssku"==n.type?(o.sku_id=n.data.goods_sku_id,o.time=n.data.create_day+n.data.create_time,o.logo=n.data.avatar,o.nickname=n.data.nickname,o.contentType="goods"):"image"==n.type&&(o.content=n.data.servicer_say,o.time=n.data.create_day+n.data.create_time,o.logo=n.data.avatar,o.nickname=n.data.nickname,o.contentType="image"),this.messageList.push(o)}this.scrollBottom()},reset:function(){console.log("检测心跳"),console.log(this.timeoutObj,"this.timeoutObj"),clearInterval(this.timeoutObj),this.start()},start:function(){var t=this;0!=c["a"].pingInterval&&(console.log("启动心跳"),this.timeoutObj=setInterval((function(){console.log("检测..."),t.websock.send("ping")}),this.pingInterval))},websocketsend:function(t){this.websock.send(t)},websocketclose:function(t){console.log("断开连接",t)},closeDialog:function(){var t=this;clearInterval(this.timeoutObj),console.log("关闭链接"),this.websock.close();var e={servicer_id:this.servicerId,site_id:this.siteIdMap};this.servicerId&&this.websock&&S(e).then((function(e){0==e.code&&clearInterval(t.timeoutObj)}))},handleAvatarSuccess:function(t,e){this.image=t.data.pic_path,this.sendMessage("image")}}},N=R,z=(n("7a1c"),n("cbb2"),Object(m["a"])(N,i,a,!1,null,"7ff51d35",null));e["a"]=z.exports},6970:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"会员中心"}},"69bb":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"待支付"}},"69f9":function(t,e,n){"use strict";n.d(e,"k",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"n",(function(){return c})),n.d(e,"i",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"m",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"j",(function(){return l})),n.d(e,"h",(function(){return f})),n.d(e,"c",(function(){return m})),n.d(e,"a",(function(){return h})),n.d(e,"g",(function(){return p})),n.d(e,"o",(function(){return g})),n.d(e,"b",(function(){return b})),n.d(e,"l",(function(){return _}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/member/info",data:t})}function o(t){return Object(i["a"])({url:"/api/memberaddress/page",data:t,forceLogin:!0})}function c(t){return Object(i["a"])({url:"/api/memberaddress/setdefault",data:t,forceLogin:!0})}function r(t){return Object(i["a"])({url:"/api/memberaddress/delete",data:t,forceLogin:!0})}function s(t){return Object(i["a"])({url:"/api/memberaddress/info",data:t,forceLogin:!0})}function u(t){return Object(i["a"])({url:"/api/memberaddress/"+t.url,data:t,forceLogin:!0})}function d(t){var e="/coupon/api/coupon/memberpage";return Object(i["a"])({url:e,data:t,forceLogin:!0})}function l(t){return Object(i["a"])({url:"/api/goodsbrowse/page",data:t,forceLogin:!0})}function f(t){return Object(i["a"])({url:"/api/goodsbrowse/delete",data:t,forceLogin:!0})}function m(t){return Object(i["a"])({url:"/api/memberbankaccount/page",data:t})}function h(t){return Object(i["a"])({url:"/api/memberbankaccount/setdefault",data:t})}function p(t){return Object(i["a"])({url:"/api/memberbankaccount/delete",data:t})}function g(t){return Object(i["a"])({url:"/api/memberwithdraw/transferType",data:t})}function b(t){return Object(i["a"])({url:"/api/memberbankaccount/info",data:t})}function _(t){return Object(i["a"])({url:"/api/memberbankaccount/"+t.url,data:t})}},"71a9":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"首页"}},7401:function(t,e,n){"use strict";n.d(e,"a",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return c})),n.d(e,"e",(function(){return r})),n.d(e,"d",(function(){return s})),n.d(e,"g",(function(){return u})),n.d(e,"f",(function(){return d})),n.d(e,"h",(function(){return l}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/login/login",data:t})}function o(t){return Object(i["a"])({url:"/api/login/mobile",data:t})}function c(t){return Object(i["a"])({url:"/api/login/mobileCode",data:t})}function r(t){return Object(i["a"])({url:"/api/findpassword/mobile",data:t})}function s(t){return Object(i["a"])({url:"/api/member/checkmobile",data:t},-1)}function u(t){return Object(i["a"])({url:"/api/findpassword/mobilecode",data:t})}function d(t){return Object(i["a"])({url:"/api/register/config",data:t})}function l(t){return Object(i["a"])({url:"/api/login/getMobileCode",data:t})}},"751a":function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));n("b0c0"),n("d3b7");var i=n("01ea"),a=(n("9816"),n("bc3a")),o=n.n(a),c=n("5f87"),r=location.protocol;if("https:"==r&&-1==i["a"].baseUrl.indexOf(r)||"http:"==r&&-1==i["a"].baseUrl.indexOf(r));function s(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"POST",i=t.url,a={app_type:"pc",app_type_name:"PC"},r=Object(c["a"])();return r&&(a.token=r),void 0!=t.data&&Object.assign(a,t.data),o()({url:i,method:n,data:a}).then((function(t){var n=t.data||{},i=n.code;if(-3!=i||"closed"==vue.$route.name)return i==e?t.data:Promise.reject(t.data);vue.$router.push("/closed")})).catch((function(e){var n=e.error_code;return"TOKEN_ERROR"===n&&(e.message="登录错误",vue.$store.dispatch("member/remove_token"),t.forceLogin&&vue.$router.push("/login?redirect=".concat(encodeURIComponent(vue.$router.history.current.fullPath)))),Promise.reject(e)}))}o.a.defaults.baseURL=i["a"].baseUrl,o.a.defaults.headers={"X-Requested-With":"XMLHttpRequest","content-type":"application/json"},o.a.defaults.responseType="json",o.a.defaults.timeout=6e4},"768e":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"购物车"}},"78c4":function(t,e,n){"use strict";n("5a36")},"7a1c":function(t,e,n){"use strict";n("ae0c")},"7b9e":function(t,e,n){"use strict";n("5b42")},"7d8a":function(t,e,n){"use strict";n("61dc")},"7e62":function(t,e,n){t.exports=n.p+"assets/img/kefupng.f75cdccc.png"},"7ec7":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"店铺街"}},"7ffd":function(t,e,n){},8010:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"我的关注"}},8045:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"专题活动详情"}},8894:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/goodscategory/tree",data:t})}function o(t){return Object(i["a"])({url:"/api/goodscategory/info",data:t})}function c(t){return Object(i["a"])({url:"/api/config/categoryconfig",data:t})}},"894f":function(t,e,n){t.exports=n.p+"assets/img/upload.f47fe918.png"},"8c8f":function(t,e,n){var i={"./en-us/common.js":"daea","./zh-cn/common.js":"26ae"};function a(t){var e=o(t);return n(e)}function o(t){if(!n.o(i,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return i[t]}a.keys=function(){return Object.keys(i)},a.resolve=o,t.exports=a,a.id="8c8f"},"8ca5":function(t,e,n){"use strict";n("236f")},"8f1a":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"秒杀专区"}},"8f3d":function(t,e,n){"use strict";n("981d")},"8ffa":function(t,e,n){"use strict";n("9f8b")},"981d":function(t,e,n){},"997d":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"编辑收货地址"}},"9ec1":function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"商品详情"}},"9f8b":function(t,e,n){},a2a9:function(t,e,n){"use strict";n.d(e,"h",(function(){return a})),n.d(e,"f",(function(){return o})),n.d(e,"c",(function(){return c})),n.d(e,"g",(function(){return r})),n.d(e,"k",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"i",(function(){return d})),n.d(e,"b",(function(){return l})),n.d(e,"j",(function(){return f})),n.d(e,"a",(function(){return m})),n.d(e,"e",(function(){return h}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/goodssku/page",data:t})}function o(t){return Object(i["a"])({url:"/api/goodssku/detail",data:t})}function c(){return Object(i["a"])({url:"/api/goodsevaluate/config",data:{},forceLogin:!0})}function r(t){return Object(i["a"])({url:"/api/goodssku/info",data:t})}function s(t){return Object(i["a"])({url:"/seckill/api/seckillgoods/info",data:t})}function u(t){return Object(i["a"])({url:"/api/goodssku/goodsqrcode",data:t})}function d(t){return Object(i["a"])({url:"/manjian/api/manjian/info",data:t})}function l(t){return Object(i["a"])({url:"/api/goods/aftersale",data:t})}function f(t){return Object(i["a"])({url:"/api/goods/modifyclicks",data:t})}function m(t){return Object(i["a"])({url:"/api/goodsbrowse/add",data:t})}function h(t){return Object(i["a"])({url:"/api/goodssku/recommend",data:t})}},a2ac:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"账户余额"}},a3d9:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"充值详情"}},aa79:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"切换城市"}},ab4d:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"我的积分"}},abb4:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"订单评价"}},ac32:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"退款/售后"}},ac37:function(t,e,n){"use strict";n("c38b")},ac66:function(t,e,n){},ad66:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"登录"}},adb8:function(t,e,n){},adba:function(t,e,n){},ae0c:function(t,e,n){},b171:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"编辑账户"}},b973:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"团购专区"}},bda5:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"订单详情"}},bf3b:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"店铺首页"}},c0f4:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"404"}},c38b:function(t,e,n){},cab9:function(t,e,n){"use strict";n("d03c")},cbb2:function(t,e,n){"use strict";n("7ffd")},ce59:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"核销台"}},d03c:function(t,e,n){},d57a:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"订单详情"}},d5a1:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"平台维权"}},d5d3:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"网站维护"}},d6a6:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"核销记录"}},d850:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"专题活动"}},daea:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={common:{name:"英文"}}},dcfe:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"帮助中心"}},de55:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"提现记录"}},dea0:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"e",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"f",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"d",(function(){return u})),n.d(e,"g",(function(){return d})),n.d(e,"h",(function(){return l}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/order/lists",data:t,forceLogin:!0})}function o(t){return Object(i["a"])({url:"/api/order/pay",data:t,forceLogin:!0})}function c(t){return Object(i["a"])({url:"/api/order/close",data:t,forceLogin:!0})}function r(t){return Object(i["a"])({url:"/api/order/takedelivery",data:t,forceLogin:!0})}function s(t){return Object(i["a"])({url:"/api/order/detail",data:t,forceLogin:!0})}function u(t){return Object(i["a"])({url:"/api/order/package",data:t,forceLogin:!0})}function d(t){return Object(i["a"])({url:"/api/order/evluateinfo",data:t,forceLogin:!0})}function l(t){var e="";return e=t.isEvaluate?"/api/goodsevaluate/again":"/api/goodsevaluate/add",Object(i["a"])({url:e,data:t,forceLogin:!0})}},df77:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"领券中心"}},df81:function(t,e,n){"use strict";n("adba")},e0c0:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"退款详情"}},e2cb:function(t,e,n){},e2ff:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"订单详情"}},e5a0:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"商品详情"}},e6b0:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"支付结果"}},e6f0:function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"b",(function(){return o})),n.d(e,"a",(function(){return c})),n.d(e,"c",(function(){return r}));var i=n("751a");function a(t){return Object(i["a"])({url:"/api/pc/floors",data:t})}function o(t){return Object(i["a"])({url:"/api/goods/hotSearchWords",data:t})}function c(t){return Object(i["a"])({url:"/api/goods/defaultSearchWords",data:t})}function r(t){return Object(i["a"])({url:"/api/pc/floatLayer",data:t})}},f5c0:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"商品详情"}},f5d4:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"待付款订单"}},f6fb:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"会员签到"}},f9d7:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"核销"}},fc19:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"提现详情"}},fce6:function(t,e,n){},fd26:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"充值记录"}},fe84:function(t,e,n){"use strict";n.r(e),n.d(e,"lang",(function(){return i}));var i={title:"待付款订单"}}}); //# sourceMappingURL=app.fa2a66a8.js.map