pages/user/index.vue
@@ -32,6 +32,7 @@ <script setup> import { onMounted, ref } from "vue"; import { onShow } from "@dcloudio/uni-app" const topHeight = ref(0) const userInfo = ref() @@ -66,9 +67,12 @@ }) } onShow(() => { userInfo.value = JSON.parse(uni.getStorageSync('userInfo')) }) onMounted(() => { getTopHeight() userInfo.value = JSON.parse(uni.getStorageSync('userInfo')) }) </script> @@ -84,6 +88,7 @@ height: 80rpx; image{ width: 100%; height: 100%; border-radius: 50%; } }