首页卡片开发

This commit is contained in:
冯辉
2025-10-24 16:54:52 +08:00
parent 92ee5c5311
commit 2d6370b796
22 changed files with 896 additions and 205 deletions

View File

@@ -120,7 +120,7 @@
</template>
<script setup>
import { reactive, inject, watch, ref, onMounted } from 'vue';
import { reactive, inject, watch, ref, onMounted, onUnmounted } from 'vue';
import { storeToRefs } from 'pinia';
import { onLoad, onShow } from '@dcloudio/uni-app';
const { $api, navTo } = inject('globalFunction');
@@ -145,6 +145,21 @@ onShow(() => {
tabbarManager.updateSelected(4);
});
// 监听退出登录事件,显示微信登录弹窗
onMounted(() => {
uni.$on('showLoginModal', () => {
// 这里可以显示微信登录弹窗
// 由于这个页面没有 WxAuthLogin 组件,我们跳转到首页让首页处理
uni.reLaunch({
url: '/pages/index/index'
});
});
});
onUnmounted(() => {
uni.$off('showLoginModal');
});
function close() {
popup.value.close();
}