<template>
  <!-- <div class="loading-container"> -->
    <!-- <van-loading size="24px" vertical>加载中...</van-loading> -->
    <div class="meteor">
        <div class="star"></div>
    </div>
  <!-- </div> -->
</template>
<script>
  import wepy from '@wepy/core';
  
  wepy.component({
    methods: {
      onShareAppMessage: function(res) {
        if (res.from === 'button') {
          console.log('onShareAppMessage1', res.target);
        }
      }
    }
  });
</script>
<style lang="less">
  // .loading-container {
  // 	position: absolute;
  // 	width: 100%;
  // 	height: 100%;
  // 	display: flex;
  // 	justify-content: center;
  // 	align-items: center;
  // 	z-index: 1;
    .meteor {
        position: absolute;
        top: 153rpx;
        left: 94rpx;
        width: calc(100% - 170rpx);;
        height: 0;
        // border: 2rpx solid #000;
        z-index: 10;
        transform: rotateZ(-2deg)
    }
    .star {
        position: absolute;
        left: -3rpx;
        // bottom: -220rpx;
        top: -4rpx;
        // left: -43%;
        height: 10rpx;
        width: 150rpx;
        background: linear-gradient(-45deg,rgba(255,255,255,0),yellow);
        transform: translateX(605rpx);
        // background: -webkit-linear-gradient(-45deg,rgba(255,255,255,0),yellow);
        /*此处为下一步的添加动画*/
        // -webkit-animation: tail 1s ease-in forwards, shooting 1s ease-in forwards;
        // -o-animation: tail 1s ease-in forwards, shooting 1s ease-in forwards;
        animation: tail .6s ease-in forwards, shooting .6s ease-in forwards;
    }
    .star::before{
        content: "";
        position: absolute;
        top: -29rpx;
        left: -52rpx;
        width: 78rpx;
        height: 78rpx;
        // top: calc(100% - 1px);
        // left: 100%;
        background: url('http://activitystatic.xyqb.com/sign@2x.png') 0 0/contain no-repeat;
        // background: -webkit-linear-gradient(45deg,rgba(255,255,255,0),yellow,rgba(255,255,255,0));
        /*此处为下一步的添加动画*/
        // -webkit-animation: shining 3s ease-in-out infinite;
        // -o-animation: shining 3s ease-in-out infinite;
        animation: shining .6s ease-in-out forwards;
    }
    .star:before {
        transform: rotateZ(-2deg);
        // transform: -webkit-translateX(-50%) -webkit-rotateZ(-45deg);
    }
    .star:after {
        // transform: translateX(-50%) rotateZ(45deg);
        // transform: -webkit-translateX(-50%) -webkit-rotateZ(45deg);
    }

    // @-webkit-keyframes shining {
    //     0% {width: 0;}
    //     50% {width: 30px;}
    //     100% {width: 0;}
    // }
    @keyframes shining {
        0% {transform: scale(1);}
        // 50% {transform: scale(0.8);}
        99% {transform: scale(0.3);}
        100% {transform: scale(0);}
    }
    // @-webkit-keyframes tail {
    //     0% {width: 0;}
    //     30% {width: 50px;}
    //     100% {width: 0;}
    // }
    @keyframes tail {
        0% {width: 0;}
        10% {width: 0;}
        50% {width: 150rpx;}
        65% {width: 50rpx;}
        80% {width: 150rpx;}
        100% {width: 0;}
    }
    // @-webkit-keyframes shooting {
    //     0% {
    //         -webkit-transform: translateX(0);
    //         transform: translateX(0);
    //     }
    //     100% {
    //         -webkit-transform: translateX(350px);
    //         transform: translateX(350px);
    //     }
    // }
    @keyframes shooting {
        0% {
            // -webkit-transform: translateX(0);
            transform: translateX(605rpx);
        }
        100% {
            // -webkit-transform: translateX(350px);
            transform: translateX(30rpx);
        }
    }
  // }
</style>
<config>
{
    usingComponents: {
      'van-loading': '~@/components/vant/loading/index'
    }
}
</config>
