This commit is contained in:
liwenhao 2025-05-23 15:32:24 +08:00
commit c5c22124d7
11 changed files with 59 additions and 103 deletions

View File

@ -17,9 +17,6 @@
background: #f7f8fa;
letter-spacing: 1px;
border-top: 1px solid #ececec;
position: fixed;
left: 0;
bottom: 0;
z-index: 100;
}
</style>

View File

@ -17,8 +17,6 @@
background: #f7f8fa;
letter-spacing: 5px;
border-top: 5px solid #ececec;
left: 0;
bottom: 0;
z-index: 100;
}
</style>

View File

@ -22,72 +22,67 @@
</template>
<script setup>
import FiEELogo from "@/assets/image/header/logo.png";
import { ref, onMounted, onUnmounted } from "vue";
import { NMenu, NLayoutHeader, NImage } from "naive-ui";
import { useI18n } from "vue-i18n";
import { useRouter } from "vue-router";
import { useHeaderMenuConfig } from "@/config/headerMenuConfig";
import FiEELogo from '@/assets/image/header/logo.png'
import { ref, onMounted, onUnmounted } from 'vue'
import { NMenu, NLayoutHeader, NImage } from 'naive-ui'
import { useI18n } from 'vue-i18n'
import { useRouter } from 'vue-router'
import { useHeaderMenuConfig } from '@/config/headerMenuConfig'
const { t } = useI18n();
const router = useRouter();
const { t } = useI18n()
const router = useRouter()
// 使
const menuOptions = useHeaderMenuConfig();
const selectedKey = ref(null);
const menuOptions = useHeaderMenuConfig()
const selectedKey = ref(null)
const isScrolled = ref(false);
const isScrolled = ref(false)
//
function findMenuOptionByKey(options, key) {
for (const option of options) {
if (option.key === key) return option;
if (option.key === key) return option
if (option.children) {
const found = findMenuOptionByKey(option.children, key);
if (found) return found;
const found = findMenuOptionByKey(option.children, key)
if (found) return found
}
}
return null;
return null
}
//
const handleMenuSelect = (key) => {
const option = findMenuOptionByKey(menuOptions, key);
const option = findMenuOptionByKey(menuOptions, key)
if (option && option.href) {
router.push(option.href);
router.push(option.href)
}
};
}
//
const handleScroll = () => {
//100pxheader
isScrolled.value = window.scrollY >= 100;
};
isScrolled.value = window.scrollY >= 100
}
onMounted(() => {
window.addEventListener("scroll", handleScroll);
});
window.addEventListener('scroll', handleScroll)
})
onUnmounted(() => {
window.removeEventListener("scroll", handleScroll);
});
window.removeEventListener('scroll', handleScroll)
})
//
const handleToHome = () => {
router.push("/myhome");
selectedKey.value = null; //
};
router.push('/myhome')
selectedKey.value = null //
}
</script>
<style scoped lang="scss">
.custom-header {
--header-height: 80px;
--primary-color: #8b59f7;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
transition: all 0.3s ease;
background: transparent;
height: var(--header-height);
@ -143,7 +138,7 @@ const handleToHome = () => {
text-align: center;
&::after {
content: "";
content: '';
position: absolute;
bottom: 0;
left: 50%;
@ -189,7 +184,7 @@ const handleToHome = () => {
overflow: hidden;
&::before {
content: "";
content: '';
position: absolute;
top: 0;
left: 0;

View File

@ -108,11 +108,6 @@ const handleToHome = () => {
<style scoped lang="scss">
.custom-header {
top: 0;
left: 0;
right: 0;
z-index: 1000;
transition: all 0.3s ease;
background: transparent;
height: 320px;

View File

@ -38,10 +38,10 @@ export const useHeaderMenuConfig = () => {
key: "governance",
href: "/govern",
},
{
label: t("header_menu.corporate_information.corporate_video"),
key: "corporate_video",
},
// {
// label: t("header_menu.corporate_information.corporate_video"),
// key: "corporate_video",
// },//暂时隐藏本菜单
],
},
{
@ -72,6 +72,7 @@ export const useHeaderMenuConfig = () => {
{
label: t("header_menu.stock_information.historic_stock_price"),
key: "historic_stock_price",
href:'/historic-stock'
},
{
label: t("header_menu.stock_information.investment_calculator"),
@ -92,6 +93,7 @@ export const useHeaderMenuConfig = () => {
{
label: t("header_menu.news_releases.events_calendar"),
key: "events_calendar",
href: "/events-calendar",
},
],
},

View File

@ -3,6 +3,10 @@ import { createRouter, createWebHistory } from "vue-router";
import { setupRouterGuards } from "./router-guards";
const routes = [
{
path: "/",
redirect: '/myhome'
},
{
path: "/",
name: "index",
@ -23,16 +27,6 @@ const routes = [
name: "calculator",
component: () => import("@/views/calculator/index.vue"),
},
{
path: "/home",
name: "home",
component: () => import("@/views/home/index.vue"),
// beforeEnter: (to, from, next) => {
// localStorage.clear()
// next()
// }
},
{
path: "/stock-quote",
name: "stock-quote",
@ -138,6 +132,10 @@ const routes = [
// name: 'Investorhandbook',
// component: () => import('@/views/investorhandbook/index.vue'),
// },
{
path: '/:pathMatch(.*)*',
redirect: '/myhome'
}
];
const router = createRouter({

View File

@ -15,7 +15,7 @@ export const useStockQuote = createGlobalState(() => {
]
})
const getStockQuate= async()=>{
const res = await axios.get('http://saas-test.szjixun.cn/api/chart/forward/test')
const res = await axios.get('https://saas-test.szjixun.cn/api/chart/forward/test')
stockQuote.value=res.data
}
return {

View File

@ -308,7 +308,6 @@ const getPageData = async () => {
let url = `https://stockanalysis.com/api/symbol/a/OTC-MINM/history?period=${state.selectedPeriod}&range=${range}`;
const res = await axios.get(url);
if (res.data.status === 200) {
console.error(res.data.data);
// "Nov 26, 2024"
let resultData = res.data.data.map((item) => {
return {
@ -326,7 +325,6 @@ const getPageData = async () => {
volume: item.v,
};
});
console.error(resultData, "resultData");
state.tableData = resultData;
}
};

View File

@ -307,7 +307,6 @@ const getPageData = async () => {
let url = `https://stockanalysis.com/api/symbol/a/OTC-MINM/history?period=${state.selectedPeriod}&range=${range}`;
const res = await axios.get(url);
if (res.data.status === 200) {
console.error(res.data.data);
// "Nov 26, 2024"
let resultData = res.data.data.map((item) => {
return {
@ -325,7 +324,6 @@ const getPageData = async () => {
volume: item.v,
};
});
console.error(resultData, "resultData");
state.tableData = resultData;
}
};

View File

@ -1,7 +1,4 @@
<script setup>
import { NCarousel, NDivider, NMarquee, NPopselect } from 'naive-ui'
import { onUnmounted, ref, watch, onMounted, computed } from 'vue'
import customHeader from '@/components/customHeader/index.vue'
import customFooter from '@/components/customFooter/index.vue'
</script>
@ -9,15 +6,13 @@ import customFooter from '@/components/customFooter/index.vue'
<template>
<div class="flex flex-col h-screen">
<customHeader></customHeader>
<div class="bg-[url('@/assets/image/bg-pc.png')] bg-cover bg-center flex-1" style="margin: 80px 0;">
<div
class="bg-[url('@/assets/image/bg-pc.png')] bg-cover bg-center flex-1 overflow-auto"
>
<router-view />
</div>
<customFooter></customFooter>
</div>
</template>
<style scoped lang="scss">
main {
padding: var(--header-height, 80px) 0 0;
}
</style>
<style scoped lang="scss"></style>

View File

@ -1,38 +1,18 @@
<script setup>
import { NCarousel, NDivider, NMarquee, NPopselect } from 'naive-ui'
import { onUnmounted, ref, watch, onMounted, computed } from 'vue'
import customHeader from '@/components/customHeader/index.vue'
import customFooter from '@/components/customFooter/index.vue'
</script>
<template>
<!-- <header className="header">
375
</header> -->
<!-- <main ref="main"></main> -->
<div class="flex flex-col h-screen">
<customHeader />
<div class="bg-[url('@/assets/image/bg-mobile.png')] bg-cover bg-center flex-1 overflow-auto">
<div
class="bg-[url('@/assets/image/bg-mobile.png')] bg-cover bg-center flex-1 overflow-auto"
>
<router-view />
</div>
<customFooter />
</div>
</div>
</template>
<style scoped lang="scss">
.background-image {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-image: url('@/assets/image/bg-375.png');
background-size: 100% 100%;
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
z-index: -1;
}
</style>
<style scoped lang="scss"></style>