(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/product/search"],{"1f5a":function(e,t,o){"use strict";o.r(t);var n=o("de9d"),r=o.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){o.d(t,e,(function(){return n[e]}))}(i);t["default"]=r.a},4144:function(e,t,o){"use strict";o.r(t);var n=o("fede"),r=o("1f5a");for(var i in r)["default"].indexOf(i)<0&&function(e){o.d(t,e,(function(){return r[e]}))}(i);o("d9db");var a=o("828b"),d=Object(a["a"])(r["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=d.exports},b741:function(e,t,o){"use strict";(function(e,t){var n=o("47a9");o("a346");n(o("3240"));var r=n(o("4144"));e.__webpack_require_UNI_MP_PLUGIN__=o,t(r.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},ca9f:function(e,t,o){},d9db:function(e,t,o){"use strict";var n=o("ca9f"),r=o.n(n);r.a},de9d:function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={components:{mSearch:function(){o.e("components/mehaotian-search-revision").then(function(){return resolve(o("7ef2"))}.bind(null,o)).catch(o.oe)}},data:function(){return{defaultKeyword:"",keyword:"",oldKeywordList:[],hotKeywordList:[],keywordList:[],forbid:"",isShowKeywordList:!1}},onLoad:function(){this.init()},methods:{init:function(){this.loadDefaultKeyword(),this.loadOldKeyword()},blur:function(){e.hideKeyboard()},loadDefaultKeyword:function(){this.defaultKeyword="默认关键字"},loadOldKeyword:function(){var t=this;e.getStorage({key:"OldKeys",success:function(e){var o=JSON.parse(e.data);t.oldKeywordList=o}})},drawCorrelativeKeyword:function(e,t){for(var o=e.length,n=[],r=0;r<o;r++){var i=e[r],a=i[0].replace(t,"<span style='color: #9f9f9f;'>"+t+"</span>");a="<div>"+a+"</div>";var d={keyword:i[0],htmlStr:a};n.push(d)}return n},setkeyword:function(e){this.keyword=e.keyword},oldDelete:function(){var t=this;e.showModal({content:"确定清除历史搜索记录?",success:function(o){o.confirm?(console.log("用户点击确定"),t.oldKeywordList=[],e.removeStorage({key:"OldKeys"})):o.cancel&&console.log("用户点击取消")}})},hotToggle:function(){this.forbid=this.forbid?"":"_forbid"},doSearch:function(t){t=t||(this.keyword?this.keyword:this.defaultKeyword),this.keyword=t,this.saveKeyword(t),e.navigateTo({url:"/pages/product/list?keyword=".concat(t)})},saveKeyword:function(t){var o=this;e.getStorage({key:"OldKeys",success:function(n){console.log(n.data);var r=JSON.parse(n.data),i=r.indexOf(t);-1===i||r.splice(i,1),r.unshift(t),r.length>10&&r.pop(),e.setStorage({key:"OldKeys",data:JSON.stringify(r)}),o.oldKeywordList=r},fail:function(n){var r=[t];e.setStorage({key:"OldKeys",data:JSON.stringify(r)}),o.oldKeywordList=r}})}}};t.default=n}).call(this,o("df3c")["default"])},fede:function(e,t,o){"use strict";o.d(t,"b",(function(){return n})),o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){}));var n=function(){var e=this.$createElement,t=(this._self._c,this.oldKeywordList.length);this.$mp.data=Object.assign({},{$root:{g0:t}})},r=[]}},[["b741","common/runtime","common/vendor"]]]);
|