index.js 926 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. Component({
  2. data: {
  3. modalVisible: false,
  4. tipText: '云开发>云模板>模板中心',
  5. },
  6. properties: {
  7. installModulePageTitleProps: String,
  8. modalVisibleProps: Boolean,
  9. tipTextProps: String,
  10. installModuleNameProps: String,
  11. },
  12. observers: {
  13. modalVisibleProps: function (modalVisibleProps) {
  14. this.setData({
  15. modalVisible: modalVisibleProps,
  16. });
  17. },
  18. tipTextProps: function (tipTextProps) {
  19. this.setData({
  20. tipText: tipTextProps,
  21. });
  22. },
  23. },
  24. methods: {
  25. hideModal() {
  26. if (this.data.modalVisible) {
  27. this.setData({
  28. modalVisible: false,
  29. });
  30. }
  31. },
  32. onViewDetail() {
  33. this.hideModal();
  34. wx.navigateTo({
  35. url: `/pages/cloudbaseModuleInstallTips/index?moduleName=${this.properties.installModuleNameProps}&title=${this.properties.installModulePageTitleProps}`,
  36. });
  37. },
  38. },
  39. });