index.js 4.8 KB

12
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/index"],[,,,,,,,,,,,,function(n,e,t){"use strict";(function(n){t(5);o(t(4));var e=o(t(13));function o(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 o=t(14),r=t(16);for(var i in r)"default"!==i&&function(n){t.d(e,n,(function(){return r[n]}))}(i);t(25);var u,a=t(11),c=Object(a["default"])(r["default"],o["render"],o["staticRenderFns"],!1,null,null,null,!1,o["components"],u);c.options.__file="pages/index/index.vue",e["default"]=c.exports},function(n,e,t){"use strict";t.r(e);var o=t(15);t.d(e,"render",(function(){return o["render"]})),t.d(e,"staticRenderFns",(function(){return o["staticRenderFns"]})),t.d(e,"recyclableRender",(function(){return o["recyclableRender"]})),t.d(e,"components",(function(){return o["components"]}))},function(n,e,t){"use strict";var o;t.r(e),t.d(e,"render",(function(){return r})),t.d(e,"staticRenderFns",(function(){return u})),t.d(e,"recyclableRender",(function(){return i})),t.d(e,"components",(function(){return o}));try{o={uniTransition:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uni-transition/components/uni-transition/uni-transition")]).then(t.bind(null,248))},uniNoticeBar:function(){return t.e("uni_modules/uni-notice-bar/components/uni-notice-bar/uni-notice-bar").then(t.bind(null,254))},uniSection:function(){return t.e("uni_modules/uni-section/components/uni-section/uni-section").then(t.bind(null,261))}}}catch(a){if(-1===a.message.indexOf("Cannot find module")||-1===a.message.indexOf(".vue"))throw a;console.error(a.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var n=this,e=n.$createElement;n._self._c},i=!1,u=[];r._withStripped=!0},function(n,e,t){"use strict";t.r(e);var o=t(17),r=t.n(o);for(var i in o)"default"!==i&&function(n){t.d(e,n,(function(){return o[n]}))}(i);e["default"]=r.a},function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=u(t(18)),r=u(t(21)),i=u(t(24));function u(n){return n&&n.__esModule?n:{default:n}}function a(n,e,t,o,r,i,u){try{var a=n[i](u),c=a.value}catch(s){return void t(s)}a.done?e(c):Promise.resolve(c).then(o,r)}function c(n){return function(){var e=this,t=arguments;return new Promise((function(o,r){var i=n.apply(e,t);function u(n){a(i,o,r,u,c,"next",n)}function c(n){a(i,o,r,u,c,"throw",n)}u(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 e=this;return c(o.default.mark((function t(){var u,a,l,d,f,p,v;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return wx.hideTabBar(),setTimeout((function(){e.dhshow=!e.dhshow,wx.showTabBar()}),3e3),t.next=4,i.default.getJson();case 4:u=t.sent,a=u.data,l=a.list,d=a.bannerList,f=a.governList,p=a.construct,e.list=l,e.bannerList=d,e.govern=f,e.construct=p,v=e,wx.login({success:function(){var e=c(o.default.mark((function e(t){var u,a,c,l;return o.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(a=e.sent,!a||200!=a.code){e.next=12;break}return n.setStorageSync("token",a.data.token),n.setStorageSync("userinfo",a.data.user),n.setStorageSync("role",a.data.role),e.next=10,r.default.getSystemNoticeNew();case 10:l=e.sent,v.notice=null===(c=l.data)||void 0===c?void 0:c.noticeTitle;case 12:case"end":return e.stop()}}),e)})));function t(n){return e.apply(this,arguments)}return t}()});case 12:case"end":return t.stop()}}),t)})))()},methods:{morBtn:function(){n.switchTab({url:"/pages/policy/index"})},illnessBtn:function(e){var t=n.getStorageSync("role");console.log(t,"role"),e.isUser&&t&&"guest"==t?n.navigateTo({url:"/pages/register/index?path=".concat(e.path)}):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 o=t(26),r=t.n(o);for(var i in o)"default"!==i&&function(n){t.d(e,n,(function(){return o[n]}))}(i);e["default"]=r.a},function(n,e,t){}],[[12,"common/runtime","common/vendor"]]]);
  2. //# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/index/index.js.map