当前位置:网站首页>uni-app用canvas截屏并且分享好友
uni-app用canvas截屏并且分享好友
2022-06-12 07:58:00 【汪小敏同学】
http://链接: https://pan.baidu.com/s/1TRiiErZPgFVtXi6tUtlG3g?pwd=aa1r 提取码: aa1r --来自百度网盘超级会员v4的分享
<template>
<view class="content">
<!-- <view class="beijing"> -->
<view class="post" v-show="tishi==1" >
<p style="color: #ffffff;font-size: 35upx;margin-top: 70upx;">长按分享给朋友</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) {
//二维码地址(可从后台获取地址进行赋值)
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: '承诺人:汪敏',
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:'你是第112位承诺人',
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>
边栏推荐
- How to standardize the creation of a pytorch project
- Fundamentals of Mathematics - Taylor Theorem
- Principes et exemples de tâches OpenMP
- Meter Reading Instrument(MRI) Remote Terminal Unit electric gas water
- LeetCode笔记:Biweekly Contest 79
- Voice assistant -- Qu -- semantic role annotation and its application
- 2021.11.3-7 scientific research log
- 2021.11.2 scientific research log
- Leetcode notes: Weekly contest 279
- 2D visualization of oil storage, transportation and production, configuration application enables intelligent development of industry
猜你喜欢

20220526 yolov1-v5

『Three.js』辅助坐标轴

System service configuration service - detailed version

Search and rescue strategy of underwater robot (FISH)

Primal problem and dual problem

Leverage contextual information

Process terminated

Chapter V - message authentication and digital signature
![[RedisTemplate方法详解]](/img/ef/66d8e3fe998d9a788170016495cb10.png)
[RedisTemplate方法详解]

Literature reading: deep neural networks for YouTube recommendations
随机推荐
Conda創建虛擬環境報錯,問題解决
OpenMP task 原理与实例
Pytorch installation (GPU) in Anaconda (step on pit + fill pit)
Chapter V - message authentication and digital signature
Visual studio code batch comment and uncomment
Mathematical knowledge - matrix - matrix / vector derivation
Numerical calculation method chapter6 Iterative method for solving linear equations
Utilize user behavior data
Solve mapper duplication problem in reverse engineering
Database connection pool and dbutils tool
Compiling principle on computer -- functional drawing language (IV): semantic analyzer
连接数据库却无法修改数据
The R language converts the data of the specified data column in the dataframe data from decimal to percentage representation, and the data to percentage
The R language catools package divides the data, the scale function scales the data, the KNN function of the class package constructs a k-nearest neighbor classifier, and compares the model accuracy u
MinGW offline installation package (free, fool)
从AC5到AC6转型之路(1)——补救和准备
Process terminated
L'effet de l'oie sauvage sur l'économie numérique verte de Guilin
Multithread decompression of tar
Primal problem and dual problem