首页卡片开发
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user