export function useClientCommon() {
    const handleNavigator = () => {
        const { longitude, latitude, name } = {
            longitude: 113.606973,
            latitude: 23.134507,
            name: '广东省广州市增城区东进商城'
        }
        uni.openLocation({
            longitude,
            latitude,
            name
        })
    }
    const handleMobile = () => {
        uni.makePhoneCall({
            phoneNumber: '18138952909',
            fail: () => { }
        })
    }
    const handleAddClientContact = () => {
        uni.navigateTo({
            url: '/bundle/pages/salesman/client-contact/index'
        })
    }
    const handleAddClientDevice = () => {
        uni.navigateTo({
            url: '/bundle/pages/salesman/client-device/index'
        })
    }
    const handleEditClient = () => {
        uni.navigateTo({
            url: '/bundle/pages/salesman/client-info/index?type=edit'
        })
    }

    return {
        handleNavigator,
        handleMobile,
        handleAddClientContact,
        handleAddClientDevice,
        handleEditClient
    }
}
