<template>
	<view class="controls">
		<view class="bell"
		@click="bell">
			<uv-icon size="35rpx" name="bell"></uv-icon>
			举报
		</view>
		<view class=""
		@click="thumbUp">
			<uv-icon size="35rpx" name="thumb-up"></uv-icon>
			点赞
		</view>
		<view class=""
		@click="share">
			<uv-icon size="35rpx" name="share"></uv-icon>
			分享
		</view>
		<view class=""
		@click="thumbDown">
			<uv-icon size="35rpx" name="thumb-down"></uv-icon>
			踩
		</view>
	</view>
</template>

<script>
	export default {
		name:"contentControls",
		props : {
			type : {
				default : 0
			},
			detail : {
				default : {}
			}
		},
		data() {
			return {
				
			};
		},
		methods : {
			// 举报
			bell(){
				this.$api('infoReport', {
					type : this.type,
					id : this.detail.id,
				}, res => {
					if(res.code == 200){
						uni.showToast({
							title: '举报成功'
						})
					}
				})
			},
			// 点赞
			thumbUp(){
				this.$api('infoLike', {
					type : this.type,
					id : this.detail.id,
				}, res => {
					if(res.code == 200){
						uni.showToast({
							title: '点赞成功'
						})
					}
				})
			},
			// 分享
			share(){
				
			},
			// 踩
			thumbDown(){
				this.$api('infoDislike', {
					type : this.type,
					id : this.detail.id,
				}, res => {
					if(res.code == 200){
						uni.showToast({
							title: '踩成功'
						})
						
					}
				})
			},
		},
	}
</script>

<style lang="scss" scoped>
.controls {
	display: flex;
	&>view {
		display: flex;
		justify-content: center;
		align-items: center;
		margin-right: 40rpx;
	}
}
</style>