From 88b91387e4ca658425076372ff6003e17479b04a Mon Sep 17 00:00:00 2001 From: Lei OT Date: Mon, 5 Aug 2024 09:17:29 +0800 Subject: [PATCH] =?UTF-8?q?#=20=E9=99=84=E5=8A=A0=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/stores/Products/Index.js | 8 ++++---- src/views/products/Detail/Extras.jsx | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/stores/Products/Index.js b/src/stores/Products/Index.js index ed31239..8735a0f 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) => {