<!-- 这个是商户端微信认证所需的h5页面，三个端只有用户端有h5,故把商户端的微信认证h5页面放在此处一起打包 -->
<template>
	<view>
		<u-mask :show="show" >
			<view class="warp" style="margin-top: -50rpx;">
				<image :show-menu-by-longpress="true" @error="error" style="width: 70%;" :src="src" mode="widthFix">
				</image>
				<view class="text-white text-sm margin-top-20">
					<text>长按二维码关注公众号认证信息</text>
				</view>
			</view>
		</u-mask>
	</view>
</template>

<script>
	export default {
		name: '',
		data() {
			return {
				show: true,
				src: ''
			};
		},
		onLoad(options) {
			this.src = options.src
			if (this.$isEmpty(this.src)) {
				this.$dialog.showModalAndBack('二维码获取失败')
				return
			}
		},
		methods: {
			error() {
				this.$dialog.showModalAndBack('二维码加载失败')
			},
			async saveImg() {
				let res = await this.$mpi.downloadFile(this.src)
				this.$mpi.saveImg(res)
			}
		}
	};
</script>

<style lang="scss" scoped>
	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		flex-direction: column;
		height: 100%;
	}
</style>
