물건 상세

This commit is contained in:
basssy 2024-12-09 09:23:37 +09:00
parent 32108583e9
commit 4114a3ca1e
3 changed files with 3 additions and 59 deletions

View File

@ -27,37 +27,12 @@ export default function MainPage() {
const [searchRadioType, setSearchRadioType] = useState('object')
// const [saleStoreId, setSaleStoreId] = useState('')
// const [saleStoreName, setSaleStoreName] = useState('')
const [stuffSearch, setStuffSearch] = useRecoilState(stuffSearchState)
const [searchForm, setSearchForm] = useRecoilState(searchState)
const { qcastState } = useContext(QcastContext)
// useEffect(() => {
// if (session.pwdInitYn === 'Y') {
// fetchObjectList()
// }
// }, [session])
const fetchObjectList = async () => {
try {
const apiUrl = `/api/main-page/object/${session?.storeId}/list`
await promiseGet({
url: apiUrl,
}).then((res) => {
if (res.status === 200) {
setSaleStoreId(res.data.saleStoreId)
setSaleStoreName(res.data.saleStoreName)
}
})
} catch (error) {
console.error('MAIN API fetching error:', error)
}
}
//
const handleByOnKeyUp = (e) => {
if (e.key === 'Enter') {
@ -68,7 +43,7 @@ export default function MainPage() {
schObjectNo: searchTxt,
code: 'M',
})
router.push('/management/stuff')
router.push('/management/stuff', { scroll: false })
} else {
setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' })
router.push('/community/faq')
@ -90,7 +65,7 @@ export default function MainPage() {
code: 'M',
})
router.push('/management/stuff')
router.push('/management/stuff', { scroll: false })
} else {
setSearchForm({ ...searchForm, searchValue: searchTxt, mainFlag: 'Y' })
router.push('/community/faq')

View File

@ -22,19 +22,12 @@ export default function MainContents() {
const globalLocaleState = useRecoilValue(globalLocaleStore)
const { promiseGet } = useAxios(globalLocaleState)
//
// const [objectList, setObjectList] = useState([])
//
const [recentNoticeList, setRecentNoticeList] = useState([])
//FAQ
const [recentFaqList, setRecentFaqList] = useState([])
//Sales Contact info
// const [businessCharger, setBusinessCharger] = useState(null)
// const [businessChargerMail, setBusinessChargerMail] = useState(null)
const { qcastState } = useContext(QcastContext)
const { fetchObjectList, initObjectList } = useMainContentsController()
@ -47,28 +40,6 @@ export default function MainContents() {
}
}, [])
// / Sales Contact info
// const fetchObjectList = async () => {
// try {
// const apiUrl = `/api/main-page/object/${session?.storeId}/list`
// await promiseGet({
// url: apiUrl,
// }).then((res) => {
// if (res.status === 200) {
// setObjectList(res.data.objectList)
// setBusinessCharger(res.data.businessCharger)
// setBusinessChargerMail(res.data.businessChargerMail)
// } else {
// setObjectList([])
// setBusinessCharger(null)
// setBusinessChargerMail(null)
// }
// })
// } catch (error) {
// console.error('MAIN API fetching error:', error)
// }
// }
//
const fetchNoticeList = async () => {
try {

View File

@ -211,7 +211,6 @@ export default function Stuff() {
fetchData()
} else if (stuffSearchParams?.code === 'M') {
const params = {
saleStoreId: session?.storeId,
schObjectNo: stuffSearchParams.schObjectNo,
schAddress: '',
schObjectName: '',
@ -225,7 +224,7 @@ export default function Stuff() {
endRow: pageNo * pageSize,
schSelSaleStoreId: stuffSearchParams?.schOtherSelSaleStoreId ? stuffSearchParams.schOtherSelSaleStoreId : stuffSearchParams.schSelSaleStoreId,
schSortType: 'R',
code: 'S',
code: 'E',
pageNo: 1,
pageSize: 100,
}
@ -338,7 +337,6 @@ export default function Stuff() {
//
const onChangeSortType = (e) => {
// let startRow = (stuffSearchParams.pageNo - 1) * pageSize + 1
let startRow = (1 - 1) * stuffSearchParams.pageSize + 1
stuffSearchParams.startRow = startRow
stuffSearchParams.endRow = startRow * stuffSearchParams.pageSize