bztang-admin/addons/yun_shop/static/app/js/chunk-1b2311a8.8af8fe6b.js

1 line
10 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1b2311a8"],{"1b61":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAANCAYAAACZ3F9/AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NkM4Nzc5MDMyMjgyMTFFN0JCRDFBNkYyOTQwQTkyRUEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NkM4Nzc5MDQyMjgyMTFFN0JCRDFBNkYyOTQwQTkyRUEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2Qzg3NzkwMTIyODIxMUU3QkJEMUE2RjI5NDBBOTJFQSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo2Qzg3NzkwMjIyODIxMUU3QkJEMUE2RjI5NDBBOTJFQSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmSE+HYAAAENSURBVHjajNIxSMJBFMfxs7IIScQ9m9wMA3MJycE1EASFhjZxE6S5sTGIBIc/BEW06dAQCLY4JU0NRQTOBeJQiC1B6PfiHTwk7P/gw3+4+/3v3t0FPM8zUgHkUUYaEbzhDmd4MaoW5LuGG5yijSxi2McIPdR0cElWukYQmxir8QEecIWOjJ27FUvYQnEmpOtJVj9B1AUPUMeXmV9d+UHBBVO4N/6qJ+38Bq0fn0E7b9EFn7HtM2h313dBe6JVLP8TSmIHTRe0R/2BC7mev2odLRzj3aj+7IuJS/P21MIS2MAhHuWnu1jVL2eIDC5xhE9M8Iqc3HFC2rlFSG/tGw2xYgelhYmasyc9VqYCDAAgLzWBjWiGsgAAAABJRU5ErkJggg=="},"253a":function(t,e,o){t.exports=o.p+"static/app/img/img_default.a608a24a.png"},3957:function(t,e,o){"use strict";o("3d2d")},"3d2d":function(t,e,o){var i=o("f30d");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=o("499e").default;a("21a68ce3",i,!0,{sourceMap:!1,shadowMode:!1})},8798:function(t,e,o){t.exports=o.p+"static/app/img/no-more-product.f4632785.png"},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));var i=document.documentElement,a=document.body,r={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return i&&i.scrollTop?t=i.scrollTop:a&&(t=a.scrollTop),t},getClientHeight:function(){var t=0;return t=a.clientHeight&&i.clientHeight?Math.min(a.clientHeight,i.clientHeight):Math.max(a.clientHeight,i.clientHeight),t},getScrollHeight:function(){return Math.max(a.scrollHeight,i.scrollHeight)},handleScroll:function(){this.otherScroll();var t=document.documentElement.scrollTop||document.body.scrollTop;this.btnFlag=t>60,this.getScrollTop()+this.getClientHeight()+105>this.getScrollHeight()?(this.isLoadMore&&this.getMoreData(),this.isBottom=!0):this.isBottom=!1},otherScroll:function(){}}}},d45a:function(t,e,o){"use strict";o.r(e);var i=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"search",transition:"fadeInLeft"}},[o("div",{staticClass:"uou",class:{mout:t.amout},style:{width:3==t.fun.getPhoneEnv()?"375px":""},attrs:{id:"soso"}},[o("div",{staticClass:"search"},[o("div",{staticStyle:{background:"#fff","box-shadow":"none"},attrs:{slot:"prepend"},on:{click:t.goback},slot:"prepend"},[o("i",{staticClass:"iconfont icon-back"})]),o("div",{staticClass:"searchBox"},[o("form",{attrs:{action:"#"},on:{submit:function(t){t.preventDefault()}}},[o("input",{directives:[{name:"model",rawName:"v-model",value:t.inputs,expression:"inputs"}],attrs:{type:"search",placeholder:"搜索当前分类商品"},domProps:{value:t.inputs},on:{keypress:t.enterSearch,input:function(e){e.target.composing||(t.inputs=e.target.value)}}})]),o("div",{staticClass:"img-icon",on:{click:t.search}},[o("div",{staticClass:"img-icon-btn"})])]),o("van-col",{staticStyle:{"padding-left":"0.5rem"},attrs:{span:1}},[o("i",{directives:[{name:"show",rawName:"v-show",value:t.view,expression:"view"}],staticClass:"fa fa-th-large",on:{click:function(e){return t.$store.commit("views")}}}),o("i",{directives:[{name:"show",rawName:"v-show",value:!t.view,expression:"!view"}],staticClass:"fa fa-th-list",on:{click:function(e){return t.$store.commit("views")}}})])],1),o("c-sort",{attrs:{goods:t.datas,text:"搜索结果"},on:{sortIn:t.sortOut}})],1),o("div",{staticStyle:{height:"82px",display:"block"}}),o("div",{ref:"wrapper",staticClass:"page-loadmore-wrapper",style:{height:t.wrapperHeight+"px"}},[o("c-goodsList",{staticClass:"osll",attrs:{goods:t.datas,text:"搜索结果",loading:t.loading}})],1)])},a=[],r=o("2909"),n=o("5530"),s=(o("ac1f"),o("841c"),o("b64b"),o("99af"),o("14d9"),o("5880")),d=o("98e3"),c=o("6499"),l=o("ac0d"),h=1,p=Object(n["a"])(Object(n["a"])({mixins:[l["a"]],data:function(){return{title:"搜索",inputs:"",amout:!1,loading:!1,allLoaded:!0,topStatus:"",bottomStatus:"",wrapperHeight:0,order_by:"",order_field:"",datas:[],page:1,total_page:0,isLoadMore:!0}},computed:Object(s["mapState"])(["message","blurst","view"])},Object(s["mapMutations"])(["views"])),{},{methods:{enterSearch:function(t){13===t.keyCode&&(t.preventDefault(),this.search())},sortOut:function(t){0!=this.datas.length&&(h=1,this.datas=[],this.page=1,this.order_field=t.order_field,this.order_by=t.order_by,this.gotoSearch(h))},handleTopChange:function(t){this.topStatus=t},loadTop:function(){this.$refs.loadmore.onTopLoaded()},getMoreData:function(){var t=this;if(this.page!=this.total_page){if(this.page>=this.total_page)return t.loading=!0,void(t.allLoaded=!0);this.page=this.page+1;var e=JSON.parse(this.$route.params.id);$http.get("plugin.micro.frontend.controllers.MicroShop.search-goods",{"search[keyword]":this.inputs,page:this.page,"search[category]":e,order_field:this.order_field,order_by:this.order_by,"search[couponid]":this.$route.params.coupon},"加载中...").then((function(e){if(1!=e.result)return t.page=t.page-1,t.loading=!0,t.allLoaded=!0,void(t.isLoadMore=!1);t.loading=!1,t.allLoaded=!1,t.datas=t.datas.concat(e.data.data)}),(function(t){}))}else this.loading=!0},slider:function(){var t=this;window.onscroll=function(){var e=document.documentElement.scrollTop||document.body.scrollTop;t.amout=!(e<80)}},goback:function(){this.$router.go(-1)},search:function(){h=1,this.datas=[],this.gotoSearch(h,!1)},gotoSearch:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,o=JSON.parse(this.$route.params.id);$http.get("plugin.micro.frontend.controllers.MicroShop.search-goods",{"search[keyword]":this.inputs,page:e,"search[category]":o,order_field:this.order_field,order_by:this.order_by,"search[couponid]":this.$route.params.coupon}).then((function(e){if(1==e.result){var o;if(t.loading=!1,t.allLoaded=!1,e.data.data.length<=0)return t.loading=!0,void(t.allLoaded=!0);if(e.data.current_page>e.data.last_page)return t.loading=!0,void(t.allLoaded=!0);if((o=t.datas).push.apply(o,Object(r["a"])(e.data.data)),t.total_page=e.data.last_page,e.data.data.length<20)return t.loading=!0,void(t.allLoaded=!0)}}))}},beforeRouteLeave:function(t,e,o){window.MCateScrollTop=document.documentElement.scrollTop||document.body.scrollTop,o()},activated:function(){var t=JSON.parse(localStorage.getItem("mailLanguage"));t.micro?this.fun.setWXTitle("".concat(t.micro.title,"商品")):this.fun.setWXTitle("微店商品"),this.amout=!1,this.slider(),this.wrapperHeight=document.documentElement.clientHeight-this.$refs.wrapper.getBoundingClientRect().top,window.location.href.indexOf("#/microShopShare/micro_share_catelist/")>-1&&setTimeout((function(){window.scrollTo(0,window.MCateScrollTop)}),200),1===this.$route.params.fromHome&&(this.datas=[],this.order_field="",this.order_by="",h=1,this.gotoSearch(h))},created:function(){var t=JSON.parse(localStorage.getItem("mailLanguage"));t.micro?this.fun.setWXTitle("".concat(t.micro.title,"商品")):this.fun.setWXTitle("微店商品"),1!==this.$route.params.fromHome&&(this.datas=[],this.order_field="",this.order_by="",h=1,this.gotoSearch(h))},mounted:function(){this.slider(),window.MCateScrollTop=0},components:{cGoodsList:d["a"],cSort:c["a"]}}),u=p,g=(o("3957"),o("2877")),f=Object(g["a"])(u,i,a,!1,null,"494ff85a",null);e["default"]=f.exports},dec5:function(t,e,o){t.exports=o.p+"static/app/img/jd-sprites.fb1e8d8b.png"},f30d:function(t,e,o){var i=o("24fb"),a=o("1de5"),r=o("1b61");e=i(!1);var n=a(r);e.push([t.i,"#search .osll[data-v-494ff85a]{min-height:100vh;margin-top:1.2vw;-webkit-box-sizing:border-box;box-sizing:border-box}#search .page-loadmore-wrapper2[data-v-494ff85a]{height:100vh;overflow:hidden}#search .uou[data-v-494ff85a]{position:fixed;z-index:99;top:0;transition:.2s;-webkit-transition:.2s;width:100%;background:#fff}#search .mout[data-v-494ff85a]{top:-2.25rem}.search[data-v-494ff85a]{overflow:hidden;background:#fff;border-bottom:.0625rem solid #f5f5f5;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;padding-left:1rem}.search .mint-button.mint-button--default[data-v-494ff85a]{float:left;width:10%;border:none;padding-top:.4rem;-webkit-box-shadow:none;box-shadow:none}.search .searchBox[data-v-494ff85a]{position:relative;font-size:14px;display:inline-table;float:left;width:80%;margin-left:2%;height:2.8125rem}.search .searchBox input[data-v-494ff85a]{vertical-align:middle;border:none;background:#f2f2f2 none;-webkit-box-sizing:border-box;box-sizing:border-box;outline:0;padding:.1875rem .625rem;height:1.875rem;line-height:1.875rem;margin-top:.5rem;color:#8c8c8c;font-size:14px;width:17.75rem;border-radius:.9375rem;z-index:10}.search .searchBox .img-icon[data-v-494ff85a]{border:none;color:#a9a9a9;display:table-cell;position:relative;border-radius:0;height:1.875rem;top:.0625rem;opacity:1;left:-2.25rem}.search .searchBox .img-icon .img-icon-btn[data-v-494ff85a]{position:absolute;z-index:12;width:1rem;height:1rem;top:50%;left:50%;margin-left:-.5rem;margin-top:-.5rem;background:url("+n+") no-repeat 50%;background-size:80% 80%}",""]),t.exports=e}}]);