text: (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/home/subPages/search/search"],{"0af6":function(e,t,n){"use strict";var a=n("c708"),o=n.n(a);o.a},"91e2":function(e,t,n){"use strict";n.r(t);var a=n("de4a"),o=n("a68d");for(var r in o)"default"!==r&&function(e){n.d(t,e,function(){return o[e]})}(r);n("0af6");var c=n("2877"),i=Object(c["a"])(o["default"],a["a"],a["b"],!1,null,"224e4e07",null);t["default"]=i.exports},9339:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=c(n("a34a")),o=n("2f62"),r=n("25d2");function c(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n,a,o,r,c){try{var i=e[r](c),u=i.value}catch(s){return void n(s)}i.done?t(u):Promise.resolve(u).then(a,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(a,o){var r=e.apply(t,n);function c(e){i(r,a,o,c,u,"next",e)}function u(e){i(r,a,o,c,u,"throw",e)}c(void 0)})}}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},a=Object.keys(n);"function"===typeof Object.getOwnPropertySymbols&&(a=a.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),a.forEach(function(t){h(e,t,n[t])})}return e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var f=function(){return n.e("pages/home/subPages/search/children/search-item").then(n.bind(null,"7a25"))},l=function(){return n.e("pages/home/subPages/search/children/search-result").then(n.bind(null,"e2d8"))},d={name:"",data:function(){return{showSearchResult:!1,page:1,text:""}},watch:{text:function(e,t){""==e&&(this.showSearchResult=!1)}},onNavigationBarButtonTap:function(){e.navigateBack()},onLoad:function(){this._getSearchHistory()},onShow:function(){this.$hideTabbarButton()},computed:s({},(0,o.mapState)(["search_history","search_hot","search_goods"])),methods:s({},(0,o.mapActions)(["reqSearchHistory","reqSearchGoods"]),{onSearchEvent:function(){""!=this.text&&(this.showSearchResult=!0,this.reqSearchGoods({token:e.getStorageSync("token"),text:this.text,page:this.page}))},onToGoodsDetail:function(t){1==t.type&&e.navigateTo({url:"/pages/home/subPages/goods-detail/goods-detail?id="+t.id}),2==t.type&&e.navigateTo({url:"/pages/home/subPages/demand-detail/demand-detail?id="+t.id})},_getSearchHistory:function(){this.reqSearchHistory({token:e.getStorageSync("token")})},onSearchItemEvent:function(e){this.text=e,this.onSearchEvent(e)},onDelSearchHistoryEvent:function(){var t=this;e.showModal({content:"确定要删除历史搜索吗？",success:function(){var n=u(a.default.mark(function n(o){var c;return a.default.wrap(function(n){while(1)switch(n.prev=n.next){case 0:if(!o.confirm){n.next=6;break}return n.next=3,(0,r.delSearchHistory)({token:e.getStorageSync("token")});case 3:c=n.sent,console.log(c," at pages\\home\\subPages\\search\\search.vue:93"),200==c.code&&t._getSearchHistory();case 6:case"end":return n.stop()}},n,this)}));function o(e){return n.apply(this,arguments)}return o}()})},onBackEvent:function(){e.navigateBack()}}),components:{searchItem:f,searchResult:l}};t.default=d}).call(this,n("6e42")["default"])},a68d:function(e,t,n){"use strict";n.r(t);var a=n("9339"),o=n.n(a);for(var r in a)"default"!==r&&function(e){n.d(t,e,function(){return a[e]})}(r);t["default"]=o.a},c708:function(e,t,n){},de4a:function(e,t,n){"use strict";var a=function(){var e=this,t=e.$createElement;e._self._c},o=[];n.d(t,"a",function(){return a}),n.d(t,"b",function(){return o})}},[["2fa1","common/runtime","common/vendor"]]]);