import Vue from 'vue' Vue.mixin({ onReady(){ const userData = uni.getStorageSync('userData'); uni.setNavigationBarTitle({ title: userData ? userData.user.name : "", }) }, })