123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- <template>
- <view class="">
- <view class="collpopul" v-for="(i,index) in msgpop" :key="index">
- <view class="contxt">
- <image :src="i.collAoff?img1:img2" 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 {
- img1: 'https://teacherapi.cocorobo.cn/teaching-file/static/mine/Collect_yellow.png',
- img2: 'https://ccrb.s3.cn-northwest-1.amazonaws.com.cn/delcoll1708391346848.png'
- }
- },
- 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);
- z-index: 100;
- width: 650rpx;
- height: 90rpx;
- left: 50%;
- transform: translate(-50%, 0);
- border-radius: 30rpx;
- display: flex;
- align-items: center;
- // animation: collpopul 1s cubic-bezier(0,0,0.25,1) forwards;
- .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;
- }
- }
- @keyframes collpopul {
- 0% {
- // background: red;
- top: 0;
- }
- 100% {
- // background: red;
- top: 15%;
- }
- // 100%{
- // opacity: 0;
- // }
- }
- </style>
|