invite.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import Vue from 'vue'
  2. import lib from 'lib'
  3. import Clipboard from 'clipboard'
  4. export default {
  5. data() {
  6. return {
  7. winHeight : 0,
  8. cover : lib.formatHttpProtocol(lib.getParam("cover")),
  9. nick : lib.getParam("nick"),
  10. bonus : lib.getParam("bonus"),
  11. code : lib.getParam("code"),
  12. clipboard: null
  13. }
  14. },
  15. mounted() {
  16. this.winHeight = $(window).height()
  17. this.clipboard = new Clipboard(this.$refs.copy)
  18. },
  19. activated() {
  20. lib.setTitle("百万奥斯卡-微剧院")
  21. lib.setWxShare({
  22. title : `${this.nick}在【百万奥斯卡-微剧院】平分10万奖金啦!`,
  23. desc : "影视知识大问答,百万奖金等你拿。",
  24. link : location.href,
  25. imgUrl: `//h5-glance.duowan.com/build/logo-oscar.png`
  26. })
  27. },
  28. methods: {
  29. copy(){
  30. this.clipboard.on('success', function () {
  31. location.href = lib.downloadUrl
  32. });
  33. }
  34. }
  35. }