index.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. <template>
  2. <view class='sharing-packets' :class='sharePacket.isState==true?"on":""'>
  3. <view class='iconfont icon-guanbi' @click="closeShare"></view>
  4. <view class='line'></view>
  5. <view class='sharing-con' @click='goShare'>
  6. <image src='../../static/images/red-packets.png'></image>
  7. <view class='text font-color'>
  8. <view>会员分享返</view>
  9. <view class='money'><text class='label'>¥</text>{{sharePacket.priceName}}</view>
  10. <view class='tip'>下单即返佣金</view>
  11. <view class='shareBut'>立即分享</view>
  12. </view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props: {
  19. sharePacket: {
  20. type: Object,
  21. default: function(){
  22. return {isState: true,priceName:''}
  23. }
  24. }
  25. },
  26. data() {
  27. return {
  28. };
  29. },
  30. methods: {
  31. closeShare:function(){
  32. this.$emit('closeChange');
  33. },
  34. goShare:function(){
  35. this.$emit('listenerActionSheet');
  36. }
  37. }
  38. }
  39. </script>
  40. <style scoped lang="scss">
  41. .sharing-packets{position:fixed;left:30rpx;bottom:200rpx;z-index:5;transition:all 0.3s ease-in-out 0s;opacity:1;transform: scale(1);}
  42. .sharing-packets.on{transform: scale(0);opacity:0;}
  43. .sharing-packets .iconfont{width:44rpx;height:44rpx;border-radius:50%;text-align:center;line-height:44rpx;background-color:#999;font-size:20rpx;color:#fff;margin:0 auto;box-sizing:border-box;padding-left:1px;}
  44. .sharing-packets .line{width:2rpx;height:40rpx;background-color:#999;margin:0 auto;}
  45. .sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
  46. .sharing-packets .sharing-con image{width:100%;height:100%;}
  47. .sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
  48. .sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;}
  49. .sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
  50. .sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
  51. .sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}
  52. </style>