Merge branch 'main' of github.com:hainatravel/GHHub

perf/export-docx
Jimmy Liow 11 months ago
commit b3faf7453e

@ -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) => { export const addProductExtraAction = async (body) => {
console.log('addProductExtraAction', body); // console.log('addProductExtraAction', body);
return true; // test: 先不更新到HT // return true; // test: 先不更新到HT
const { errcode, result } = await postJSON(`${HT_HOST}/Service_BaseInfoWeb/products_extras_add`, body); const { errcode, result } = await postJSON(`${HT_HOST}/Service_BaseInfoWeb/products_extras_add`, body);
return errcode === 0 ? true : false; return errcode === 0 ? true : false;
}; };
@ -49,7 +49,7 @@ export const addProductExtraAction = async (body) => {
* *
*/ */
export const delProductExtrasAction = 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); const { errcode, result } = await postJSON(`${HT_HOST}/Service_BaseInfoWeb/products_extras_del`, body);
return errcode === 0 ? true : false; return errcode === 0 ? true : false;
}; };

@ -117,9 +117,9 @@ const Extras = ({ productId, onChange, ...props }) => {
const handleGetAgencyProductExtras = async () => { const handleGetAgencyProductExtras = async () => {
setExtrasData([]); setExtrasData([]);
console.log('handleGetAgencyProductExtras', productId); // console.log('handleGetAgencyProductExtras', productId);
// const data = await getAgencyProductExtrasAction({ id: productId, travel_agency_id: travel_agency_id || travelAgencyId, use_year }); const data = await getAgencyProductExtrasAction({ id: productId, travel_agency_id: travel_agency_id || travelAgencyId, use_year });
// setExtrasData(data); setExtrasData(data);
}; };
const handleNewAddOn = async (item) => { const handleNewAddOn = async (item) => {

Loading…
Cancel
Save