|
@@ -181,7 +181,7 @@
|
|
|
import CreditCard from '@/components/creditCard.vue'
|
|
|
|
|
|
import { ref, computed } from 'vue'
|
|
|
- import { onLoad } from '@dcloudio/uni-app'
|
|
|
+ import { onLoad, onShow } from '@dcloudio/uni-app'
|
|
|
import { getToken, removeToken } from '@/utils/auth.js'
|
|
|
import { useAuthStore } from '@/store/authStore'
|
|
|
|
|
@@ -409,10 +409,10 @@
|
|
|
}
|
|
|
|
|
|
const isLogin = computed(() => {
|
|
|
- return getToken() ? true : false
|
|
|
+ return authStore.token ? true : false
|
|
|
})
|
|
|
|
|
|
- onLoad(() => {
|
|
|
+ onShow(() => {
|
|
|
user.value = authStore.userInfo
|
|
|
getCreditCard().then(res => {
|
|
|
if (res && res.message === 'success') {
|