index.vue 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <template>
  2. <view class='sharing-packets' :class='isAnimate==true?"":"right"'>
  3. <view class='sharing-con' @click='goShare'>
  4. <image src='/static/images/red-packets.png'></image>
  5. <view class='text font-color'>
  6. <view class="title">分享赚佣金</view>
  7. <!-- <view class='money'><text class='label'>¥</text>{{sharePacket.priceName}}</view> -->
  8. <view class='money'><text class='label'>¥</text>{{parseFloat(sharePacket.max)}}</view>
  9. <view class='tip'>下单即返佣金</view>
  10. <view class='shareBut'>立即分享</view>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. // +----------------------------------------------------------------------
  17. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  18. // +----------------------------------------------------------------------
  19. // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
  20. // +----------------------------------------------------------------------
  21. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  22. // +----------------------------------------------------------------------
  23. // | Author: CRMEB Team <admin@crmeb.com>
  24. // +----------------------------------------------------------------------
  25. export default {
  26. props: {
  27. sharePacket: {
  28. type: Object,
  29. default: function() {
  30. return {
  31. isState: true,
  32. priceName: ''
  33. }
  34. }
  35. },
  36. showAnimate:{
  37. type: Boolean,
  38. },
  39. },
  40. watch:{
  41. showAnimate(nVal,oVal){
  42. setTimeout(res=>{
  43. this.isAnimate = nVal
  44. },1000)
  45. }
  46. },
  47. data() {
  48. return {
  49. scrollNum:0,
  50. isAnimate:true
  51. };
  52. },
  53. methods: {
  54. closeShare: function() {
  55. this.$emit('closeChange');
  56. },
  57. goShare: function() {
  58. if(this.isAnimate){
  59. this.$emit('listenerActionSheet');
  60. }else{
  61. this.isAnimate = true
  62. this.$emit('boxStatus',true);
  63. }
  64. }
  65. },
  66. }
  67. </script>
  68. <style scoped lang="scss">
  69. .sharing-packets {
  70. position: fixed;
  71. right: 30rpx;
  72. bottom: 200rpx;
  73. z-index: 5;
  74. transition: all 0.3s ease-in-out 0s;
  75. opacity: 1;
  76. transform: scale(1);
  77. &.right{
  78. right: -170rpx;
  79. }
  80. }
  81. .sharing-packets.on {
  82. transform: scale(0);
  83. opacity: 0;
  84. }
  85. .sharing-packets .iconfont {
  86. width: 44rpx;
  87. height: 44rpx;
  88. border-radius: 50%;
  89. text-align: center;
  90. line-height: 44rpx;
  91. background-color: #999;
  92. font-size: 20rpx;
  93. color: #fff;
  94. margin: 0 auto;
  95. box-sizing: border-box;
  96. padding-left: 1px;
  97. }
  98. .sharing-packets .line {
  99. width: 2rpx;
  100. height: 40rpx;
  101. background-color: #999;
  102. margin: 0 auto;
  103. }
  104. .sharing-packets .sharing-con {
  105. width: 193rpx;
  106. height: 195rpx;
  107. position: relative;
  108. }
  109. .sharing-packets .sharing-con image {
  110. width: 100%;
  111. height: 100%;
  112. }
  113. .sharing-packets .sharing-con .text {
  114. position: absolute;
  115. top: 20rpx;
  116. font-size: 20rpx;
  117. width: 100%;
  118. text-align: center;
  119. }
  120. .sharing-packets .sharing-con .text .money {
  121. font-size: 32rpx;
  122. font-weight: bold;
  123. margin-top: 5rpx;
  124. }
  125. .sharing-packets .sharing-con .text .money .label {
  126. font-size: 16rpx;
  127. }
  128. .sharing-packets .sharing-con .text .tip {
  129. font-size: 18rpx;
  130. color: #AA6E56;
  131. margin-top: 5rpx;
  132. }
  133. .sharing-packets .sharing-con .text .shareBut {
  134. width: 60%;
  135. font-size: 20rpx;
  136. color: #F13926;
  137. margin-top: 18rpx;
  138. height: 30rpx;
  139. line-height: 30rpx;
  140. background: #FFE8BB;
  141. border-radius: 30rpx;
  142. margin: 26rpx auto 0;
  143. }
  144. </style>