(function(){"use strict";var e={2199: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=n(5129),T={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=k.A.state.user?.info?.token||"";window.location.href="https://api.sutenong.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=T,A=(0,d.A)(w,y,_,!1,null,"6df28cc6",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}}},B=I,D=(0,d.A)(B,a,r,!1,null,null,null),$=D.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(98).then(n.bind(n,7098))},{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(87).then(n.bind(n,8087))},{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=k.A.state.user?.info?.token||"";t?n():n({path:"/Login",query:{redirect:e.fullPath}})}else n()});var j=z,q=n(9143),G=n.n(q),M=n(5847),V=n(4373);const F=V.A.create({timeout:6e3});F.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://api.sutenong.com";const n=k.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)),F.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)=>{F.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)=>{F.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("'),t=new RegExp("section","g"),e=e.replace(t,"div"),t=new RegExp("↵","g"),e=e.replace(t,"
"),e=e.replace(/