auth-popup.js 727 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. const getThree = require("/utils/getThree/zfb_getThree")
  2. import { protocolEnum, protocolNavigateTo } from '/utils/common/protocol'
  3. Component({
  4. data: {
  5. name: null,
  6. show: false,
  7. protocolEnum: protocolEnum
  8. },
  9. props: {},
  10. methods: {
  11. open(name) {
  12. this.setData({
  13. show: true
  14. })
  15. if(name) {
  16. this.setData({
  17. name
  18. })
  19. }
  20. },
  21. onClose() {
  22. this.setData({ show: false })
  23. },
  24. gotoInfo() {
  25. // this.onClose()
  26. },
  27. protocol(e) {
  28. protocolNavigateTo(e.currentTarget.dataset.type)
  29. },
  30. getAuth() {
  31. this.onClose()
  32. getThree((authResult) => {
  33. this.triggerEvent('authResult', authResult)
  34. })
  35. }
  36. }
  37. })