<template>
	<view class="works" @click="$emit('click')">
		
		<userHeadItem :item="item"/>
		
		<daynamicInfo :item="item"/>
		
		<view class="bottom">
			<view class="browse">
				{{ item.isBrowse }}浏览
			</view>
			<view class="browse">
				{{ item.isComment }}条评论
			</view>
			<view class="phone"
			v-if="item.phone"
			@click.stop="callPhone">
				<image src="/static/image/home/phone.png" mode=""></image>
				联系{{ ta[item.sex] }}
			</view>
		</view>
	</view>
</template>

<script>
	import mixinsSex from '@/mixins/sex.js'
	import userHeadItem from '@/components/list/dynamic/userHeadItem.vue'
	import daynamicInfo from '@/components/list/dynamic/daynamicInfo.vue'
	export default {
		mixins: [mixinsSex],
		components : {
			userHeadItem,
			daynamicInfo,
		},
		props: {
			item: {},
		},
		data() {
			return {
			}
		},
		methods: {
			callPhone(){
				uni.makePhoneCall({
					phoneNumber: this.item.phone
				})
			},
		},
	}
</script>

<style scoped lang="scss">
	.works {
		margin: 40rpx 20rpx;
		background-color: #fff;
		padding: 40rpx;
		border-radius: 20rpx;
		box-shadow: 0 0 6rpx 6rpx #00000011;

		.bottom {
			display: flex;
			margin-top: 20rpx;
			font-size: 24rpx;

			.browse {
				margin: 0rpx 30rpx;
				color: rgb(132, 132, 132);
			}

			.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>