提交 832edfc8 作者: 翁进城

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

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