index.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. const _my = require("../../__antmove/api/index.js")(my);
  2. const wx = _my;
  3. // components/navigator/index.js
  4. const app = getApp();
  5. Component({
  6. /**
  7. * 组件的属性列表
  8. */
  9. properties: {
  10. title: {
  11. type: String,
  12. value: "杭州壹芯"
  13. },
  14. showArrow: {
  15. type: Boolean,
  16. value: true
  17. },
  18. titleStyle: {
  19. type: String,
  20. value: "black"
  21. },
  22. bgColor: {
  23. type: String,
  24. value: "white"
  25. }
  26. },
  27. externalClasses: [],
  28. /**
  29. * 组件的初始数据
  30. */
  31. data: {
  32. statusBarHeight: 0,
  33. titleBarHeight: 0,
  34. },
  35. /**
  36. * 组件的方法列表
  37. */
  38. methods: {
  39. back() {
  40. if (this.data.showArrow) {
  41. wx.navigateBack({
  42. delta: 1
  43. });
  44. } else {
  45. wx.reLaunch({
  46. url: '/pages/resitor_scence/resitor_scence'
  47. })
  48. }
  49. },
  50. antmoveAction: function () {
  51. //执行时动态赋值,请勿删除
  52. }
  53. },
  54. onInit: function() {
  55. this.setData({
  56. statusBarHeight: app.globalData.statusBarHeight,
  57. titleBarHeight: app.globalData.titleBarHeight
  58. })
  59. }
  60. });