(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/foodlist"],{"0193":function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("af34")),a=i(n("7ca3")),c=n("8f59");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var u={components:{search:function(){n.e("components/search").then(function(){return resolve(n("f1d3"))}.bind(null,n)).catch(n.oe)}},data:function(){return{text:"",index:0,leftInd:0,menu:[],menu2:[],menu3:[],menulist:[],ActiveList:[],page:1,type:"",name:"",lastPage:""}},computed:r(r({},(0,c.mapState)(["foodList"])),{},{menuTop:function(){return this.menu2=this.foodList.length?this.foodList[0].list:[],console.log([].concat((0,o.default)(this.foodList),[{id:4,list:[],name:"搜索"}])),[].concat((0,o.default)(this.foodList),[{id:4,list:[],name:"搜索"}])}}),onLoad:function(t){if(t&&t.list){var e=JSON.parse(t.list);console.log("11111111",e)}this.handleHomeInfo()},onPullDownRefresh:function(){!this.lastPage||this.page>=this.lastPage?t.showToast({title:"没有更多数据！",icon:"none"}):(this.page++,this.menu2.length&&this.handleHomeInfo(),setTimeout((function(){t.stopPullDownRefresh()}),500))},methods:{handleHomeInfo:function(){var t=this;t.$model.getCookFoodList({food_level2_id:t.menu2[t.leftInd].id,page:t.page,search_data:t.name}).then((function(e){0==e.code&&(t.lastPage=e.data.page_total,t.menu3=t.menu3.concat(e.data.content_list))}))},handleToggle:function(t){this.index=t,this.leftInd=0,this.menu2=this.menuTop[t].list,this.menu3=[],this.page=1,this.menu2.length&&this.handleHomeInfo()},handleToggleLeft:function(t){this.leftInd=t,this.menu3=[],this.page=1,this.handleHomeInfo()},handleDetail:function(t,e){var n=[];if(1==e)n.push(t),this.ActiveList=this.$tools.mergeAndDeduplicate(this.ActiveList,n,"name");else for(var i=0;i<this.ActiveList.length;i++)t.name==this.ActiveList[i].name&&this.ActiveList.splice(i,1)},handledelete:function(){this.ActiveList=[]},handlesubbtn:function(){var e=getCurrentPages(),n=e[e.length-2];n.$vm.getAddFood(this.ActiveList),t.navigateBack({delta:1})},handleSearch:function(e){var n=this;""!=e&&n.$model.getFoodSearch({food_name:e}).then((function(e){0==e.code?(n.index=3,n.menu2=[],n.menu3=e.data):t.showToast({title:e.msg,icon:"error"})}))}}};e.default=u}).call(this,n("df3c")["default"])},"21f0":function(t,e,n){"use strict";var i=n("37c1"),o=n.n(i);o.a},"2a91":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("6c4c");i(n("3240"));var o=i(n("fd42"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"36dd":function(t,e,n){"use strict";n.r(e);var i=n("0193"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"37c1":function(t,e,n){},bc4c:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,t.ActiveList.length),i=t.__map(t.menu3,(function(e,n){var i=t.__get_orig(e),o=t.ActiveList.indexOf(e),a=t.ActiveList.indexOf(e);return{$orig:i,g1:o,g2:a}})),o=t.menu3.length,a=t.ActiveList.length;t.$mp.data=Object.assign({},{$root:{g0:n,l0:i,g3:o,g4:a}})},o=[]},fd42:function(t,e,n){"use strict";n.r(e);var i=n("bc4c"),o=n("36dd");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("21f0");var c=n("828b"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"6252f0d2",null,!1,i["a"],void 0);e["default"]=s.exports}},[["2a91","common/runtime","common/vendor"]]]);