欧美三级国产三级日韩三级_亚洲熟妇丰满大屁股熟妇_欧美亚洲成人一区二区三区_国产精品久久久久久模特

微信小程序-基于colorui構建皮皮蝦短視頻去水印組件 - 新聞資訊 - 云南小程序開發(fā)|云南軟件開發(fā)|云南網(wǎng)站建設-昆明葵宇信息科技有限公司

159-8711-8523

云南網(wǎng)建設/小程序開發(fā)/軟件開發(fā)

知識

不管是網(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.組件引入準備

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

3.組件引入并使用

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

 "navigationStyle": "custom"//自定義需要配置的內(nèi)容

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

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

在頁面中使用組件

  1. 
    <spider>
    spider>
    

4.API構建思路

  1. 根據(jù)短鏈接請求的response溯源視頻的item_id信息
  2. 配置合理的header置換真實的視頻地址
  3. 根據(jù)item_id請求api置換無水印視頻地址
  4. 請求結果存放在緩存中,如果短時間內(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"
    }
    
  • 全局引入組件并使用

  • 相關案例查看更多