Commit 799b392b by liguokang

feat: 🎨

parent f3628c28
......@@ -2,11 +2,20 @@
* @Author: liguokang
* @Date: 2021-07-27 20:25:45
* @LastEditors: liguokang
* @LastEditTime: 2021-07-27 20:31:33
* @LastEditTime: 2021-07-29 16:02:23
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
module.exports = {
presets: [['next/babel']],
plugins: [['import', { libraryName: 'antd', style: true }]],
presets: ['next/babel', '@babel/preset-react'],
plugins: [
[
'import',
{
libraryName: 'antd',
// true 的时候才会编译less
style: true,
},
],
],
};
......@@ -10,7 +10,7 @@
# next.js
/.next/
/out/
/dist/
# production
/build
......
......@@ -2,7 +2,7 @@
* @Author: liguokang
* @Date: 2021-07-14 20:36:28
* @LastEditors: liguokang
* @LastEditTime: 2021-07-29 14:43:14
* @LastEditTime: 2021-07-29 16:05:28
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
......@@ -40,6 +40,14 @@ module.exports = withLessExcludeAntd({
},
}),
);
if (config.externals) {
const includes = [/antd/];
config.externals = config.externals.map((external) => {
if (typeof external !== 'function') return external;
return (ctx, req, cb) =>
includes.find((include) => (req.startsWith('.') ? include.test(path.resolve(ctx, req)) : include.test(req))) ? cb() : external(ctx, req, cb);
});
}
return config;
},
});
......@@ -3,7 +3,7 @@
"version": "0.1.0",
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "next build && next export -o dist && npm run nd",
"export": "npm run build && next export",
"start": "next start",
"build:dev": "cross-env DEPLOY_ENV=dev npm run build",
......@@ -14,6 +14,8 @@
"precommit": "pretty-quick --staged"
},
"dependencies": {
"@babel/core": "^7.14.8",
"@babel/preset-react": "^7.14.5",
"@zeit/next-css": "^1.0.1",
"@zeit/next-less": "^1.0.1",
"antd": "^4.16.9",
......
......@@ -2,10 +2,11 @@
* @Author: zhujiapeng
* @Date: 2021-06-02 15:13:37
* @LastEditors: liguokang
* @LastEditTime: 2021-07-14 20:40:05
* @LastEditTime: 2021-07-29 16:10:19
* @Description: 描述一下咯
* @Copyright: ©2021 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
function About() {
return <div>About</div>
......
......@@ -2,21 +2,16 @@
* @Author: liguokang
* @Date: 2021-07-14 20:36:28
* @LastEditors: liguokang
* @LastEditTime: 2021-07-28 14:28:21
* @LastEditTime: 2021-07-29 16:11:39
* @Description:
* @Copyrigh: ©2021 杭州杰竞科技有限公司 版权所有
*/
import React from 'react';
import { useState, useLayoutEffect } from 'react';
import Layout from 'components/layout';
export default function JoinUs() {
const [jobs, setJobs] = useState([]);
const [selectJobs, setSelectJobs] = useState([]);
const [postTypeFlag, setPostTypeFlag] = useState(0); // 职位类别标记
const [jobNatureFlag, setJobNatureFlag] = useState(0); // 工作性质标记
const [detailFlag, setDetailFlag] = useState(-1);
useLayoutEffect(() => {
getData();
}, []);
......@@ -24,29 +19,9 @@ export default function JoinUs() {
// 获取数据
async function getData() {}
function handSelectNature(type, flag) {
const selectJobs = type === '全部' ? jobs : jobs.filter((item) => item.jobNature.indexOf(type) !== -1);
setSelectJobs(selectJobs);
setJobNatureFlag(flag);
}
function handSelectType(type, flag) {
const selectJobs = type === '全部' ? jobs : jobs.filter((item) => item.postType == type);
setSelectJobs(selectJobs);
setPostTypeFlag(flag);
}
return (
<Layout isHome={false} className="nnnnnn">
<div className="gdfgd" style={{ background: '#fff' }} style={{ height: '85vh' }}>
{/* <Header active={"aboutUs"} /> */}
<div className="join-us">
<div className="center" style={{ textAlign: 'center' }}>
<p>加入我们,麦向美好未来</p>
</div>
</div>
<div className="content">
<div className="center">
<div className="content-module" style={{ background: '#fff' }}>
<div className="content-module-body">
<p className="join-us-title">
......@@ -55,190 +30,6 @@ export default function JoinUs() {
</div>
</div>
</div>
<div className="content-module content-module-3" style={{ background: '#fff' }}>
<div className="center">
<div className="module-title">热招岗位</div>
<div className="content-module-body">
<div className="job-head">
<div className="work-nature clearfix">
<span className="type-nature fl" id="xmtd-type-nature">
工作性质
</span>
<div className="button fl clearfix" id="nature">
<span
className={jobNatureFlag === 0 ? 'active' : ''}
data-id="0"
onClick={() => {
handSelectNature('全部', 0);
}}
>
全部
</span>
<span
className={jobNatureFlag === 1 ? 'active' : ''}
data-id="1"
onClick={() => {
handSelectNature('社招', 1);
}}
>
社招
</span>
<span
className={jobNatureFlag === 2 ? 'active' : ''}
data-id="2"
onClick={() => {
this.handSelectNature('校招', 2);
}}
>
校招
</span>
<span
className={jobNatureFlag === 3 ? 'active' : ''}
data-id="3"
onClick={() => {
handSelectNature('校招', 3);
}}
>
实习
</span>
</div>
</div>
<div className="job-category clearfix">
<span className="type fl">职位类别</span>
<div className="button fl clearfix" id="type">
<span
className={postTypeFlag === 0 ? 'active' : ''}
data-index="0"
onClick={() => {
handSelectType('全部', 0);
}}
>
全部
</span>
<span
className={postTypeFlag === 1 ? 'active' : ''}
data-index="1"
onClick={() => {
handSelectType('技术', 1);
}}
>
技术
</span>
<span
className={postTypeFlag === 2 ? 'active' : ''}
data-index="2"
onClick={() => {
handSelectType('产品', 2);
}}
>
产品
</span>
<span
className={postTypeFlag === 3 ? 'active' : ''}
data-index="3"
onClick={() => {
handSelectType('设计', 3);
}}
>
设计
</span>
<span
className={postTypeFlag === 4 ? 'active' : ''}
data-index="4"
onClick={() => {
handSelectType('市场', 4);
}}
>
市场
</span>
<span
className={postTypeFlag === 5 ? 'active' : ''}
data-index="5"
onClick={() => {
handSelectType('商务顾问', 5);
}}
>
销售
</span>
<span
className={postTypeFlag === 6 ? 'active' : ''}
data-index="6"
onClick={() => {
handSelectType('运营', 6);
}}
>
运营
</span>
</div>
</div>
</div>
<div className="job-detail" id="job-detail">
<ul style={{ padding: 0 }}>
<li className="first" id="first">
<span>职位名称</span>
<span>工作性质</span>
<span>职位类别</span>
<span>工作经验</span>
<span>招聘人数</span>
</li>
{selectJobs.map((item, index) => {
return (
<div
key={index}
onClick={() => {
detailFlag === index ? setDetailFlag(-1) : setDetailFlag(index);
}}
>
<li className="title">
<span>{item.jobName}</span>
<span>{item.jobType}</span>
<span>{item.postType}</span>
<span>{item.jobExperience}</span>
<span className="num xmtd-num">
{item.NeedNum}
{detailFlag === index ? (
<i className="icon iconfont up active iconUp fr"></i>
) : (
<i className="icon iconfont down active iconDown fr xmtd-num"></i>
)}
</span>
</li>
<li className={detailFlag === index ? 'detail active' : 'detail'} id="detail">
<div className="append">
<div className="duty">
<div className="title">岗位职责:</div>
<div className="list" id="duty-list">
{item.responsibility &&
item.responsibility.map((item1, index1) => {
return <p key={index1}>{item1}</p>;
})}
</div>
</div>
<div className="require">
<div className="title">岗位要求:</div>
<div className="list" id="require-list">
{item.requirement &&
item.requirement.map((item2, index2) => {
return <p key={index2}>{item2}</p>;
})}
</div>
</div>
<div className="mail">简历投递:liyan@xiaomai5.com</div>
</div>
</li>
</div>
);
})}
</ul>
</div>
</div>
</div>
</div>
</div>
{/* <Footer></Footer> */}
{/* <SiderBar /> */}
</div>
</Layout>
);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment