当前位置:网站首页>Tiktok practice ~ sharing module ~ generate short video QR code
Tiktok practice ~ sharing module ~ generate short video QR code
2022-06-26 19:05:00 【gblfy】



One 、 Visible range
Save to album 、 Replication link 、 QR code It is all done by the front end
1. Publish your own short video
The short video released by myself will have “ Save to album 、 Replication link 、 QR code 、 Become private ”
2. Others post short videos
Others post short videos , I can only see “ Save to album 、 Replication link 、 QR code ”
Two 、 Source code analysis
2.1. Bottom window popup
<view>
<!-- Bottom window popup -->
<uni-popup ref="comment" type="comment">
<uni-popup-comments :thisVlogerId="thisVlogerId" :thisVlogId="thisVlogId"></uni-popup-comments>
</uni-popup>
<uni-popup ref="share" background-color="#fff" type="share">
<uni-popup-share :thisVlogerId="thisVlogerId" :thisVlogId="thisVlogId" :vlogUrl="thisVlog.url"
:isPrivate="thisVlog.isPrivate"></uni-popup-share>
</uni-popup>
</view>
2.2. Implementation components uQRCode
Plug in links :https://ext.dcloud.net.cn/plugin?id=1287
Component case :
2.3. Plug ins involve components

2.4. Component modification
uQRCode be based on uqrcode.js Realization
gotoQRCode() {
uni.navigateTo({
url: "/pages/qrcode/qrcode?vlogId=" + this.thisVlogId
})
},
onReady() {
var vlogId = this.vlogId;
var content = {
type: "vlog",
content: vlogId
};
var contentStr = JSON.stringify(content);
uQRCode.make({
canvasId: 'qrcode',
componentInstance: this,
size: 170,
margin: 10,
text: contentStr,
backgroundColor: '#ffffff',
foregroundColor: '#0f0827',
fileType: 'png',
errorCorrectLevel: uQRCode.errorCorrectLevel.H
})
.then(res => {
})
},
2.5. Realization principle
- 1. In fact, generating short video QR code is the release of short video ID
- 2. When wechat scanning, only the generated QR code will be displayed type and content Written content , Because there is no other operation on the text .
- 3. Let's Tiktok app When you scan the QR code , I did the following things :
- 3.1. The first thing is to parse the text messages behind the QR code just like wechat scanning
- 3.2. Get short video publishing ID after , Calling the backend short video details api Interface
- 3.3. After calling the interface , There are short video information to video processing for short video details ( It's just a preview of a short video ), The principle is the same as that of the search page .
The implementation principle flow chart will be supplemented later , Let us know in detail
3、 ... and 、 Appreciation of works
3.1. Generate short video QR code

3.2. Wechat scanning

3.3. Tiktok scanning


边栏推荐
猜你喜欢

Deep learning: numpy

Current limiting design and Implementation

Pinda general permission system (day 3~day 4)

Leetcode interview question 29 clockwise print matrix

Redis单点登陆系统+投票系统

Preliminary analysis of serial port printing and stack for arm bare board debugging

50 lines of code to crawl TOP500 books and import TXT documents

Leetcode 238 product of arrays other than itself

Boyun, standing at the forefront of China's container industry

Boot的单元测试
随机推荐
ROS query topic specific content common instructions
Eigen库计算两个向量夹角
How to create and enforce indexes
Leetcode 128 longest continuous sequence
50 lines of code to crawl TOP500 books and import TXT documents
Installation and use of logstash
零时科技 | 智能合约安全系列文章之反编译篇
自己创建一个时间拦截器
Nftgamefi chain game system development detailed solution - chain game system development principle analysis
微信小程序 uniapp 左滑 删除 带删除icon
sql 中的alter操作总结
Filebeat安装及使用
xlua获取ugui的button注册click事件
Crawl Douban to read top250 and import it into SqList database (or excel table)
問題解决:虛擬機無法複制粘貼文件
知識點總結
sql中的几种删除操作
Boyun, standing at the forefront of China's container industry
Feign remote call
Yujun product methodology