You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2 lines
25 KiB
2 lines
25 KiB
(function(){"use strict";var e={1534:function(e,t,n){n(4114);var o=n(6674),a=function(){var e=this,t=e._self._c;return t("div",{attrs:{id:"app"}},["Register"!==e.$route.name?t("HeaderNav"):e._e(),"Login"!==e.$route.name?t("main",{staticClass:"main-container"},[t("router-view")],1):e._e(),"Login"==e.$route.name?t("main",{staticClass:"main-containers"},[t("router-view")],1):e._e(),"Register"!==e.$route.name?t("Sidebar"):e._e(),"Register"!==e.$route.name?t("Footer"):e._e()],1)},r=[],i=function(){var e=this,t=e._self._c;return t("header",{staticClass:"header-nav"},[t("div",{staticClass:"top-notice"},[t("div",{staticClass:"container"},[t("p",[e._v(" 欢迎来到时味苏州平台! "),e._e()],1),t("div",{staticClass:"top-links"},[e.isLogin?t("router-link",{staticClass:"user-link",attrs:{to:"/User"}},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.userInfo.avatar,expression:"userInfo.avatar"}],staticClass:"avatar",attrs:{alt:"用户头像"}}),e._v(" "+e._s(e.userInfo.username)+" ")]):t("router-link",{attrs:{to:"/Login"}},[e._v("登录")]),e._e(),e._e(),t("router-link",{attrs:{to:"/User"}},[e._v("采购人中心")]),t("router-link",{staticClass:"cart-link",attrs:{to:"/User/ShoppingCart"}},[e._v(" 购物车"),e.cartTotalCount>0?t("span",[e._v("("+e._s(e.cartTotalCount)+"件)")]):e._e()]),e.isLogin?t("router-link",{attrs:{to:"/User/OrderList"}},[e._v("我的订单")]):e._e(),e.isLogin?t("div",{staticClass:"logout-btn",on:{click:e.handleLogout}},[e._v(" 退出 ")]):e._e()],1)])]),t("div",{staticClass:"main-nav"},[t("div",{staticClass:"container"},[t("div",{staticClass:"logo"},[t("router-link",{attrs:{to:"/"}},[t("img",{staticClass:"logo-img",attrs:{src:"https://static.ticket.sz-trip.com/shiweisuzhou/pc/logo.png",alt:"logo"},on:{click:function(t){e.searchText=""}}})])],1),t("div",{staticClass:"search-box"},[t("el-input",{staticClass:"search-input",attrs:{placeholder:"请输入搜索内容"},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.handleSearch.apply(null,arguments)}},model:{value:e.searchText,callback:function(t){e.searchText=t},expression:"searchText"}},[t("el-button",{attrs:{slot:"append",icon:"el-icon-search"},on:{click:e.handleSearch},slot:"append"})],1),e.hotList.length>0?t("div",{staticClass:"hot-tags"},[t("span",[e._v("热门搜索:")]),e._l(e.hotList,function(n,o){return t("div",{key:o,staticClass:"hot-tag",on:{click:function(t){e.searchText=n.name,e.handleSearch()}}},[e._v(" "+e._s(n.name)+" ")])})],2):e._e()],1),t("div",{staticClass:"phone-entry"},[t("div",{staticStyle:{display:"flex","align-items":"center"}},[t("img",{staticStyle:{"margin-right":"5px"},attrs:{src:"https://static.ticket.sz-trip.com/shiweisuzhou/pc/login/phone.png",alt:"联系电话"}}),t("span",[e._v("0512-80822586")]),(e.cartTotalCount,e._e())])])])]),e.categories.length>0?t("div",{staticClass:"category-nav"},[t("div",{staticClass:"container"},[e._e()])]):e._e()])},s=[],c=n(3518),l={name:"HeaderNav",data(){return{searchText:"",hotList:[]}},computed:{...(0,c.L8)(["getCategories","getCartTotalCount","isUserLogin","getUserInfo"]),categories(){return this.getCategories||[]},cartTotalCount(){return this.getCartTotalCount||0},isLogin(){return this.isUserLogin},userInfo(){return this.getUserInfo||{}}},created(){this.fetchCategories(),this.post({offset:0,limit:5},"/api/search/hot").then(e=>{this.hotList=e.data})},methods:{...(0,c.i0)(["fetchCategories","logout"]),handleSearch(){this.searchText.trim()&&(this.$store.commit("setSearchText",this.searchText),"/ProductList"===this.$route.path||this.$router.push({path:"/ProductList",query:{keyword:this.searchText,type:"search"}}))},handleLogout(){this.$confirm("确定要退出登录吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{this.logout().then(()=>{this.$message.success("退出登录成功"),localStorage.setItem("redirectPath",this.$route.path),this.$router.push("/Login")}).catch(e=>{this.$message.error("退出失败:"+(e.message||"未知错误"))})}).catch(()=>{})}}},u=l,d=n(1656),p=(0,d.A)(u,i,s,!1,null,"00f3c839",null),h=p.exports,m=function(){var e=this,t=e._self._c;return t("div",{staticClass:"footer-container"},[t("div",{staticClass:"footer-top"},[e._l(e.nonQrcodeColumns,function(n,o){return t("div",{key:n.id,staticClass:"footer-column"},[t("h3",[e._v(e._s(n.title))]),t("ul",e._l(n.list,function(n,a){return t("li",{key:a,style:{cursor:o<4?"pointer":""},on:{click:function(t){o<4&&e.gotoDetail(n)}}},[e._v(" "+e._s(n.title)+" ")])}),0)])}),t("div",{staticClass:"qrcode-group"},e._l(e.qrcodeColumn.list,function(n,o){return t("div",{key:o,staticClass:"qrcode-item"},[t("img",{staticStyle:{width:"100px",height:"100px"},attrs:{src:e.util.showImg(n.image)}}),t("p",[e._v(e._s(n.title))])])}),0)],2),e._m(0)])},f=[function(){var e=this,t=e._self._c;return t("div",{staticClass:"footer-bottom"},[t("p",[e._v("版权所有 苏州市特色农产品发展有限公司 | 苏ICP备2023023300号-1")]),t("p",[e._v("本网站由 江苏大运远见文化科技发展有限公司 运营维护")])])}],g=(n(8111),n(2489),n(116),n(7588),{name:"Footer",data(){return{list:[{id:1,title:"关于我们",list:[]},{id:2,title:"新手上路",list:[]},{id:5,title:"交易流程",list:[]},{id:3,title:"常见问题",list:[]},{id:6,title:"联系方式",list:[]},{id:4,title:"二维码推荐",list:[]}]}},computed:{nonQrcodeColumns(){return this.list.filter(e=>"二维码推荐"!==e.title)},qrcodeColumn(){return this.list.find(e=>"二维码推荐"===e.title)||{list:[]}}},mounted(){this.list.forEach(e=>{this.get({type_id:e.id},"/api/navigation/getNavigationByTypeList").then(t=>{e.list=t.data})})},methods:{gotoDetail(e){e.link_url?window.location.href=e.link_url:this.$router.push(`/NoticeDetail?type=footer&id=${e.id}`)}}}),v=g,b=(0,d.A)(v,m,f,!1,null,"3080ae3e",null),C=b.exports,y=function(){var e=this,t=e._self._c;return t("div",{staticClass:"sidebar-container"},[t("div",{staticClass:"sidebar-item",on:{click:e.handleCartClick}},[t("el-badge",{staticClass:"item-badge",attrs:{value:e.$store.getters.getCartTotalCount}},[t("i",{staticClass:"el-icon-shopping-cart-full"})]),t("div",{staticClass:"item-text"},[e._v("购物车")])],1),t("div",{staticClass:"sidebar-item",on:{click:e.handleServiceClick}},[t("i",{staticClass:"el-icon-headset"}),t("div",{staticClass:"item-text"},[e._v("在线客服")])]),t("div",{staticClass:"sidebar-item back-to-top",class:{active:e.isShowBackTop},on:{click:e.handleBackToTop}},[t("i",{staticClass:"el-icon-caret-top"}),t("div",{staticClass:"item-text"},[e._v("回到顶部")])])])},k=[],T=n(5129),w={name:"Sidebar",data(){return{cartCount:0,isShowBackTop:!1,scrollTimer:null}},computed:{...(0,c.L8)(["getCartTotalCount"])},mounted(){window.addEventListener("scroll",this.handleScroll),this.$store.dispatch("fetchCartCount")},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll),this.scrollTimer&&clearTimeout(this.scrollTimer)},methods:{handleCartClick(){this.$router.push("/User/ShoppingCart")},handleServiceClick(){const e=T.A.state.user?.info?.token||"";window.location.href="https://swsz.api.js-dyyj.com/kefu?token="+e},handleBackToTop(){window.scrollTo({top:0,behavior:"smooth"})},handleScroll(){this.scrollTimer&&clearTimeout(this.scrollTimer),this.scrollTimer=setTimeout(()=>{this.isShowBackTop=window.pageYOffset>300},200)}}},_=w,A=(0,d.A)(_,y,k,!1,null,"1a8585cf",null),L=A.exports,x=function(){var e=this,t=e._self._c;return e.showBackToTop?t("div",{staticClass:"back-to-top",on:{click:e.scrollToTop}},[t("el-icon",{attrs:{name:"el-icon-arrow-up"}})],1):e._e()},O=[],S={name:"BackToTop",data(){return{showBackToTop:!1}},mounted(){window.addEventListener("scroll",this.handleScroll)},beforeDestroy(){window.removeEventListener("scroll",this.handleScroll)},methods:{handleScroll(){this.showBackToTop=window.pageYOffset>500},scrollToTop(){const e=window.setInterval(()=>{const t=window.pageYOffset;t>0?window.scrollTo(0,t-Math.max(20,t/10)):window.clearInterval(e)},16)}}},U=S,P=(0,d.A)(U,x,O,!1,null,"7ea6dee0",null),E=P.exports,I={name:"App",components:{HeaderNav:h,Footer:C,BackToTop:E,Sidebar:L},computed:{...(0,c.L8)(["getLoadingStatus"]),loading(){return this.getLoadingStatus}}},D=I,$=(0,d.A)(D,a,r,!1,null,null,null),B=$.exports,R=n(6178);o["default"].use(R.Ay);const N=R.Ay.prototype.push;R.Ay.prototype.push=function(e){return N.call(this,e).catch(e=>{if("NavigationDuplicated"!==e.name)throw e})};const z=new R.Ay({mode:"history",base:"/",routes:[{path:"/",name:"Index",meta:{title:"首页 - 精品商城",keepAlive:!1},component:()=>n.e(750).then(n.bind(n,750))},{path:"/Login",name:"Login",meta:{title:"登录 - 精品商城",keepAlive:!1},component:()=>n.e(700).then(n.bind(n,1700))},{path:"/Register",name:"Register",meta:{title:"注册 - 精品商城",keepAlive:!1},component:()=>n.e(29).then(n.bind(n,3029))},{path:"/Home",name:"Home",meta:{title:"首页 - 精品商城",keepAlive:!1},component:()=>n.e(828).then(n.bind(n,9828))},{path:"/Detail/:id",name:"Detail",meta:{title:"首页 - 精品商城",keepAlive:!1},component:()=>n.e(646).then(n.bind(n,5646))},{path:"/ProductList",name:"ProductList",meta:{title:"商品列表",keepAlive:!1},component:()=>n.e(220).then(n.bind(n,6220))},{path:"/ProductReview",name:"ProductReview",meta:{title:"商品评价",keepAlive:!1},component:()=>n.e(779).then(n.bind(n,4779))},{path:"/NoticeList",name:"NoticeList",meta:{title:"公告列表",keepAlive:!1},component:()=>n.e(601).then(n.bind(n,6601))},{path:"/NoticeDetail",name:"NoticeDetail",meta:{title:"公告详情",keepAlive:!1},component:()=>n.e(989).then(n.bind(n,3989))},{path:"/User",name:"User",component:()=>n.e(462).then(n.bind(n,462)),redirect:"/User/UserCenter",children:[{path:"UserCenter",name:"UserCenter",component:()=>n.e(709).then(n.bind(n,5709))},{path:"OrderList",name:"OrderList",meta:{title:"我的订单 - 精品商城",keepAlive:!1},component:()=>n.e(497).then(n.bind(n,7497))},{path:"UserInfo",name:"UserInfo",meta:{title:"个人信息 - 精品商城",keepAlive:!1},component:()=>n.e(192).then(n.bind(n,1192))},{path:"ViewHistory",name:"ViewHistory",meta:{title:"我的足迹 - 精品商城",keepAlive:!1},component:()=>n.e(33).then(n.bind(n,4033))},{path:"UserAddress",name:"UserAddress",meta:{title:"我的收货地址 - 精品商城",keepAlive:!1},component:()=>n.e(208).then(n.bind(n,5208))},{path:"UserInvoice",name:"UserInvoice",meta:{title:"发票抬头 - 精品商城",keepAlive:!1},component:()=>n.e(612).then(n.bind(n,9231))},{path:"UserInvoiceList",name:"UserInvoiceList",meta:{title:"我的发票 - 精品商城",keepAlive:!1},component:()=>n.e(688).then(n.bind(n,5688))},{path:"ShoppingCart",name:"ShoppingCart",meta:{title:"购物车 - 精品商城",keepAlive:!1},component:()=>n.e(630).then(n.bind(n,2630))},{path:"CommentManage",name:"CommentManage",meta:{title:"评价管理 - 精品商城",keepAlive:!1},component:()=>n.e(990).then(n.bind(n,4990))},{path:"ContractList",name:"ContractList",meta:{title:"合同管理 - 精品商城",keepAlive:!1},component:()=>n.e(719).then(n.bind(n,100))},{path:"MessageList",name:"MessageList",meta:{title:"消息中心 - 精品商城",keepAlive:!1},component:()=>n.e(838).then(n.bind(n,7838))},{path:"PurchaserAdd",name:"PurchaserAdd",meta:{title:"添加采购单位信息 - 精品商城",keepAlive:!1},component:()=>n.e(995).then(n.bind(n,6995))}]},{path:"/Order",name:"Order",meta:{title:"下单",keepAlive:!1},component:()=>n.e(807).then(n.bind(n,1807))},{path:"/OrderDetail",name:"OrderDetail",meta:{title:"订单详情 - 精品商城",keepAlive:!1},component:()=>n.e(711).then(n.bind(n,8711))},{path:"/OrderPay",name:"OrderPay",meta:{title:"订单支付 - 精品商城",keepAlive:!1},component:()=>n.e(677).then(n.bind(n,3677))},{path:"/OrderPayB2B",name:"OrderPayB2B",meta:{title:"订单支付 - 精品商城",keepAlive:!1},component:()=>n.e(452).then(n.bind(n,1452))},{path:"/OrderPayCode",name:"OrderPayCode",meta:{title:"订单支付 - 精品商城",keepAlive:!1},component:()=>n.e(244).then(n.bind(n,244))},{path:"/OrderPaySuccess",name:"OrderPaySuccess",meta:{title:"订单支付 - 精品商城",keepAlive:!1},component:()=>n.e(169).then(n.bind(n,7169))}],scrollBehavior(e,t,n){return{x:0,y:0}}});z.beforeEach((e,t,n)=>{if(e.meta.title&&(document.title=e.meta.title),e.meta.requireAuth){const t=T.A.state.user?.info?.token||"";t?n():n({path:"/Login",query:{redirect:e.fullPath}})}else n()});var j=z,q=n(9143),M=n.n(q),F=n(5847),G=n(4373);const V=G.A.create({timeout:6e3});V.interceptors.request.use(e=>{const{customBaseURL:t}=e.params||e.data||{};t?(e.baseURL=t,e.params?delete e.params.customBaseURL:e.data&&delete e.data.customBaseURL):e.baseURL="https://swsz.api.js-dyyj.com";const n=T.A.state.user?.info?.token||"";return e.headers["token"]=n||"",e.headers["Content-Type"]="application/json;charset=UTF-8","get"===e.method?.toLowerCase()?e.params={platform_type:2,...e.params}:e.data={platform_type:2,...e.data},!1!==e.loading&&(e.loadingInstance=q.Loading.service({lock:!0,text:"加载中...",background:"rgba(0, 0, 0, 0.7)"})),e},e=>Promise.reject(e)),V.interceptors.response.use(e=>{if(e.config.loadingInstance&&e.config.loadingInstance.close(),200!==e.status&&1!==e.status){const t=`请求失败,状态码:${e.status}`;return q.MessageBox.alert(t,"错误提示",{confirmButtonText:"确定",type:"error"}),Promise.reject(new Error(t))}{const t=e.data;if(1===t.code||200===t.code)return t;{const e=t.msg||`业务处理失败,错误码:${t.code}`;q.MessageBox.alert(e,"错误提示",{confirmButtonText:"确定",type:"error"}).then(()=>{if(401===t.code){const e=j.currentRoute.fullPath;"/Login"!==e&&localStorage.setItem("redirectPath",e),j.push("/Login")}}).catch(()=>{})}}},e=>{if(e.config&&e.config.loadingInstance&&e.config.loadingInstance.close(),e.response&&e.response.status)switch(e.response.status){case 401:q.MessageBox.confirm("请登录后操作","提示",{confirmButtonText:"去登录",cancelButtonText:"取消",type:"warning"}).then(()=>{j.push("/Login")}).catch(()=>{});break;case 404:(0,q.Message)({message:"网络繁忙,请刷新再试",type:"error",duration:2e3});break;default:(0,q.Message)({message:"网络繁忙,请刷新再试",type:"error",duration:2e3});break}return Promise.reject(e)}),o["default"].prototype.get=(e,t,n=!1)=>new Promise((o,a)=>{V.get(t,{params:e,loading:n}).then(e=>{o(e)}).catch(e=>{a(e)})}),o["default"].prototype.post=(e,t,n=!1)=>new Promise((o,a)=>{V.post(t,e,{loading:n}).then(e=>{o(e)}).catch(e=>{a(e)})});var H={install(e){e.prototype.util={formateRichText(e){if(!e)return"";var t=new RegExp("<img","g");return e=e.replace(t,"<img class='sz-xcx-fwb-img' width='100%'"),t=new RegExp("<IMG","g"),e=e.replace(t,"<img class='sz-xcx-fwb-img' width='100%'"),t=new RegExp(" ","g"),e=e.replace(t,'<span style="width: 8rpx;display: inline-block;"></span>'),t=new RegExp("section","g"),e=e.replace(t,"div"),t=new RegExp("↵","g"),e=e.replace(t,"<br />"),e=e.replace(/<table/g,'<table border="1" cellspacing="0" style="border-collapse:collapse"'),e},mobileValid(e){return/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)},idNumberValid(e){return/^\d{17}(\d{1}|[X|x])$/.test(e)},passportValid(e){return/^([a-zA-z]|[0-9]){5,17}$/.test(e)},taiwanValid(e){return/^\d{8}|^[a-zA-Z0-9]{10}|^\d{18}$/.test(e)},gangaoValid(e){return/^([A-Z]\d{6,10}(\(\w{1}\))?)$/.test(e)},foreignerValid(e){return/(^[A-Za-z]{3})([0-9]{12}$)/.test(e)},officerValid(e){return/^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/.test(e)},emailValid(e){return/^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(e)},getUrlPara(e){let t=e.split("?"),n=t[1];return!!n&&n.split("&")},showImg(e){if(e)return-1!=e.indexOf("https://")||-1!=e.indexOf("http://")?e:"https://static.ticket.sz-trip.com"+e},imgToBase64(e){let t=new FileReader;return t.readAsDataURL(e),new Promise((e,n)=>{t.onload=()=>{e(t.result)}})},copyId(t){const n=document.createElement("input");n.value=t,document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n),e.prototype.$message({message:"复制成功",type:"success"})}}}};o["default"].use(H),o["default"].config.productionTip=!1,o["default"].use(M()),o["default"].use(F.A,{preLoad:1.3,error:n(3153),loading:n(3153),attempt:3,listenEvents:["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],adapter:{loaded({bindType:e,el:t,naturalHeight:n,naturalWidth:o,$parent:a,src:r,loading:i,error:s,Init:c}){console.log("图片加载完成:",r)},error({bindType:e,el:t,error:n,$parent:o,src:a,loading:r}){console.log("图片加载失败:",a)}}}),o["default"].prototype.gotoPath=function(e,t={}){const n=this.$router.currentRoute.fullPath;if(e!==n)try{"string"===typeof e?this.$router.push({path:e,query:t.query||{}}):"object"===typeof e&&this.$router.push(e),"function"===typeof t.success&&t.success()}catch(o){console.error("路由跳转失败:",o),"function"===typeof t.fail&&t.fail(o)}},new o["default"]({el:"#app",router:j,store:T.A,components:{App:B},template:"<App/>"})},3153:function(e,t,n){e.exports=n.p+"img/logo.bb511aff.png"},5129:function(e,t,n){var o=n(6674),a=n(3518),r=n(5131);o["default"].use(a.Ay),t.A=new a.Ay.Store({plugins:[(0,r.A)({storage:window.localStorage,reducer(e){return{cart:e.cart,user:e.user}}})],state:{cart:{items:[],totalCount:0,totalPrice:0},user:{isLogin:!1,info:null,token:""},categories:[],loading:!1,searchText:"",orderData:null},mutations:{setOrderData(e,t){e.orderData=t},clearOrderData(e){e.orderData=null},UPDATE_CATEGORIES(e,t){e.categories=t},UPDATE_LOADING(e,t){e.loading=t},USER_LOGIN(e,{userInfo:t,token:n}){e.user.isLogin=!0,e.user.info=t,e.user.token=n,localStorage.setItem("token",n)},USER_LOGOUT(e){e.user.isLogin=!1,e.user.info=null,e.user.token="",localStorage.removeItem("token"),e.cart.totalCount=0},UPDATE_CART_TOTAL_COUNT(e,t){e.cart.totalCount=t},setSearchText(e,t){e.searchText=t}},actions:{submitOrderData({commit:e},t){e("setOrderData",t)},fetchCategories({commit:e}){return e("UPDATE_LOADING",!0),new Promise(t=>{setTimeout(()=>{const n=[{id:1,name:"电子产品",icon:"el-icon-laptop"},{id:2,name:"服装鞋帽",icon:"el-icon-shopping-bag-1"},{id:3,name:"家居用品",icon:"el-icon-home"},{id:4,name:"美妆个护",icon:"el-icon-present"},{id:5,name:"食品饮料",icon:"el-icon-dish"},{id:6,name:"图书音像",icon:"el-icon-document"}];e("UPDATE_CATEGORIES",n),e("UPDATE_LOADING",!1),t(n)},500)})},login({commit:e,dispatch:t},{userInfo:n,token:o}){e("USER_LOGIN",{userInfo:n,token:o}),t("fetchCartCount")},logout({commit:e}){e("USER_LOGOUT")},addToCart({dispatch:e},t){return o["default"].prototype.post({sku_id:t.id,num:t.quantity||1},"/api/cart/add_sku").then(t=>{if(t)return o["default"].prototype.$message.success("购物车添加成功!"),e("fetchCartCount")}).catch(e=>{throw console.error("添加到购物车请求失败",e),e})},fetchCartCount({commit:e,state:t}){return t.user.token?o["default"].prototype.post({},"/api/cart/get_count").then(t=>(console.log("购物车数量接口返回",t),1==t.code&&e("UPDATE_CART_TOTAL_COUNT",t.data),t.data)).catch(e=>{throw console.error("获取购物车数量失败",e),e}):(e("UPDATE_CART_TOTAL_COUNT",0),Promise.resolve(0))},removeFromCart({dispatch:e},t){return o["default"].prototype.post({sku_id:t},"/api/cart/remove_sku").then(()=>e("fetchCartCount")).catch(e=>{throw console.error("删除购物车商品失败",e),e})},updateCartItemQuantity({dispatch:e},{productId:t,quantity:n}){return o["default"].prototype.post({sku_id:t,num:n},"/api/cart/add_sku").then(()=>e("fetchCartCount")).catch(e=>{throw console.error("更新购物车商品数量失败",e),e})},clearCart({dispatch:e}){return o["default"].prototype.post({},"/api/cart/clear").then(()=>e("fetchCartCount")).catch(e=>{throw console.error("清空购物车失败",e),e})}},getters:{getOrderData:e=>e.orderData,getCategories:e=>e.categories,getCart:e=>e.cart,getCartTotalCount:e=>e.cart.totalCount,isUserLogin:e=>e.user.isLogin,getUserInfo:e=>e.user.info,getLoadingStatus:e=>e.loading,getSearchText:e=>e.searchText}})}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={id:o,loaded:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.m=e,function(){n.amdO={}}(),function(){var e=[];n.O=function(t,o,a,r){if(!o){var i=1/0;for(u=0;u<e.length;u++){o=e[u][0],a=e[u][1],r=e[u][2];for(var s=!0,c=0;c<o.length;c++)(!1&r||i>=r)&&Object.keys(n.O).every(function(e){return n.O[e](o[c])})?o.splice(c--,1):(s=!1,r<i&&(i=r));if(s){e.splice(u--,1);var l=a();void 0!==l&&(t=l)}}return t}r=r||0;for(var u=e.length;u>0&&e[u-1][2]>r;u--)e[u]=e[u-1];e[u]=[o,a,r]}}(),function(){n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,{a:t}),t}}(),function(){n.d=function(e,t){for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})}}(),function(){n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce(function(t,o){return n.f[o](e,t),t},[]))}}(),function(){n.u=function(e){return"js/"+e+"."+{29:"2ece41d9",33:"ca85dca8",169:"33f72ed2",192:"a0b515d3",208:"50f78b20",220:"18d44668",244:"940fed0d",452:"0b1eacbe",462:"1343c7cb",497:"13803348",601:"1c95e2ee",612:"0689f662",630:"d2996537",646:"86f530bc",677:"bb7c2f70",688:"aa0eb580",700:"d2d5f812",709:"04a9155a",711:"baa8d180",719:"4c174724",750:"df13650b",779:"c8f94891",807:"8f1f61a0",828:"deb87761",838:"3bd96d59",989:"ec009c2e",990:"244d285a",995:"b05470f0"}[e]+".js"}}(),function(){n.miniCssF=function(e){return"css/"+e+"."+{29:"2661f71c",33:"5507be5a",169:"a7db186a",192:"3189fded",208:"268eb302",220:"409c24a4",244:"edd4b6a0",452:"42e712d8",462:"5ae3b03a",497:"703f0337",601:"91c548ed",630:"e6d20e0d",646:"ec7235c5",677:"51eebda5",688:"b751536e",700:"5f484165",709:"8b344007",711:"701f8f15",719:"37d35775",750:"f4921ea4",779:"b5e6f704",807:"9b5bd9e0",828:"9419445b",838:"4c0b65d7",989:"f060a013",990:"fb749462",995:"81403639"}[e]+".css"}}(),function(){n.g=function(){if("object"===typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"===typeof window)return window}}()}(),function(){n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}(),function(){var e={},t="shiweisuzhou:";n.l=function(o,a,r,i){if(e[o])e[o].push(a);else{var s,c;if(void 0!==r)for(var l=document.getElementsByTagName("script"),u=0;u<l.length;u++){var d=l[u];if(d.getAttribute("src")==o||d.getAttribute("data-webpack")==t+r){s=d;break}}s||(c=!0,s=document.createElement("script"),s.charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+r),s.src=o),e[o]=[a];var p=function(t,n){s.onerror=s.onload=null,clearTimeout(h);var a=e[o];if(delete e[o],s.parentNode&&s.parentNode.removeChild(s),a&&a.forEach(function(e){return e(n)}),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=p.bind(null,s.onerror),s.onload=p.bind(null,s.onload),c&&document.head.appendChild(s)}}}(),function(){n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}}(),function(){n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e}}(),function(){n.p="/"}(),function(){if("undefined"!==typeof document){var e=function(e,t,o,a,r){var i=document.createElement("link");i.rel="stylesheet",i.type="text/css",n.nc&&(i.nonce=n.nc);var s=function(n){if(i.onerror=i.onload=null,"load"===n.type)a();else{var o=n&&n.type,s=n&&n.target&&n.target.href||t,c=new Error("Loading CSS chunk "+e+" failed.\n("+o+": "+s+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=o,c.request=s,i.parentNode&&i.parentNode.removeChild(i),r(c)}};return i.onerror=i.onload=s,i.href=t,o?o.parentNode.insertBefore(i,o.nextSibling):document.head.appendChild(i),i},t=function(e,t){for(var n=document.getElementsByTagName("link"),o=0;o<n.length;o++){var a=n[o],r=a.getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(r===e||r===t))return a}var i=document.getElementsByTagName("style");for(o=0;o<i.length;o++){a=i[o],r=a.getAttribute("data-href");if(r===e||r===t)return a}},o=function(o){return new Promise(function(a,r){var i=n.miniCssF(o),s=n.p+i;if(t(i,s))return a();e(o,s,null,a,r)})},a={524:0};n.f.miniCss=function(e,t){var n={29:1,33:1,169:1,192:1,208:1,220:1,244:1,452:1,462:1,497:1,601:1,630:1,646:1,677:1,688:1,700:1,709:1,711:1,719:1,750:1,779:1,807:1,828:1,838:1,989:1,990:1,995:1};a[e]?t.push(a[e]):0!==a[e]&&n[e]&&t.push(a[e]=o(e).then(function(){a[e]=0},function(t){throw delete a[e],t}))}}}(),function(){var e={524:0};n.f.j=function(t,o){var a=n.o(e,t)?e[t]:void 0;if(0!==a)if(a)o.push(a[2]);else{var r=new Promise(function(n,o){a=e[t]=[n,o]});o.push(a[2]=r);var i=n.p+n.u(t),s=new Error,c=function(o){if(n.o(e,t)&&(a=e[t],0!==a&&(e[t]=void 0),a)){var r=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;s.message="Loading chunk "+t+" failed.\n("+r+": "+i+")",s.name="ChunkLoadError",s.type=r,s.request=i,a[1](s)}};n.l(i,c,"chunk-"+t,t)}},n.O.j=function(t){return 0===e[t]};var t=function(t,o){var a,r,i=o[0],s=o[1],c=o[2],l=0;if(i.some(function(t){return 0!==e[t]})){for(a in s)n.o(s,a)&&(n.m[a]=s[a]);if(c)var u=c(n)}for(t&&t(o);l<i.length;l++)r=i[l],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(u)},o=self["webpackChunkshiweisuzhou"]=self["webpackChunkshiweisuzhou"]||[];o.forEach(t.bind(null,0)),o.push=t.bind(null,o.push.bind(o))}();var o=n.O(void 0,[504],function(){return n(1534)});o=n.O(o)})();
|
|
//# sourceMappingURL=app.bde3f723.js.map
|