1) 删除无用文件
This commit is contained in:
parent
86800a06ab
commit
bbf3444e2a
|
@ -29,7 +29,7 @@ import plan from "../plan/main/main";
|
|||
import planlist from "../plan/list/list";
|
||||
import planadd from "../plan/add/add";
|
||||
import planedit from "../plan/add/edit";
|
||||
import plancopy from "../plan/copy/index";
|
||||
// import plancopy from "../plan/copy/index";
|
||||
import planeditcopy from "../plan/add/plan-copy";
|
||||
|
||||
import keylist from "../plan/key/list";
|
||||
|
@ -475,11 +475,6 @@ export default class App extends Component {
|
|||
exact={true}
|
||||
component={planadd}
|
||||
/>
|
||||
<Route
|
||||
path="/home/plan-copy"
|
||||
exact={true}
|
||||
component={plancopy}
|
||||
></Route>
|
||||
<Route path="/home/plan-edit" exact={true} component={planedit} />
|
||||
<Route
|
||||
path="/home/plan-edit-copy"
|
||||
|
|
|
@ -1,254 +0,0 @@
|
|||
import React, { useState, useRef, useEffect } from "react";
|
||||
|
||||
import {
|
||||
Button,
|
||||
Card,
|
||||
Icon,
|
||||
Notify,
|
||||
Radio,
|
||||
RadioGroup,
|
||||
smoothScroll,
|
||||
Sweetalert,
|
||||
Input,
|
||||
} from "zent";
|
||||
|
||||
import { UseSteps, Step } from "@/components/UseSteps/index";
|
||||
import {
|
||||
UsePlanCardStep01,
|
||||
UsePlanCardStep02,
|
||||
UsePlanCardStep03,
|
||||
} from "@/components/UsePlanCard/index";
|
||||
import UseExchangeCodePop from "@/components/UseExchangeCodePop/index";
|
||||
import {
|
||||
addPlanStep,
|
||||
handelResponse,
|
||||
getReseller,
|
||||
planSend,
|
||||
approvals,
|
||||
getDraftInfo,
|
||||
} from "@/assets/api.js";
|
||||
import Bus from "@/assets/eventBus.js";
|
||||
|
||||
import "./style.less";
|
||||
|
||||
const stepsData = [
|
||||
{
|
||||
title: "营销计划",
|
||||
children: [
|
||||
{
|
||||
title: "新建计划",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Key",
|
||||
children: [
|
||||
{
|
||||
title: "生成Key",
|
||||
},
|
||||
{
|
||||
title: "绑定卡劵",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "落地页",
|
||||
children: [
|
||||
{
|
||||
title: "绑定落地页",
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
const UseOneCopy = () => {
|
||||
const [stateSteps, setStateSteps] = useState(1);
|
||||
const [resellerInfo, setResellerInfo] = useState({
|
||||
direct_reseller_id: 23377,
|
||||
});
|
||||
const [keys, setkeys] = useState(null);
|
||||
const [keyStyle, setkeyStyle] = useState(1);
|
||||
const [isload, setIsload] = useState(false);
|
||||
const [whiteStyle, setWhiteStyle] = useState(false);
|
||||
const [newPlanTime, setNewPlanTime] = useState([]);
|
||||
const [exChangeTableData, setExChangeTableData] = useState([]);
|
||||
const [step1_data, setStep1_data] = useState(null);
|
||||
|
||||
const step1 = useRef(null);
|
||||
const step2 = useRef([]);
|
||||
const step3 = useRef(null);
|
||||
|
||||
useEffect(() => {
|
||||
let plan_id = sessionStorage.getItem("plan_id");
|
||||
if (plan_id) {
|
||||
getDraftInfo(plan_id).then((res) => {
|
||||
console.log("res =>", res);
|
||||
if (res.code === 200) {
|
||||
let info = res.data.info;
|
||||
setStep1_data({
|
||||
title: info.title,
|
||||
type: info.type,
|
||||
reseller: {
|
||||
key: info.reseller_id,
|
||||
text: info.reseller_name,
|
||||
disabled: true,
|
||||
},
|
||||
return_id: "1",
|
||||
date_time: [info.begin_time, info.end_time],
|
||||
});
|
||||
|
||||
setkeys(res.data.keys); // key
|
||||
}
|
||||
});
|
||||
}
|
||||
}, []);
|
||||
|
||||
/*** 👇👇👇👇👇👇👇 step 01 👇👇👇👇👇👇👇 ***/
|
||||
// 获取分销商信息
|
||||
const getResellerInfo = (e) => {
|
||||
setResellerInfo(e);
|
||||
console.log("分销商信息:", e);
|
||||
};
|
||||
/*** 👆👆👆👆👆👆👆 step 01 👆👆👆👆👆👆👆 ***/
|
||||
|
||||
/*** 👇👇👇👇👇👇👇 step 02 👇👇👇👇👇👇👇 ***/
|
||||
const addNewkey = () => {};
|
||||
const onStyleChange = () => {};
|
||||
/*** 👆👆👆👆👆👆👆 step 02 👆👆👆👆👆👆👆 ***/
|
||||
|
||||
/*** 👇👇👇👇👇👇👇 step 03 👇👇👇👇👇👇👇 ***/
|
||||
/*** 👆👆👆👆👆👆👆 step 03 👆👆👆👆👆👆👆 ***/
|
||||
|
||||
/************************************** 下一步 ***********************/
|
||||
// 步骤改变
|
||||
const stepChange = (e) => {
|
||||
setStateSteps(e);
|
||||
};
|
||||
// 下一步
|
||||
const onNextStep = async () => {
|
||||
let step1_res = await step1.current.submit();
|
||||
if (step1_res === true) {
|
||||
setStateSteps(1);
|
||||
}
|
||||
};
|
||||
// 返回
|
||||
const onReturn = () => {};
|
||||
|
||||
const nextBtnEl = () => {
|
||||
return (
|
||||
<div className="step-btn-group">
|
||||
<Button type="primary" onClick={() => onNextStep()}>
|
||||
下一步
|
||||
</Button>
|
||||
<Button type="normal" onClick={() => onReturn()}>
|
||||
取消
|
||||
</Button>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
const closeStep = () => {};
|
||||
|
||||
return (
|
||||
<div className="plan-add">
|
||||
<div className="plan-left">
|
||||
<UseSteps
|
||||
current={stateSteps}
|
||||
onChange={(e) => stepChange(e)}
|
||||
className="mystep-class-01"
|
||||
style={{ height: 600 }}
|
||||
>
|
||||
{stepsData.map((item, index) => {
|
||||
return (
|
||||
<Step
|
||||
title={item.title}
|
||||
children={item.children}
|
||||
initial={index}
|
||||
className="mystep-class-02"
|
||||
key={index}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
</UseSteps>
|
||||
</div>
|
||||
<div className="plan-right">
|
||||
<div className="action-panel">
|
||||
<div className="step1">
|
||||
<div className="plan-title">营销计划</div>
|
||||
{step1_data ? (
|
||||
<Card style={{ width: "100%" }} title="新建计划">
|
||||
{/********************* 第一步 *****************/}
|
||||
<UsePlanCardStep01
|
||||
ref={step1}
|
||||
dataInfo={step1_data}
|
||||
setNewPlanTime={(e) =>
|
||||
setStep1_data({ ...step1_data, date_time: e })
|
||||
}
|
||||
getResellerInfo={(e) => {
|
||||
getResellerInfo(e);
|
||||
}}
|
||||
></UsePlanCardStep01>
|
||||
</Card>
|
||||
) : null}
|
||||
</div>
|
||||
|
||||
{/********************* 第二步 *****************/}
|
||||
{stateSteps >= 1 ? (
|
||||
<div className="step2">
|
||||
<div className="plan-title">key</div>
|
||||
{keys
|
||||
? keys.map((item, index) => {
|
||||
return item ? (
|
||||
<Card
|
||||
style={{
|
||||
width: "100%",
|
||||
height: "auto",
|
||||
marginBottom: "10px",
|
||||
}}
|
||||
key={index}
|
||||
title="生成key"
|
||||
action={
|
||||
index > 0 ? (
|
||||
<span
|
||||
className="zent-link"
|
||||
target="_blank"
|
||||
onClick={(e) => {
|
||||
closeStep(index);
|
||||
}}
|
||||
>
|
||||
关闭
|
||||
</span>
|
||||
) : null
|
||||
}
|
||||
>
|
||||
<UsePlanCardStep02
|
||||
ref={(f) => {
|
||||
step2.current[`step2-${index}`] = f;
|
||||
}}
|
||||
dataInfo={item}
|
||||
newPlanTime={step1_data.date_time}
|
||||
direct_reseller_id={resellerInfo.direct_reseller_id}
|
||||
></UsePlanCardStep02>
|
||||
</Card>
|
||||
) : null;
|
||||
})
|
||||
: null}
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{/********************* 第三步 *****************/}
|
||||
{stateSteps >= 2 ? (
|
||||
<div className="step3">
|
||||
<div className="plan-title">落地页</div>
|
||||
<Card style={{ width: "100%" }} title="绑定落地页">
|
||||
<UsePlanCardStep03 ref={step3}></UsePlanCardStep03>
|
||||
</Card>
|
||||
</div>
|
||||
) : null}
|
||||
|
||||
{nextBtnEl()}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default UseOneCopy;
|
|
@ -1,12 +0,0 @@
|
|||
.plan-add{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
max-height: 100%;
|
||||
}
|
||||
|
||||
.action-panel{
|
||||
width: 88%;
|
||||
margin: 0 auto;
|
||||
height: auto;
|
||||
margin-bottom: 60px;
|
||||
}
|
Loading…
Reference in New Issue