C端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
823 B

  1. const app = getApp()
  2. Component({
  3. properties: {
  4. background: {
  5. type: String,
  6. value: '#F4F5F9'
  7. },
  8. color: {
  9. type: String,
  10. value: '#000'
  11. },
  12. text: {
  13. type: String,
  14. value: 'Wechat'
  15. },
  16. back: {
  17. type: Boolean,
  18. value: false
  19. },
  20. home: {
  21. type: Boolean,
  22. value: false
  23. }
  24. },
  25. data: {
  26. statusBarHeight: app.statusBarHeight + 'px',
  27. navigationBarHeight: (app.statusBarHeight + 44) + 'px'
  28. },
  29. ready(){
  30. let pages = getCurrentPages();
  31. if (pages&&pages.length>0){
  32. this.setData({
  33. back:false
  34. })
  35. }
  36. },
  37. methods: {
  38. backHome: function () {
  39. wx.switchTab({
  40. url: '/pages/main/index',
  41. })
  42. },
  43. back: function () {
  44. wx.navigateBack({
  45. delta: 1
  46. })
  47. }
  48. }
  49. })