(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5e79c369"],{"2e91":function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));r("4d20");function i(t,e,r,i,n,a,o){try{var s=t[a](o),c=s.value}catch(l){return void r(l)}s.done?e(c):Promise.resolve(c).then(i,n)}function n(t){return function(){var e=this,r=arguments;return new Promise((function(n,a){var o=t.apply(e,r);function s(t){i(o,n,a,s,c,"next",t)}function c(t){i(o,n,a,s,c,"throw",t)}s(void 0)}))}}},"2f84":function(t,e,r){"use strict";r.d(e,"c",(function(){return n})),r.d(e,"a",(function(){return a})),r.d(e,"b",(function(){return o}));var i=r("751a");function n(t){return Object(i["a"])({url:"/api/goodscollect/iscollect",data:t,forceLogin:!0})}function a(t){return Object(i["a"])({url:"/api/goodscollect/add",data:t,forceLogin:!0})}function o(t){return Object(i["a"])({url:"/api/goodscollect/delete",data:t,forceLogin:!0})}},"43fc":function(t,e,r){"use strict";r.r(e);var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"goods-list"},[t.keyword?r("div",{staticClass:"search_bread"},[r("router-link",{attrs:{to:"/"}},[t._v("首页")]),r("span",{staticClass:"padd-10"},[t._v("/")]),r("span",{staticClass:"keyword"},[t._v(t._s(t.keyword))])],1):!t.keyword&&t.catewords?r("div",{staticClass:"search_bread"},[r("router-link",{attrs:{to:"/"}},[t._v("首页")]),r("span",{staticClass:"padd-10"},[t._v("/")]),r("router-link",{attrs:{to:{path:"/list",query:{category_id:t.first_index,level:1}}}},[t._v(t._s(t.catewords.split("/")[0]))]),2!=t.filters.category_level&&3!=t.filters.category_level||!t.catewords.split("/")[1]?t._e():r("span",{staticClass:"padd-10"},[t._v("/")]),2!=t.filters.category_level&&3!=t.filters.category_level||!t.catewords.split("/")[1]?t._e():r("span",{staticClass:"keyword"},[t._v(t._s(t.catewords.split("/")[1]))])],1):t._e(),!t.keyword&&t.first_child_list?r("div",{staticClass:"search_bread"},[r("p",[t._v("分类:")]),r("ul",[r("li",{class:{active:0==t.first_index_active},on:{click:function(e){return t.setSiindex()}}},[r("router-link",{attrs:{to:{path:"/list",query:{category_id:t.two_index,level:2}}}},[t._v("全部")])],1),t._l(t.first_child_list,(function(e){return r("li",{class:{active:e.category_id==t.first_index_active},on:{click:function(r){return t.setFiindex(e)}}},[r("router-link",{attrs:{to:{path:"/list",query:{category_id:e.category_id,level:e.level}}}},[t._v(t._s(e.category_name))])],1)}))],2)]):t._e(),[t.brandList.length||t.attributeList.length?r("div",{staticClass:"category"},t._l(t.attributeList,(function(e){return r("div",{key:"attr"+e.attr_id,staticClass:"brand"},[r("div",{staticClass:"table_head"},[t._v(t._s(e.attr_name)+":")]),r("div",{staticClass:"table_body"},[r("div",{staticClass:"content"},t._l(e.child,(function(i){return r("span",{key:i.attr_value_id},[e.isMuiltSelect?r("el-checkbox",{attrs:{label:i.attr_value_name,checked:i.selected},on:{change:function(r){return t.setAttrSelectedMuilt(e,i)}}}):r("el-link",{attrs:{underline:!1},on:{click:function(r){return t.setAttrSelected(e,i)}}},[t._v(t._s(i.attr_value_name))])],1)})),0)]),r("div",{staticClass:"table_op"},[r("el-button",{attrs:{size:"small",icon:"el-icon-circle-plus-outline"},on:{click:function(r){return t.setMuiltChoose(e)}}},[t._v("多选")])],1)])})),0):t._e()],r("div",{staticClass:"list-wrap"},[t.cargoList.length?r("div",{staticClass:"goods-recommended"},[r("goods-recommend",{attrs:{"page-size":t.cargoList.length<5?2:5}})],1):t._e(),r("div",{staticClass:"list-right"},[r("div",[r("div",{staticClass:"sort"},[r("div",{staticClass:"item",on:{click:function(e){return t.changeSort("")}}},[r("div",{staticClass:"item-name"},[t._v("综合")])]),r("div",{staticClass:"item",on:{click:function(e){return t.changeSort("sale_num")}}},[r("div",{staticClass:"item-name"},[t._v("销量")]),"sale_num"===t.filters.order&&"desc"===t.filters.sort?r("i",{staticClass:"el-icon-arrow-down el-icon--down"}):r("i",{staticClass:"el-icon-arrow-up el-icon--up"})]),r("div",{staticClass:"item",on:{click:function(e){return t.changeSort("discount_price")}}},[r("div",{staticClass:"item-name"},[t._v("价格")]),"discount_price"===t.filters.order&&"desc"===t.filters.sort?r("i",{staticClass:"el-icon-arrow-down el-icon--down"}):r("i",{staticClass:"el-icon-arrow-up el-icon--up"})]),r("div",{staticClass:"item-other"},[r("el-checkbox",{attrs:{label:"包邮"},model:{value:t.is_free_shipping,callback:function(e){t.is_free_shipping=e},expression:"is_free_shipping"}})],1),r("div",{staticClass:"input-wrap"},[r("div",{staticClass:"price_range"},[r("el-input",{attrs:{placeholder:"最低价格",size:"small"},model:{value:t.filters.min_price,callback:function(e){t.$set(t.filters,"min_price",e)},expression:"filters.min_price"}}),r("span",[t._v("—")]),r("el-input",{attrs:{placeholder:"最高价格",size:"small"},model:{value:t.filters.max_price,callback:function(e){t.$set(t.filters,"max_price",e)},expression:"filters.max_price"}})],1),r("el-button",{attrs:{plain:"",size:"mini"},on:{click:t.handlePriceRange}},[t._v("确定")])],1)])]),t.cargoList.length?r("div",{staticClass:"cargo-list"},[r("div",{staticClass:"goods-info"},t._l(t.cargoList,(function(e,i){return r("div",{key:e.goods_id,staticClass:"item",on:{click:function(r){return t.$router.pushToTab({path:"/sku-"+e.sku_id})}}},[r("img",{staticClass:"img-wrap",attrs:{src:t.$img(e.sku_image,{size:"mid"})},on:{error:function(e){return t.imageError(i)}}}),r("div",{staticClass:"price-wrap"},[r("div",{staticClass:"price"},[r("p",[t._v("¥")]),t._v(" "+t._s(t.showPrice(e))+" "),r("div",{staticClass:"price-icon-wrap"},[e.member_price&&e.member_price==t.showPrice(e)?r("img",{attrs:{src:t.$img("upload/uniapp/index/VIP.png")}}):1==t.promotion_type?r("img",{attrs:{src:t.$img("upload/uniapp/index/discount.png")}}):t._e()])]),r("div",{staticClass:"market-price"},[t._v("¥"+t._s(e.market_price))])]),r("div",{staticClass:"goods-name"},[t._v(t._s(e.goods_name))]),r("div",{staticClass:"sale-num"},[r("p",[t._v(t._s(e.sale_num||0))]),t._v("人付款 ")]),r("div",{staticClass:"saling"},[1==e.is_free_shipping?r("div",{staticClass:"free-shipping"},[t._v("包邮")]):t._e(),1==e.promotion_type?r("div",{staticClass:"promotion-type"},[t._v("限时折扣")]):t._e()])])})),0),r("div",{staticClass:"pager"},[r("el-pagination",{attrs:{background:"","pager-count":5,total:t.total,"prev-text":"上一页","next-text":"下一页","current-page":t.currentPage,"page-size":t.pageSize,"hide-on-single-page":""},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handlePageSizeChange,"current-change":t.handleCurrentPageChange}})],1)]):r("div",{staticClass:"empty"},[r("div",{staticClass:"ns-text-align"},[t._v("没有找到您想要的商品。换个条件试试吧")])])])])],2)},n=[],a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[r("transition-group",{attrs:{name:"breadcrumb"}},[t._l(t.levelList,(function(e,i){return r("el-breadcrumb-item",{key:e.path},[0==i?r("span",[r("i",{staticClass:"el-icon-s-home"})]):t._e(),"noRedirect"===e.redirect||i==t.levelList.length-1?r("span",{staticClass:"no-redirect"},[t._v(t._s(e.meta.title))]):r("a",{on:{click:function(r){return r.preventDefault(),t.handleLink(e)}}},[t._v(t._s(e.meta.title))])])})),t.hasExtItem?r("el-breadcrumb-item",{key:"ext_item"},[t._t("ext_item")],2):t._e()],2)],1)},o=[];r("51d7"),r("3f4b"),r("1e6a"),r("270d");function s(t){var e=[],r=0;while(r=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||95===c))break;o+=t[s++]}if(!o)throw new TypeError("Missing parameter name at "+r);e.push({type:"NAME",index:r,value:o}),r=s}else e.push({type:"CLOSE",index:r,value:t[r++]});else e.push({type:"OPEN",index:r,value:t[r++]});else e.push({type:"ESCAPED_CHAR",index:r++,value:t[r++]});else e.push({type:"MODIFIER",index:r,value:t[r++]})}return e.push({type:"END",index:r,value:""}),e}function c(t,e){void 0===e&&(e={});var r=s(t),i=e.prefixes,n=void 0===i?"./":i,a="[^"+d(e.delimiter||"/#?")+"]+?",o=[],c=0,l=0,u="",f=function(t){if(l0&&e.$message({message:"加入购物车成功",type:"success"})})).catch((function(t){return t}))},isCollect:function(t){var e=this;return Object(y["a"])(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(k["c"])({goods_id:t.goods_id}).then((function(r){e.whetherCollection=r.data,0==e.whetherCollection?t.isCollection=!1:t.isCollection=!0})).catch((function(t){return t}));case 2:case"end":return r.stop()}}),r)})))()},editCollection:function(t){var e=this;return Object(y["a"])(regeneratorRuntime.mark((function r(){var i,n,a,o,s,c;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,e.isCollect(t);case 2:if(i=t.goods_id,n=t.sku_id,a=t.site_id,o=t.sku_name,s=t.sku_price,c=t.sku_image,0!=e.whetherCollection){r.next=8;break}return r.next=6,Object(k["a"])({goods_id:i,sku_id:n,site_id:a,sku_name:o,sku_price:s,sku_image:c}).then((function(r){e.$message({message:"收藏成功",type:"success"}),t.isCollection=!0})).catch((function(t){return t}));case 6:r.next=10;break;case 8:return r.next=10,Object(k["b"])({goods_id:i}).then((function(r){r.data>0&&(e.$message({message:"取消收藏成功",type:"success"}),t.isCollection=!1)})).catch((function(t){return t}));case 10:case"end":return r.stop()}}),r)})))()},getGoodsList:function(){var t=this,e=[];this.attributeList&&this.attributeList.forEach((function(t){t.child&&t.child.forEach((function(r){r.selected&&e.push({attr_id:t.attr_id,attr_value_id:r.attr_value_id})}))}));var r=Object(w["a"])({page:this.currentPage,page_size:this.pageSize,site_id:this.filters.siteId,keyword:this.keyword,attr:e.length>0?JSON.stringify(e):""},this.filters);Object(b["h"])(r||{}).then((function(e){console.log(e,"goodsSkuPage");var r=e.data,i=r.count,n=(r.page_count,r.list);t.total=i,t.cargoList=n,t.loading=!1})).catch((function(e){t.loading=!1}))},onChooseBrand:function(t){this.choosedBrand=t,this.filters.brand_id=t.id,this.getGoodsList()},setMuiltChoose:function(t){this.$set(t,"isMuiltSelect",!t.isMuiltSelect),this.getGoodsList()},setAttrSelected:function(t,e){var r=this;t.child&&t.child.forEach((function(t){r.$set(t,"selected",!1)})),this.$set(e,"selected",!0),this.$set(t,"selectedValue",e.attr_value_name),this.getGoodsList()},setAttrSelectedMuilt:function(t,e){this.$set(e,"selected",!e.selected);var r=[];if(e.selected){var i=t.selectedValue||"";r=i.split(","),""==r[0]&&r.pop(0),-1==r.indexOf(e.attr_value_name)&&r.push(e.attr_value_name)}else{var n=t.selectedValue||"";r=n.split(","),""==r[0]&&r.pop(0),-1!==r.indexOf(e.attr_value_name)&&r.splice(r.indexOf(e.attr_value_name),1)}this.$set(t,"selectedValue",r.toString()),this.getGoodsList()},colseBrand:function(){this.choosedBrand="",this.filters.brand_id="",this.getGoodsList()},colseAttr:function(t){t.selectedValue="",t.child.forEach((function(t){t.selected=!1})),t.isMuiltSelect=!1,this.getGoodsList()},handlePageSizeChange:function(t){this.pageSize=t,this.getGoodsList()},handleCurrentPageChange:function(t){this.currentPage=t,this.getGoodsList()},handlePriceRange:function(){if(Number(this.filters.min_price)>Number(this.filters.max_price)){var t=[this.filters.max_price,this.filters.min_price];this.filters.min_price=t[0],this.filters.max_price=t[1]}this.getGoodsList()},handleChangeInitial:function(t){this.currentInitial=t},changeSort:function(t){this.filters.order===t?this.$set(this.filters,"sort","desc"===this.filters.sort?"asc":"desc"):(this.$set(this.filters,"order",t),this.$set(this.filters,"sort","desc")),this.getGoodsList()}},watch:{is_free_shipping:function(t){this.filters.is_free_shipping=t?1:"",this.getGoodsList()},is_own:function(t){this.filters.is_own=t?1:"",this.getGoodsList()},$route:function(t){console.log(t,""),t.query.keyword&&(window.document.title="".concat(t.query.keyword," - ").concat(this.siteInfo.site_name)),t.query.level&&(this.filters.category_level=t.query.level,this.filters.category_id=t.query.category_id,this.getGoodsList(),3!=t.query.level&&this.categorySearch()),void 0==t.query.category_id&&(this.catewords="$route$route",this.currentPage=1,this.keyword=t.query.keyword,this.filters.category_id=t.query.category_id||"",this.filters.category_level=t.query.level||"",this.filters.brand_id=t.query.brand_id||"",this.getGoodsList())}}},L={name:"list",components:{BreadCrumbs:v,GoodsRecommend:m["a"]},data:function(){return{}},mixins:[E],created:function(){},methods:{showPrice:function(t){var e=t.discount_price;return t.member_price&&parseFloat(t.member_price)2)if(l=_(l),e=l.charCodeAt(0),43===e||45===e){if(r=l.charCodeAt(2),88===r||120===r)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:i=2,n=49;break;case 79:case 111:i=8,n=55;break;default:return+l}for(a=l.slice(2),o=a.length,s=0;sn)return NaN;return parseInt(a,i)}return+l};if(a(v,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var x,C=function(t){var e=arguments.length<1?0:t,r=this;return r instanceof C&&(w?d((function(){y.valueOf.call(r)})):c(r)!=v)?l(new m(b(e)),r,C):b(e)},k=i?h(m):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger,fromString,range".split(","),E=0;k.length>E;E++)s(m,x=k[E])&&!s(C,x)&&g(C,x,p(m,x));C.prototype=y,y.constructor=C,o(n,v,C)}},"6a61":function(t,e,r){var i=function(t){"use strict";var e,r=Object.prototype,i=r.hasOwnProperty,n="function"===typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function c(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(P){c=function(t,e,r){return t[e]=r}}function l(t,e,r,i){var n=e&&e.prototype instanceof _?e:_,a=Object.create(n.prototype),o=new N(i||[]);return a._invoke=E(t,r,o),a}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(P){return{type:"throw",arg:P}}}t.wrap=l;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",g={};function _(){}function v(){}function m(){}var y={};y[a]=function(){return this};var w=Object.getPrototypeOf,b=w&&w(w(I([])));b&&b!==r&&i.call(b,a)&&(y=b);var x=m.prototype=_.prototype=Object.create(y);function C(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(n,a,o,s){var c=u(t[n],t,a);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"===typeof d&&i.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,o,s)}),(function(t){r("throw",t,o,s)})):e.resolve(d).then((function(t){l.value=t,o(l)}),(function(t){return r("throw",t,o,s)}))}s(c.arg)}var n;function a(t,i){function a(){return new e((function(e,n){r(t,i,e,n)}))}return n=n?n.then(a,a):a()}this._invoke=a}function E(t,e,r){var i=d;return function(n,a){if(i===h)throw new Error("Generator is already running");if(i===p){if("throw"===n)throw a;return $()}r.method=n,r.arg=a;while(1){var o=r.delegate;if(o){var s=L(o,r);if(s){if(s===g)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=h;var c=u(t,e,r);if("normal"===c.type){if(i=r.done?p:f,c.arg===g)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=p,r.method="throw",r.arg=c.arg)}}}function L(t,r){var i=t.iterator[r.method];if(i===e){if(r.delegate=null,"throw"===r.method){if(t.iterator["return"]&&(r.method="return",r.arg=e,L(t,r),"throw"===r.method))return g;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=u(i,t.iterator,r.arg);if("throw"===n.type)return r.method="throw",r.arg=n.arg,r.delegate=null,g;var a=n.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function I(t){if(t){var r=t[a];if(r)return r.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function r(){while(++n=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var i=r.completion;if("throw"===i.type){var n=i.arg;O(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,i){return this.delegate={iterator:I(t),resultName:r,nextLoc:i},"next"===this.method&&(this.arg=e),g}},t}(t.exports);try{regeneratorRuntime=i}catch(n){Function("r","regeneratorRuntime = r")(i)}},"7faa":function(t,e,r){},a63f:function(t,e,r){"use strict";var i=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"goods-recommend"},[r("h4",[t._v("商品精选")]),t.list.length?r("ul",t._l(t.list,(function(e,i){return r("li",{key:i,on:{click:function(r){return t.$router.pushToTab({path:"/sku-"+e.sku_id})}}},[r("div",{staticClass:"img-wrap"},[r("img",{attrs:{src:t.$img(e["sku_image"],{size:"mid"})},on:{error:function(e){return t.imageError(i)}}})]),r("div",{staticClass:"price"},[t._v("¥"+t._s(e.discount_price))]),r("p",{staticClass:"sku-name"},[t._v(t._s(e.goods_name))]),r("div",{staticClass:"info-wrap"})])})),0):t._e()])},n=[],a=(r("65ba"),r("d211")),o=r("cf6b"),s=r("a2a9"),c={name:"goods_recommend",props:{page:{type:[Number,String],default:1},pageSize:{type:[Number,String],default:5}},data:function(){return{loading:!0,list:[]}},created:function(){this.getGoodsRecommend()},computed:Object(a["a"])({},Object(o["b"])(["defaultGoodsImage"])),methods:{getGoodsRecommend:function(){var t=this;Object(s["e"])({page:this.page,page_size:this.pageSize}).then((function(e){0==e.code&&(t.list=e.data.list),t.loading=!1})).catch((function(e){t.loading=!1}))},imageError:function(t){this.list[t].sku_image=this.defaultGoodsImage}}},l=c,u=(r("b46b"),r("5d22")),d=Object(u["a"])(l,i,n,!1,null,"427ce1a4",null);e["a"]=d.exports},a7bc:function(t,e,r){"use strict";r("e6f5")},ab6d:function(t,e,r){"use strict";r("e26d")},b46b:function(t,e,r){"use strict";r("7faa")},e26d:function(t,e,r){},e6f5:function(t,e,r){}}]); //# sourceMappingURL=chunk-5e79c369.8cc4d586.js.map