修改提示文案
This commit is contained in:
@@ -3,7 +3,6 @@ import { View, Text, Image } from "@tarojs/components";
|
|||||||
import Taro from "@tarojs/taro";
|
import Taro from "@tarojs/taro";
|
||||||
import { useUserInfo } from "@/store/userStore";
|
import { useUserInfo } from "@/store/userStore";
|
||||||
import {
|
import {
|
||||||
useEvaluate,
|
|
||||||
EvaluateCallback,
|
EvaluateCallback,
|
||||||
EvaluateScene,
|
EvaluateScene,
|
||||||
} from "@/store/evaluateStore";
|
} from "@/store/evaluateStore";
|
||||||
@@ -15,6 +14,7 @@ import styles from "./index.module.scss";
|
|||||||
import images from "@/config/images";
|
import images from "@/config/images";
|
||||||
import AiImportPopup from "@/publish_pages/publishBall/components/AiImportPopup";
|
import AiImportPopup from "@/publish_pages/publishBall/components/AiImportPopup";
|
||||||
import NTRPEvaluatePopup from "../NTRPEvaluatePopup";
|
import NTRPEvaluatePopup from "../NTRPEvaluatePopup";
|
||||||
|
import { useDictionaryStore } from "@/store/dictionaryStore";
|
||||||
|
|
||||||
export interface PublishMenuProps {
|
export interface PublishMenuProps {
|
||||||
onPersonalPublish?: () => void;
|
onPersonalPublish?: () => void;
|
||||||
@@ -30,6 +30,7 @@ const PublishMenu: React.FC<PublishMenuProps> = (props) => {
|
|||||||
area
|
area
|
||||||
} = useListState();
|
} = useListState();
|
||||||
|
|
||||||
|
const supportedCitiesList = useDictionaryStore((s) => s.getDictionaryValue('supported_cities')) || [];
|
||||||
|
|
||||||
// 使用 useEffect 监听 isVisible 变化,确保所有情况都能触发回调
|
// 使用 useEffect 监听 isVisible 变化,确保所有情况都能触发回调
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -67,10 +68,10 @@ const PublishMenu: React.FC<PublishMenuProps> = (props) => {
|
|||||||
};
|
};
|
||||||
const handleMenuItemClick = (type: "individual" | "group" | "ai") => {
|
const handleMenuItemClick = (type: "individual" | "group" | "ai") => {
|
||||||
const [_, address] = area;
|
const [_, address] = area;
|
||||||
if (address !== '上海市') {
|
if (!supportedCitiesList.includes(address)) {
|
||||||
(Taro as any).showModal({
|
(Taro as any).showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '仅上海地区开放,您可加入社群或切换城市',
|
content: '该城市尚未开放,您可加入社群或切换城市',
|
||||||
showCancel: false,
|
showCancel: false,
|
||||||
confirmText: '知道了'
|
confirmText: '知道了'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -230,7 +230,7 @@ const StadiumDetail = forwardRef<StadiumDetailRef, StadiumDetailProps>(({
|
|||||||
<View className='stadium-item-right'>
|
<View className='stadium-item-right'>
|
||||||
<View className='stadium-name'>{formData.name}</View>
|
<View className='stadium-name'>{formData.name}</View>
|
||||||
<View className='stadium-address'>
|
<View className='stadium-address'>
|
||||||
<Text>{calculateDistance(formData.istance || null)} · </Text>
|
<Text>{calculateDistance(formData.istance || null) + ' · '}</Text>
|
||||||
<Text>{formData.address}</Text>
|
<Text>{formData.address}</Text>
|
||||||
<Image src={images.ICON_ARRORW_SMALL} className='stadium-map-icon' />
|
<Image src={images.ICON_ARRORW_SMALL} className='stadium-map-icon' />
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
Reference in New Issue
Block a user