<template>
	<view class="">
		<view class="collpopul" v-for="(i,index) in msgpop" :key="index">
			<view class="contxt">
				<image src="../../static/mine/Collect_yellow.png" mode="aspectFill" style="width: 30rpx;height: 30rpx;">
				</image>
				{{i.collAoff?'收藏成功':'已取消'}}
				<!-- 收藏成功 -->
			</view>
			<!-- <view class="goMore" @click="goMore"> -->
			<view class="goMore" @click="goMore" v-if="i.collAoff">
				<view class="">
					去看看
				</view>
				<view class="" style="display: flex;height: 100%;justify-content: center;align-items: center;">
					<image src="../../static/yyyou.png" mode="aspectFill" style="width: 30rpx;height: 32rpx;">
					</image>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "msgPop",
		computed: {
			msgpop() {
			      return this.$store.state.msgpop; // 直接访问 Vuex 中的状态数据
			}
		},
		props: {
			itemlist: {
				type: Array,
				default () {
					return []
				}
			},
			// 0 活动 1课程
			goNum: {
				type: Number,
				default () {
					return 0
				}
			}
		},
		data() {
			return {}
		},
		methods: {
			// 删除
			delData() {
				this.itemlist.shift()
			},

			// 跳转收藏页面
			goMore() {
				uni.navigateTo({
					url: `/pages/mineCollNew/mineCollNew?ty=${this.goNum}`
				})
			},
		}
	}
</script>

<style lang="scss">
	.collpopul {
		position: fixed;
		padding: 0 30rpx;
		background-color: #fff;
		top: 15%;
		box-shadow: 0rpx 10rpx 10rpx 5rpx rgba(0, 0, 0, .1);
		// bottom: 10%;
		z-index: 100;
		width: 650rpx;
		height: 90rpx;
		left: 50%;
		transform: translate(-50%, 0);
		border-radius: 30rpx;
		display: flex;
		align-items: center;

		.contxt {
			flex: 1;
			font-weight: 580;
			font-size: 30rpx;
			display: flex;
			align-items: center;

			image {
				padding-right: 10rpx;
			}
		}

		.goMore {
			// width: 120rpx;
			display: flex;
			// height: 35rpx;
			height: 100%;
			line-height: 30rpx;
			align-items: center;
			color: #F44265;
			font-size: 30rpx;
			font-weight: bold;
		}
	}
</style>