2022-12-02 18:59:29 +08:00

51 lines
1.7 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { Image, Swiper, SwiperItem, Text, View } from '@tarojs/components'
import Taro from '@tarojs/taro'
import styles from './index.module.scss'
import { formatImgUrl } from '@/common/fotmat'
import { goLink } from '@/common/common'
interface params {
show?: true|false
onClose?: () => void
}
export default ({ show, onClose }: params) => {
const onCustomer = async() => {
const res = await Taro.showModal({
title: '是否拨打服务热线',
confirmText: '拨打',
content: '(0757) 8270 6695',
cancelText: '取消',
})
if (res.confirm) {
Taro.makePhoneCall({
phoneNumber: '(0757)82706695',
})
}
}
const onConfirm = () => {
onClose?.()
goLink('/pages/bindSalesman/index')
}
return (
<>
{show && <View className={styles.bindSalesman_main}>
<View className={styles.bindSalesman_pop}>
<View className={styles.bindSalesman_header}>
<Image src={formatImgUrl('/mall/invite_code_top.png', '!w400')} mode="aspectFill" />
</View>
<View className={styles.bindSalesman_message}>
<Text></Text>
<Text></Text>
</View>
<View className={styles.bindSalesman_operation}>
<View className={styles.btns} onClick={() => onConfirm()}></View>
<View className={styles.btns} onClick={() => onCustomer()}></View>
</View>
</View>
<View className={styles.bindSalesman_mask} onClick={onClose}></View>
</View>}
</>
)
}