feat: 抽屉中的数据加载问题优化

This commit is contained in:
2025-09-16 21:07:54 +08:00
parent 69fe1b80c8
commit cead891e69

View File

@@ -36,8 +36,7 @@
</template> </template>
<script setup> <script setup>
import { ref } from "vue"; import { ref, onMounted } from "vue";
import { onShow } from "@dcloudio/uni-app";
import { getLoginUserPhone } from "@/request/api/LoginApi"; import { getLoginUserPhone } from "@/request/api/LoginApi";
// 假数据 // 假数据
@@ -60,8 +59,8 @@ const menuList = ref([
{ label: "订阅消息", type: "action", action: "subscribeMessage" }, { label: "订阅消息", type: "action", action: "subscribeMessage" },
]); ]);
// 页面生命周期钩子 - 页面显示时调用 // 组件挂载时调用
onShow(() => { onMounted(() => {
getLoginUserPhoneInfo(); getLoginUserPhoneInfo();
}); });