import { View, Text } from '@tarojs/components'; import Taro from '@tarojs/taro'; import { CUSTOMER_SERVICE_PHONE } from '@dukang/shared-types'; import PageShell from '../../components/PageShell'; import SubPageHeader from '../../components/SubPageHeader'; import ContactCsButton from '../../components/ContactCsButton'; import { toast } from '../../lib/api'; const isWeapp = process.env.TARO_ENV === 'weapp'; const DIAL_PHONE = CUSTOMER_SERVICE_PHONE.replace(/-/g, ''); function dialPhone() { Taro.makePhoneCall({ phoneNumber: DIAL_PHONE }).catch(() => toast('无法拨打电话')); } export default function CustomerServicePage() { return ( 杜康好客客服 {isWeapp ? '点击下方按钮,进入小程序在线客服会话' : '请在微信小程序内打开以使用在线客服,或拨打客服电话'} 工作时间:9:00 - 21:00 {isWeapp ? ( ) : null} {isWeapp ? `或拨打客服电话 ${CUSTOMER_SERVICE_PHONE}` : '拨打客服电话'} {!isWeapp ? ( {CUSTOMER_SERVICE_PHONE} ) : null} ); }