{"version":3,"file":"ActivitiesGrid-d2106c72.js","sources":["../src/components/activity/ActivitiesGrid.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport styles from '@styles/ActivitiesGrid.module.css';\nimport * as config from '@config';\nimport { GetUserInfo } from '@utils/storage';\nimport { Link } from 'react-router-dom';\n\nfunction ActivitiesGrid({ activities = [], isDailyUnit = false, isFromPrice = false }) {\n return (\n
\n
\n {activities.map((activity, index) => {\n return (\n \n );\n })}\n
\n
\n );\n}\n\nActivitiesGrid.propTypes = {\n activities: PropTypes.array.isRequired,\n isDailyUnit: PropTypes.bool,\n isFromPrice: PropTypes.bool,\n};\n\n//Grid Item\nfunction ActivitiesGridItem({ activity = {}, isDailyUnit = false, isFromPrice = false }) {\n const loginInfo = GetUserInfo();\n // const [commission, setCommission] = useState({});\n // const commissionProfile = useSelector((state) => state.commission.data);\n\n const { pricing } = activity;\n\n // useEffect(() => {\n // if (activity.id && loginInfo.agency.id) {\n // let comm = commissionProfile?.adjusted?.find((item) => item.activityID == activity.id);\n // if (!comm) {\n // comm = { ratio: commissionProfile.defaultRate };\n // }\n // setCommission(comm);\n // }\n // return () => {};\n // }, [activity.id, commissionProfile]);\n\n return (\n
\n \n (e.currentTarget.src = `${config.baseURL}/public/empty_image.png`)}\n />\n \n
\n
\n {activity.name} {activity.tourCode && `(${activity.tourCode})`}\n
\n {1 == 1 && (\n
\n
\n {pricing.bundlePriced && (\n \n $A{pricing.bundlePriceRetail}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'}\n \n )}\n {!pricing.bundlePriced && (\n <>\n \n $A{pricing.adultPriceRetail}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'}\n \n {pricing.childPriceRetail && (\n \n (儿童$A{pricing.childPriceRetail}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'})\n \n )}\n \n )}\n
\n
\n {pricing.bundlePriced && (\n \n $A{pricing.bundlePrice}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'}\n \n )}\n {!pricing.bundlePriced && (\n <>\n \n $A{pricing.adultPrice}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'}\n \n {pricing.childPrice && (\n \n (儿童$A{pricing.childPrice}\n {isDailyUnit && '/天'}\n {isFromPrice && '起'})\n \n )}\n \n )}\n
\n
\n )}\n {/* {activity.demo && (\n \n
\n
参考行程
\n \n
\n \n )} */}\n
\n
\n );\n}\n\nActivitiesGridItem.propTypes = {\n activity: PropTypes.object.isRequired,\n isDailyUnit: PropTypes.bool,\n isFromPrice: PropTypes.bool,\n};\n\nexport default ActivitiesGrid;\n"],"names":["ActivitiesGrid","activities","isDailyUnit","isFromPrice","jsx","styles","activity","index","ActivitiesGridItem","PropTypes","GetUserInfo","pricing","jsxs","Link","config.baseURL","_b","_a","e","Fragment"],"mappings":"slBAOA,SAASA,EAAe,CAAE,WAAAC,EAAa,GAAI,YAAAC,EAAc,GAAO,YAAAC,EAAc,IAAS,CACnF,OACKC,EAAAA,IAAA,MAAA,CAAI,UAAWC,EAAO,UACnB,SAACD,MAAA,MAAA,CAAI,UAAWC,EAAO,eAClB,SAAAJ,EAAW,IAAI,CAACK,EAAUC,IAEnBH,EAAA,IAACI,EAAA,CAEG,SAAAF,EACA,YAAAJ,EACA,YAAAC,CAAA,EAHKI,CAAA,CAMhB,EACL,CACJ,CAAA,CAER,CAEAP,EAAe,UAAY,CACvB,WAAYS,EAAU,MAAM,WAC5B,YAAaA,EAAU,KACvB,YAAaA,EAAU,IAC3B,EAGA,SAASD,EAAmB,CAAE,SAAAF,EAAW,GAAI,YAAAJ,EAAc,GAAO,YAAAC,EAAc,IAAS,SACnEO,EAAY,EAIxB,KAAA,CAAE,QAAAC,CAAY,EAAAL,EAapB,OACKM,EAAAA,KAAA,MAAA,CAAI,UAAWP,EAAO,oBACnB,SAAA,CAAAD,MAACS,EAAK,CAAA,GAAI,yBAAyBP,EAAS,EAAE,GAC1C,SAAAF,EAAA,IAAC,MAAA,CACG,IAAK,GAAGU,CAAc,YAAW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