(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],{"18bb":function(n,t,e){"use strict";e.r(t);var o=e("ff25"),i=e.n(o);for(var r in o)"default"!==r&&function(n){e.d(t,n,(function(){return o[n]}))}(r);t["default"]=i.a},"4da5":function(n,t,e){},"723c":function(n,t,e){"use strict";(function(n){e("d69c");o(e("66fd"));var t=o(e("bec0"));function o(n){return n&&n.__esModule?n:{default:n}}wx.__webpack_require_UNI_MP_PLUGIN__=e,n(t.default)}).call(this,e("543d")["createPage"])},bec0:function(n,t,e){"use strict";e.r(t);var o=e("cd4a"),i=e("18bb");for(var r in i)"default"!==r&&function(n){e.d(t,n,(function(){return i[n]}))}(r);e("d642");var a,u=e("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);t["default"]=c.exports},cd4a:function(n,t,e){"use strict";e.d(t,"b",(function(){return i})),e.d(t,"c",(function(){return r})),e.d(t,"a",(function(){return o}));var o={uniTransition:function(){return Promise.all([e.e("common/vendor"),e.e("uni_modules/uni-transition/components/uni-transition/uni-transition")]).then(e.bind(null,"4e5c"))},uniNoticeBar:function(){return e.e("uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar").then(e.bind(null,"207c"))},uniSection:function(){return e.e("uni_modules/uni-section/components/uni-section/uni-section").then(e.bind(null,"9d71"))}},i=function(){var n=this,t=n.$createElement;n._self._c},r=[]},d642:function(n,t,e){"use strict";var o=e("4da5"),i=e.n(o);i.a},ff25:function(n,t,e){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(e("a34a")),i=a(e("8325")),r=a(e("b583"));function a(n){return n&&n.__esModule?n:{default:n}}function u(n,t,e,o,i,r,a){try{var u=n[r](a),c=u.value}catch(s){return void e(s)}u.done?t(c):Promise.resolve(c).then(o,i)}function c(n){return function(){var t=this,e=arguments;return new Promise((function(o,i){var r=n.apply(t,e);function a(n){u(r,o,i,a,c,"next",n)}function c(n){u(r,o,i,a,c,"throw",n)}a(void 0)}))}}var s=n.getAccountInfoSync().miniProgram.appId,l={data:function(){return{styles:{width:"100vw",height:"100vh"},modeClass:["fade","zoom-in"],dhshow:!0,list:[],policyList:[],notice:"通知公告",autoplay:!0,interval:3e3,duration:500,indicatorDots:!1,bannerList:[],govern:[],construct:[]}},mounted:function(){var t=this;return c(o.default.mark((function e(){var a,u,l,d,f,v,p;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return wx.hideTabBar(),setTimeout((function(){t.dhshow=!t.dhshow,wx.showTabBar()}),3e3),e.next=4,r.default.getJson();case 4:a=e.sent,u=a.data,l=u.list,d=u.bannerList,f=u.governList,v=u.construct,t.list=l,t.bannerList=d,t.govern=f,t.construct=v,p=t,wx.login({success:function(){var t=c(o.default.mark((function t(e){var a,u,c,l;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return a=e.code,t.next=3,r.default.login({code:a,appId:s});case 3:if(u=t.sent,!u||200!=u.code){t.next=12;break}return n.setStorageSync("token",u.data.token),n.setStorageSync("userinfo",u.data.user),n.setStorageSync("role",u.data.role),t.next=10,i.default.getSystemNoticeNew();case 10:l=t.sent,p.notice=null===(c=l.data)||void 0===c?void 0:c.noticeTitle;case 12:case"end":return t.stop()}}),t)})));function e(n){return t.apply(this,arguments)}return e}()});case 12:case"end":return e.stop()}}),e)})))()},methods:{morBtn:function(){n.switchTab({url:"/pages/policy/index"})},illnessBtn:function(t){var e=n.getStorageSync("role");console.log(e,"role"),t.isUser&&e&&"guest"==e?n.navigateTo({url:"/pages/register/index?path=".concat(t.path)}):t.path?n.navigateTo({url:t.path}):n.showToast({title:"敬请期待",icon:"error",duration:2e3})},policyBtn:function(t){n.navigateTo({url:t.path})},getMore:function(){n.navigateTo({url:"/pages/notice/index"})}},onShow:function(){n.removeStorageSync("policyItem")}};t.default=l}).call(this,e("543d")["default"])}},[["723c","common/runtime","common/vendor"]]]);