修改bug

This commit is contained in:
筱野
2025-09-13 10:55:06 +08:00
parent aef84e76cb
commit 52bee95505
9 changed files with 317 additions and 349 deletions

View File

@@ -57,7 +57,7 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
setLoading(false)
}
}
useEffect(() => {
if (visible) {
@@ -138,8 +138,8 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
const handleItemLocation = (stadium: Stadium) => {
if (stadium.latitude && stadium.longitude) {
Taro.openLocation({
latitude: stadium.latitude,
longitude: stadium.longitude,
latitude: stadium.latitude * 1,
longitude: stadium.longitude * 1,
name: stadium.name,
address: stadium.address,
success: (res) => {
@@ -157,8 +157,8 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
)
}
// 如果显示详情页面
if (showDetail && selectedStadium) {
@@ -194,7 +194,7 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
position="bottom"
round
>
<View className='select-stadium'>
{/* 搜索框 */}
<View className='search-section'>
@@ -255,20 +255,20 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
<View className='stadium-item-right'>
<View className='stadium-name' dangerouslySetInnerHTML={{ __html: markSearchText(stadium.name) }}></View>
<View className='stadium-address'>
<Text
<Text
className='stadium-distance'
onClick={(e) => {
e.stopPropagation()
handleItemLocation(stadium)
onClick={(e) => {
e.stopPropagation()
handleItemLocation(stadium)
}}
>
{calculateDistance(stadium)} ·
{calculateDistance(stadium)} ·
</Text>
<Text
<Text
className='stadium-address-text'
onClick={(e) => {
e.stopPropagation()
handleItemLocation(stadium)
onClick={(e) => {
e.stopPropagation()
handleItemLocation(stadium)
}}
>
{stadium.address}
@@ -276,7 +276,7 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
<Image src={images.ICON_ARRORW_SMALL} className='stadium-map-icon' />
</View>
</View>
</View>
))}
{searchValue && (
@@ -297,10 +297,10 @@ const SelectStadium: React.FC<SelectStadiumProps> = ({
)
}
{/* 场馆列表 */}
</View>
</CommonPopup>
)
}
export default SelectStadium
export default SelectStadium