|
|
|
@ -42,11 +42,15 @@ export default function ListenRegion() { |
|
|
|
|
} |
|
|
|
|
setpageTitle(res.data.data.show.title) |
|
|
|
|
|
|
|
|
|
Taro.setNavigationBarTitle({ |
|
|
|
|
title: res.data.data.show.title |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
const initialStates = res.data.data.show.grouped_products.reduce((acc, option) => ({ ...acc, [option.title]: true }), {}); |
|
|
|
|
console.log('initialStates', initialStates) |
|
|
|
|
setisAcOpen(initialStates) |
|
|
|
|
setisAcItem(res.data.data.show.grouped_products.map(option => option.id)) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log('isAcOpen', isAcOpen) |
|
|
|
|
console.log('isAcItem', isAcItem) |
|
|
|
|
} |
|
|
|
@ -68,6 +72,10 @@ export default function ListenRegion() { |
|
|
|
|
setregionList(res.data.data.show.products) |
|
|
|
|
} |
|
|
|
|
setpageTitle(res.data.data.show.title) |
|
|
|
|
|
|
|
|
|
Taro.setNavigationBarTitle({ |
|
|
|
|
title: res.data.data.show.title |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
@ -87,31 +95,24 @@ export default function ListenRegion() { |
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
|
<View className='listenRegion_bg'> |
|
|
|
|
<View className='header'> |
|
|
|
|
<View
|
|
|
|
|
className='back' |
|
|
|
|
onClick={handleBack} |
|
|
|
|
></View> |
|
|
|
|
<View className='title'>{pageTitle}</View>
|
|
|
|
|
</View> |
|
|
|
|
<View className='container'> |
|
|
|
|
{ |
|
|
|
|
!ifMB && regionList.map((item, index) => ( |
|
|
|
|
<View
|
|
|
|
|
key={index}
|
|
|
|
|
<View |
|
|
|
|
key={index} |
|
|
|
|
className='item' |
|
|
|
|
onClick={()=>handleDetail(item.PrdtId)} |
|
|
|
|
> |
|
|
|
|
<Image
|
|
|
|
|
<Image |
|
|
|
|
className='icon' |
|
|
|
|
src={item.PrdtCover}
|
|
|
|
|
src={item.PrdtCover} |
|
|
|
|
></Image> |
|
|
|
|
<View className='title'>{item.PrdtTitle}</View> |
|
|
|
|
</View> |
|
|
|
|
)) |
|
|
|
|
} |
|
|
|
|
</View> |
|
|
|
|
<View
|
|
|
|
|
<View |
|
|
|
|
className='acContainer' |
|
|
|
|
> |
|
|
|
|
{ |
|
|
|
@ -145,21 +146,21 @@ export default function ListenRegion() { |
|
|
|
|
<View className='acItem'> |
|
|
|
|
{ |
|
|
|
|
item.list.map((acitem, acindex) => ( |
|
|
|
|
<View
|
|
|
|
|
key={acindex}
|
|
|
|
|
<View |
|
|
|
|
key={acindex} |
|
|
|
|
className='item' |
|
|
|
|
onClick={()=>handleDetail(acitem.prdt_id)} |
|
|
|
|
> |
|
|
|
|
<Image
|
|
|
|
|
<Image |
|
|
|
|
className='icon' |
|
|
|
|
src={acitem.prdt_cover}
|
|
|
|
|
src={acitem.prdt_cover} |
|
|
|
|
></Image> |
|
|
|
|
<View className='title'>{acitem.prdt_title}</View> |
|
|
|
|
</View> |
|
|
|
|
)) |
|
|
|
|
} |
|
|
|
|
</View> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</AtAccordion> |
|
|
|
|
)) |
|
|
|
|
} |
|
|
|
|