提交 e37d6ba1 作者: ZhangLingKun

功能:首页展示科比特店铺

上级 baea6fea
流水线 #8806 已通过 于阶段
in 5 分 50 秒
......@@ -4,7 +4,7 @@ import {
LogoutOutlined,
ReloadOutlined,
} from '@ant-design/icons';
import { App, Button, Dropdown, MenuProps, Modal } from 'antd';
import { App, Button, Dropdown, Input, MenuProps, Modal } from 'antd';
import dayjs from 'dayjs';
import Cookies from 'js-cookie';
import { throttle } from 'lodash';
......@@ -197,6 +197,15 @@ const HeaderView: React.FC<{
</Button>
)}
</div>
<div className="header-search">
<Input.Search
className="search-box"
placeholder="科比特航空"
enterButton="搜索"
size={'middle'}
bordered={true}
/>
</div>
<div className="header-nav">
<div className="nav-tab">
{tabList?.map((i, j) =>
......
......@@ -36,7 +36,7 @@ export const HeaderWrap = styled.div`
color: #ffffff;
}
.location-hello {
//width: 8rem;
min-width: 6.8rem;
}
.location-address {
margin: 0 0.25rem 0 0 !important;
......
import React from 'react';
import { ArrowRightOutlined } from '@ant-design/icons';
import { useRouter } from 'next/router';
import styled from 'styled-components';
const HomeHeadView = () => {
// 路由钩子
const router = useRouter();
// 跳转详情
const handleDetail = async () => {
await router.push(`/store/product/39`);
};
return (
<HomeHeadWrap>
<div className="head-wrap">
<img
className="head-logo"
src="https://file.iuav.com/file/sharefly-web-head-logo01.png"
alt="科比特航空"
/>
<div className="head-action flex-center" onClick={handleDetail}>
<div className="text">进入商家</div>
<ArrowRightOutlined />
</div>
</div>
</HomeHeadWrap>
);
};
export default HomeHeadView;
// 样式
const HomeHeadWrap = styled.div`
position: relative;
width: 100%;
height: 16.42rem;
background-image: url('https://file.iuav.com/file/sharefly-web-headbg02.png');
//background-size: 100% 100%;
background-size: cover;
background-position: center;
.head-wrap {
position: relative;
max-width: 1190px;
height: 16.42rem;
box-sizing: border-box;
display: flex;
align-items: flex-end;
justify-content: center;
flex-direction: column;
margin: 0 auto;
padding: 2rem 0 0 0;
.head-logo {
width: 18rem;
object-fit: cover;
margin-bottom: 2rem;
user-select: none;
}
.head-action {
width: 6rem;
height: 2rem;
background: #e1000e;
border-radius: 0.38rem;
color: #fff;
cursor: pointer;
&:hover {
filter: brightness(0.96);
}
.text {
margin-right: 0.25rem;
}
}
}
`;
......@@ -5,8 +5,8 @@ import HomeBrandView from '@/pages/home/comp/home-brand/_index';
import HomeCourseView from '@/pages/home/comp/home-course/_index';
import HomeFlyerView from '@/pages/home/comp/home-flyer/_index';
import HomeForumView from '@/pages/home/comp/home-forum/_index';
import HomeHeadView from '@/pages/home/comp/home-head/_index';
import HomeNewsView from '@/pages/home/comp/home-news/_index';
import HomeSearchView from '@/pages/home/comp/home-search/_index';
import HomeTabView from '@/pages/home/comp/home-tab/_index';
import HomeTaskView from '@/pages/home/comp/home-task/_index';
import HomeTopicView from '@/pages/home/comp/home-topic/_index';
......@@ -14,8 +14,10 @@ import HomeTopicView from '@/pages/home/comp/home-topic/_index';
const HomePageView = () => {
return (
<HomeViewWrap>
{/* 科比特航空 */}
<HomeHeadView />
{/* 主页搜索 */}
<HomeSearchView />
{/* <HomeSearchView /> */}
{/* 页面布局 */}
<div className="home-wrap flex-between align-start">
{/* 主页分类 */}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论