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']
|
const statusOptions = ['lead', 'negotiating', 'customer', 'lost']
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
const token = uni.getStorageSync('token')
|
||||||
|
const isGuest = uni.getStorageSync('isGuest')
|
||||||
|
if (!token || isGuest) return
|
||||||
loadCustomers()
|
loadCustomers()
|
||||||
loadHealthOverview()
|
loadHealthOverview()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user