fix: 删除无用代码

This commit is contained in:
zhangds 2022-10-24 11:47:28 +08:00
parent 975bccbda8
commit f9f2b095a0
2 changed files with 0 additions and 20 deletions

View File

@ -244,9 +244,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
useEffect(() => { useEffect(() => {
(async function init() { (async function init() {
// 1. couponType // 1. couponType
console.log("couponType =>", couponType);
console.log("详情 =>", editData);
console.log("isstate =>", sessionStorage.getItem("isState"));
if (couponType === 0) { if (couponType === 0) {
// //
if (editData && editData !== "") { if (editData && editData !== "") {
@ -612,7 +609,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
update_product: {}, update_product: {},
delete_product: [], delete_product: [],
}; };
console.log("所有数据 =>", state.tableData);
// - // -
let goods_arr = state.tableData.filter( let goods_arr = state.tableData.filter(
(item) => item.checked && item.type === 1 (item) => item.checked && item.type === 1
@ -641,11 +637,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
return item.only; return item.only;
}); // }); //
// console.log(" =>", param);
// return;
console.log("旧数据 =>", state.oldProduct);
console.log("编辑 大提交 =>", param);
// return; // return;
// - // -
param.delete_product = state.tableData param.delete_product = state.tableData
@ -658,8 +649,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
} }
}); });
console.log("所有数据 =>", state.tableData);
console.log("旧数据 =>", state.oldProduct);
console.log("编辑 大提交 =>", param); console.log("编辑 大提交 =>", param);
editCoupon(editData.id, param).then((res) => { editCoupon(editData.id, param).then((res) => {
@ -704,8 +693,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
...item.only, ...item.only,
}; };
}); });
console.log("param 优惠券新增 大提交 =>", param);
// id // id
if (state.isState === "1") { if (state.isState === "1") {
param.copy_code_batch_id = editData.id; param.copy_code_batch_id = editData.id;
@ -734,7 +721,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
handelResponse( handelResponse(
res, res,
(req, msg) => { (req, msg) => {
console.log("分销商 id =>", req.direct_reseller_id);
setState({ direct_reseller_id: req.direct_reseller_id }); setState({ direct_reseller_id: req.direct_reseller_id });
}, },
(err) => { (err) => {
@ -853,7 +839,6 @@ const UseCouponAddEdit = forwardRef((props, ref) => {
// () // ()
const getCheckedProduct = () => { const getCheckedProduct = () => {
console.log("state.tableData =>", state.tableData);
let arr = state.tableData.map((item) => item.product_id); let arr = state.tableData.map((item) => item.product_id);
return arr; return arr;
}; };

View File

@ -168,9 +168,6 @@ const UseProductPop = forwardRef((props, ref) => {
checkedProduct.indexOf(item.id) !== -1 ? true : false, checkedProduct.indexOf(item.id) !== -1 ? true : false,
}; };
}); });
console.log("opt-arr =>", optArr);
console.log("checkedProduct =>", checkedProduct);
// //
setState({ productOption: optArr }); setState({ productOption: optArr });
resolve(optArr); resolve(optArr);
@ -179,7 +176,6 @@ const UseProductPop = forwardRef((props, ref) => {
setState({ setState({
loading: false, loading: false,
}); });
console.log("err =>", err);
reject(false); reject(false);
} }
); );
@ -193,7 +189,6 @@ const UseProductPop = forwardRef((props, ref) => {
// //
const editFun = () => { const editFun = () => {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
console.log("商品编辑 =>", productData);
// //
if (productData) { if (productData) {
setModel({ setModel({