提交 0c98981a 作者: 余乾开

Merge branch 'master' into feature/chuck

......@@ -3,6 +3,18 @@
"plugins": [
[
"styled-components",{ "ssr":true }
],
[
"styled-components-px2rem",
{
"rootValue": 1,
"unitPrecision": 5,
"propList": ["*"],
"selectorBlackList": [], //排除html样式
"replace": true,
"mediaQuery": false,
"minPixelValue": 0
}
]
]
}
\ No newline at end of file
.content{
min-height: 120px;
line-height: 1;
width: 1200px;
position: relative;
margin: 0 auto;
}
\ No newline at end of file
......@@ -2,9 +2,17 @@ import React, { Suspense } from "react";
import { Layout, Space } from "antd";
import NavHeader from "~/components/NavHeader";
import FooterView from "~/components/footer";
import {useRouter} from 'next/router'
import styles from './index.module.scss';
const { Header, Footer, Content } = Layout;
const homeStyle: React.CSSProperties = {
position:'fixed',
width:'100%',
bottom:'0'
}
const headerStyle: React.CSSProperties = {
height: "auto",
background: "none",
......@@ -24,14 +32,12 @@ const contentStyle: React.CSSProperties = {
};
const footerStyle: React.CSSProperties = {
width:"100%",
color: "",
backgroundColor: "",
lineHeight: "1",
padding: 0,
position: "fixed",
bottom:0,
// marginTop: 60,
position: "relative",
marginTop: 60,
};
type Props = {
......@@ -41,6 +47,7 @@ type Props = {
};
export default function LayoutView(props: Props) {
const router = useRouter()
return (
<Space direction="vertical" style={{ width: "100%" }} size={[0, 48]}>
<Layout
......@@ -52,9 +59,15 @@ export default function LayoutView(props: Props) {
<Header style={headerStyle}>
<NavHeader />
</Header>
<Content style={contentStyle}>{props.children}</Content>
<Content className={styles.content}>{props.children}</Content>
{!props.hideFooter && (
<Footer style={footerStyle}>
<Footer
style={
router.pathname.includes("home")
? { ...footerStyle, ...homeStyle }
: footerStyle
}
>
<FooterView></FooterView>
</Footer>
)}
......
......@@ -2,6 +2,7 @@ import React, { useContext, useEffect, useState } from "react";
import { Modal, Image } from "antd";
import api from "~/api";
import { UserContext } from "~/lib/userProvider";
import errImg from "~/assets/errImg";
type Props = {
open: boolean;
......@@ -27,6 +28,7 @@ export default function LoginModal(props: Props) {
});
} */
if (!props.open) {
setQrCode("");
return;
}
......@@ -38,6 +40,8 @@ export default function LoginModal(props: Props) {
.then((res) => {
if (res.code == "200") {
setQrCode("data:image/png;base64," + res.result || "");
} else {
window.messageApi.error("获取登录二维码失败");
}
});
}, [props.open]);
......@@ -97,7 +101,12 @@ export default function LoginModal(props: Props) {
欢迎来到云享飞
</div>
<div id="login_container" style={{ margin: "auto", display: "table" }}>
<Image src={qrCode} width={150} height={150}></Image>
<Image
src={qrCode}
width={150}
height={150}
fallback={errImg}
></Image>
</div>
<div
style={{
......
......@@ -34,12 +34,14 @@
"@hapi/iron": "^7.0.1",
"@types/styled-components": "^5.1.26",
"babel-plugin-styled-components": "^2.1.1",
"babel-plugin-styled-components-px2rem": "^1.5.5",
"cookie": "^0.5.0",
"moment": "^2.29.4",
"next-connect": "^1.0.0",
"passport": "^0.6.0",
"passport-local": "^1.0.0",
"pinyin-pro": "^3.14.0",
"postcss-pxtorem": "^6.0.0",
"react-infinite-scroll-component": "^6.1.0",
"styled-components": "^6.0.0-rc.1",
"swiper": "^9.3.2",
......
import '../public/antd.min.css';
import '../styles/index.scss';
import type { AppProps } from 'next/app';
import withTheme from '../theme';
import { message } from 'antd';
import { useEffect } from 'react';
import "../public/antd.min.css";
import "../styles/index.scss";
import type { AppProps } from "next/app";
import withTheme from "../theme";
import { message } from "antd";
import { useEffect } from "react";
import Head from "next/head";
import Script from 'next/script';
import Script from "next/script";
import UserProvider, { UserContext } from "~/lib/userProvider";
export default function App({ Component, pageProps }: AppProps) {
......@@ -13,14 +13,18 @@ export default function App({ Component, pageProps }: AppProps) {
useEffect(() => {
//全局消息提示
window.messageApi = messageApi;
}, [])
//@ts-ignore
window.onresize = function(){
window.document.querySelector('html')!.style.fontSize = (window.innerWidth / 1920) + 'PX';
}
}, []);
return withTheme(
<>
<Head>
<meta
name="viewport"
content="width=device-width,initial-scale=1"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
></meta>
</Head>
<Script src="https://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></Script>
......
......@@ -24,7 +24,7 @@ export default class MyDocument extends Document {
render() {
return (
<Html lang='en'>
<Html lang='en' style={{fontSize: 1}}>
<Head />
<body>
<Main />
......
......@@ -23,7 +23,10 @@ export default function JobServicesDetail() {
{
key: '1',
label: `团队介绍`,
children: <Image width={1100} height={800} src={detail?.teamPoster ? detail?.teamPoster : ''} alt='error'/>,
children: <div>
{/* <Image width={1100} height={800} src={detail?.teamPoster ? detail?.teamPoster : ''} alt='error'/> */}
<img src={detail?.teamPoster ? detail?.teamPoster : ''} alt="error" />
</div>,
},
{
key: '2',
......
......@@ -7,7 +7,7 @@ export default function Style() {
export const Box = styled.div`
box-sizing: border-box;
overflow-y: auto;
height: 900px;
height: 800px;
.item{
height: 180px;
&-user{
......
......@@ -104,7 +104,7 @@ export const Box = styled.div`
}
}
.tabs{
padding: 0 60px;
padding: 0 24px;
margin-top: 69px;
}
`
\ No newline at end of file
......@@ -167,7 +167,6 @@ export default function JobServices() {
total={count}
onChange={onPageChange}
hideOnSinglePage={true}
style={{ marginTop: 20 }}
/>
</div>
),
......
......@@ -13,7 +13,6 @@
.title {
font-size: 14px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #3c3e42;
width: 649px;
@include ellipsis(1);
......
......@@ -12,15 +12,14 @@
.info {
.title {
font-size: 16px;
font-size: 14px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #3c3e42;
width: 649px;
@include ellipsis(1);
}
.desc {
font-size: 16px;
font-size: 14px;
font-family: MicrosoftYaHei;
color: #ff552d;
margin-top: 9px;
......
......@@ -22,9 +22,8 @@ export interface Params {
provinceCode?: number; //省编码
}
const items = (params:any) => ["项目需求", "招投标项目", "业务案例", "行业新闻"].map(
(value) => {
const items = (params: any) =>
["项目需求", "招投标项目", "业务案例", "行业新闻"].map((value) => {
let children: JSX.Element | string = <></>;
switch (value) {
......@@ -49,14 +48,14 @@ const items = (params:any) => ["项目需求", "招投标项目", "业务案例"
key: value,
children: children,
};
}
);
});
export default function ProjectInfo() {
const [region, setRegion] = useState<Array<RegionResp>>([]);
const [params, setParams] = useState<Params | null>({});
useEffect(() => {
window!.document!.querySelector('body')!.style.background = '#fff';
commonApi.region().then((res) => {
let temp = res.result || [];
let temp1: Array<RegionResp> = [];
......@@ -77,15 +76,15 @@ export default function ProjectInfo() {
console.log(value);
let params1: Params = {
provinceCode: undefined,
districtCode: undefined
districtCode: undefined,
};
list?.forEach(item => {
if(item.level == 1){
list?.forEach((item) => {
if (item.level == 1) {
params1.provinceCode = item.id;
} else if(item.level == 2){
} else if (item.level == 2) {
params1.districtCode = item.id;
}
})
});
setParams({
...params,
...params1,
......@@ -100,41 +99,41 @@ export default function ProjectInfo() {
});
};
return (
<Layout layoutStyle={{ backgroundColor: "#fff" }} hideFooter>
<div style={{ backgroundColor: "#fff", minHeight: 820 }}>
<div className="page">
<div className={styles.bannerWrap}>
<div className={styles.banner}></div>
</div>
<Layout layoutStyle={{ backgroundColor: "#fff" }} hideFooter>
<div style={{ backgroundColor: "#fff", minHeight: 820 }}>
<div className="page">
<div className={styles.bannerWrap}>
<div className={styles.banner}></div>
</div>
<Tabs
className={styles.tabs}
tabBarExtraContent={
<Space size={8} style={{ marginRight: 25 }}>
{
<Cascader
options={region}
//@ts-ignore
onChange={onRegionChange}
placeholder="选择省市"
borderRadiusSM={6}
fieldNames={{
label: "name",
value: "id",
children: "childInfo",
}}
changeOnSelect
/>
}
<DatePicker onChange={onDateChange} />
</Space>
}
items={items(params)}
tabBarGutter={41}
destroyInactiveTabPane={true}
/>
<Tabs
className={styles.tabs}
tabBarExtraContent={
<Space size={8} style={{ marginRight: 25 }}>
{
<Cascader
options={region}
//@ts-ignore
onChange={onRegionChange}
placeholder="选择省市"
borderRadiusSM={6}
fieldNames={{
label: "name",
value: "id",
children: "childInfo",
}}
changeOnSelect
/>
}
<DatePicker onChange={onDateChange} />
</Space>
}
items={items(params)}
tabBarGutter={41}
destroyInactiveTabPane={true}
/>
</div>
</div>
</div>
</Layout>
</Layout>
);
}
module.exports = {
plugins: {
"postcss-pxtorem": {
rootValue: 1,
unitPrecision: 5,
propList: ["*"],
selectorBlackList: [], //排除html样式
replace: true,
mediaQuery: false,
minPixelValue: 0,
},
},
};
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论