(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"1a29":function(t,n,e){"use strict";e.r(n);var o=e("d1ed"),i=e("bb47");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("30f9");var r=e("828b"),c=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,"2f6df86c",null,!1,o["a"],void 0);n["default"]=c.exports},"30f9":function(t,n,e){"use strict";var o=e("9305"),i=e.n(o);i.a},"49e1":function(t,n,e){"use strict";(function(t){var o=e("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o(e("7ca3")),a=e("8f59");function r(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,o)}return e}function c(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?r(Object(e),!0).forEach((function(n){(0,i.default)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):r(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var s={data:function(){return{token:"",isShow:!1,isFoodList:!1,today_intake:{kcal:{},list:[],time:"",title:"",other_elements:{}},chartData:{series:[{data:1,color:"#ff4c4f"}]},ListDetail:{title:"",value:"",unit:"",content:{time:"",list:[]}},addfoodList:[]}},components:{qiunDataCharts:function(){Promise.all([e.e("common/vendor"),e.e("uni_modules/qiun-data-charts/components/qiun-data-charts")]).then(function(){return resolve(e("bd05"))}.bind(null,e)).catch(e.oe)}},computed:c(c({},(0,a.mapState)(["configInfo","user"])),{},{info:function(){return this.user},kcalVal:function(){return this.configInfo.kcal_data}}),onLoad:function(){this.addfoodList=this.$json.addfoodList,this.token=t.getStorageSync("token"),this.handleHomeConfig()},onPullDownRefresh:function(){this.index=0,this.footlist=[],this.handleHomeConfig(),setTimeout((function(){t.stopPullDownRefresh()}),500)},methods:{handleHomeConfig:function(){var t=this;t.$model.getHomeConfig({}).then((function(n){0==n.code&&(t.handleHomeUserInfo(),t.$store.commit("changeConfig",n.data))}))},handleHomeUserInfo:function(){var t=this;t.$model.getHomeUserInfo({}).then((function(n){if(0!=n.code)return t.$store.commit("changeUserInfo",{}),void console.log("11111");t.$store.commit("changeUserInfo",n.data),t.handleCountFoodInfo()}))},handleCountFoodInfo:function(){var t=this;t.$model.getCountFoodInfo({aud_id:t.info.aud_id,time:t.$tools.getDate("start")}).then((function(n){0==n.code&&(t.today_intake=n.data.home_food_count.kcal_data)}))},handleSearch:function(){t.switchTab({url:"/pages/search/search"})},handleLogin:function(){t.reLaunch({url:"/pageTwo/login/login"})},handleUserEdit:function(){t.navigateTo({url:"/pageTwo/me/userEdit"})},handleNavTo:function(n){this.isShow=!1,t.setStorageSync("startDay",n),t.switchTab({url:"/pages/count/count"})},handleAddFood:function(n,e){this.isShow=!1,3!=n?t.navigateTo({url:"/pageTwo/count/food?name="+e+"&ind="+n}):this.isShow=!0},handleListDetail:function(t){console.log("item",t),t.content.list.length?(this.isFoodList=!0,this.ListDetail=t):this.$tools.msg("暂无摄入，快去添加吧")},navTo:function(n){t.navigateTo({url:n}),t.switchTab({url:n})}}};n.default=s}).call(this,e("df3c")["default"])},"541f":function(t,n,e){"use strict";(function(t,n){var o=e("47a9");e("6c4c");o(e("3240"));var i=o(e("1a29"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},9305:function(t,n,e){},bb47:function(t,n,e){"use strict";e.r(n);var o=e("49e1"),i=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a},d1ed:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var o=function(){var t=this,n=t.$createElement,e=(t._self._c,t.configInfo.banner_data.length);t._isMounted||(t.e0=function(n,e){var o=arguments[arguments.length-1].currentTarget.dataset,i=o.eventParams||o["event-params"];e=i.ite;return t.$tools.NewsPtype(e)},t.e1=function(n){t.isShow=!1},t.e2=function(n){t.isShow=!1},t.e3=function(n){t.isFoodList=!1},t.e4=function(n){t.isFoodList=!1}),t.$mp.data=Object.assign({},{$root:{g0:e}})},i=[]}},[["541f","common/runtime","common/vendor"]]]);