bztang-admin/addons/yun_shop/static/app/js/chunk-ee618694.6d244408.js

3 lines
17 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-ee618694"],{"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=="},"1da1":function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("d3b7");function o(t,e,r,o,i,n,a){try{var c=t[n](a),s=c.value}catch(l){return void r(l)}c.done?e(s):Promise.resolve(s).then(o,i)}function i(t){return function(){var e=this,r=arguments;return new Promise((function(i,n){var a=t.apply(e,r);function c(t){o(a,i,n,c,s,"next",t)}function s(t){o(a,i,n,c,s,"throw",t)}c(void 0)}))}}},"253a":function(t,e,r){t.exports=r.p+"static/app/img/img_default.a608a24a.png"},3957:function(t,e,r){"use strict";r("3d2d")},"3d2d":function(t,e,r){var o=r("f30d");o.__esModule&&(o=o.default),"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var i=r("499e").default;i("21a68ce3",o,!0,{sourceMap:!1,shadowMode:!1})},8798:function(t,e,r){t.exports=r.p+"static/app/img/no-more-product.f4632785.png"},ac0d:function(t,e,r){"use strict";r.d(e,"a",(function(){return n}));var o=document.documentElement,i=document.body,n={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return o&&o.scrollTop?t=o.scrollTop:i&&(t=i.scrollTop),t},getClientHeight:function(){var t=0;return t=i.clientHeight&&o.clientHeight?Math.min(i.clientHeight,o.clientHeight):Math.max(i.clientHeight,o.clientHeight),t},getScrollHeight:function(){return Math.max(i.scrollHeight,o.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(){}}}},c7eb:function(t,e,r){"use strict";r.d(e,"a",(function(){return i}));r("a4d3"),r("e01a"),r("d3b7"),r("d28b"),r("3ca3"),r("ddb0"),r("b636"),r("944a"),r("0c47"),r("23dc"),r("d9e2"),r("3410"),r("159b"),r("b0c0"),r("131a"),r("fb6a");var o=r("53ca");function i(){
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
i=function(){return t};var t={},e=Object.prototype,r=e.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",c=n.asyncIterator||"@@asyncIterator",s=n.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(I){l=function(t,e,r){return t[e]=r}}function d(t,e,r,o){var i=e&&e.prototype instanceof f?e:f,n=Object.create(i.prototype),a=new E(o||[]);return n._invoke=function(t,e,r){var o="suspendedStart";return function(i,n){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===i)throw n;return A()}for(r.method=i,r.arg=n;;){var a=r.delegate;if(a){var c=S(a,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var s=u(t,e,r);if("normal"===s.type){if(o=r.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(o="completed",r.method="throw",r.arg=s.arg)}}}(t,r,a),n}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(I){return{type:"throw",arg:I}}}t.wrap=d;var h={};function f(){}function p(){}function g(){}var m={};l(m,a,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(M([])));y&&y!==e&&r.call(y,a)&&(m=y);var b=g.prototype=f.prototype=Object.create(m);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function i(n,a,c,s){var l=u(t[n],t,a);if("throw"!==l.type){var d=l.arg,h=d.value;return h&&"object"==Object(o["a"])(h)&&r.call(h,"__await")?e.resolve(h.__await).then((function(t){i("next",t,c,s)}),(function(t){i("throw",t,c,s)})):e.resolve(h).then((function(t){d.value=t,c(d)}),(function(t){return i("throw",t,c,s)}))}s(l.arg)}var n;this._invoke=function(t,r){function o(){return new e((function(e,o){i(t,r,e,o)}))}return n=n?n.then(o,o):o()}}function S(t,e){var r=t.iterator[e.method];if(void 0===r){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,S(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=u(r,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,h;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}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 k(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function M(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function e(){for(;++o<t.length;)if(r.call(t,o))return e.value=t[o],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:A}}function A(){return{value:void 0,done:!0}}return p.prototype=g,l(b,"constructor",g),l(g,"constructor",p),p.displayName=l(g,s,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===p||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,s,"GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},w(x.prototype),l(x.prototype,c,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,o,i,n){void 0===n&&(n=Promise);var a=new x(d(e,r,o,i),n);return t.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},w(b),l(b,s,"Generator"),l(b,a,(function(){return this})),l(b,"toString",(function(){return"[object Generator]"})),t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var o=e.pop();if(o in t)return r.value=o,r.done=!1,r}return r.done=!0,r}},t.values=M,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!t)for(var e in this)"t"===e.charAt(0)&&r.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function o(r,o){return a.type="throw",a.arg=t,e.next=r,o&&(e.method="next",e.arg=void 0),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var n=this.tryEntries[i],a=n.completion;if("root"===n.tryLoc)return o("end");if(n.tryLoc<=this.prev){var c=r.call(n,"catchLoc"),s=r.call(n,"finallyLoc");if(c&&s){if(this.prev<n.catchLoc)return o(n.catchLoc,!0);if(this.prev<n.finallyLoc)return o(n.finallyLoc)}else if(c){if(this.prev<n.catchLoc)return o(n.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<n.finallyLoc)return o(n.finallyLoc)}}}},abrupt:function(t,e){for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var n=i;break}}n&&("break"===t||"continue"===t)&&n.tryLoc<=e&&e<=n.finallyLoc&&(n=null);var a=n?n.completion:{};return a.type=t,a.arg=e,n?(this.method="next",this.next=n.finallyLoc,h):this.complete(a)},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),h},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),k(r),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var i=o.arg;k(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:M(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}},d45a:function(t,e,r){"use strict";r.r(e);var o=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{attrs:{id:"search",transition:"fadeInLeft"}},[r("div",{staticClass:"uou",class:{mout:t.amout},style:{width:3==t.fun.getPhoneEnv()?"375px":""},attrs:{id:"soso"}},[r("div",{staticClass:"search"},[r("div",{staticStyle:{background:"#fff","box-shadow":"none"},attrs:{slot:"prepend"},on:{click:t.goback},slot:"prepend"},[r("i",{staticClass:"iconfont icon-back"})]),r("div",{staticClass:"searchBox"},[r("form",{attrs:{action:"#"},on:{submit:function(t){t.preventDefault()}}},[r("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)}}})]),r("div",{staticClass:"img-icon",on:{click:t.search}},[r("div",{staticClass:"img-icon-btn"})])]),r("van-col",{staticStyle:{"padding-left":"0.5rem"},attrs:{span:1}},[r("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")}}}),r("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),r("c-sort",{attrs:{goods:t.datas,text:"搜索结果"},on:{sortIn:t.sortOut}})],1),r("div",{staticStyle:{height:"82px",display:"block"}}),r("div",{ref:"wrapper",staticClass:"page-loadmore-wrapper",style:{height:t.wrapperHeight+"px"}},[r("c-goodsList",{staticClass:"osll",attrs:{goods:t.datas,text:"搜索结果",loading:t.loading}})],1)])},i=[],n=r("2909"),a=r("5530"),c=(r("ac1f"),r("841c"),r("99af"),r("5880")),s=r("98e3"),l=r("6499"),d=r("ac0d"),u=1,h=Object(a["a"])(Object(a["a"])({mixins:[d["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(c["mapState"])(["message","blurst","view"])},Object(c["mapMutations"])(["views"])),{},{methods:{enterSearch:function(t){13===t.keyCode&&(t.preventDefault(),this.search())},sortOut:function(t){0!=this.datas.length&&(u=1,this.datas=[],this.page=1,this.order_field=t.order_field,this.order_by=t.order_by,this.gotoSearch(u))},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(){u=1,this.datas=[],this.gotoSearch(u,!1)},gotoSearch:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,r=JSON.parse(this.$route.params.id);$http.get("plugin.micro.frontend.controllers.MicroShop.search-goods",{"search[keyword]":this.inputs,page:e,"search[category]":r,order_field:this.order_field,order_by:this.order_by,"search[couponid]":this.$route.params.coupon}).then((function(e){if(1==e.result){var r;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((r=t.datas).push.apply(r,Object(n["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,r){window.MCateScrollTop=document.documentElement.scrollTop||document.body.scrollTop,r()},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="",u=1,this.gotoSearch(u))},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="",u=1,this.gotoSearch(u))},mounted:function(){this.slider(),window.MCateScrollTop=0},components:{cGoodsList:s["a"],cSort:l["a"]}}),f=h,p=(r("3957"),r("2877")),g=Object(p["a"])(f,o,i,!1,null,"494ff85a",null);e["default"]=g.exports},dec5:function(t,e,r){t.exports=r.p+"static/app/img/jd-sprites.fb1e8d8b.png"},f30d:function(t,e,r){var o=r("24fb"),i=r("1de5"),n=r("1b61");e=o(!1);var a=i(n);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("+a+") no-repeat 50%;background-size:80% 80%}",""]),t.exports=e}}]);