| 12 |
- (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<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"),_=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 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("a7bc"),i("2877")),_=Object(g["a"])(p,a,o,!1,null,"a18e9fe4",null),v=_.exports,m=i("a63f"),y=i("1da1"),w=i("5530"),b=(i("96cf"),i("159b"),i("ac1f"),i("1276"),i("a434"),i("d3b7"),i("25f0"),i("a9e3"),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: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,N=(i("ab6d"),Object(g["a"])(S,r,n,!1,null,"bf5b4724",null));e["default"]=N.exports},"96cf":function(t,e){!function(e){"use strict";var i,r=Object.prototype,n=r.hasOwnProperty,a="function"===typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag",l="object"===typeof t,u=e.regeneratorRuntime;if(u)l&&(t.exports=u);else{u=e.regeneratorRuntime=l?t.exports:{},u.wrap=w;var d="suspendedStart",f="suspendedYield",h="executing",p="completed",g={},_={};_[o]=function(){return this};var v=Object.getPrototypeOf,m=v&&v(v(P([])));m&&m!==r&&n.call(m,o)&&(_=m);var y=k.prototype=x.prototype=Object.create(_);C.prototype=y.constructor=k,k.constructor=C,k[c]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(t){var e="function"===typeof t&&t.constructor;return!!e&&(e===C||"GeneratorFunction"===(e.displayName||e.name))},u.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,k):(t.__proto__=k,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(y),t},u.awrap=function(t){return{__await:t}},E(L.prototype),L.prototype[s]=function(){return this},u.AsyncIterator=L,u.async=function(t,e,i,r){var n=new L(w(t,e,i,r));return u.isGeneratorFunction(e)?n:n.next().then((function(t){return t.done?t.value:n.next()}))},E(y),y[c]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},u.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}},u.values=P,$.prototype={constructor:$,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=i,this.done=!1,this.delegate=null,this.method="next",this.arg=i,this.tryEntries.forEach(I),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=i)},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 e=this;function r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=i),!!n}for(var a=this.tryEntries.length-1;a>=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<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;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 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(++r<t.length)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=i,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:i,done:!0}}}(function(){return this}()||Function("return this")())},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("5530"),o=(i("a9e3"),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("b46b"),i("2877")),d=Object(u["a"])(l,r,n,!1,null,"427ce1a4",null);e["a"]=d.exports},a7bc:function(t,e,i){"use strict";i("1254")},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,_=i("58a8").trim,v="Number",m=n[v],y=m.prototype,w=c(f(y))==v,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=_(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(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
|