当前位置:网站首页>抖音实战~分享模块~复制短视频链接
抖音实战~分享模块~复制短视频链接
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.setClipboardData(OBJECT)
涉及关键的api:uni.setClipboardData(OBJECT)
- 示例:
uni.setClipboardData({
data: 'hello',
success: function () {
console.log('success');
}
});
- 调整后
copyLink() {
uni.setClipboardData({
data: this.vlogUrl,
success:()=>{
uni.showToast({
//提示
title:'复制成功'
})
}
});
},
- 复制后链接:
在浏览器可以在线播放的
https://vkceyugu.cdn.bspapp.com/VKCEYUGU-912ebac0-be4a-440a-be59-c5bdba836d9c/76c6e411-0309-4ace-8ac4-f8c1a6fdba68.mp4
三、作品鉴赏
3.1. 自己发布视频

3.2. 复制链接


边栏推荐
- Summary of knowledge points
- Yujun product methodology
- Preliminary analysis of serial port printing and stack for arm bare board debugging
- Leetcode interview question 29 clockwise print matrix
- String string is converted to jsonarray and parsed
- Conditional compilation in precompiling instructions
- CD-CompactDisk
- Publish message publishers and subscribe message subscribers of ROS
- ROS query topic specific content common instructions
- 刷新三观的HP-UX系统中的强指针赋值出core问题
猜你喜欢
随机推荐
wm_ Concat() and group_ Concat() function
Usage and difference between ros:: spinonce() and ros:: spin()
LeetCode 面试题29 顺时针打印矩阵
[kubernetes] kubernetes principle analysis and practical application (under update)
软考备战多媒体系统
Numpy's Matplotlib
Tree array
Analysis on development technology of NFT meta universe chain game system
Image binarization
转:实事求是
Boot指标监测
Minimum spanning tree, shortest path, topology sorting, critical path
The cross compilation environment appears So link file not found problem
Boot的单元测试
Kubernetes 资源拓扑感知调度优化
爬取豆瓣读书Top250,导入sqlist数据库(或excel表格)中
The goal you specified requires a project to execute but there is no POM
物联网协议的王者:MQTT
Résolution du problème: la machine virtuelle n'a pas pu copier et coller le fichier
問題解决:虛擬機無法複制粘貼文件









