提交 39ee7e23 作者: 翁进城

Merge branch 'master' into feature/chuck

...@@ -83,12 +83,20 @@ export default function PublishModal(props: Props) { ...@@ -83,12 +83,20 @@ export default function PublishModal(props: Props) {
<Form.Item <Form.Item
label="手机号" label="手机号"
name="publishPhone" name="publishPhone"
rules={[{ required: true, message: "请输入手机号!" }]} rules={[
{ required: true, message: "请输入手机号!" },
{
pattern: /^1\d{10}$/,
message: "很输入11位手机号",
},
]}
> >
<Input <Input
onInput={phoneNumber} maxLength={11} onInput={phoneNumber}
allowClear maxLength={11}
placeholder="输入手机号"></Input> allowClear
placeholder="输入手机号"
></Input>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="需求类型" label="需求类型"
......
...@@ -10,6 +10,7 @@ type Props = { ...@@ -10,6 +10,7 @@ type Props = {
export default function RegionItem(props: Props) { export default function RegionItem(props: Props) {
const [provinceList, setProvinceList] = useState<RegionResp[]>([]); const [provinceList, setProvinceList] = useState<RegionResp[]>([]);
const [cityList, setCityList] = useState<RegionResp[]>([]); const [cityList, setCityList] = useState<RegionResp[]>([]);
const [selectCity, setSelectCity] = useState<number>()
useEffect(() => { useEffect(() => {
api.region().then((res) => { api.region().then((res) => {
setProvinceList(res?.result || []); setProvinceList(res?.result || []);
...@@ -19,11 +20,13 @@ export default function RegionItem(props: Props) { ...@@ -19,11 +20,13 @@ export default function RegionItem(props: Props) {
const onProvinceChange = (value: number, item: any) => { const onProvinceChange = (value: number, item: any) => {
console.log("省", value, item); console.log("省", value, item);
setCityList(item.childInfo || []); setCityList(item.childInfo || []);
setSelectCity(undefined);
props.onChange(item); props.onChange(item);
}; };
const onCityChange = (value: number, item: any) => { const onCityChange = (value: number, item: any) => {
console.log("市", value); console.log("市", value);
setSelectCity(value);
props.onChange(item); props.onChange(item);
}; };
return ( return (
...@@ -45,6 +48,7 @@ export default function RegionItem(props: Props) { ...@@ -45,6 +48,7 @@ export default function RegionItem(props: Props) {
})} })}
/> />
<Select <Select
value={selectCity}
bordered={false} bordered={false}
popupMatchSelectWidth={false} popupMatchSelectWidth={false}
placeholder="选择市" placeholder="选择市"
......
...@@ -10,9 +10,7 @@ const { Header, Footer, Content } = Layout; ...@@ -10,9 +10,7 @@ const { Header, Footer, Content } = Layout;
const includesPage = ["/home","/flyingHandService/detail/[id]"] const includesPage = ["/home","/flyingHandService/detail/[id]"]
const homeStyle: React.CSSProperties = { const homeStyle: React.CSSProperties = {
position:'fixed', marginTop:10
width:'100%',
bottom:'0'
} }
const headerStyle: React.CSSProperties = { const headerStyle: React.CSSProperties = {
...@@ -34,8 +32,6 @@ const contentStyle: React.CSSProperties = { ...@@ -34,8 +32,6 @@ const contentStyle: React.CSSProperties = {
}; };
const footerStyle: React.CSSProperties = { const footerStyle: React.CSSProperties = {
color: "",
backgroundColor: "",
lineHeight: "1", lineHeight: "1",
padding: 0, padding: 0,
position: "relative", position: "relative",
......
...@@ -84,9 +84,15 @@ export default function JoinPolicy() { ...@@ -84,9 +84,15 @@ export default function JoinPolicy() {
<Form.Item <Form.Item
label="联系方式" label="联系方式"
name="applyPhone" name="applyPhone"
rules={[{ required: true }]} rules={[
{ required: true },
{
pattern: /^1\d{10}$/,
message: "很输入11位手机号",
},
]}
> >
<Input placeholder="请输入手机号"></Input> <Input placeholder="请输入手机号" maxLength={11}></Input>
</Form.Item> </Form.Item>
<Form.Item name="remark"> <Form.Item name="remark">
<Input.TextArea placeholder="其它信息"></Input.TextArea> <Input.TextArea placeholder="其它信息"></Input.TextArea>
......
...@@ -108,7 +108,7 @@ export default function EquipmentLeasing(props: Props) { ...@@ -108,7 +108,7 @@ export default function EquipmentLeasing(props: Props) {
) )
.then((res) => { .then((res) => {
setProductList( setProductList(
res.result?.list.map((item) => { res.result?.list?.map((item) => {
return { element: leftDom(item) }; return { element: leftDom(item) };
}) || [] }) || []
); );
......
...@@ -59,8 +59,7 @@ export default function PublishMessage(props: Props) { ...@@ -59,8 +59,7 @@ export default function PublishMessage(props: Props) {
setFileList([...fileList, info.file]); setFileList([...fileList, info.file]);
} }
return; return;
} } else if (info.file.status === "done") {
if (info.file.status === "done") {
// Get this url from response in real world. // Get this url from response in real world.
if (info.file.response.code === "200" && info.file.response.result) { if (info.file.response.code === "200" && info.file.response.result) {
let fileList1 = fileList.map((item) => { let fileList1 = fileList.map((item) => {
...@@ -78,6 +77,8 @@ export default function PublishMessage(props: Props) { ...@@ -78,6 +77,8 @@ export default function PublishMessage(props: Props) {
}); });
setFileList([...info.fileList]); setFileList([...info.fileList]);
} }
} else {
setFileList([...info.fileList]);
} }
}; };
......
...@@ -6,5 +6,4 @@ export default function Style() { ...@@ -6,5 +6,4 @@ export default function Style() {
export const Box = styled.div` export const Box = styled.div`
box-sizing: border-box; box-sizing: border-box;
padding-Bottom: 110px;
` `
\ No newline at end of file
...@@ -195,9 +195,7 @@ export const Box = styled.div` ...@@ -195,9 +195,7 @@ export const Box = styled.div`
} }
.right-item-second { .right-item-second {
border-radius: 6px; border-radius: 6px;
background-color: #fff;
background: url(${xwbg.src}) no-repeat; background: url(${xwbg.src}) no-repeat;
background-size: contain;
.title { .title {
display: flex; display: flex;
align-items: center; align-items: center;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论