知識
不管是網(wǎng)站,軟件還是小程序,都要直接或間接能為您產(chǎn)生價值,我們在追求其視覺表現(xiàn)的同時,更側重于功能的便捷,營銷的便利,運營的高效,讓網(wǎng)站成為營銷工具,讓軟件能切實提升企業(yè)內(nèi)部管理水平和效率。優(yōu)秀的程序為后期升級提供便捷的支持!
微信小程序-基于colorui構建皮皮蝦短視頻去水印組件
發(fā)表時間:2021-1-5
發(fā)布人:葵宇科技
瀏覽次數(shù):93
微信小程序--基于colorui構建皮皮蝦短視頻去水印組件
沒錯,我是皮友,我想學習舞蹈(/doge)和瑜伽 ,要無水印的那種有助于我加深學習。
1.組件效果展示
2.組件引入準備
https://spider.apisev.cn
加入合法request
域名列表s- 如果需要下載視頻功能的話,把
https://v6-ppx.ixigua.com
加入downloadFile
合法域名列表 - 樣式基于
colorui
,請在全局或者組件樣式文件內(nèi)引入colorui
3.組件引入并使用
-
組件建議在一個空白頁面進行引入,配置
json
文件
"navigationStyle": "custom"//自定義需要配置的內(nèi)容
或者也可以在全局引入該配置
"usingComponents": {
"spider":"components/spider/spider"
}
在頁面中使用組件
<spider> spider>
4.API構建思路
- 根據(jù)短鏈接請求的
response
溯源視頻的item_id
信息 - 配置合理的
header
置換真實的視頻地址 - 根據(jù)
item_id
請求api
置換無水印視頻地址 - 請求結果存放在緩存中,如果短時間內(nèi)有類似查詢,可以迅速返回結果
age = 3600 * 24
不提供接口源碼,不做盈利使用,僅供皮友們學習娛樂
5.去水印插件
可以刪除uload,那是我自定義的loading
動畫,可以使用 wx.showLoading
來替代
spider.js
// components/spider/spider.js
Component({
options: {
addGlobalClass: true,
multipleSlots: true
},
/**
* 組件的屬性列表
*/
properties: {
},
/**
* 組件的初始數(shù)據(jù)
*/
data: {
url:'',
vis:false,
mname:'',
videourl:''
},
/**
* 組件的方法列表
*/
methods: {
hideModal(e) {
this.setData({
mname: null
})
},
urlinput(e){
this.setData({
url:e.detail.value
})
},
parse(){
var url = this.data.url;
this.setData({vis:true})
wx.request({
url: 'https://spider.apisev.cn/cvideo/v1/pipixia?url='+url,
success:res=>{
console.log(res)
this.setData({
vis:false,
mname:'bt',
videourl:res.data.videourl
})
},
fail:res=>{
console.log(res)
}
})
}
}
})
spider.wxml
<cu-custom bgColor="bg-gradual-blue" isBack="{{true}}">
<view slot="backText">返回view>
<view slot="content">去水印解析view>
cu-custom>
<view class="cu-form-group margin-top">
<textarea maxlength="-1" disabled="{{modalName!=null}}" bindinput="urlinput" placeholder="請輸入視頻鏈接">textarea>
view>
<view class="padding flex flex-direction">
<button class="cu-btn bg-green margin-tb-sm lg" bindtap="parse">解析button>
view>
<uload
visible="{{vis}}"
text="正在解析"
>
uload>
<view class="cu-modal bottom-modal {{mname=='bt'?'show':''}}">
<view class="cu-dialog">
<view class="cu-bar bg-white">
<view class="action text-green">下載view>
<view class="action text-blue" bindtap="hideModal">關閉view>
view>
<view class="padding-xl">
<video src="{{videourl}}" >video>
view>
view>
view>
"window": {
"navigationStyle": "custom"
}
全局引入組件并使用
相關案例查看更多
相關閱讀
- 小程序開發(fā)課程
- 云南網(wǎng)站制作哪家好
- 云南小程序開發(fā)公司哪家好
- 網(wǎng)站上首頁
- 網(wǎng)站建設公司網(wǎng)站
- 手機網(wǎng)站建設
- 云南網(wǎng)站建設公司排名
- 云南做軟件
- 小程序設計
- 軟件定制
- web
- web教程
- 北京小程序制作
- 微信小程序開發(fā)入門課程
- 云南etc微信小程序
- 做網(wǎng)站
- 汽車報廢拆解管理系統(tǒng)
- 云南網(wǎng)站建設公司地址
- 昆明小程序定制開發(fā)
- 昆明軟件公司
- 百度推廣
- 云南網(wǎng)站建設電話
- 網(wǎng)站建設需要多少錢
- 云南軟件開發(fā)
- 云南網(wǎng)站建設百度
- 網(wǎng)站建設首選公司
- 網(wǎng)站排名
- 云南網(wǎng)站建設一條龍
- 汽車報廢回收軟件
- 云南網(wǎng)站建設特性