裂变星小程序-25.03.04
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

86 lines
1.9 KiB

  1. <template>
  2. <view>
  3. <navbar leftClick @leftClick="$utils.navigateBack" />
  4. <view class="content">
  5. <video
  6. :src="detail.videoUrl"
  7. autoplay
  8. @timeupdate="onTimeupdate"
  9. ></video>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. export default {
  15. data() {
  16. return {
  17. detail: {
  18. id: null,
  19. title: null,
  20. videoUrl: null,
  21. times: 10,
  22. qrCode: null,
  23. description: null,
  24. },
  25. isLocked: true,
  26. }
  27. },
  28. onLoad(option) {
  29. console.log('--option', option)
  30. const { id } = option
  31. this.fetchSharingDetail(id)
  32. },
  33. onShareAppMessage(res) {
  34. const {
  35. description,
  36. imageUrl,
  37. } = this.detail
  38. // todo: check
  39. let o = {
  40. title : description,
  41. imageUrl: imageUrl,
  42. // path: `/pages_order/sharing/personal?id=${this.detail.id}`
  43. query: `id=${this.detail.id}`,
  44. }
  45. // todo: check callback? settimeout?
  46. // todo: get times and check is unlocked
  47. return o
  48. },
  49. methods: {
  50. async fetchSharingDetail(id) {
  51. // todo: init data by id
  52. this.detail = {
  53. id: '001',
  54. coverImageUrl: 'http://gips3.baidu.com/it/u=70459541,3412285454&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280',
  55. videoUrl: '../static/temp-video.mp4',
  56. times: 10,
  57. qrCode: '../static/temp-qrcode.png',
  58. title: '裂变星轻松获客',
  59. description: '如此好用的赚钱项目,赶快加入吧!',
  60. auditStatus: 2,
  61. createTime: '2025年2月1日',
  62. state: -1,
  63. }
  64. },
  65. onTimeupdate(e) {
  66. console.log('--onTimeupdate', e)
  67. },
  68. openPopup() {
  69. this.$refs.popup.open();
  70. },
  71. closePopup() {
  72. this.$refs.popup.close();
  73. },
  74. },
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. </style>