index.vue 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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="HTTP_REQUEST_URL_IMG+'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. import { HTTP_REQUEST_URL_IMG } from "@/config/app";
  18. export default {
  19. props: {
  20. sharePacket: {
  21. type: Object,
  22. default: function(){
  23. return {isState: true,priceName:''}
  24. }
  25. }
  26. },
  27. data() {
  28. return {
  29. };
  30. },
  31. methods: {
  32. closeShare:function(){
  33. this.$emit('closeChange');
  34. },
  35. goShare:function(){
  36. this.$emit('listenerActionSheet');
  37. }
  38. }
  39. }
  40. </script>
  41. <style scoped lang="scss">
  42. .sharing-packets{position:fixed;left:30rpx;bottom:200rpx;z-index:5;transition:all 0.3s ease-in-out 0s;opacity:1;transform: scale(1);}
  43. .sharing-packets.on{transform: scale(0);opacity:0;}
  44. .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;}
  45. .sharing-packets .line{width:2rpx;height:40rpx;background-color:#999;margin:0 auto;}
  46. .sharing-packets .sharing-con{width:187rpx;height:210rpx;position:relative;}
  47. .sharing-packets .sharing-con image{width:100%;height:100%;}
  48. .sharing-packets .sharing-con .text{position:absolute;top:30rpx;font-size:20rpx;width:100%;text-align:center;}
  49. .sharing-packets .sharing-con .text .money{font-size:32rpx;font-weight:bold;margin-top:5rpx;}
  50. .sharing-packets .sharing-con .text .money .label{font-size:20rpx;}
  51. .sharing-packets .sharing-con .text .tip{font-size:18rpx;color:#999;margin-top:5rpx;}
  52. .sharing-packets .sharing-con .text .shareBut{font-size:22rpx;color:#fff;margin-top:18rpx;height:50rpx;line-height:50rpx;}
  53. </style>