(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{2320:function(e,t,n){"use strict";var o=n("991c"),i=n.n(o);i.a},"51fc":function(e,t,n){"use strict";(function(e){var o=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(n("7ca3")),a=n("8f59");function c(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}var r={data:function(){return{index:0,fimages:[],list:[],tools:[],menu:[],footlist:[]}},components:{search:function(){n.e("components/search2").then(function(){return resolve(n("4d80"))}.bind(null,n)).catch(n.oe)},foodList:function(){n.e("components/list").then(function(){return resolve(n("cebd"))}.bind(null,n)).catch(n.oe)}},computed:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,i.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},(0,a.mapState)(["menuList"])),onLoad:function(){this.handleHomeConfig()},onPullDownRefresh:function(){this.menu=[],this.index=0,this.fimages=[],this.list=[],this.tools=[],this.footlist=[],this.handleHomeConfig(),setTimeout((function(){e.stopPullDownRefresh()}),500)},methods:{handleHomeConfig:function(){var e=this;e.$model.getHomeConfig({}).then((function(t){0==t.code&&(e.menu=t.data.cook_label,e.fimages=t.data.banner,e.tools=t.data.jingang_region,e.$store.commit("changeMenuList",t.data.cook_label),e.$store.commit("changeFoodList",t.data.food_list),e.handleCookListLabel(),e.handleHomeUserInfo())}))},handleHomeUserInfo:function(){var e=this;e.$model.getHomeUserInfo({}).then((function(t){0==t.code&&e.$store.commit("changeUserInfo",t.data)}))},handleCookListLabel:function(){var e=this;e.$model.getCookListLabel({cook_label:e.menu.length?e.menu[e.index].id:0,page:1}).then((function(t){0==t.code&&(e.footlist=t.data.content_list)}))},handleToggle:function(e){this.index=e,this.footlist=[],this.handleCookListLabel()},handleDetail:function(t){e.getStorageSync("token")?e.navigateTo({url:"/pageTwo/me/menudetail?id="+t}):this.$tools.msg("登录后查看等多！")},handleSearch:function(t){e.navigateTo({url:"/pages/search/search"})},navTo:function(t){e.navigateTo({url:t}),e.switchTab({url:t})}}};t.default=r}).call(this,n("df3c")["default"])},"69fe":function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){}));var o=function(){var e=this.$createElement,t=(this._self._c,this.fimages.length);this.$mp.data=Object.assign({},{$root:{g0:t}})},i=[]},8404:function(e,t,n){"use strict";n.r(t);var o=n("69fe"),i=n("ca7c");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("2320");var c=n("828b"),r=Object(c["a"])(i["default"],o["b"],o["c"],!1,null,"205d0d94",null,!1,o["a"],void 0);t["default"]=r.exports},"991c":function(e,t,n){},ca7c:function(e,t,n){"use strict";n.r(t);var o=n("51fc"),i=n.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(a);t["default"]=i.a},d367:function(e,t,n){"use strict";(function(e,t){var o=n("47a9");n("6caf");o(n("3240"));var i=o(n("8404"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])}},[["d367","common/runtime","common/vendor"]]]);