pages-product-search.1bc48440.js 17 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-search"],{"12c5":function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getProducts=o,e.goodsDetail=r,e.getBargainList=s,e.cartAdd=c,e.collectAdd=d,e.collectDel=l,e.searchKeyword=u,e.groomList=f,e.seckillGoods=v,e.groupGoods=h,e.getCategoryList=m,e.getCombinationList=p,e.getCombinationLisRemove=g,e.getCombinationLisPink=b,e.getCombinationPoster=w,e.getSeckillClass=y,e.getSeckillList=x,e.reply_config=k,e.reply_list=C;var n=i(a("4c3b"));function o(t){return(0,n.default)({url:"/api/products",method:"get",data:t})}function r(t,e){return(0,n.default)({url:"/api/product/detail/"+e,method:"get",data:t})}function s(t){return(0,n.default)({url:"/api/bargain/list",method:"get",data:t})}function c(t){return(0,n.default)({url:"/api/cart/add",method:"post",data:t})}function d(t){return(0,n.default)({url:"/api/collect/add",method:"post",data:t})}function l(t){return(0,n.default)({url:"/api/collect/del",method:"post",data:t})}function u(t){return(0,n.default)({url:"/api/search/keyword",method:"get",data:t})}function f(t,e){return(0,n.default)({url:"/api/groom/list/"+e,method:"get",data:t})}function v(t,e){return(0,n.default)({url:"/api/seckill/detail/"+e,method:"get",data:t})}function h(t,e){return(0,n.default)({url:"/api/combination/detail/"+e,method:"get",data:t})}function m(t){return(0,n.default)({url:"/api/category",method:"get",data:t})}function p(t){return(0,n.default)({url:"/api/combination/list",method:"get",data:t})}function g(t,e){return(0,n.default)({url:"/api/combination/remove"+e,method:"get",data:t})}function b(t,e){return(0,n.default)({url:"/api/combination/pink/"+e,method:"get",data:t})}function w(t){return(0,n.default)({url:"/api/combination/poster",method:"post",data:t})}function y(t){return(0,n.default)({url:"/api/seckill/index",method:"get",data:t})}function x(t,e){return(0,n.default)({url:"/api/seckill/list/"+e,method:"get",data:t})}function k(t,e){return(0,n.default)({url:"/api/reply/config/"+e,method:"get",data:t})}function C(t,e){return(0,n.default)({url:"/api/reply/list/"+e,method:"get",data:t})}},"1ad9":function(t,e,a){"use strict";a.r(e);var i=a("8951"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},"2c70":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/uni-page-body[data-v-6abcdf5e],\n.content[data-v-6abcdf5e]{height:100%;background-color:#f8f8f8}.swiper-box[data-v-6abcdf5e]{height:100%}.swiper-box .search-hot[data-v-6abcdf5e]{padding:%?25?%}.swiper-box .search-hot .title[data-v-6abcdf5e]{font-size:%?32?%;color:#909399}.swiper-box .search-hot .hot-list[data-v-6abcdf5e]{display:flex;flex-wrap:wrap;margin-top:%?30?%}.swiper-box .search-hot .hot-list .list-item[data-v-6abcdf5e]{padding:%?10?% %?20?%;border:1px solid #dcdfe6;color:#303133;font-size:%?28?%;margin-right:%?20?%;margin-bottom:%?20?%}.guess-section .icon[data-v-6abcdf5e]{margin-right:%?10?%;display:inline-block;padding:%?2?% %?10?%;border:%?1?% solid #fd5b23;color:#fd5b23;line-height:1;font-size:%?28?%;border-radius:%?10?%}.guess-section[data-v-6abcdf5e]{display:flex;flex-wrap:wrap}.guess-section .guess-item[data-v-6abcdf5e]{overflow:hidden;display:flex;flex-direction:column;width:48%;margin-bottom:4%;border-radius:%?15?%;background-color:#fff;box-shadow:%?0?% %?0?% %?10?% %?10?% #f3f3f3}.guess-section .guess-item[data-v-6abcdf5e]:nth-child(2n + 1){margin-right:4%}.guess-section .image-wrapper[data-v-6abcdf5e]{width:100%;height:%?330?%;border-radius:3px;overflow:hidden}.guess-section .image-wrapper uni-image[data-v-6abcdf5e]{width:100%;height:100%;opacity:1}.guess-section .title[data-v-6abcdf5e]{font-size:%?28?%;color:#303133;font-weight:700;line-height:%?80?%}.guess-section .price[data-v-6abcdf5e]{font-size:%?32?%;color:#606266;font-weight:700;line-height:1;line-height:%?80?%}.guess-section .detail[data-v-6abcdf5e]{line-height:1}.guess-section .tip[data-v-6abcdf5e]{color:#fff;background-color:#fd5b23;line-height:1.5;font-size:%?24?%;padding-left:%?20?%}.navbar[data-v-6abcdf5e]{position:absolute;top:0;left:0;display:flex;width:100%;height:40px;background:#fff;box-shadow:0 %?2?% %?10?% rgba(0,0,0,.06);z-index:10}.navbar .nav-item[data-v-6abcdf5e]{flex:1;display:flex;justify-content:center;align-items:center;height:100%;font-size:%?30?%;color:#303133;position:relative}.navbar .nav-item.current[data-v-6abcdf5e]{color:#5dbc7c}.navbar .nav-item.current[data-v-6abcdf5e]:after{content:"";position:absolute;left:50%;bottom:0;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:%?120?%;height:0;border-bottom:%?4?% solid #5dbc7c}.navbar .p-box[data-v-6abcdf5e]{display:flex;flex-direction:column}.navbar .p-box .iconfont[data-v-6abcdf5e]{display:flex;align-items:center;justify-content:center;width:%?30?%;height:%?14?%;line-height:1;margin-left:%?4?%;font-size:%?26?%;color:#888}.navbar .p-box .iconfont.active[data-v-6abcdf5e]{color:#5dbc7c}.navbar .p-box .xia[data-v-6abcdf5e]{-webkit-transform:scaleY(-1);transform:scaleY(-1)}.navbar .cate-item[data-v-6abcdf5e]{display:flex;justify-content:center;align-items:center;height:100%;width:%?80?%;position:relative;font-size:%?44?%}.navbar .cate-item[data-v-6abcdf5e]:after{content:"";position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);border-left:1px solid #ddd;width:0;height:%?36?%}.cate-list[data-v-6abcdf5e]{height:100%;padding-top:40px}body.?%PAGE?%[data-v-6abcdf5e]{background-color:#f8f8f8}',""]),t.exports=e},"6a11":function(t,e,a){var i=a("74b9");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("c7b491b8",i,!0,{sourceMap:!1,shadowMode:!1})},"74b9":function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,".uni-load-more[data-v-c8f01f2e]{display:flex;flex-direction:row;height:%?80?%;align-items:center;justify-content:center}.uni-load-more__text[data-v-c8f01f2e]{font-size:%?28?%;color:#999}.uni-load-more__img[data-v-c8f01f2e]{height:24px;width:24px;margin-right:10px}.uni-load-more__img>.load[data-v-c8f01f2e]{position:absolute}.uni-load-more__img>.load .item[data-v-c8f01f2e]{width:6px;height:2px;border-top-left-radius:1px;border-bottom-left-radius:1px;background:#999;position:absolute;opacity:.2;-webkit-transform-origin:50%;transform-origin:50%;-webkit-animation:load-data-v-c8f01f2e 1.56s ease infinite;animation:load-data-v-c8f01f2e 1.56s ease infinite}.uni-load-more__img>.load .item[data-v-c8f01f2e]:nth-child(1){-webkit-transform:rotate(90deg);transform:rotate(90deg);top:2px;left:9px}.uni-load-more__img>.load .item[data-v-c8f01f2e]:nth-child(2){-webkit-transform:rotate(180deg);transform:rotate(180deg);top:11px;right:0}.uni-load-more__img>.load .item[data-v-c8f01f2e]:nth-child(3){-webkit-transform:rotate(270deg);transform:rotate(270deg);bottom:2px;left:9px}.uni-load-more__img>.load .item[data-v-c8f01f2e]:nth-child(4){top:11px;left:0}.load1[data-v-c8f01f2e],\n.load2[data-v-c8f01f2e],\n.load3[data-v-c8f01f2e]{height:24px;width:24px}.load2[data-v-c8f01f2e]{-webkit-transform:rotate(30deg);transform:rotate(30deg)}.load3[data-v-c8f01f2e]{-webkit-transform:rotate(60deg);transform:rotate(60deg)}.load1 .item[data-v-c8f01f2e]:nth-child(1){-webkit-animation-delay:0s;animation-delay:0s}.load2 .item[data-v-c8f01f2e]:nth-child(1){-webkit-animation-delay:.13s;animation-delay:.13s}.load3 .item[data-v-c8f01f2e]:nth-child(1){-webkit-animation-delay:.26s;animation-delay:.26s}.load1 .item[data-v-c8f01f2e]:nth-child(2){-webkit-animation-delay:.39s;animation-delay:.39s}.load2 .item[data-v-c8f01f2e]:nth-child(2){-webkit-animation-delay:.52s;animation-delay:.52s}.load3 .item[data-v-c8f01f2e]:nth-child(2){-webkit-animation-delay:.65s;animation-delay:.65s}.load1 .item[data-v-c8f01f2e]:nth-child(3){-webkit-animation-delay:.78s;animation-delay:.78s}.load2 .item[data-v-c8f01f2e]:nth-child(3){-webkit-animation-delay:.91s;animation-delay:.91s}.load3 .item[data-v-c8f01f2e]:nth-child(3){-webkit-animation-delay:1.04s;animation-delay:1.04s}.load1 .item[data-v-c8f01f2e]:nth-child(4){-webkit-animation-delay:1.17s;animation-delay:1.17s}.load2 .item[data-v-c8f01f2e]:nth-child(4){-webkit-animation-delay:1.3s;animation-delay:1.3s}.load3 .item[data-v-c8f01f2e]:nth-child(4){-webkit-animation-delay:1.43s;animation-delay:1.43s}@-webkit-keyframes load-data-v-c8f01f2e{0%{opacity:1}100%{opacity:.2}}",""]),t.exports=e},"777f":function(t,e,a){var i=a("2c70");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=a("4f06").default;n("a36875ba",i,!0,{sourceMap:!1,shadowMode:!1})},8951:function(t,e,a){"use strict";var i=a("4ea4");a("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var n=i(a("1da1")),o=i(a("dfd3")),r=a("12c5"),s={components:{uniLoadMore:o.default},data:function(){return{arrlist:[],keyword:"",list:[],tabCurrentIndex:0,goodsList:[],limit:6,page:1,loadingType:"more",numberOrder:1,priceOrder:1,newOrder:0,searchType:0}},onNavigationBarButtonTap:function(t){var e=t.index;0===e&&this.navTo()},onNavigationBarSearchInputConfirmed:function(t){this.navTo()},onNavigationBarSearchInputChanged:function(t){this.keyword=t.text},onLoad:function(){this.loadData()},onPullDownRefresh:function(){this.page=1,this.getProducts("refresh")},methods:{getProducts:function(t,e){var a=this;return(0,n.default)(regeneratorRuntime.mark((function i(){var n,o;return regeneratorRuntime.wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=a,"refresh"===t){i.next=9;break}if("nomore"!==n.loadingType){i.next=6;break}return i.abrupt("return");case 6:n.loadingType="loading";case 7:i.next=10;break;case 9:n.loadingType="more";case 10:o={page:n.page,limit:n.limit,news:n.newOrder,keyword:a.keyword},1===a.searchType&&(o.salesOrder=1===n.numberOrder?"asc":"desc"),2===a.searchType&&(o.priceOrder=1===n.priceOrder?"asc":"desc"),(0,r.getProducts)(o).then((function(a){"refresh"===t&&(n.goodsList=[]),n.goodsList=n.goodsList.concat(a.data),n.limit==a.data.length?(n.page++,n.loadingType="more"):n.loadingType="nomore","refresh"===t&&(1==e?uni.hideLoading():uni.stopPullDownRefresh())}));case 14:case"end":return i.stop()}}),i)})))()},clickHotText:function(t){this.keyword=t,this.navTo()},loadData:function(){var t=this;return(0,n.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:(0,r.searchKeyword)({}).then((function(e){t.list=e.data})).catch((function(t){console.log(t)}));case 1:case"end":return e.stop()}}),e)})))()},navTo:function(){this.tabCurrentIndex=1,this.infoData()},defaultSearch:function(){this.numberOrder="",this.priceOrder="",this.newOrder=0,this.searchType=0,this.infoData()},newGoodsTab:function(){this.newOrder=1===this.newOrder?0:1,this.infoData()},sortTab:function(t){this.searchType=t,1===this.searchType&&(this.numberOrder=1===this.numberOrder?2:1),2===this.searchType&&(this.priceOrder=1===this.priceOrder?2:1),this.infoData()},infoData:function(){this.page=1,uni.pageScrollTo({duration:300,scrollTop:0}),this.getProducts("refresh",1),uni.showLoading({title:"正在加载"})},navToDetailPage:function(t){var e=t.id;uni.navigateTo({url:"/pages/product/product?id="+e})}}};e.default=s},"8af6":function(t,e,a){"use strict";a.r(e);var i=a("93dc"),n=a.n(i);for(var o in i)"default"!==o&&function(t){a.d(e,t,(function(){return i[t]}))}(o);e["default"]=n.a},"90a2":function(t,e,a){"use strict";var i=a("6a11"),n=a.n(i);n.a},"93dc":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={name:"uni-load-more",props:{status:{type:String,default:"more"},showIcon:{type:Boolean,default:!0},color:{type:String,default:"#777777"},contentText:{type:Object,default:function(){return{contentdown:"上拉显示更多",contentrefresh:"正在加载...",contentnomore:"没有更多数据了"}}}},data:function(){return{}}};e.default=i},ae0c:function(t,e,a){"use strict";a.r(e);var i=a("b7a8"),n=a("1ad9");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("ebc2");var r,s=a("f0c5"),c=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"6abcdf5e",null,!1,i["a"],r);e["default"]=c.exports},b7a8:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var i={uniLoadMore:a("dfd3").default},n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"content"},[a("v-uni-swiper",{staticClass:"swiper-box ",attrs:{current:t.tabCurrentIndex,duration:"300"}},[a("v-uni-swiper-item",{staticClass:"search-hot"},[a("v-uni-view",{staticClass:"title"},[a("v-uni-text",[t._v("热门搜索")])],1),a("v-uni-view",{staticClass:"hot-list"},t._l(t.list,(function(e,i){return a("v-uni-view",{key:i,staticClass:"list-item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.clickHotText(e)}}},[a("v-uni-text",[t._v(t._s(e))])],1)})),1)],1),a("v-uni-swiper-item",{staticClass:"search-hot position-relative"},[a("v-uni-view",{staticClass:"navbar"},[a("v-uni-view",{staticClass:"nav-item",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.defaultSearch()}}},[t._v("默认")]),a("v-uni-view",{staticClass:"nav-item",class:{current:1===t.searchType},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.sortTab(1)}}},[a("v-uni-text",[t._v("销量优先")]),a("v-uni-view",{staticClass:"p-box"},[a("v-uni-text",{staticClass:"iconfont iconfold",class:{active:1===t.searchType&&1===t.numberOrder}}),a("v-uni-text",{staticClass:"iconfont iconfold xia",class:{active:1===t.searchType&&2===t.numberOrder}})],1)],1),a("v-uni-view",{staticClass:"nav-item",class:{current:2===t.searchType},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.sortTab(2)}}},[a("v-uni-text",[t._v("价格")]),a("v-uni-view",{staticClass:"p-box"},[a("v-uni-text",{staticClass:"iconfont iconfold",class:{active:2===t.searchType&&1===t.priceOrder}}),a("v-uni-text",{staticClass:"iconfont iconfold xia",class:{active:2===t.searchType&&2===t.priceOrder}})],1)],1),a("v-uni-view",{staticClass:"nav-item",class:{current:1==t.newOrder},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.newGoodsTab()}}},[t._v("新品")])],1),a("v-uni-scroll-view",{staticClass:"cate-list",attrs:{"scroll-y":!0},on:{scrolltolower:function(e){arguments[0]=e=t.$handleEvent(e),t.getProducts.apply(void 0,arguments)}}},[a("v-uni-view",{staticClass:"guess-section"},t._l(t.goodsList,(function(e,i){return a("v-uni-view",{key:i,staticClass:"guess-item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.navToDetailPage(e)}}},[a("v-uni-view",{staticClass:"image-wrapper"},[a("v-uni-image",{attrs:{src:e.image,mode:"aspectFill"}})],1),a("v-uni-text",{staticClass:"title clamp margin-c-20"},[t._v(t._s(e.store_name))]),a("v-uni-view",{staticClass:"cmy-hr"}),a("v-uni-view",{staticClass:"price margin-c-20 flex"},[a("v-uni-view",[a("v-uni-text",{staticClass:"font-size-sm "},[t._v("¥")]),t._v(t._s(e.price))],1),a("v-uni-view",{staticClass:"font-size-sm"},[a("v-uni-text",{staticClass:"font-color-gray"},[t._v(t._s(e.sales)+"人购买")])],1)],1)],1)})),1),a("uni-load-more",{attrs:{status:t.loadingType}})],1)],1)],1)],1)},o=[]},dfd3:function(t,e,a){"use strict";a.r(e);var i=a("ede1"),n=a("8af6");for(var o in n)"default"!==o&&function(t){a.d(e,t,(function(){return n[t]}))}(o);a("90a2");var r,s=a("f0c5"),c=Object(s["a"])(n["default"],i["b"],i["c"],!1,null,"c8f01f2e",null,!1,i["a"],r);e["default"]=c.exports},ebc2:function(t,e,a){"use strict";var i=a("777f"),n=a.n(i);n.a},ede1:function(t,e,a){"use strict";var i;a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){return i}));var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"uni-load-more"},[a("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:"loading"===t.status&&t.showIcon,expression:"status === 'loading' && showIcon"}],staticClass:"uni-load-more__img"},[a("v-uni-view",{staticClass:"load1 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1),a("v-uni-view",{staticClass:"load2 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1),a("v-uni-view",{staticClass:"load3 load"},[a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}}),a("v-uni-view",{staticClass:"item",style:{background:t.color}})],1)],1),a("v-uni-text",{staticClass:"uni-load-more__text",style:{color:t.color}},[t._v(t._s("more"===t.status?t.contentText.contentdown:"loading"===t.status?t.contentText.contentrefresh:t.contentText.contentnomore))])],1)},o=[]}}]);