(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],[,,,,,,,,,,,,function(n,e,t){"use strict";(function(n){t(5);r(t(4));var e=r(t(13));function r(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=t,n(e.default)}).call(this,t(1)["createPage"])},function(n,e,t){"use strict";t.r(e);var r=t(14),o=t(16);for(var i in o)"default"!==i&&function(n){t.d(e,n,(function(){return o[n]}))}(i);t(25);var u,c=t(11),a=Object(c["default"])(o["default"],r["render"],r["staticRenderFns"],!1,null,null,null,!1,r["components"],u);a.options.__file="pages/index/index.vue",e["default"]=a.exports},function(n,e,t){"use strict";t.r(e);var r=t(15);t.d(e,"render",(function(){return r["render"]})),t.d(e,"staticRenderFns",(function(){return r["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return r["recyclableRender"]})),t.d(e,"components",(function(){return r["components"]}))},function(n,e,t){"use strict";var r;t.r(e),t.d(e,"render",(function(){return o})),t.d(e,"staticRenderFns",(function(){return u})),t.d(e,"recyclableRender",(function(){return i})),t.d(e,"components",(function(){return r}));try{r={uniNoticeBar:function(){return t.e("uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar").then(t.bind(null,145))},uniSection:function(){return t.e("uni_modules/uni-section/components/uni-section/uni-section").then(t.bind(null,152))},uniCard:function(){return t.e("uni_modules/uni-card/components/uni-card/uni-card").then(t.bind(null,159))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范，文档：https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范，需手动引入，并在 components 中注册该组件")}var o=function(){var n=this,e=n.$createElement;n._self._c},i=!1,u=[];o._withStripped=!0},function(n,e,t){"use strict";t.r(e);var r=t(17),o=t.n(r);for(var i in r)"default"!==i&&function(n){t.d(e,n,(function(){return r[n]}))}(i);e["default"]=o.a},function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=u(t(18)),o=u(t(21)),i=u(t(24));function u(n){return n&&n.__esModule?n:{default:n}}function c(n,e,t,r,o,i,u){try{var c=n[i](u),a=c.value}catch(s){return void t(s)}c.done?e(a):Promise.resolve(a).then(r,o)}function a(n){return function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function u(n){c(i,r,o,u,a,"next",n)}function a(n){c(i,r,o,u,a,"throw",n)}u(void 0)}))}}var s=n.getAccountInfoSync().miniProgram.appId,l={data:function(){return{list:[],policyList:[],notice:"通知公告",autoplay:!0,interval:3e3,duration:500,indicatorDots:!1,bannerList:[]}},mounted:function(){var e=this;return a(r.default.mark((function t(){var u,c,l,d,f,p;return r.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,i.default.getJson();case 2:u=t.sent,c=u.data,l=c.list,d=c.bannerList,f=c.policyList,e.list=l,e.bannerList=d,e.policyList=f,p=e,wx.login({success:function(){var e=a(r.default.mark((function e(t){var u,c,a,l;return r.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return u=t.code,e.next=3,i.default.login({code:u,appId:s});case 3:if(c=e.sent,!c||200!=c.code){e.next=12;break}return n.setStorageSync("token",c.data.token),n.setStorageSync("userinfo",c.data.user),n.setStorageSync("role",c.data.role),e.next=10,o.default.getSystemNoticeNew();case 10:l=e.sent,p.notice=null===(a=l.data)||void 0===a?void 0:a.noticeTitle;case 12:case"end":return e.stop()}}),e)})));function t(n){return e.apply(this,arguments)}return t}()});case 9:case"end":return t.stop()}}),t)})))()},methods:{morBtn:function(){n.switchTab({url:"/pages/policy/index"})},illnessBtn:function(e){var t=n.getStorageSync("role");e.isUser&&t&&"guest"==t?n.navigateTo({url:"/pages/register/index"}):e.path?n.navigateTo({url:e.path}):n.showToast({title:"敬请期待",icon:"error",duration:2e3})},policyBtn:function(e){n.navigateTo({url:e.path})},getMore:function(){n.navigateTo({url:"/pages/notice/index"})}},onShow:function(){n.removeStorageSync("policyItem")}};e.default=l}).call(this,t(1)["default"])},,,,,,,,function(n,e,t){"use strict";t.r(e);var r=t(26),o=t.n(r);for(var i in r)"default"!==i&&function(n){t.d(e,n,(function(){return r[n]}))}(i);e["default"]=o.a},function(n,e,t){}],[[12,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map