提交 39ee7e23 作者: 翁进城

Merge branch 'master' into feature/chuck

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