C端小程序
No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

65 líneas
1.7 KiB

  1. const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {}
  2. let ifStoreApp = extConfig.attr.ifStoreApp;
  3. Component({
  4. data: {
  5. selected: 0,
  6. "color": "#abb1be",
  7. "selectedColor": "#FD782D",
  8. "list": [
  9. {
  10. "pagePath": "/index/index",
  11. "iconPath": "../assets/images/home.png",
  12. "selectedIconPath": "../assets/images/home-a.png",
  13. "text": "首页"
  14. },
  15. {
  16. "pagePath": "/index/searchbar",
  17. "iconPath": "../assets/images/mendian.png",
  18. "selectedIconPath": "../assets/images/mendian-a.png",
  19. "text": "门店"
  20. },
  21. {
  22. "pagePath": "/index/passCar",
  23. "iconPath": "../assets/images/park.png",
  24. "selectedIconPath": "../assets/images/park-a.png",
  25. "text": "停车"
  26. },
  27. {
  28. "pagePath": "/index/user",
  29. "iconPath": "../assets/images/user.png",
  30. "selectedIconPath": "../assets/images/user-a.png",
  31. "text": "我的"
  32. }
  33. ]
  34. },
  35. attached() {
  36. if (ifStoreApp==1){
  37. this.setData({
  38. list: [
  39. {
  40. "pagePath": "/index/index",
  41. "iconPath": "../assets/images/home.png",
  42. "selectedIconPath": "../assets/images/home-a.png",
  43. "text": "首页"
  44. },
  45. {
  46. "pagePath": "/index/user",
  47. "iconPath": "../assets/images/user.png",
  48. "selectedIconPath": "../assets/images/user-a.png",
  49. "text": "我的"
  50. }
  51. ]
  52. })
  53. }
  54. },
  55. methods: {
  56. switchTab(e) {
  57. const data = e.currentTarget.dataset
  58. const url = data.path
  59. wx.switchTab({url})
  60. this.setData({
  61. selected: data.index
  62. })
  63. }
  64. }
  65. })