diff --git a/App.vue b/App.vue index 3f55ab8..c503477 100644 --- a/App.vue +++ b/App.vue @@ -7,6 +7,7 @@ import { formatQuery } from 'utils/util'; export default { async onLaunch(options) { console.log('options: ', options); + // #ifdef MP-WEIXIN uni.getSetting({ success(res) { if (!res.authSetting['scope.userLocation']) { @@ -17,9 +18,10 @@ export default { } }, }); + // #endif try { - if (options.query.scene) { + if (options.query && options.query.scene) { const query = formatQuery(decodeURIComponent(options.query.scene)); if (options.path === 'pages/index/index' && query && query.d) { await this.getTokenByUserId({ params: { userId: query.d } }); @@ -42,6 +44,7 @@ export default { methods: { ...mapActions('user', ['login', 'getUserInfo', 'getHealthTypeStatus', 'getTokenByUserId']), + async initCommon() { const startTime = +this.$moment() .startOf('year') diff --git a/components/nav-bottom/nav-bottom.vue b/components/nav-bottom/nav-bottom.vue index 5232d75..e7d47ac 100644 --- a/components/nav-bottom/nav-bottom.vue +++ b/components/nav-bottom/nav-bottom.vue @@ -1,5 +1,5 @@