提交 fb8b0d5b 作者: 翁进城

加盟入驻开发

上级 47f6e2ce
...@@ -4,6 +4,7 @@ import styles from "./index.module.scss"; ...@@ -4,6 +4,7 @@ import styles from "./index.module.scss";
import img from "./assets/img.png"; import img from "./assets/img.png";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import api, { ListTagResp } from "./api"; import api, { ListTagResp } from "./api";
import { useRouter } from "next/router";
type Props = { type Props = {
open?: boolean; open?: boolean;
...@@ -11,12 +12,7 @@ type Props = { ...@@ -11,12 +12,7 @@ type Props = {
onCancel?: () => void; onCancel?: () => void;
}; };
export default function JoinModal(props: Props) { export default function JoinModal(props: Props) {
const test = [ const router = useRouter();
{
name: '飞手培训机构',
id: 0
}
];
const [tagList, setTagList] = useState<ListTagResp[]>([]); const [tagList, setTagList] = useState<ListTagResp[]>([]);
useEffect(() => { useEffect(() => {
...@@ -24,6 +20,11 @@ export default function JoinModal(props: Props) { ...@@ -24,6 +20,11 @@ export default function JoinModal(props: Props) {
setTagList(res.result || []); setTagList(res.result || []);
}) })
}, []) }, [])
const onClickTag = (item: ListTagResp) => {
router.replace("/JoinPolicy?tagId=" + item.id);
props.onCancel && props.onCancel();
};
return ( return (
<Modal <Modal
title="申请合作加盟" title="申请合作加盟"
...@@ -40,9 +41,13 @@ export default function JoinModal(props: Props) { ...@@ -40,9 +41,13 @@ export default function JoinModal(props: Props) {
<Col <Col
key={item.id} key={item.id}
style={{ cursor: "pointer", height: 100, padding: 0 }} style={{ cursor: "pointer", height: 100, padding: 0 }}
onClick={() => onClickTag(item)}
> >
<Image src={img} width={100} height={100} alt=""></Image> <Image src={img} width={100} height={100} alt=""></Image>
<div className={styles.identityBtn}>{item.tagName}{">"}</div> <div className={styles.identityBtn}>
{item.tagName}
{">"}
</div>
</Col> </Col>
); );
})} })}
......
import request, { Response } from "~/api/request"
export interface CooperationApplyParams {
applyName: string,
applyPhone: string,
remark?: string,
userAccountId: number,
cooperationTagId: number
}
export default {
//请加盟
cooperationApply(params: CooperationApplyParams):Promise<Response<string>>{
return request('/userapp/cooperation/apply', 'post', params)
}
}
\ No newline at end of file
.banner {
width: 100vw;
height: 200px;
background: #f25834;
position: absolute;
left: 50%;
top: 0;
transform: translate(-50%, 0);
}
.font1 {
font-size: 20px;
font-family: MicrosoftYaHeiUI-Bold, MicrosoftYaHeiUI;
font-weight: bold;
color: #000000;
line-height: 25px;
}
.font2 {
font-size: 18px;
font-family: MicrosoftYaHei;
color: #333333;
line-height: 32px;
letter-spacing: 1px;
}
import { Button, Col, Divider, Form, Input, Row } from "antd";
import { useRouter } from "next/router";
import LayoutView from "~/components/layout";
import api from "./api";
import styles from "./index.module.scss";
export default function JoinPolicy() {
const router = useRouter();
//提交
const onFinish = (values: any) => {
console.log(values);
api
.cooperationApply({
...values,
userAccountId: 1,
cooperationTagId: router.query.tagId,
})
.then((res) => {
console.log("提交结果", res);
if (res.result === "已通过") {
window.messageApi.success(res.result);
setTimeout(() => {
router.push("/");
}, 1500);
} else {
window.messageApi.error(res.message);
}
});
};
return (
<LayoutView>
<div className={styles.banner}></div>
<div
className="page"
style={{
background: "#fff",
position: "relative",
zIndex: 1,
marginTop: 60,
paddingBottom: 63,
}}
>
<div
className={styles.font1}
style={{ textAlign: "center", paddingTop: 40, paddingBottom: 30 }}
>
加盟入驻政策
</div>
<div
className={styles.font2}
style={{ paddingLeft: 50, paddingRight: 50 }}
>
1.每月自动获取一张高额度优惠券
<br /> 2.流量扶持和店铺曝光度
<br />
3成为科比特指定官方生态合作伙伴
<br /> 4.享受不低于1亿制造采购补贴
<br /> 5.无人机产业链资源共享
<br /> 6.享受价值5亿产业链订单
<br /> 7.享受一对一代运营服务
<br /> 8.享受无人机生态圈资源
<br /> 9.成为科比特指定官方生态
<br />
10.享受无人机生态圈资源合作伙伴
<br />
11.受价值5亿产业链订单
<br />
12.成为科比特指定官方生态合作伙伴
</div>
<Divider />
<div
className={styles.font1}
style={{ textAlign: "center", marginBottom: 28 }}
>
申请加盟入驻
</div>
<Row justify={"center"}>
<Col style={{ width: 400 }}>
<Form labelAlign="left" labelCol={{ span: 5 }} onFinish={onFinish}>
<Form.Item
label="姓名"
name="applyName"
rules={[{ required: true }]}
>
<Input placeholder="请输入姓名"></Input>
</Form.Item>
<Form.Item
label="联系方式"
name="applyPhone"
rules={[{ required: true }]}
>
<Input placeholder="请输入手机号"></Input>
</Form.Item>
<Form.Item name="remark">
<Input.TextArea placeholder="其它信息"></Input.TextArea>
</Form.Item>
<Row justify={"center"}>
<Button
type="primary"
htmlType="submit"
style={{ marginTop: 11, width: 200 }}
size="large"
>
提交申请
</Button>
</Row>
</Form>
</Col>
</Row>
</div>
</LayoutView>
);
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论