当前位置:网站首页>Uni app screenshot with canvas and share friends
Uni app screenshot with canvas and share friends
2022-06-12 08:04:00 【Wangxiaomin】
<template>
<view class="content">
<!-- <view class="beijing"> -->
<view class="post" v-show="tishi==1" >
<p style="color: #ffffff;font-size: 35upx;margin-top: 70upx;"> Long press to share with friends </p>
<view class="content" style="text-align: center;width: 85%;margin: 0 auto;">
<view style="padding-top: 20upx;margin-top: 30upx;background: #ffffff;">
<view @click="guanbi" >
<img id="test" style="width: 580upx;height: 954upx;"/>
</view>
</view>
</view>
<!-- #ifdef APP-PLUS -->
<image @click="guanbi" class="cha" style="width: 80upx;height: 80upx; margin-top: 25upx;margin-left: 47%;"></image>
<!-- #endif -->
<!-- #ifdef H5 -->
<image @click="guanbi" class="cha" style="width: 80upx;height: 80upx; margin-top: 25upx; margin: 0;"></image>
<!-- #endif -->
</view>
<!-- </view> -->
<view class="tupian" @click="erweima" style="text-align: center;"></view>
</view>
</template>
<script>
import canvas_x from '../../common/canvas_x.js';
export default {
data() {
return {
tishi:0,
userid:0,
img:"",
phone:"",
poster: {},
qrShow: false,
canvasId: 'default_PosterCanvasId',
nickname:"",
val:"",
lastPic:''
};
},
onLoad(option) {
// QR code address ( The address can be obtained from the background for assignment )
this.val='http://www.dreamgo.cn/h8'
},
methods: {
guanbi:function(){
this.tishi=0;
},
erweima:function(){
let that=this;
this.tishi=1;
canvas_x.makeImage({
type: 'url',
parts: [
{
type: 'image',
url: 'https://wangnode.oss-cn-beijing.aliyuncs.com/stjimg/liuan01.jpg',
width: 680,
height: 1264,
// backgroundSize:680,
},
{
type: 'qrcode',
text: this.val,
x: 80,
y: -230,
width: 170,
height: 170,
padding: 0,
background: '#fff',
level: 3
},
{
type: 'text',
text: ' Commitment person : Wang Min ',
textAlign: 'left',
lineAlign: 'TOP',
x: 340,
y: 835,
color: 'black',
size: '30px',
// bold: true
},
{
type: 'text',
text:'2022-06-05 01:05:34',
textAlign: 'left',
lineAlign: 'TOP',
x: 340,
y: 895,
color: 'black',
size: '30px',
// bold: true
},
{
type: 'text',
text:' You are the first 112 Commitment persons ',
textAlign: 'left',
lineAlign: 'TOP',
x: 340,
y: 955,
color: 'black',
size: '30px',
// bold: true
}
],
width: 680,
height: 1264
}, (err, data) => {
document.getElementById('test').src = data;
that.lastPic=data;
console.log(11,that.lastPic)
})
}
}
};
</script>
<style lang="scss">
.post {
width: 100%;
height: 100%;
background-color:rgba(0,0,0,0.7);
position: fixed;
top: 0upx;
z-index: 10000;
text-align: center;
.wrapper {
height: 1420upx;
width: 610upx;
margin: 0 auto;
margin-top: -150upx;
// margin-top: 50upx;
}
}
.tupian{
width: 100%;
height: 1360upx;
background-image: url('../../static/liuan01.jpeg');
background-size:750upx 1360upx ;
}
.cha{
background-image: url('../../static/chacha.png');background-size: 80upx 80upx;
position: relative;
top: 40upx
}
</style>
边栏推荐
- Kalman filter encapsulation function
- Vision Transformer | Arxiv 2205 - LiTv2: Fast Vision Transformers with HiLo Attention
- Topic 1 Single_ Cell_ analysis(4)
- Compiling principle on computer -- function drawing language (III): parser
- MSE (mean square error) calculation package function
- OpenMP task 原理与实例
- 802.11 protocol: wireless LAN protocol
- [RedisTemplate方法详解]
- Topic 1 Single_ Cell_ analysis(1)
- DUF:Deep Video Super-Resolution Network Using Dynamic Upsampling Filters ...阅读笔记
猜你喜欢

Search and rescue strategy of underwater robot (FISH)

Servlet advanced

Three data exchange modes: line exchange, message exchange and message packet exchange

Pytorch profiler with tensorboard.
![FPGA based communication system receiver [packet detection] development document](/img/50/0d15abc41c6e373b00fa05e299566a.jpg)
FPGA based communication system receiver [packet detection] development document

Vision Transformer | CVPR 2022 - Vision Transformer with Deformable Attention

Topic 1 Single_Cell_analysis(4)

Explanation and explanation on the situation that the volume GPU util (GPU utilization) is very low and the memory ueage (memory occupation) is very high during the training of pytoch

The project file contains toolsversion= "14.0". This toolset may be unknown or missing workarounds

Meter Reading Instrument(MRI) Remote Terminal Unit electric gas water
随机推荐
CONDA reports an error when creating a virtual environment, and the problem is solved
R language dplyr package mutate_ At function and one_ The of function converts the data type of a specified data column (specified by a vector) in dataframe data to a factor type
2021.10.31-11.1 scientific research log
计组第一章
PPP agreement
Interview questions on mobile terminal, Android and IOS compatibility
Conda crée un environnement virtuel pour signaler les erreurs et résoudre les problèmes
Leetcode notes: biweekly contest 71
Ten important properties of determinant
El expression and JSTL
Explanation and explanation on the situation that the volume GPU util (GPU utilization) is very low and the memory ueage (memory occupation) is very high during the training of pytoch
Servlet advanced
Topic 1 Single_Cell_analysis(1)
2021.10.24-25 scientific research log
Leetcode notes: Weekly contest 295
The computer is connected to WiFi but can't connect to the Internet
Literature reading: deep neural networks for YouTube recommendations
Ceres optimizer usage (self use)
Meter Reading Instrument(MRI) Remote Terminal Unit electric gas water
Vision Transformer | CVPR 2022 - Vision Transformer with Deformable Attention