index.js 758 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // index.js
  2. // 获取应用实例
  3. const app = getApp()
  4. import {
  5. VueLikePage
  6. } from '../../utils/page'
  7. import { CDN_URL } from '../../config/index'
  8. import Router from '../../utils/routes'
  9. VueLikePage([],{
  10. data:{
  11. cdn_url:CDN_URL,
  12. current:'',
  13. id:''
  14. },
  15. methods:{
  16. onLoad:function (options) {
  17. let { id,name } = options
  18. this.setData({
  19. current:`${this.data.cdn_url}/video/${id}.mp4?v=${Math.random()}`,
  20. id
  21. })
  22. wx.setNavigationBarTitle({
  23. title: name
  24. })
  25. },
  26. loadcompele(){
  27. this.setData({
  28. loadCompele: true
  29. })
  30. },
  31. tapToCamera(){
  32. Router.push({
  33. url: 'camera',
  34. query: {
  35. id:this.data.id
  36. }
  37. })
  38. }
  39. }
  40. })