fix: skip API calls on customers page when user is guest/unauthenticated
This commit is contained in:
@@ -300,6 +300,9 @@ const formData = ref({
|
||||
const statusOptions = ['lead', 'negotiating', 'customer', 'lost']
|
||||
|
||||
onShow(() => {
|
||||
const token = uni.getStorageSync('token')
|
||||
const isGuest = uni.getStorageSync('isGuest')
|
||||
if (!token || isGuest) return
|
||||
loadCustomers()
|
||||
loadHealthOverview()
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user