12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- <script>
- import wepy from '@wepy/core';
- // import eventHub from './common/eventHub';
- import vuex from '@wepy/x';
- wepy.use(vuex);
- wepy.app({
- hooks: {
- // App 级别 hook,对整个 App 生效
- // 同时存在 Page hook 和 App hook 时,优先执行 Page hook,返回值再交由 App hook 处
- // 'before-setData': function (dirty) {
- // console.log('setData dirty: ', dirty);
- // return dirty;
- // }
- },
- globalData: {
- appInfo: 'this is globleData',
- userInfo: null
- },
- onLaunch() {
- console.log('app onLaunch');
- // this.testAsync();
- // eventHub.$on('app-launch', (...args) => {
- // console.log('app-launch event emitted, the params are:');
- // console.log(args);
- // });
- },
- onShow () {
- console.log('app onishow');
- }
- // methods: {
- // sleep (s) {
- // return new Promise((resolve, reject) => {
- // setTimeout(() => {
- // resolve('promise resolved')
- // }, s * 1000)
- // })
- // },
- // async testAsync () {
- // let d = await this.sleep(3);
- // console.log(d);
- // }
- // }
- });
- </script>
- <config>
- {
- "entryPagePath": "pages/index",
- requiredPrivateInfos: ["getLocation"],
- pages: [
- 'pages/index',
- 'pages/login',
- 'pages/report/index',
- 'pages/my/index'
- ],
- window: {
- backgroundTextStyle: 'light',
- navigationBarBackgroundColor: '#fff',
- navigationBarTitleText: 'ITT健康检测',
- navigationBarTextStyle: 'black'
- },
- tabBar: {
- list:[
- {
- pagePath: 'pages/index',
- text: '首页'
- },
- {
- pagePath: 'pages/report/index',
- text: '报告'
- },
- {
- pagePath: 'pages/my/index',
- text: '我的'
- }
- ]
- }
- }
- </config>
|