chunk-5e79c369.8cc4d586.js 27 KB

12
  1. (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<t.length){var i=t[r];if("*"!==i&&"+"!==i&&"?"!==i)if("\\"!==i)if("{"!==i)if("}"!==i)if(":"!==i)if("("!==i)e.push({type:"CHAR",index:r,value:t[r++]});else{var n=1,a="";s=r+1;if("?"===t[s])throw new TypeError('Pattern cannot start with "?" at '+s);while(s<t.length)if("\\"!==t[s]){if(")"===t[s]){if(n--,0===n){s++;break}}else if("("===t[s]&&(n++,"?"!==t[s+1]))throw new TypeError("Capturing groups are not allowed at "+s);a+=t[s++]}else a+=t[s++]+t[s++];if(n)throw new TypeError("Unbalanced pattern at "+r);if(!a)throw new TypeError("Missing pattern at "+r);e.push({type:"PATTERN",index:r,value:a}),r=s}else{var o="",s=r+1;while(s<t.length){var c=t.charCodeAt(s);if(!(c>=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(l<r.length&&r[l].type===t)return r[l++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var i=r[l],n=i.type,a=i.index;throw new TypeError("Unexpected "+n+" at "+a+", expected "+t)},p=function(){var t,e="";while(t=f("CHAR")||f("ESCAPED_CHAR"))e+=t;return e};while(l<r.length){var g=f("CHAR"),_=f("NAME"),v=f("PATTERN");if(_||v){var m=g||"";-1===n.indexOf(m)&&(u+=m,m=""),u&&(o.push(u),u=""),o.push({name:_||c++,prefix:m,suffix:"",pattern:v||a,modifier:f("MODIFIER")||""})}else{var y=g||f("ESCAPED_CHAR");if(y)u+=y;else{u&&(o.push(u),u="");var w=f("OPEN");if(w){m=p();var b=f("NAME")||"",x=f("PATTERN")||"",C=p();h("CLOSE"),o.push({name:b||(x?c++:""),pattern:b&&!x?a:x,prefix:m,suffix:C,modifier:f("MODIFIER")||""})}else h("END")}}}return o}function l(t,e){return u(c(t,e),e)}function u(t,e){void 0===e&&(e={});var r=f(e),i=e.encode,n=void 0===i?function(t){return t}:i,a=e.validate,o=void 0===a||a,s=t.map((function(t){if("object"===typeof t)return new RegExp("^(?:"+t.pattern+")$",r)}));return function(e){for(var r="",i=0;i<t.length;i++){var a=t[i];if("string"!==typeof a){var c=e?e[a.name]:void 0,l="?"===a.modifier||"*"===a.modifier,u="*"===a.modifier||"+"===a.modifier;if(Array.isArray(c)){if(!u)throw new TypeError('Expected "'+a.name+'" to not repeat, but got an array');if(0===c.length){if(l)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(var d=0;d<c.length;d++){var f=n(c[d],a);if(o&&!s[i].test(f))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but got "'+f+'"');r+=a.prefix+f+a.suffix}}else if("string"!==typeof c&&"number"!==typeof c){if(!l){var h=u?"an array":"a string";throw new TypeError('Expected "'+a.name+'" to be '+h)}}else{f=n(String(c),a);if(o&&!s[i].test(f))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but got "'+f+'"');r+=a.prefix+f+a.suffix}}else r+=a}return r}}function d(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function f(t){return t&&t.sensitive?"":"i"}var h={props:{hasExtItem:!1},data:function(){return{levelList:null}},watch:{$route:function(){this.getBreadcrumb()}},created:function(){this.getBreadcrumb()},methods:{getBreadcrumb:function(){var t=this.$route.matched.filter((function(t){return t.meta&&t.meta.title})),e=t[0];this.isHome(e)||(t=[{path:"/index",meta:{title:"首页"}}].concat(t)),this.levelList=t.filter((function(t){return t.meta&&t.meta.title&&!1!==t.meta.breadcrumb}))},isHome:function(t){var e=t&&t.name;return!!e&&e.trim().toLocaleLowerCase()==="index".toLocaleLowerCase()},pathCompile:function(t){var e=this.$route.params,r=l(t);return r(e)},handleLink:function(t){var e=t.redirect,r=t.path;e?this.$router.push(e):this.$router.push(this.pathCompile(r))}}},p=h,g=(r("a7bc"),r("5d22")),_=Object(g["a"])(p,a,o,!1,null,"a18e9fe4",null),v=_.exports,m=r("a63f"),y=(r("5cff"),r("4ec5"),r("b4e6"),r("65ba"),r("4d20"),r("6a22"),r("8d56"),r("5f89"),r("dcd4"),r("6a61"),r("2e91")),w=r("d211"),b=r("a2a9"),x=r("cf6b"),C=r("8894"),k=r("2f84"),E={data:function(){return{cargoList:[],shopList:[],brandList:[],attributeList:[],brandInitialList:[],currentInitial:"",choosedBrand:"",hasChoosedAttrs:!1,total:0,keyword:"",catewords:"",currentPage:1,pageSize:12,is_free_shipping:0,is_own:"",filters:{site_id:0,category_id:0,category_level:0,brand_id:0,min_price:"",max_price:"",order:"",sort:"desc",coupon:0},loading:!0,whetherCollection:0,first_index:0,two_index:0,first_child_list:[],first_index_active:0,testingNumberState:!1}},created:function(){this.keyword=this.$route.query.keyword||"",this.$route.query.keyword&&(window.document.title="".concat(this.$route.query.keyword," - ").concat(this.siteInfo.site_name)),this.filters.category_id=this.$route.query.category_id||"",this.filters.category_level=this.$route.query.level||"",this.filters.brand_id=this.$route.query.brand_id||"",this.filters.coupon=this.$route.query.coupon||0,this.getGoodsList(),this.$route.query.category_id&&this.categorySearch()},computed:Object(w["a"])({},Object(x["b"])(["defaultGoodsImage","siteInfo"])),methods:{categorySearch:function(){var t=this;Object(C["b"])({category_id:this.filters.category_id}).then((function(e){console.log(e,"商品分类搜索"),0==e.code&&e.data&&(t.catewords=e.data.category_full_name,t.first_index=e.data.category_id_1,t.two_index=e.data.category_id_2,t.first_child_list=e.data.child_list,t.first_index_active=0,window.document.title="".concat(e.data.category_name," - ").concat(t.siteInfo.site_name))})).catch((function(t){}))},setFiindex:function(t){console.log(t,"setFiindex"),this.first_index_active=t.category_id,window.document.title="".concat(t.category_name," - ").concat(this.siteInfo.site_name)},setSiindex:function(){this.first_index_active=0},addToCart:function(t){var e=this;this.$store.dispatch("cart/add_to_cart",t).then((function(t){var r=t.data;r>0&&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)<parseFloat(e)&&(e=t.member_price),e}}},S=L,O=(r("ab6d"),Object(g["a"])(S,i,n,!1,null,"bf5b4724",null));e["default"]=O.exports},"65ba":function(t,e,r){"use strict";var i=r("6921"),n=r("4c16"),a=r("adc7"),o=r("58e4"),s=r("631e"),c=r("40e6"),l=r("d922"),u=r("6a27"),d=r("e4bd"),f=r("4035"),h=r("889a").f,p=r("37cb4").f,g=r("60ce").f,_=r("13cf").trim,v="Number",m=n[v],y=m.prototype,w=c(f(y))==v,b=function(t){var e,r,i,n,a,o,s,c,l=u(t,!1);if("string"==typeof l&&l.length>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;s<o;s++)if(c=a.charCodeAt(s),c<48||c>n)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<t.length)if(i.call(t,n))return r.value=t[n],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}return{next:$}}function $(){return{value:e,done:!0}}return v.prototype=x.constructor=m,m.constructor=v,v.displayName=c(m,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,m):(t.__proto__=m,c(t,s,"GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},C(k.prototype),k.prototype[o]=function(){return this},t.AsyncIterator=k,t.async=function(e,r,i,n,a){void 0===a&&(a=Promise);var o=new k(l(e,r,i,n),a);return t.isGeneratorFunction(r)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},C(x),c(x,s,"Generator"),x[a]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){while(e.length){var i=e.pop();if(i in t)return r.value=i,r.done=!1,r}return r.done=!0,r}},t.values=I,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(O),!t)for(var r in this)"t"===r.charAt(0)&&i.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0],e=t.completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(i,n){return s.type="throw",s.arg=t,r.next=i,n&&(r.method="next",r.arg=e),!!n}for(var a=this.tryEntries.length-1;a>=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<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var a=n;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var o=a?a.completion:{};return o.type=t,o.arg=e,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=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){}}]);
  2. //# sourceMappingURL=chunk-5e79c369.8cc4d586.js.map