diff --git a/App.vue b/App.vue index 9012ad1..c22e9b6 100644 --- a/App.vue +++ b/App.vue @@ -7,12 +7,12 @@ mapMutations } from 'vuex' export default { - + computed:{ ...mapGetters({'user':'getUser'}) }, methods: { - + ...mapActions(['memberLogin','getLoginCode']), ...mapMutations(['setVisitChannels']), }, @@ -27,26 +27,27 @@ Vue.prototype.CustomBar = e.statusBarHeight + 45; }; // #endif - + // #ifdef MP-WEIXIN Vue.prototype.StatusBar = e.statusBarHeight; let custom = wx.getMenuButtonBoundingClientRect(); Vue.prototype.Custom = custom; Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; Vue.prototype.pageWindowHeight = e.screenHeight-custom.bottom - custom.top + e.statusBarHeight;; - // #endif - - + // #endif + + } }) - + let _this = this + console.log('app',this.user.WeChat_MiniProToken) if (this.user.WeChat_MiniProToken) { this.memberLogin() // 获取用户数据 } else { this.getLoginCode() } - + this.setVisitChannels(options.scene) const updateManager = uni.getUpdateManager() updateManager.onUpdateReady(function(res) { @@ -63,10 +64,10 @@ }); this.$util.addUserBehavior( {intoRoute: '/'+options.path, outtoRoute: ''}) // 记录用户行为 - + }, onShow: function() { - + // var pages = getCurrentPages() // 获取加载的页面 // let len = pages.length // if (len > 0) { @@ -78,7 +79,7 @@ }, onHide: function(options) { let pages = getCurrentPages() // 获取加载的页面 - + let len = pages.length if (len > 0) { let currentPage = pages[len - 1] // 获取当前页面的对象 @@ -92,7 +93,7 @@