提交 832edfc8 作者: 翁进城

文字显示优化, 地区筛选只带省

上级 d8263076
...@@ -47,7 +47,7 @@ export default function RegionItem(props: Props) { ...@@ -47,7 +47,7 @@ export default function RegionItem(props: Props) {
}; };
})} })}
/> />
<Select {/* <Select
value={selectCity} value={selectCity}
bordered={false} bordered={false}
popupMatchSelectWidth={false} popupMatchSelectWidth={false}
...@@ -60,7 +60,7 @@ export default function RegionItem(props: Props) { ...@@ -60,7 +60,7 @@ export default function RegionItem(props: Props) {
label: item.name, label: item.name,
}; };
})} })}
/> /> */}
</Space> </Space>
</div> </div>
</div> </div>
......
...@@ -91,7 +91,11 @@ export default function Certification() { ...@@ -91,7 +91,11 @@ export default function Certification() {
}); });
} }
setTimeout(() => { setTimeout(() => {
Router.push("/"); if (Router.query.type == 'back'){
Router.back();
}else{
Router.push("/");
}
}, 1000); }, 1000);
} }
}); });
......
...@@ -83,7 +83,7 @@ export default function Mall(props: Props) { ...@@ -83,7 +83,7 @@ export default function Mall(props: Props) {
<Layout> <Layout>
<div className="page" style={{ paddingTop: "18px" }}> <div className="page" style={{ paddingTop: "18px" }}>
<Filter <Filter
types={["类目", "地域", "品牌", "部件", "型号", "成色"]} types={["类目", "地域", "品牌", "部件",/* "型号", "成色" */]}
showResultItem showResultItem
onChange={onFilterChange} onChange={onFilterChange}
></Filter> ></Filter>
......
...@@ -101,7 +101,7 @@ export default function Bids(props: Props) { ...@@ -101,7 +101,7 @@ export default function Bids(props: Props) {
<Button type="primary" className={styles.btn}> <Button type="primary" className={styles.btn}>
<div className={styles.text1}>{item.tenderPrice}</div> <div className={styles.text1}>{item.tenderPrice}</div>
<div className={styles.text2} onClick={() => onApply(item)}> <div className={styles.text2} onClick={() => onApply(item)}>
申请合作 商务合作
</div> </div>
</Button> </Button>
)} )}
......
...@@ -86,7 +86,7 @@ export default function Cases(props: Props) { ...@@ -86,7 +86,7 @@ export default function Cases(props: Props) {
Router.push("/projectInfo/caseArticle/" + item.id) Router.push("/projectInfo/caseArticle/" + item.id)
} }
> >
申请合作 联系品牌厂家
</Button> </Button>
</div> </div>
); );
......
...@@ -2,10 +2,11 @@ import { RightOutlined } from "@ant-design/icons"; ...@@ -2,10 +2,11 @@ import { RightOutlined } from "@ant-design/icons";
import { Button, Col, Empty, Pagination, Row, Spin } from "antd"; import { Button, Col, Empty, Pagination, Row, Spin } from "antd";
import styles from "./index.module.scss"; import styles from "./index.module.scss";
import Image from "next/image"; import Image from "next/image";
import { useState, useEffect } from "react"; import { useState, useEffect, useContext } from "react";
import api, { Item } from "./api"; import api, { Item } from "./api";
import { useRouter } from "next/router"; import Router from "next/router";
import Moment from "moment"; import Moment from "moment";
import { UserContext } from "~/lib/userProvider";
type Props = { type Props = {
params?: { params?: {
...@@ -25,7 +26,7 @@ export default function News(props: Props) { ...@@ -25,7 +26,7 @@ export default function News(props: Props) {
}); });
const [count, setCount] = useState(0); const [count, setCount] = useState(0);
const [abort, setAbort] = useState<AbortController | null>(null); const [abort, setAbort] = useState<AbortController | null>(null);
const router = useRouter(); const { userInfo, setNeedLogin } = useContext(UserContext);
useEffect(() => { useEffect(() => {
//中断前一次请求 //中断前一次请求
...@@ -62,6 +63,19 @@ export default function News(props: Props) { ...@@ -62,6 +63,19 @@ export default function News(props: Props) {
}); });
}; };
//获取产品信息事件
const onGetInfo = () => {
if(userInfo){
if(userInfo.companyAuthStatus){
}else{
Router.push("/certification?type=back");
}
}else{
setNeedLogin(true);
}
}
return ( return (
<Spin spinning={loading} delay={500}> <Spin spinning={loading} delay={500}>
<Row justify="space-between" style={{ height: 606 }}> <Row justify="space-between" style={{ height: 606 }}>
...@@ -86,11 +100,9 @@ export default function News(props: Props) { ...@@ -86,11 +100,9 @@ export default function News(props: Props) {
<Button <Button
type="primary" type="primary"
style={{ width: 120, height: 40, flexShrink: 0 }} style={{ width: 120, height: 40, flexShrink: 0 }}
onClick={() => onClick={onGetInfo}
router.push("/projectInfo/newsArticle/" + item.id)
}
> >
申请合作 获取产品资料
</Button> </Button>
</div> </div>
); );
......
...@@ -23,7 +23,7 @@ export interface Params { ...@@ -23,7 +23,7 @@ export interface Params {
} }
const items = (params: any) => const items = (params: any) =>
["项目需求", "招投标项目", "业务案例", "行业新闻"].map((value) => { [/* "项目需求", */ "招投标项目", "项目案例", "行业新闻"].map((value) => {
let children: JSX.Element | string = <></>; let children: JSX.Element | string = <></>;
switch (value) { switch (value) {
...@@ -35,7 +35,7 @@ const items = (params: any) => ...@@ -35,7 +35,7 @@ const items = (params: any) =>
children = <Bids params={params}></Bids>; children = <Bids params={params}></Bids>;
break; break;
case "业务案例": case "项目案例":
children = <Cases params={params}></Cases>; children = <Cases params={params}></Cases>;
break; break;
...@@ -120,7 +120,7 @@ export default function ProjectInfo() { ...@@ -120,7 +120,7 @@ export default function ProjectInfo() {
fieldNames={{ fieldNames={{
label: "name", label: "name",
value: "id", value: "id",
children: "childInfo", // children: "childInfo",
}} }}
changeOnSelect changeOnSelect
/> />
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论