登录流程改版
This commit is contained in:
@@ -400,11 +400,7 @@
|
||||
<!-- 筛选 -->
|
||||
<select-filter ref="selectFilterModel"></select-filter>
|
||||
|
||||
<!-- 微信授权登录弹窗 -->
|
||||
<WxAuthLogin
|
||||
ref="wxAuthLoginRef"
|
||||
@success="handleLoginSuccess"
|
||||
></WxAuthLogin>
|
||||
|
||||
|
||||
<!-- <view class="maskFristEntry" v-if="maskFristEntry">
|
||||
<view class="entry-content">
|
||||
@@ -531,7 +527,7 @@ import {
|
||||
} from "@/stores/useRecommedIndexedDBStore.js";
|
||||
import { useScrollDirection } from "@/hook/useScrollDirection";
|
||||
import { useColumnCount } from "@/hook/useColumnCount";
|
||||
import WxAuthLogin from "@/components/WxAuthLogin/WxAuthLogin.vue";
|
||||
|
||||
import IconfontIcon from "@/components/IconfontIcon/IconfontIcon.vue";
|
||||
// 企业卡片组件已内联到模板中
|
||||
// 滚动状态管理
|
||||
@@ -584,7 +580,7 @@ const loadmoreRef = ref(null);
|
||||
const conditionSearch = ref({});
|
||||
const waterfallcolumn = ref(2);
|
||||
const maskFristEntry = ref(false);
|
||||
const wxAuthLoginRef = ref(null);
|
||||
|
||||
const state = reactive({
|
||||
tabIndex: "all",
|
||||
});
|
||||
@@ -684,7 +680,7 @@ onMounted(() => {
|
||||
|
||||
// 监听退出登录事件,显示微信登录弹窗
|
||||
uni.$on("showLoginModal", () => {
|
||||
wxAuthLoginRef.value?.open();
|
||||
uni.navigateTo({ url: '/pages/login/wx-login' });
|
||||
});
|
||||
});
|
||||
|
||||
@@ -712,8 +708,8 @@ watch(
|
||||
const checkLogin = () => {
|
||||
const tokenValue = uni.getStorageSync("token") || "";
|
||||
if (!tokenValue || !hasLogin.value) {
|
||||
// 未登录,打开授权弹窗
|
||||
wxAuthLoginRef.value?.open();
|
||||
// 未登录,跳转到登录页面
|
||||
uni.navigateTo({ url: '/pages/login/wx-login' });
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user