mp-share.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  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: ['isMpShare'],
  22. watch: {
  23. 'isMpShare': function(n, o) {
  24. if (n != o) {
  25. this.Visible = n;
  26. }
  27. }
  28. },
  29. methods: {
  30. /*关闭弹窗*/
  31. closePopup() {
  32. this.$emit('close');
  33. },
  34. }
  35. }
  36. </script>
  37. <style>
  38. .bottom-panel .popup-bg {
  39. position: fixed;
  40. top: 0;
  41. right: 0;
  42. bottom: 0;
  43. left: 0;
  44. background: rgba(0, 0, 0, .6);
  45. z-index: 98;
  46. }
  47. .bottom-panel .popup-bg .wechat-box{ padding-top: var(--window-top);}
  48. .bottom-panel .popup-bg .wechat-box image{ width: 100%;}
  49. .bottom-panel .content {
  50. position: fixed;
  51. width: 100%;
  52. bottom: 0;
  53. min-height: 200rpx;
  54. max-height: 900rpx;
  55. background-color: #fff;
  56. transform: translate3d(0, 980rpx, 0);
  57. transition: transform .2s cubic-bezier(0, 0, .25, 1);
  58. bottom: env(safe-area-inset-bottom);
  59. z-index: 99;
  60. }
  61. .bottom-panel.open .content {
  62. transform: translate3d(0, 0, 0);
  63. }
  64. .bottom-panel.close .popup-bg {
  65. display: none;
  66. }
  67. .module-share .hd {
  68. height: 90rpx;
  69. line-height: 90rpx;
  70. font-size: 36rpx;
  71. }
  72. .module-share .item button,.module-share .item button::after{ background: none; border: none;}
  73. .module-share .icon-box {
  74. width: 100rpx;
  75. height: 100rpx;
  76. border-radius: 50%;
  77. background: #f6bd1d;
  78. }
  79. .module-share .icon-box .iconfont {
  80. font-size: 60rpx;
  81. color: #FFFFFF;
  82. }
  83. .module-share .btns {
  84. margin-top: 30rpx;
  85. }
  86. .module-share .btns button {
  87. height: 90rpx;
  88. line-height: 90rpx;
  89. border-radius: 0;
  90. border-top: 1px solid #EEEEEE;
  91. }
  92. .module-share .btns button::after {
  93. border-radius: 0;
  94. }
  95. .module-share .share-friend {
  96. background: #04BE01;
  97. }
  98. </style>