// index.js
// 获取应用实例
const app = getApp()
import {
  VueLikePage
} from '../../utils/page'

import { CDN_URL } from '../../config/index'

import Router from '../../utils/routes'

VueLikePage([],{
  data:{
    cdn_url:CDN_URL,
    current:'',
    id:''
  },
  methods:{
    onLoad:function (options) {
      let { id,name } = options
      this.setData({
        current:`${this.data.cdn_url}/video/${id}.mp4?v=${Math.random()}`,
        id
      })
      wx.setNavigationBarTitle({
        title: name 
      })
    },
    loadcompele(){
      this.setData({
        loadCompele: true
      })
    },
    tapToCamera(){
      Router.push({
        url: 'camera',
          query: {
            id:this.data.id
          }
      })
    }
  }
})

