diff --git a/unitool/index.js b/unitool/index.js index ff32d5d..ee40e52 100644 --- a/unitool/index.js +++ b/unitool/index.js @@ -242,7 +242,7 @@ module.exports = { }, setBarTitles({ windowTitle, pageTitle } = {}) { - let page = this.$store ? this : getCurrentPages().pop() + let page = this.$store ? this : getCurrentPages()[getCurrentPages().length - 1] uni.setNavigationBarTitle({ title: pageTitle || page.i18nText[page.$store.state.i18n.mylang].tPageTitle }) // #ifdef H5 document.title = windowTitle || page.$store.getters['i18n/getAppName'] // 必须放在 setNavigationBarTitle 之后,否则会被其覆盖掉。 @@ -251,7 +251,7 @@ module.exports = { }, localeText() { - let page = this.$store ? this : getCurrentPages().pop() + let page = this.$store ? this : getCurrentPages()[getCurrentPages().length - 1] return page.i18nText[page.$store.state.i18n.mylang] },