<template>
	<view class="phone" v-if="phone" @click.stop="callPhone">
		<image src="/static/image/home/phone.png" mode="widthFix"></image>
		联系{{ title || ta[sexName] }}
	</view>
</template>

<script>
	import mixinsSex from '@/mixins/sex.js'
	export default {
		mixins: [mixinsSex],
		props: ['phone', 'title', 'sexName'],
		data() {
			return {

			}
		},
		methods: {
			callPhone(){
				uni.makePhoneCall({
					phoneNumber: this.phone
				})
			},
		}
	}
</script>

<style scoped lang="scss">
	.phone {
		background-color: rgba($uni-color, 0.2);
		color: $uni-color;
		padding: 8rpx 16rpx;
		border-radius: 10rpx;
		margin-left: auto;

		image {
			width: 20rpx;
			height: 20rpx;
		}
	}
</style>