| 12 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-58701434"],{"068f":function(t,e,i){},"1da1":function(t,e,i){"use strict";i.d(e,"a",(function(){return n}));i("d3b7"),i("e6cf");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.goods_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("public/uniapp/index/VIP.png")}}):1==t.promotion_type?i("img",{attrs:{src:t.$img("public/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("99af"),i("4de4"),i("b0c0"),i("498a");function s(t){var e=[],i=0;while(i<t.length){var r=t[i];if("*"!==r&&"+"!==r&&"?"!==r)if("\\"!==r)if("{"!==r)if("}"!==r)if(":"!==r)if("("!==r)e.push({type:"CHAR",index:i,value:t[i++]});else{var n=1,a="";s=i+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 "+i);if(!a)throw new TypeError("Missing pattern at "+i);e.push({type:"PATTERN",index:i,value:a}),i=s}else{var o="",s=i+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 "+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(l<i.length&&i[l].type===t)return i[l++].value},h=function(t){var e=f(t);if(void 0!==e)return e;var r=i[l],n=r.type,a=r.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<i.length){var g=f("CHAR"),v=f("NAME"),_=f("PATTERN");if(v||_){var m=g||"";-1===n.indexOf(m)&&(u+=m,m=""),u&&(o.push(u),u=""),o.push({name:v||c++,prefix:m,suffix:"",pattern:_||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 i=f(e),r=e.encode,n=void 0===r?function(t){return t}:r,a=e.validate,o=void 0===a||a,s=t.map((function(t){if("object"===typeof t)return new RegExp("^(?:"+t.pattern+")$",i)}));return function(e){for(var i="",r=0;r<t.length;r++){var a=t[r];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[r].test(f))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'", but got "'+f+'"');i+=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[r].test(f))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but got "'+f+'"');i+=a.prefix+f+a.suffix}}else i+=a}return i}}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,i=l(t);return i(e)},handleLink:function(t){var e=t.redirect,i=t.path;e?this.$router.push(e):this.$router.push(this.pathCompile(i))}}},p=h,g=(i("df8f"),i("2877")),v=Object(g["a"])(p,a,o,!1,null,"692967a6",null),_=v.exports,m=i("a63f"),y=(i("4160"),i("c975"),i("a434"),i("a9e3"),i("d3b7"),i("ac1f"),i("25f0"),i("1276"),i("159b"),i("96cf"),i("1da1")),w=i("5530"),b=i("a2a9"),x=i("2f62"),C=i("8894"),k=i("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 i=t.data;i>0&&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:_,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,N=(i("8e67"),Object(g["a"])(S,r,n,!1,null,"273642a8",null));e["default"]=N.exports},4927:function(t,e,i){},"8e1e":function(t,e,i){},"8e67":function(t,e,i){"use strict";var r=i("4927"),n=i.n(r);n.a},"96cf":function(t,e,i){var r=function(t){"use strict";var e,i=Object.prototype,r=i.hasOwnProperty,n="function"===typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function c(t,e,i,r){var n=e&&e.prototype instanceof g?e:g,a=Object.create(n.prototype),o=new N(r||[]);return a._invoke=k(t,i,o),a}function l(t,e,i){try{return{type:"normal",arg:t.call(e,i)}}catch(r){return{type:"throw",arg:r}}}t.wrap=c;var u="suspendedStart",d="suspendedYield",f="executing",h="completed",p={};function g(){}function v(){}function _(){}var m={};m[a]=function(){return this};var y=Object.getPrototypeOf,w=y&&y(y(O([])));w&&w!==i&&r.call(w,a)&&(m=w);var b=_.prototype=g.prototype=Object.create(m);function x(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function C(t,e){function i(n,a,o,s){var c=l(t[n],t,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"===typeof d&&r.call(d,"__await")?e.resolve(d.__await).then((function(t){i("next",t,o,s)}),(function(t){i("throw",t,o,s)})):e.resolve(d).then((function(t){u.value=t,o(u)}),(function(t){return i("throw",t,o,s)}))}s(c.arg)}var n;function a(t,r){function a(){return new e((function(e,n){i(t,r,e,n)}))}return n=n?n.then(a,a):a()}this._invoke=a}function k(t,e,i){var r=u;return function(n,a){if(r===f)throw new Error("Generator is already running");if(r===h){if("throw"===n)throw a;return I()}i.method=n,i.arg=a;while(1){var o=i.delegate;if(o){var s=E(o,i);if(s){if(s===p)continue;return s}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(r===u)throw r=h,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);r=f;var c=l(t,e,i);if("normal"===c.type){if(r=i.done?h:d,c.arg===p)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(r=h,i.method="throw",i.arg=c.arg)}}}function E(t,i){var r=t.iterator[i.method];if(r===e){if(i.delegate=null,"throw"===i.method){if(t.iterator["return"]&&(i.method="return",i.arg=e,E(t,i),"throw"===i.method))return p;i.method="throw",i.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var n=l(r,t.iterator,i.arg);if("throw"===n.type)return i.method="throw",i.arg=n.arg,i.delegate=null,p;var a=n.arg;return a?a.done?(i[t.resultName]=a.value,i.next=t.nextLoc,"return"!==i.method&&(i.method="next",i.arg=e),i.delegate=null,p):a:(i.method="throw",i.arg=new TypeError("iterator result is not an object"),i.delegate=null,p)}function L(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 S(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function O(t){if(t){var i=t[a];if(i)return i.call(t);if("function"===typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function i(){while(++n<t.length)if(r.call(t,n))return i.value=t[n],i.done=!1,i;return i.value=e,i.done=!0,i};return o.next=o}}return{next:I}}function I(){return{value:e,done:!0}}return v.prototype=b.constructor=_,_.constructor=v,_[s]=v.displayName="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,_):(t.__proto__=_,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},x(C.prototype),C.prototype[o]=function(){return this},t.AsyncIterator=C,t.async=function(e,i,r,n,a){void 0===a&&(a=Promise);var o=new C(c(e,i,r,n),a);return t.isGeneratorFunction(i)?o:o.next().then((function(t){return t.done?t.value:o.next()}))},x(b),b[s]="Generator",b[a]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var i in t)e.push(i);return e.reverse(),function i(){while(e.length){var r=e.pop();if(r in t)return i.value=r,i.done=!1,i}return i.done=!0,i}},t.values=O,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(S),!t)for(var i in this)"t"===i.charAt(0)&&r.call(this,i)&&!isNaN(+i.slice(1))&&(this[i]=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 i=this;function n(r,n){return s.type="throw",s.arg=t,i.next=r,n&&(i.method="next",i.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=r.call(o,"catchLoc"),l=r.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 i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i];if(n.tryLoc<=this.prev&&r.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,p):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),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var i=this.tryEntries[e];if(i.finallyLoc===t)return this.complete(i.completion,i.afterLoc),S(i),p}},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;S(i)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,i,r){return this.delegate={iterator:O(t),resultName:i,nextLoc:r},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=r}catch(n){Function("r","regeneratorRuntime = r")(r)}},a63f:function(t,e,i){"use strict";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-recommend"},[i("h4",[t._v("商品精选")]),t.list.length?i("ul",t._l(t.list,(function(e,r){return i("li",{key:r,on:{click:function(i){return t.$router.pushToTab({path:"/sku-"+e.sku_id})}}},[i("div",{staticClass:"img-wrap"},[i("img",{attrs:{src:t.$img(e["sku_image"],{size:"mid"})},on:{error:function(e){return t.imageError(r)}}})]),i("div",{staticClass:"price"},[t._v("¥"+t._s(e.discount_price))]),i("p",{staticClass:"sku-name"},[t._v(t._s(e.goods_name))]),i("div",{staticClass:"info-wrap"})])})),0):t._e()])},n=[],a=(i("a9e3"),i("5530")),o=i("2f62"),s=i("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=(i("ad25"),i("2877")),d=Object(u["a"])(l,r,n,!1,null,"0b44e2de",null);e["a"]=d.exports},a9e3:function(t,e,i){"use strict";var r=i("83ab"),n=i("da84"),a=i("94ca"),o=i("6eeb"),s=i("5135"),c=i("c6b6"),l=i("7156"),u=i("c04e"),d=i("d039"),f=i("7c73"),h=i("241c").f,p=i("06cf").f,g=i("9bf2").f,v=i("58a8").trim,_="Number",m=n[_],y=m.prototype,w=c(f(y))==_,b=function(t){var e,i,r,n,a,o,s,c,l=u(t,!1);if("string"==typeof l&&l.length>2)if(l=v(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;s<o;s++)if(c=a.charCodeAt(s),c<48||c>n)return NaN;return parseInt(a,r)}return+l};if(a(_,!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)!=_)?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".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,_,C)}},ad25:function(t,e,i){"use strict";var r=i("8e1e"),n=i.n(r);n.a},df8f:function(t,e,i){"use strict";var r=i("068f"),n=i.n(r);n.a}}]);
- //# sourceMappingURL=chunk-58701434.6e5caf72.js.map
|