diff --git a/src/pages/realtimeInfo/components/HeaderView/index.vue b/src/pages/realtimeInfo/components/HeaderView/index.vue
index 1758bc3..2d3db93 100644
--- a/src/pages/realtimeInfo/components/HeaderView/index.vue
+++ b/src/pages/realtimeInfo/components/HeaderView/index.vue
@@ -4,9 +4,9 @@
数据更新时间:{{ date }}
@@ -24,33 +24,33 @@ import { useUserStore } from "@/stores/user";
const menus = reactive([
{
- name: "海外先机",
+ label: "海外先机",
+ name: "hwxj",
icon: MENUICON1,
- // auth: "menu1",
path: "/pages/foreign/index",
},
{
- name: "编辑精选",
+ label: "编辑精选",
+ name: "bjjx",
icon: MENUICON2,
- // auth: "menu2",
path: "/pages/recommend/index",
},
{
- name: "宏观知微",
+ label: "宏观知微",
+ name: "hgzw",
icon: MENUICON3,
- // auth: "menu3",
path: "/pages/macroscopic/index",
},
{
- name: "热门行业",
+ label: "热门行业",
+ name: "rthx",
icon: MENUICON4,
- // auth: "menu4",
path: "/pages/industry/index",
},
{
- name: "风口概念",
+ label: "风口概念",
+ name: "fkgn",
icon: MENUICON5,
- // auth: "menu5",
path: "/pages/concept/index",
},
]);
@@ -61,7 +61,7 @@ const userInfos = computed(() => {
});
const emit = defineEmits(["onShow"]);
-const goto = (path: string, auth: string) => {
+const goto = (menu: any) => {
if (!userStore.isLogin) {
emit("onShow");
return;
@@ -76,8 +76,17 @@ const goto = (path: string, auth: string) => {
return;
}
+ const isAuth = userInfos.value?.auth?.findIndex((item) => item.name === menu.name);
+ if (isAuth === -1 || userInfos.value?.auth[isAuth]?.enabled === 0) {
+ uni.showToast({
+ title: "暂未开通本栏目",
+ icon: "none",
+ });
+ return;
+ }
+
uni.navigateTo({
- url: path,
+ url: menu.path,
});
};
diff --git a/src/pages/realtimeInfo/components/TopNewsView/index.vue b/src/pages/realtimeInfo/components/TopNewsView/index.vue
index eb5141d..54121dc 100644
--- a/src/pages/realtimeInfo/components/TopNewsView/index.vue
+++ b/src/pages/realtimeInfo/components/TopNewsView/index.vue
@@ -36,11 +36,14 @@