fix: 修复getUsername未导出的错误,改用uni.getStorageSync直接获取
This commit is contained in:
@@ -154,7 +154,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { isAdmin, isSales, isCustomer, isGuest, getUsername } from '@/utils/auth'
|
import { isAdmin, isSales, isCustomer, isGuest } from '@/utils/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
@@ -176,7 +176,7 @@ export default {
|
|||||||
isLoggedIn() { return !isGuest() }
|
isLoggedIn() { return !isGuest() }
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.username = getUsername() || ''
|
this.username = uni.getStorageSync('username') || '' || ''
|
||||||
this.setGreeting()
|
this.setGreeting()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
Reference in New Issue
Block a user