3 lines
14 KiB
JavaScript
3 lines
14 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f957f48"],{"087a":function(t,e,o){"use strict";o("a52c")},"1da1":function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));o("d3b7");function r(t,e,o,r,n,i,a){try{var c=t[i](a),s=c.value}catch(l){return void o(l)}c.done?e(s):Promise.resolve(s).then(r,n)}function n(t){return function(){var e=this,o=arguments;return new Promise((function(n,i){var a=t.apply(e,o);function c(t){r(a,n,i,c,s,"next",t)}function s(t){r(a,n,i,c,s,"throw",t)}c(void 0)}))}}},"253a":function(t,e,o){t.exports=o.p+"static/app/img/img_default.a608a24a.png"},"496f":function(t,e,o){var r=o("24fb");e=r(!1),e.push([t.i,"#search .uou[data-v-15d1a1bc]{width:100%;position:fixed;z-index:99;top:0;transition:.2s;-webkit-transition:.2s;background:#fff}#search .pcStyle[data-v-15d1a1bc]{width:375px}#search .mout[data-v-15d1a1bc]{top:-2.25rem}.search[data-v-15d1a1bc]{height:2.8125rem;line-height:2.8125rem;position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;overflow:hidden;background:#fff;border-bottom:.0625rem solid #f5f5f5}.search .back[data-v-15d1a1bc]{width:2.8125rem}.search .back i[data-v-15d1a1bc]{line-height:2.8125rem;font-size:1.5rem}.search .search-box[data-v-15d1a1bc]{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:75%;margin-top:.5rem;padding:0 .625rem;background-color:#f2f2f2;height:1.75rem;line-height:1.75rem;border-radius:.875rem}.search .search-box input[data-v-15d1a1bc]{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;line-height:1.75rem;border:none;color:#333}.search .search-box i[data-v-15d1a1bc]{position:absolute;right:1rem;-webkit-box-flex:0;-webkit-flex:0 0 1.5rem;-ms-flex:0 0 1.5rem;flex:0 0 1.5rem}",""]),t.exports=e},8798:function(t,e,o){t.exports=o.p+"static/app/img/no-more-product.f4632785.png"},a52c:function(t,e,o){var r=o("496f");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var n=o("499e").default;n("76fcf8de",r,!0,{sourceMap:!1,shadowMode:!1})},aa7f:function(t,e,o){"use strict";o.r(e);var r=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},3==this.fun.getPhoneEnv()?"pcStyle":""],attrs:{id:"soso"}},[o("div",{staticClass:"search"},[o("div",{staticClass:"back",on:{click:t.goback}},[o("i",{staticClass:"fa fa-angle-left"})]),o("div",{staticClass:"search-box"},[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("i",{staticClass:"iconfont icon-sousuo1",staticStyle:{color:"#ccc"},on:{click:t.search}})]),o("div",{staticStyle:{position:"absolute",right:"1rem"}},[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")}}})])]),o("c-sort",{attrs:{goods:t.goods,text:"搜索结果"},on:{sortIn:t.sortOut}})],1),o("div",{staticStyle:{height:"5.4375rem",display:"block"}}),o("c-goodsList",{staticClass:"osll",attrs:{goods:t.goods,goods_template:t.goods_template,text:"搜索结果",loading:t.loading}})],1)},n=[],i=(o("e7e5"),o("d399")),a=o("5530"),c=(o("b0c0"),o("ac1f"),o("841c"),o("99af"),o("5880")),s=o("98e3"),l=o("6499"),u=o("ac0d"),d=Object(a["a"])(Object(a["a"])({mixins:[u["a"]],data:function(){return{title:"搜索",inputs:"",amout:!1,loading:!1,goods:[],order_by:"",order_field:"",goods_template:"",isLoadMore:!0,page:1,total_page:0}},computed:Object(c["mapState"])(["view"])},Object(c["mapMutations"])(["views"])),{},{mounted:function(){this.slider(),window.searchallScrollTop=0,"searchAll"==this.$route.name&&this.search()},beforeRouteLeave:function(t,e,o){window.searchallScrollTop=document.documentElement.scrollTop||document.body.scrollTop,o()},methods:{enterSearch:function(t){13===t.keyCode&&(t.preventDefault(),this.search())},sortOut:function(t){0!=this.goods.length&&(this.goods=[],this.order_field=t.order_field,this.order_by=t.order_by,this.getData())},search:function(){this.goods=[],this.getData()},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)},getData:function(){var t=this;this.page=1;var e={"search[keyword]":this.inputs,page:1,order_field:this.order_field,order_by:this.order_by};$http.get("goods.goods.search-goods",e,"loading").then((function(e){1===e.result?(t.isLoadMore=!0,t.total_page=e.data.last_page,t.total_page||(t.total_page=0),t.goods=e.data.data,t.goods_template=e.data.goods_template):Object(i["a"])(e.msg)})).catch((function(t){}))},getMoreData:function(){var t=this,e=this;e.isLoadMore=!1;var o={"search[keyword]":this.inputs,page:1,order_field:this.order_field,order_by:this.order_by};this.page>=this.total_page?this.loading=!0:(this.page=this.page+1,o.page=this.page,$http.get("goods.goods.search-goods",o,"加载中").then((function(o){if(e.isLoadMore=!0,t.loading=!1,1!==o.result)return e.page=e.page-1,t.loading=!0,void(e.isLoadMore=!1);var r=o.data.data;e.goods=e.goods.concat(r)}),(function(t){})))}},activated:function(){this.amout=!1,window.location.href.indexOf("#/searchall?")>-1&&setTimeout((function(){window.scrollTo(0,window.searchallScrollTop)}),200)},components:{cGoodsList:s["a"],cSort:l["a"]}}),h=d,f=(o("087a"),o("2877")),p=Object(f["a"])(h,r,n,!1,null,"15d1a1bc",null);e["default"]=p.exports},ac0d:function(t,e,o){"use strict";o.d(e,"a",(function(){return i}));var r=document.documentElement,n=document.body,i={data:function(){return{}},activated:function(){window.addEventListener("scroll",this.handleScroll)},deactivated:function(){window.removeEventListener("scroll",this.handleScroll)},methods:{getScrollTop:function(){var t=0;return r&&r.scrollTop?t=r.scrollTop:n&&(t=n.scrollTop),t},getClientHeight:function(){var t=0;return t=n.clientHeight&&r.clientHeight?Math.min(n.clientHeight,r.clientHeight):Math.max(n.clientHeight,r.clientHeight),t},getScrollHeight:function(){return Math.max(n.scrollHeight,r.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,o){"use strict";o.d(e,"a",(function(){return n}));o("a4d3"),o("e01a"),o("d3b7"),o("d28b"),o("3ca3"),o("ddb0"),o("b636"),o("944a"),o("0c47"),o("23dc"),o("d9e2"),o("3410"),o("159b"),o("b0c0"),o("131a"),o("fb6a");var r=o("53ca");function n(){
|
|
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
|
n=function(){return t};var t={},e=Object.prototype,o=e.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,o){return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(O){l=function(t,e,o){return t[e]=o}}function u(t,e,o,r){var n=e&&e.prototype instanceof f?e:f,i=Object.create(n.prototype),a=new E(r||[]);return i._invoke=function(t,e,o){var r="suspendedStart";return function(n,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===n)throw i;return j()}for(o.method=n,o.arg=i;;){var a=o.delegate;if(a){var c=_(a,o);if(c){if(c===h)continue;return c}}if("next"===o.method)o.sent=o._sent=o.arg;else if("throw"===o.method){if("suspendedStart"===r)throw r="completed",o.arg;o.dispatchException(o.arg)}else"return"===o.method&&o.abrupt("return",o.arg);r="executing";var s=d(t,e,o);if("normal"===s.type){if(r=o.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:o.done}}"throw"===s.type&&(r="completed",o.method="throw",o.arg=s.arg)}}}(t,o,a),i}function d(t,e,o){try{return{type:"normal",arg:t.call(e,o)}}catch(O){return{type:"throw",arg:O}}}t.wrap=u;var h={};function f(){}function p(){}function g(){}var v={};l(v,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(S([])));y&&y!==e&&o.call(y,a)&&(v=y);var b=g.prototype=f.prototype=Object.create(v);function w(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,a,c,s){var l=d(t[i],t,a);if("throw"!==l.type){var u=l.arg,h=u.value;return h&&"object"==Object(r["a"])(h)&&o.call(h,"__await")?e.resolve(h.__await).then((function(t){n("next",t,c,s)}),(function(t){n("throw",t,c,s)})):e.resolve(h).then((function(t){u.value=t,c(u)}),(function(t){return n("throw",t,c,s)}))}s(l.arg)}var i;this._invoke=function(t,o){function r(){return new e((function(e,r){n(t,o,e,r)}))}return i=i?i.then(r,r):r()}}function _(t,e){var o=t.iterator[e.method];if(void 0===o){if(e.delegate=null,"throw"===e.method){if(t.iterator["return"]&&(e.method="return",e.arg=void 0,_(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 r=d(o,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,h;var n=r.arg;return n?n.done?(e[t.resultName]=n.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):n:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function k(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function S(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 r=-1,n=function e(){for(;++r<t.length;)if(o.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return n.next=n}}return{next:j}}function j(){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,o,r,n,i){void 0===i&&(i=Promise);var a=new x(u(e,o,r,n),i);return t.isGeneratorFunction(o)?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 o in t)e.push(o);return e.reverse(),function o(){for(;e.length;){var r=e.pop();if(r in t)return o.value=r,o.done=!1,o}return o.done=!0,o}},t.values=S,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(L),!t)for(var e in this)"t"===e.charAt(0)&&o.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 r(o,r){return a.type="throw",a.arg=t,e.next=o,r&&(e.method="next",e.arg=void 0),!!r}for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=o.call(i,"catchLoc"),s=o.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var i=n;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.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 o=this.tryEntries[e];if(o.finallyLoc===t)return this.complete(o.completion,o.afterLoc),L(o),h}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var o=this.tryEntries[e];if(o.tryLoc===t){var r=o.completion;if("throw"===r.type){var n=r.arg;L(o)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,o){return this.delegate={iterator:S(t),resultName:e,nextLoc:o},"next"===this.method&&(this.arg=void 0),h}},t}},dec5:function(t,e,o){t.exports=o.p+"static/app/img/jd-sprites.fb1e8d8b.png"}}]); |