欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

微信小程序基于ColorUI構建皮皮蝦短視頻去水印組件

 更新時間:2020年11月04日 14:20:58   作者:Kindear  
這篇文章主要介紹了微信小程序-基于ColorUI構建皮皮蝦短視頻去水印組件,本文通過實例代碼給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友參考下吧

沒錯,我是皮友,我想學習舞蹈(/doge)和瑜伽 ,要無水印的那種有助于我加深學習。

1.組件效果展示

2.組件引入準備

https://spider.apisev.cn加入合法request域名列表如果需要下載視頻功能的話,把https://v6-ppx.ixigua.com加入downloadFile合法域名列表樣式基于colorui,請在全局或者組件樣式文件內引入colorui

3.組件引入并使用

組件建議在一個空白頁面進行引入,配置json文件

 "navigationStyle": "custom"http://自定義需要配置的內容

或者也可以在全局引入該配置

"window": {
 "navigationStyle": "custom"
}

2.全局引入組件并使用

"usingComponents": {
 "spider":"components/spider/spider"
 }

在頁面中使用組件

<!--么錯,就是這么簡單-->
<spider>
</spider>

4.API構建思路

  1. 根據(jù)短鏈接請求的response溯源視頻的item_id信息
  2. 配置合理的header置換真實的視頻地址
  3. 根據(jù)item_id請求api置換無水印視頻地址
  4. 請求結果存放在緩存中,如果短時間內有類似查詢,可以迅速返回結果 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>

參考文檔

CVideo 接口文檔 皮皮蝦無水印接口V1 - CVideo接口文檔 - 飛光 (apisev.cn)

到此這篇關于微信小程序-基于ColorUI構建皮皮蝦短視頻去水印組件(僅供學習使用)的文章就介紹到這了,更多相關微信小程序短視頻去水印內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!

相關文章

最新評論