// component/uploadVideo/uploadVideo.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    pics:[],
    // 视频
    video: '',
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //点击上传图片
    uploadVideo(){
      console.log('1111')
      this.chooseVideo()
    },

    //选取图片
    chooseVideo(){
      let that = this;
      let pics = this.data.pics;
      wx.chooseVideo({
        sourceType: ['album','camera'],
        maxDuration: 60,
        camera: 'back',
        success(res) {
          console.log(res.tempFilePath)
          const video = res.tempFilePath;
          that.setData({
            video: video
          })
        }
      })
    }
  }
})
