share.vue 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. <template>
  2. <view class="bottom-panel" :class="Visible?'bottom-panel open':'bottom-panel close'" @click="closePopup">
  3. <view class="popup-bg">
  4. <view class="wechat-box">
  5. <image src="/static/share.png" mode="widthFix"></image>
  6. </view>
  7. </view>
  8. </view>
  9. </template>
  10. <script>
  11. export default {
  12. data() {
  13. return {
  14. /*是否可见*/
  15. Visible: false,
  16. poster_img: '',
  17. /*公众号分享是否显示*/
  18. wechat_share:false
  19. }
  20. },
  21. props: ['isshare'],
  22. watch: {
  23. 'isshare': function(n, o) {
  24. if (n != o) {
  25. this.wechat_share=false;
  26. this.Visible = n;
  27. }
  28. }
  29. },
  30. methods: {
  31. /*关闭弹窗*/
  32. closePopup(type) {
  33. this.$emit('close', {
  34. type: type,
  35. poster_img:this.poster_img
  36. })
  37. },
  38. }
  39. }
  40. </script>
  41. <style>
  42. .bottom-panel .popup-bg {
  43. position: fixed;
  44. top: 0;
  45. right: 0;
  46. bottom: 0;
  47. left: 0;
  48. background: rgba(0, 0, 0, .6);
  49. z-index: 98;
  50. }
  51. .bottom-panel .popup-bg .wechat-box{ padding-top: var(--window-top);}
  52. .bottom-panel .popup-bg .wechat-box image{ width: 100%;}
  53. .bottom-panel .content {
  54. position: fixed;
  55. width: 100%;
  56. bottom: 0;
  57. min-height: 200rpx;
  58. max-height: 900rpx;
  59. background-color: #fff;
  60. transform: translate3d(0, 980rpx, 0);
  61. transition: transform .2s cubic-bezier(0, 0, .25, 1);
  62. bottom: env(safe-area-inset-bottom);
  63. z-index: 99;
  64. }
  65. .bottom-panel.open .content {
  66. transform: translate3d(0, 0, 0);
  67. }
  68. .bottom-panel.close .popup-bg {
  69. display: none;
  70. }
  71. .module-share .hd {
  72. height: 90rpx;
  73. line-height: 90rpx;
  74. font-size: 36rpx;
  75. }
  76. .module-share .item button,.module-share .item button::after{ background: none; border: none;}
  77. .module-share .icon-box {
  78. width: 100rpx;
  79. height: 100rpx;
  80. border-radius: 50%;
  81. background: #f6bd1d;
  82. }
  83. .module-share .icon-box .iconfont {
  84. font-size: 60rpx;
  85. color: #FFFFFF;
  86. }
  87. .module-share .btns {
  88. margin-top: 30rpx;
  89. }
  90. .module-share .btns button {
  91. height: 90rpx;
  92. line-height: 90rpx;
  93. border-radius: 0;
  94. border-top: 1px solid #EEEEEE;
  95. }
  96. .module-share .btns button::after {
  97. border-radius: 0;
  98. }
  99. .module-share .share-friend {
  100. background: #04BE01;
  101. }
  102. </style>