当前位置:网站首页>抖音实战~分享模块~短视频下载(保存到相册)
抖音实战~分享模块~短视频下载(保存到相册)
2022-06-26 18:49:00 【gblfy】

文章目录
一、可见范围
保存到相册、复制链接、二维码 都是前端完成的
1. 自己发布短视频
自己发布的短视频会有“保存到相册、复制链接、二维码、转为私密”
2. 其他人发布短视频
其他人发布短视频,自己只能看到“保存到相册、复制链接、二维码”
二、源码分析
2.1. 底部窗口popup
<view>
<!-- 底部窗口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. 实现组件uni-popup 弹出层
插件链接:https://ext.dcloud.net.cn/plugin?id=329
组件案例:
2.3. 插件涉及组件
插件包括4种组件:“uni-popup-comments、uni-popup-dialog、uni-popup-message、uni-popup-share”
2.4. 组件改造
uni-popup-share
2.5. 关键的api
官网api:
uni.uploadFile(OBJECT)
uni.saveVideoToPhotosAlbum
涉及关键的api:uni.downloadFile、uni.saveVideoToPhotosAlbum

三、作品鉴赏
3.1. 自己发布视频

3.2. 其他人发布视频

3.3. 保存短视频

边栏推荐
- To: Apple CEO Cook: great ideas come from constantly rejecting the status quo
- 9. Intelligent transportation project (2)
- Development principle analysis and source code of dapp-lp single and dual currency liquidity pledge mining system
- 关于不等式取值转义的思路
- Image binarization
- 8VC Venture Cup 2017 - Final Round C. Nikita and stack
- Minimum spanning tree, shortest path, topology sorting, critical path
- 【Mysql系列】工作常用sql集锦(持续更新)
- 手机影像内卷几时休?
- Reading notes: process consulting III
猜你喜欢

Do you know how to compare two objects

Selection of database paradigm and main code

Project practice 5: build elk log collection system

Leetcode interview question 29 clockwise print matrix

Image binarization

Decompilation of zero time technology smart contract security series articles

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

On the escape of inequality value

Convex hull problem

When does the mobile phone video roll off?
随机推荐
Jsonutils tool class (based on Alibaba fastjson)
Example of using QPushButton style (and method of adding drop-down menu to button SetMenu)
ROS查询话题具体内容常用指令
为什么我不推荐去SAP培训机构参加培训?
Résumé des points de connaissance
Conditional compilation in precompiling instructions
問題解决:虛擬機無法複制粘貼文件
Tag dynamic programming - preliminary knowledge for question brushing -2 0-1 knapsack theory foundation and two-dimensional array solution template
The king of Internet of things protocol: mqtt
Project practice 5: build elk log collection system
To: Apple CEO Cook: great ideas come from constantly rejecting the status quo
9. Intelligent transportation project (2)
Redis single sign on system + voting system
【推荐收藏】这8个常用缺失值填充技巧一定要掌握
Some basic mistakes
Enter n integers and output the number of occurrences greater than or equal to half the length of the array
【Mysql系列】工作常用sql集锦(持续更新)
ROS query topic specific content common instructions
Clion breakpoint single step debugging
Convex hull problem