share.vue 1.1 KB
<template>
	<view>
		<view class="page-content">
			<image mode="widthFix" :src="src"></image>
		</view>
		<view class="page-tabbar">
			<view class="page-tabbar-tip" @click="save">保存海报去分享</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				src: 'https://img2.ydniu.com/app/cd/202204122204/%E5%BF%AB%E4%B9%908%E5%9F%BA%E6%9C%AC%E8%B5%B0%E5%8A%BF%E5%9B%BE.png'
			}
		},
		async onLoad(e) {},
		methods: {
			save() {
				//#ifdef H5
				require('@/static/js/h5-utils.js').downloadIamge(this.src)
				//#endif
			}
		}
	}
</script>

<style lang="scss" scoped>
	.page-content {}

	.page-content image {
		width: 90%;
		margin: 10px 5%;
	}

	.page-tabbar {
		display: flex;
		position: fixed;
		max-width: $sys-max-width;
		bottom: 0;
		width: 100%;
		height: 44px;
		background-color: #F8F8F8;
		justify-content: space-around;
		font-size: 16px;
		color: #333333;
	}

	.page-tabbar-tip {
		width: 33%;
		height: 44px;
		line-height: 44px;
		text-align: center;
		color: #E34439;
	}
</style>