<template>
	<view>
		分享海报
		<view class="qrcode-hidden" style="height: 100px;width: 100%;">
			<tkiQrcod cid="qrcode" 
			@result="result" 
			ref="qrcode" 
			:val="qrcode" 
			onval 
			:size="340" 
			:showLoading="false" 
			/></view>
		<image src="../../static/images/empty.png" mode="aspectFill" style="width: 200rpx;height: 200rpx;"></image>
			<view class="save-pic bg-blueself discenter animation-slide-right" @click="saveIamge" data-provider="save" data-scene="">保存分享海报</view>
	</view>
</template>

<script>
	import tkiQrcode from "tki-qrcode"; // 二维码生成器
	export default {
		components: {
			tkiQrcode
		},
		data() {
			return {
				qrcode: '',
				qrcodeImg: '',
				code: ''
			}
		},
		methods: {
			result(e) {
				uni.setStorage({ key: 'shareImg', data: e })
				this.qrcodeImg = e
			},
			saveIamge(e) {
				this.share(e)
			},
		},
		onLoad() {
			this.qrcode = 'dadaa'
		}
		
	}
</script>

<style>
</style>
