fix: 修复getUsername未导出的错误,改用uni.getStorageSync直接获取

This commit is contained in:
Agent
2026-03-28 13:36:23 +00:00
parent dc847564c0
commit dec77fd518

View File

@@ -154,7 +154,7 @@
</template>
<script>
import { isAdmin, isSales, isCustomer, isGuest, getUsername } from '@/utils/auth'
import { isAdmin, isSales, isCustomer, isGuest } from '@/utils/auth'
export default {
data() {
@@ -176,7 +176,7 @@ export default {
isLoggedIn() { return !isGuest() }
},
onShow() {
this.username = getUsername() || ''
this.username = uni.getStorageSync('username') || '' || ''
this.setGreeting()
},
methods: {