问星数据小程序

interchange.vue 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. <template>
  2. <view class="mask">
  3. <view class="content">
  4. <image src="/static/img/close.png" mode="widthFix" class="close" @click="closeMask"></image>
  5. <view class="title">扫码进群,联系我们</view>
  6. <image :src="url" mode="widthFix" class="image"></image>
  7. <view class="claimEvmHint">截屏到相册 > 微信扫一扫 > 加入官方交流群</view>
  8. <!-- <button type="default" class="copyButton" @click="downLoadImg">保存到相册</button> -->
  9. </view>
  10. </view>
  11. </template>
  12. <script>
  13. export default {
  14. name:'interchange',
  15. data() {
  16. return {
  17. url:'https://www.wenxingshuju.com/kol_wx_qun_evm.jpg'
  18. }
  19. },
  20. mounted() {
  21. this.$burialPoint({project_name:'小程序版h5',button_name:'官方交流群',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'官方交流群弹框',url_value:window.location.href})
  22. _hmt?_hmt.push(['_trackEvent','小程序版h5', '官方交流群', uni.getStorageSync('key'),'']):'';
  23. },
  24. methods: {
  25. downLoadImg(){
  26. this.savePicture(this.url)
  27. },
  28. savePicture(Url) {
  29. var blob = new Blob([''], { type: 'application/octet-stream' });
  30. var url = URL.createObjectURL(blob);
  31. var a = document.createElement('a');
  32. a.href = Url;
  33. a.download = Url.replace(/(.*\/)*([^.]+.*)/ig, "$2").split("?")[0];
  34. var e = document.createEvent('MouseEvents');
  35. e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
  36. a.dispatchEvent(e);
  37. URL.revokeObjectURL(url);
  38. },
  39. closeMask(){
  40. this.$emit('closeMask')
  41. }
  42. }
  43. }
  44. </script>
  45. <style>
  46. .mask{
  47. width: 100%;
  48. height: 100vh;
  49. background: rgba(0,0,0,0.5);
  50. position: fixed;
  51. top: 0;
  52. left: 0;
  53. z-index: 99;
  54. }
  55. .content{
  56. width: 622rpx;
  57. height: 600rpx;
  58. background: #FFFFFF;
  59. border-radius: 12rpx;
  60. position: absolute;
  61. top: 0;
  62. left: 0;
  63. right: 0;
  64. bottom: 0;
  65. margin: auto;
  66. padding-top: 84rpx;
  67. }
  68. .close{
  69. width: 40rpx;
  70. height: 40rpx;
  71. position: absolute;
  72. top: 20rpx;
  73. right: 20rpx;
  74. }
  75. .title{
  76. color: #000000;
  77. font-size: 40rpx;
  78. line-height: 44rpx;
  79. text-align: center;
  80. font-weight: bold;
  81. }
  82. .image{
  83. width: 380rpx;
  84. height: 234rpx;
  85. display: block;
  86. margin: auto;
  87. margin-top: 40rpx;
  88. }
  89. .copyButton{
  90. width: 540rpx;
  91. height: 80rpx;
  92. background: #2762FF;
  93. border-radius: 8rpx;
  94. color: #FFFFFF;
  95. font-size: 32rpx;
  96. line-height: 80rpx;
  97. text-align: center;
  98. margin-top: 40rpx;
  99. }
  100. .claimEvmHint{
  101. font-size: 26rpx;
  102. color: #666;
  103. text-align: center;
  104. }
  105. </style>