当前位置:网站首页>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


边栏推荐
- 【推荐收藏】这8个常用缺失值填充技巧一定要掌握
- DVD digital universal disc
- 数据库范式和主码的选择
- IK word breaker
- 品达通用权限系统(Day 1~Day 2)
- Clion编译catkin_ws(ROS工作空间包的简称)加载CMakeLists.txt出现的问题
- DAPP丨LP单双币流动性质押挖矿系统开发原理分析及源码
- Publish message publishers and subscribe message subscribers of ROS
- Micro service single sign on system (SSO)
- 零时科技 | 智能合约安全系列文章之反编译篇
猜你喜欢

Project practice 6: distributed transaction Seata

Boot的单元测试

Convex hull problem

抖音实战~搜索页面~扫描二维码

Minimum spanning tree, shortest path, topology sorting, critical path

Numpy之matplotlib

Tree array

Feign远程调用

Decompilation of zero time technology smart contract security series articles

Record of user behavior log in SSO microservice Engineering
随机推荐
Feign remote call
【推荐收藏】这8个常用缺失值填充技巧一定要掌握
uni-app使用canvas绘制二维码
刷新三观的HP-UX系统中的强指针赋值出core问题
成功解决之Jenkins报错:The goal you specified requires a project to execute but there is no POM
Solidity - 合约继承子合约包含构造函数时报错 及 一个合约调用另一合约view函数收取gas费用
8VC Venture Cup 2017 - Final Round C. Nikita and stack
How to create and enforce indexes
Pinda general permission system (day 3~day 4)
物联网协议的王者:MQTT
深度学习之Numpy篇
mysql的充值问题
项目实战四:用户登录及token访问验证(reids+jwt)
Web resource preloading - production environment practice
品达通用权限系统(Day 3~Day 4)
MySQL recharge
Clion compiling catkin_ WS (short for ROS workspace package) loads cmakelists Txt problems
Summary of several common UML diagrams
Boyun, standing at the forefront of China's container industry
抖音实战~分享模块~生成短视频二维码