代码:
<template>
<view class="body">
<canvas id="posters" class="canvas" type="2d" :style="{width:width+'px',height:height+'px'}"
canvas-id="posters"></canvas>
<image class="bg" :src="$common.image('/static/bgImg.png')" mode=""></image>
<view class="content">
<view class="topLogo">
<image class="logoImage" :src="$common.image('/static/logo.png')" mode=""></image>
</view>
<view class="spreadBox">
<image class="spreadCode" :src="$common.imageNet(mCodeImage)" mode=""></image>
</view>
<view class="button">
<text class="button2" @click="download()">
保存分享
</text>
</view>
</view>
</view>
</template>
<script>
import UQRCode from '@/common/uqrcode.js'
export default {
data() {
return {
mCodeImage: '',
poster: '',
width: 676,
height: 1010,
canvas: null,
ctx: null,
sys: null,
bodyHeight: 0,
qrocdeUrl: '',
posterUrl: '',
}
},
onReady() {
this.renderCanvas()
},
onLoad(options) {
this.sys = this.$common.getSys()
this.getCodes(