From de20b194f0254879bb30907d076e579acf4c11a9 Mon Sep 17 00:00:00 2001
From: "34701892@qq.com" <34701892@qq.com>
Date: Fri, 5 Sep 2025 20:27:06 +0800
Subject: [PATCH] =?UTF-8?q?feat(=E7=99=BB=E5=BD=95):=20=E6=B7=BB=E5=8A=A0?=
=?UTF-8?q?=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81=E5=88=A4=E6=96=AD=E5=8F=8A?=
=?UTF-8?q?=E5=86=85=E5=AE=B9=E6=A8=A1=E7=B3=8A=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
实现未登录状态下内容模糊显示功能,添加登录弹窗组件及相关回调处理。同时优化部分页面样式布局。
- 在indexNewsInfo.vue中添加登录状态判断及模糊效果
- 引入LoginPopup组件处理登录逻辑
- 优化realtimeInfo.vue页面布局和样式
---
src/components/article/indexNewsInfo.vue | 39 ++++++++++++---
src/pages/realtimeInfo/index.vue | 64 ++++++------------------
2 files changed, 49 insertions(+), 54 deletions(-)
diff --git a/src/components/article/indexNewsInfo.vue b/src/components/article/indexNewsInfo.vue
index 2357436..952b404 100644
--- a/src/components/article/indexNewsInfo.vue
+++ b/src/components/article/indexNewsInfo.vue
@@ -1,8 +1,8 @@
- {{ props.data.title }}
+ {{ props.data.title }}
-
+
来源:
{{ props.data.tag }}
@@ -11,11 +11,11 @@
编辑:
{{ props.data.editor }}
- {{ props.data.publishTime }}
+ {{ props.data.publishTime }}
-
+
-
+
{{ props.data.summary }}
@@ -42,7 +42,7 @@
-
+
@@ -54,6 +54,10 @@
v-html="props.data.content"
>
-->
+
+
+
@@ -67,7 +71,10 @@ import {
onShareTimeline,
} from "@dcloudio/uni-app";
import articleMock from "@/mock/article.js";
+import LoginPopup from "@/components/loginPopup/index.vue";
+import { Session } from "@/utils/storage";
+const isLogin = ref(Session.get('token'))
const props = defineProps({
data: {
type: Object,
@@ -85,6 +92,18 @@ const tagList1 = ref([
name: "医药生物-医疗服务",
},
]);
+const LoginShow = ref(false);
+// 关闭弹框
+const handlePopupClose = () => {
+ LoginShow.value = false;
+ isLogin.value = Session.get('token');
+};
+// 登录成功回调
+const handlePopupSuccessCallback = () => {
+ isLogin.value = Session.get('token');
+ console.log("🚀 ~ handlePopupSuccessCallback ~ isLogin.value:", isLogin.value)
+};
+
const tagList2 = ref([
{
@@ -106,6 +125,10 @@ const handleClick = (value: any) => {
onLoad((option) => {
type.value = option?.type || "list";
+
+ if (!isLogin.value) {
+ LoginShow.value = true;
+ }
});
const handleSub = () => {
@@ -284,4 +307,8 @@ const handleSub = () => {
white-space: nowrap;
}
}
+
+.mohu {
+ filter: blur(4px);
+}
diff --git a/src/pages/realtimeInfo/index.vue b/src/pages/realtimeInfo/index.vue
index 264cd37..3caab47 100644
--- a/src/pages/realtimeInfo/index.vue
+++ b/src/pages/realtimeInfo/index.vue
@@ -6,11 +6,9 @@
- 数据更新时间:{{
- dayjs(new Date().getTime()).format("YYYY-MM-DD")
- }}
+ 数据更新时间:{{
+ dayjs(new Date().getTime()).format("YYYY-MM-DD")
+ }}
@@ -25,12 +23,7 @@
-
+
已处理
@@ -49,12 +42,7 @@
概念标签贴标
-
+
已处理
@@ -72,16 +60,14 @@
-
+ ">
@@ -92,15 +78,13 @@
-
+ ">
查看全部
@@ -108,23 +92,17 @@
-
+
-
+ ">
查看全部
@@ -132,23 +110,13 @@
-
+
- 退出登录
+ 退出登录
-
+