agreement.js 591 B

1234567891011121314151617181920212223242526272829303132333435
  1. // pages/login/modules/agreement.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. isAgree: {
  8. type: Boolean
  9. },
  10. callBack: {
  11. type: Function
  12. }
  13. },
  14. /**
  15. * 组件的初始数据
  16. */
  17. data: {
  18. },
  19. /**
  20. * 组件的方法列表
  21. */
  22. methods: {
  23. /* 修改授权 */
  24. isAgreeChange() {
  25. let isAgree = !this.data.isAgree
  26. this.setData({
  27. isAgree
  28. })
  29. this.triggerEvent("callBack", isAgree)
  30. }
  31. }
  32. })