(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0dcfb504"],{1254:function(t,e,i){},"1da1":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));i("d3b7");function r(t,e,i,r,n,a,o){try{var s=t[a](o),c=s.value}catch(l){return void i(l)}s.done?e(c):Promise.resolve(c).then(r,n)}function n(t){return function(){var e=this,i=arguments;return new Promise((function(n,a){var o=t.apply(e,i);function s(t){r(o,n,a,s,c,"next",t)}function c(t){r(o,n,a,s,c,"throw",t)}s(void 0)}))}}},"2f84":function(t,e,i){"use strict";i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return a})),i.d(e,"b",(function(){return o}));var r=i("751a");function n(t){return Object(r["a"])({url:"/api/goodscollect/iscollect",data:t,forceLogin:!0})}function a(t){return Object(r["a"])({url:"/api/goodscollect/add",data:t,forceLogin:!0})}function o(t){return Object(r["a"])({url:"/api/goodscollect/delete",data:t,forceLogin:!0})}},"43fc":function(t,e,i){"use strict";i.r(e);var r=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"goods-list"},[t.keyword?i("div",{staticClass:"search_bread"},[i("router-link",{attrs:{to:"/"}},[t._v("首页")]),i("span",{staticClass:"padd-10"},[t._v("/")]),i("span",{staticClass:"keyword"},[t._v(t._s(t.keyword))])],1):!t.keyword&&t.catewords?i("div",{staticClass:"search_bread"},[i("router-link",{attrs:{to:"/"}},[t._v("首页")]),i("span",{staticClass:"padd-10"},[t._v("/")]),i("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():i("span",{staticClass:"padd-10"},[t._v("/")]),2!=t.filters.category_level&&3!=t.filters.category_level||!t.catewords.split("/")[1]?t._e():i("span",{staticClass:"keyword"},[t._v(t._s(t.catewords.split("/")[1]))])],1):t._e(),!t.keyword&&t.first_child_list?i("div",{staticClass:"search_bread"},[i("p",[t._v("分类:")]),i("ul",[i("li",{class:{active:0==t.first_index_active},on:{click:function(e){return t.setSiindex()}}},[i("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 i("li",{class:{active:e.category_id==t.first_index_active},on:{click:function(i){return t.setFiindex(e)}}},[i("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?i("div",{staticClass:"category"},t._l(t.attributeList,(function(e){return i("div",{key:"attr"+e.attr_id,staticClass:"brand"},[i("div",{staticClass:"table_head"},[t._v(t._s(e.attr_name)+":")]),i("div",{staticClass:"table_body"},[i("div",{staticClass:"content"},t._l(e.child,(function(r){return i("span",{key:r.attr_value_id},[e.isMuiltSelect?i("el-checkbox",{attrs:{label:r.attr_value_name,checked:r.selected},on:{change:function(i){return t.setAttrSelectedMuilt(e,r)}}}):i("el-link",{attrs:{underline:!1},on:{click:function(i){return t.setAttrSelected(e,r)}}},[t._v(t._s(r.attr_value_name))])],1)})),0)]),i("div",{staticClass:"table_op"},[i("el-button",{attrs:{size:"small",icon:"el-icon-circle-plus-outline"},on:{click:function(i){return t.setMuiltChoose(e)}}},[t._v("多选")])],1)])})),0):t._e()],i("div",{staticClass:"list-wrap"},[t.cargoList.length?i("div",{staticClass:"goods-recommended"},[i("goods-recommend",{attrs:{"page-size":t.cargoList.length<5?2:5}})],1):t._e(),i("div",{staticClass:"list-right"},[i("div",[i("div",{staticClass:"sort"},[i("div",{staticClass:"item",on:{click:function(e){return t.changeSort("")}}},[i("div",{staticClass:"item-name"},[t._v("综合")])]),i("div",{staticClass:"item",on:{click:function(e){return t.changeSort("sale_num")}}},[i("div",{staticClass:"item-name"},[t._v("销量")]),"sale_num"===t.filters.order&&"desc"===t.filters.sort?i("i",{staticClass:"el-icon-arrow-down el-icon--down"}):i("i",{staticClass:"el-icon-arrow-up el-icon--up"})]),i("div",{staticClass:"item",on:{click:function(e){return t.changeSort("discount_price")}}},[i("div",{staticClass:"item-name"},[t._v("价格")]),"discount_price"===t.filters.order&&"desc"===t.filters.sort?i("i",{staticClass:"el-icon-arrow-down el-icon--down"}):i("i",{staticClass:"el-icon-arrow-up el-icon--up"})]),i("div",{staticClass:"item-other"},[i("el-checkbox",{attrs:{label:"包邮"},model:{value:t.is_free_shipping,callback:function(e){t.is_free_shipping=e},expression:"is_free_shipping"}})],1),i("div",{staticClass:"input-wrap"},[i("div",{staticClass:"price_range"},[i("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"}}),i("span",[t._v("—")]),i("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),i("el-button",{attrs:{plain:"",size:"mini"},on:{click:t.handlePriceRange}},[t._v("确定")])],1)])]),t.cargoList.length?i("div",{staticClass:"cargo-list"},[i("div",{staticClass:"goods-info"},t._l(t.cargoList,(function(e,r){return i("div",{key:e.goods_id,staticClass:"item",on:{click:function(i){return t.$router.pushToTab({path:"/sku-"+e.sku_id})}}},[i("img",{staticClass:"img-wrap",attrs:{src:t.$img(e.sku_image,{size:"mid"})},on:{error:function(e){return t.imageError(r)}}}),i("div",{staticClass:"price-wrap"},[i("div",{staticClass:"price"},[i("p",[t._v("¥")]),t._v(" "+t._s(t.showPrice(e))+" "),i("div",{staticClass:"price-icon-wrap"},[e.member_price&&e.member_price==t.showPrice(e)?i("img",{attrs:{src:t.$img("upload/uniapp/index/VIP.png")}}):1==t.promotion_type?i("img",{attrs:{src:t.$img("upload/uniapp/index/discount.png")}}):t._e()])]),i("div",{staticClass:"market-price"},[t._v("¥"+t._s(e.market_price))])]),i("div",{staticClass:"goods-name"},[t._v(t._s(e.goods_name))]),i("div",{staticClass:"sale-num"},[i("p",[t._v(t._s(e.sale_num||0))]),t._v("人付款 ")]),i("div",{staticClass:"saling"},[1==e.is_free_shipping?i("div",{staticClass:"free-shipping"},[t._v("包邮")]):t._e(),1==e.promotion_type?i("div",{staticClass:"promotion-type"},[t._v("限时折扣")]):t._e()])])})),0),i("div",{staticClass:"pager"},[i("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)]):i("div",{staticClass:"empty"},[i("div",{staticClass:"ns-text-align"},[t._v("没有找到您想要的商品。换个条件试试吧")])])])])],2)},n=[],a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-breadcrumb",{staticClass:"app-breadcrumb",attrs:{separator:"/"}},[i("transition-group",{attrs:{name:"breadcrumb"}},[t._l(t.levelList,(function(e,r){return i("el-breadcrumb-item",{key:e.path},[0==r?i("span",[i("i",{staticClass:"el-icon-s-home"})]):t._e(),"noRedirect"===e.redirect||r==t.levelList.length-1?i("span",{staticClass:"no-redirect"},[t._v(t._s(e.meta.title))]):i("a",{on:{click:function(i){return i.preventDefault(),t.handleLink(e)}}},[t._v(t._s(e.meta.title))])])})),t.hasExtItem?i("el-breadcrumb-item",{key:"ext_item"},[t._t("ext_item")],2):t._e()],2)],1)},o=[];i("4de4"),i("99af"),i("b0c0"),i("498a");function s(t){var e=[],i=0;while(i=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 "+i);e.push({type:"NAME",index:i,value:o}),i=s}else e.push({type:"CLOSE",index:i,value:t[i++]});else e.push({type:"OPEN",index:i,value:t[i++]});else e.push({type:"ESCAPED_CHAR",index:i++,value:t[i++]});else e.push({type:"MODIFIER",index:i,value:t[i++]})}return e.push({type:"END",index:i,value:""}),e}function c(t,e){void 0===e&&(e={});var i=s(t),r=e.prefixes,n=void 0===r?"./":r,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 i(){return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,Object(k["c"])({goods_id:t.goods_id}).then((function(i){e.whetherCollection=i.data,0==e.whetherCollection?t.isCollection=!1:t.isCollection=!0})).catch((function(t){return t}));case 2:case"end":return i.stop()}}),i)})))()},editCollection:function(t){var e=this;return Object(y["a"])(regeneratorRuntime.mark((function i(){var r,n,a,o,s,c;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:return i.next=2,e.isCollect(t);case 2:if(r=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){i.next=8;break}return i.next=6,Object(k["a"])({goods_id:r,sku_id:n,site_id:a,sku_name:o,sku_price:s,sku_image:c}).then((function(i){e.$message({message:"收藏成功",type:"success"}),t.isCollection=!0})).catch((function(t){return t}));case 6:i.next=10;break;case 8:return i.next=10,Object(k["b"])({goods_id:r}).then((function(i){i.data>0&&(e.$message({message:"取消收藏成功",type:"success"}),t.isCollection=!1)})).catch((function(t){return t}));case 10:case"end":return i.stop()}}),i)})))()},getGoodsList:function(){var t=this,e=[];this.attributeList&&this.attributeList.forEach((function(t){t.child&&t.child.forEach((function(i){i.selected&&e.push({attr_id:t.attr_id,attr_value_id:i.attr_value_id})}))}));var i=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"])(i||{}).then((function(e){console.log(e,"goodsSkuPage");var i=e.data,r=i.count,n=(i.page_count,i.list);t.total=r,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 i=this;t.child&&t.child.forEach((function(t){i.$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 i=[];if(e.selected){var r=t.selectedValue||"";i=r.split(","),""==i[0]&&i.pop(0),-1==i.indexOf(e.attr_value_name)&&i.push(e.attr_value_name)}else{var n=t.selectedValue||"";i=n.split(","),""==i[0]&&i.pop(0),-1!==i.indexOf(e.attr_value_name)&&i.splice(i.indexOf(e.attr_value_name),1)}this.$set(t,"selectedValue",i.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)=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(c&&l){if(this.prev=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),I(i),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.tryLoc===t){var r=i.completion;if("throw"===r.type){var n=r.arg;I(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=i),g}}}function w(t,e,i,r){var n=e&&e.prototype instanceof x?e:x,a=Object.create(n.prototype),o=new $(r||[]);return a._invoke=S(t,i,o),a}function b(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(r){return{type:"throw",arg:r}}}function x(){}function C(){}function k(){}function E(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function L(t){function e(i,r,a,o){var s=b(t[i],t,r);if("throw"!==s.type){var c=s.arg,l=c.value;return l&&"object"===typeof l&&n.call(l,"__await")?Promise.resolve(l.__await).then((function(t){e("next",t,a,o)}),(function(t){e("throw",t,a,o)})):Promise.resolve(l).then((function(t){c.value=t,a(c)}),o)}o(s.arg)}var i;function r(t,r){function n(){return new Promise((function(i,n){e(t,r,i,n)}))}return i=i?i.then(n,n):n()}this._invoke=r}function S(t,e,i){var r=d;return function(n,a){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===n)throw a;return A()}i.method=n,i.arg=a;while(1){var o=i.delegate;if(o){var s=N(o,i);if(s){if(s===g)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===d)throw r=p,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=h;var c=b(t,e,i);if("normal"===c.type){if(r=i.done?p:f,c.arg===g)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=p,i.method="throw",i.arg=c.arg)}}}function N(t,e){var r=t.iterator[e.method];if(r===i){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=i,N(t,e),"throw"===e.method))return g;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return g}var n=b(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,g;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=i),e.delegate=null,g):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,g)}function O(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 I(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function $(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(O,this),this.reset(!0)}function P(t){if(t){var e=t[o];if(e)return e.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var r=-1,a=function e(){while(++r2)if(l=_(l),e=l.charCodeAt(0),43===e||45===e){if(i=l.charCodeAt(2),88===i||120===i)return NaN}else if(48===e){switch(l.charCodeAt(1)){case 66:case 98:r=2,n=49;break;case 79:case 111:r=8,n=55;break;default:return+l}for(a=l.slice(2),o=a.length,s=0;sn)return NaN;return parseInt(a,r)}return+l};if(a(v,!m(" 0o1")||!m("0b1")||m("+0x1"))){for(var x,C=function(t){var e=arguments.length<1?0:t,i=this;return i instanceof C&&(w?d((function(){y.valueOf.call(i)})):c(i)!=v)?l(new m(b(e)),i,C):b(e)},k=r?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)}},ab6d:function(t,e,i){"use strict";i("b4f2")},b46b:function(t,e,i){"use strict";i("ba91")},b4f2:function(t,e,i){},ba91:function(t,e,i){}}]); //# sourceMappingURL=chunk-0dcfb504.22ffeddf.js.map