index.vue 3.4 KB

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