index.ts 811 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. const AuthStepType = {
  2. ONE: 1,
  3. TWO: 2,
  4. THREE: 3,
  5. }
  6. Component({
  7. options: {
  8. multipleSlots: true,
  9. addGlobalClass: true,
  10. },
  11. properties: {
  12. currAuthStep: {
  13. type: Number,
  14. value: AuthStepType.ONE,
  15. },
  16. userInfo: {
  17. type: Object,
  18. value: {},
  19. },
  20. isNeedGetUserInfo: {
  21. type: Boolean,
  22. value: false,
  23. },
  24. },
  25. data: {
  26. defaultAvatarUrl:
  27. 'https://cdn-we-retail.ym.tencent.com/miniapp/usercenter/icon-user-center-avatar@2x.png',
  28. AuthStepType,
  29. },
  30. methods: {
  31. gotoUserEditPage() {
  32. this.triggerEvent('gotoUserEditPage')
  33. },
  34. toLogin(e: WechatMiniprogram.CustomEvent) {
  35. this.triggerEvent('toLogin', {})
  36. },
  37. toSetting(e: WechatMiniprogram.CustomEvent) {
  38. this.triggerEvent('toSetting', {})
  39. },
  40. },
  41. })