diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index 9b6f029..01bffe7 100644 --- a/src/stores/Products/Index.js +++ b/src/stores/Products/Index.js @@ -36,11 +36,11 @@ export const getAgencyProductsAction = async (param) => { }; /** - * + * @param {object} body { id, travel_agency_id, extras: [{id, title, code}] } */ export const addProductExtraAction = async (body) => { - console.log('addProductExtraAction', body); - return true; // test: 先不更新到HT + // console.log('addProductExtraAction', body); + // return true; // test: 先不更新到HT const { errcode, result } = await postJSON(`${HT_HOST}/Service_BaseInfoWeb/products_extras_add`, body); return errcode === 0 ? true : false; }; @@ -49,7 +49,7 @@ export const addProductExtraAction = async (body) => { * */ export const delProductExtrasAction = async (body) => { - return true; // test: 先不更新到HT + // return true; // test: 先不更新到HT const { errcode, result } = await postJSON(`${HT_HOST}/Service_BaseInfoWeb/products_extras_del`, body); return errcode === 0 ? true : false; }; diff --git a/src/views/products/Detail/Extras.jsx b/src/views/products/Detail/Extras.jsx index 318fb7d..b783f68 100644 --- a/src/views/products/Detail/Extras.jsx +++ b/src/views/products/Detail/Extras.jsx @@ -117,9 +117,9 @@ const Extras = ({ productId, onChange, ...props }) => { const handleGetAgencyProductExtras = async () => { setExtrasData([]); - console.log('handleGetAgencyProductExtras', productId); - // const data = await getAgencyProductExtrasAction({ id: productId, travel_agency_id: travel_agency_id || travelAgencyId, use_year }); - // setExtrasData(data); + // console.log('handleGetAgencyProductExtras', productId); + const data = await getAgencyProductExtrasAction({ id: productId, travel_agency_id: travel_agency_id || travelAgencyId, use_year }); + setExtrasData(data); }; const handleNewAddOn = async (item) => {