1 line
3.6 KiB
JavaScript
1 line
3.6 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/search/search"],{"10f0":function(e,t,n){"use strict";n.r(t);var o=n("732d"),r=n("21b2");for(var c in r)["default"].indexOf(c)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(c);n("77b0");var a=n("828b"),i=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,"4a372e71",null,!1,o["a"],void 0);t["default"]=i.exports},"21b2":function(e,t,n){"use strict";n.r(t);var o=n("df12"),r=n.n(o);for(var c in o)["default"].indexOf(c)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(c);t["default"]=r.a},"732d":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return c})),n.d(t,"a",(function(){return o}));var o={uniIcons:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uni-icons/components/uni-icons/uni-icons")]).then(n.bind(null,"5de9"))}},r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.history_food.length),o=n?e.history_food.length:null,r=n&&!e.showAll?e.history_food.slice(0,8):null;e._isMounted||(e.e0=function(t){e.showAll=!e.showAll},e.e1=function(t,n){var o=arguments[arguments.length-1].currentTarget.dataset,r=o.eventParams||o["event-params"];n=r.item;return e.handleSearchHistory(n.keyword)},e.e2=function(t){e.showAutoSearchDlg=!1},e.e3=function(t){e.showAutoSearchDlg=!0}),e.$mp.data=Object.assign({},{$root:{g0:n,g1:o,g2:r}})},c=[]},"77b0":function(e,t,n){"use strict";var o=n("9d79"),r=n.n(o);r.a},"9d79":function(e,t,n){},df12:function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n("7ca3")),c=n("8f59");function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=requirePlugin("WechatSI"),s={data:function(){return{index:0,Page:1,showAll:!1,search_value:"",mic_touch:!1,voiceManager:null,autoSearchContent:"",showAutoSearchDlg:!1}},computed:i(i({},(0,c.mapState)(["configInfo"])),{},{popular_food:function(){return this.configInfo.search_guess.cookbook},history_food:function(){return this.configInfo.search_history.cookbook}}),onLoad:function(){},mounted:function(){var e=this;e.voiceManager=u.getRecordRecognitionManager(),e.voiceManager.onStop=function(t){e.autoSearchContent=t.result.replace("。","")},e.voiceManager.onError=function(e){console.error("error msg",e.retcode)},e.voiceManager.stop()},methods:{toggleShowAll:function(){this.showAll=!this.showAll},retrySearch:function(){this.autoSearchContent=""},onVoiceTouchStart:function(){this.mic_touch=!0,this.voiceManager.start({duration:6e4,lang:"zh_CN"})},onVoiceTouchEnd:function(){this.mic_touch=!1,this.voiceManager.stop()},handlecolse:function(){console.log("取消搜索"),this.search_value=""},handleSearchHistory:function(t){""!=t?(this.showAutoSearchDlg=!1,this.autoSearchContent="",e.navigateTo({url:"/pages/search/list?name="+t})):this.$tools.msg("输入关键字后搜索")}}};t.default=s}).call(this,n("df3c")["default"])},f8bd:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6c4c");o(n("3240"));var r=o(n("10f0"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(r.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["f8bd","common/runtime","common/vendor"]]]); |