123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109 |
- <template>
- <view class="mask">
- <view class="content">
- <image src="/static/img/close.png" mode="widthFix" class="close" @click="closeMask"></image>
- <view class="title">扫码进群,联系我们</view>
- <image :src="url" mode="widthFix" class="image"></image>
- <view class="claimEvmHint">截屏到相册 > 微信扫一扫 > 加入官方交流群</view>
- <!-- <button type="default" class="copyButton" @click="downLoadImg">保存到相册</button> -->
- </view>
- </view>
- </template>
- <script>
- export default {
- name:'interchange',
- data() {
- return {
- url:'https://www.wenxingshuju.com/kol_wx_qun_evm.jpg'
- }
- },
- mounted() {
- this.$burialPoint({project_name:'小程序版h5',button_name:'官方交流群',key_value:uni.getStorageSync('key')?uni.getStorageSync('key'):'',page_name:'官方交流群弹框',url_value:window.location.href})
- _hmt?_hmt.push(['_trackEvent','小程序版h5', '官方交流群', uni.getStorageSync('key'),'']):'';
- },
- methods: {
- downLoadImg(){
-
- this.savePicture(this.url)
- },
- savePicture(Url) {
- var blob = new Blob([''], { type: 'application/octet-stream' });
- var url = URL.createObjectURL(blob);
- var a = document.createElement('a');
- a.href = Url;
- a.download = Url.replace(/(.*\/)*([^.]+.*)/ig, "$2").split("?")[0];
- var e = document.createEvent('MouseEvents');
- e.initMouseEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
- a.dispatchEvent(e);
- URL.revokeObjectURL(url);
- },
- closeMask(){
- this.$emit('closeMask')
- }
- }
- }
- </script>
- <style>
- .mask{
- width: 100%;
- height: 100vh;
- background: rgba(0,0,0,0.5);
- position: fixed;
- top: 0;
- left: 0;
- z-index: 99;
- }
- .content{
- width: 622rpx;
- height: 600rpx;
- background: #FFFFFF;
- border-radius: 12rpx;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- margin: auto;
- padding-top: 84rpx;
- }
- .close{
- width: 40rpx;
- height: 40rpx;
- position: absolute;
- top: 20rpx;
- right: 20rpx;
- }
- .title{
- color: #000000;
- font-size: 40rpx;
- line-height: 44rpx;
- text-align: center;
- font-weight: bold;
- }
- .image{
- width: 380rpx;
- height: 234rpx;
- display: block;
- margin: auto;
- margin-top: 40rpx;
- }
- .copyButton{
- width: 540rpx;
- height: 80rpx;
- background: #2762FF;
- border-radius: 8rpx;
- color: #FFFFFF;
- font-size: 32rpx;
- line-height: 80rpx;
- text-align: center;
- margin-top: 40rpx;
- }
- .claimEvmHint{
- font-size: 26rpx;
- color: #666;
- text-align: center;
- }
- </style>
|