|
|
@@ -10,10 +10,11 @@ import {
|
|
|
StyleSheet,
|
|
|
Text,
|
|
|
TouchableOpacity,
|
|
|
- View
|
|
|
+ View,
|
|
|
} from 'react-native';
|
|
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
|
|
|
|
+import { KefuPopup, KefuPopupRef } from '@/components/mine/KefuPopup';
|
|
|
import { CheckoutModal } from '@/components/product/CheckoutModal';
|
|
|
import { Images } from '@/constants/images';
|
|
|
import { getGoodsDetail, GoodsDetail, previewSubmit } from '@/services/mall';
|
|
|
@@ -25,6 +26,7 @@ export default function ProductDetailScreen() {
|
|
|
const router = useRouter();
|
|
|
const insets = useSafeAreaInsets();
|
|
|
const checkoutRef = useRef<any>(null);
|
|
|
+ const kefuRef = useRef<KefuPopupRef>(null);
|
|
|
|
|
|
const [loading, setLoading] = useState(true);
|
|
|
const [data, setData] = useState<GoodsDetail | null>(null);
|
|
|
@@ -168,7 +170,7 @@ export default function ProductDetailScreen() {
|
|
|
|
|
|
{/* 底部购买栏 */}
|
|
|
<View style={[styles.bottomBar, { paddingBottom: insets.bottom + 10 }]}>
|
|
|
- <TouchableOpacity style={styles.serviceBtn}>
|
|
|
+ <TouchableOpacity style={styles.serviceBtn} onPress={() => kefuRef.current?.open()}>
|
|
|
<Text style={styles.serviceBtnText}>客服</Text>
|
|
|
</TouchableOpacity>
|
|
|
<TouchableOpacity style={styles.buyBtn} onPress={showCheckout} activeOpacity={0.8}>
|
|
|
@@ -192,6 +194,7 @@ export default function ProductDetailScreen() {
|
|
|
goodsId={id!}
|
|
|
subjectId={subjectId}
|
|
|
/>
|
|
|
+ <KefuPopup ref={kefuRef} />
|
|
|
</View>
|
|
|
);
|
|
|
}
|