app.config.ts 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. const appConfig = defineAppConfig({
  2. pages: [
  3. // 'pages/clock/Index',
  4. 'pages/clock/Clock',
  5. 'pages/clock/Suggest',
  6. 'pages/clock/SetGoal',
  7. 'pages/demo',
  8. 'pages/food/Food',
  9. 'pages/index/index',
  10. 'pages/account/Login',
  11. 'pages/account/Auth',
  12. 'pages/account/ChooseAuth',
  13. 'pages/clock/ChooseScenario',
  14. 'pages/clock/SetSchedule',
  15. 'pages/common/H5',
  16. 'pages/account/Profile',
  17. 'pages/metric/Metric',
  18. 'pages/activity/Activity',
  19. 'pages/common/RecordsHistory',
  20. 'pages/account/ProfileSetting',
  21. 'pages/account/Setting',
  22. 'pages/account/EditPage',
  23. 'pages/workout/Workout',
  24. 'pages/workout/WorkoutDetail',
  25. 'pages/workout/Working',
  26. 'pages/workout/History',
  27. 'pages/account/Member',
  28. 'pages/explore/Index',
  29. 'pages/clock/StreakDetail'
  30. ],
  31. entryPagePath: 'pages/clock/Clock',
  32. subPackages: [
  33. {
  34. root: 'moduleA',
  35. pages: [
  36. 'pages/third'
  37. ]
  38. }
  39. ],
  40. usingComponents: {
  41. 'mysvg': './components/basic/svg',
  42. // 't-popup':'tdesgin-miniprogram/popup/popup'
  43. },
  44. "requiredPrivateInfos": [
  45. "chooseLocation"
  46. ],
  47. "permission": {
  48. "scope.userLocation": {
  49. "desc": "获取您选择的位置...."
  50. }
  51. },
  52. // tabBar: {
  53. // custom: true,
  54. // list:[
  55. // {
  56. // pagePath: 'pages/Clock',
  57. // text: '首页',
  58. // },
  59. // {
  60. // pagePath: 'pages/Metric',
  61. // text: '第二页',
  62. // },
  63. // {
  64. // pagePath: 'pages/Activity',
  65. // text: '第三页',
  66. // },
  67. // {
  68. // pagePath: 'pages/Profile',
  69. // text: '第二页',
  70. // }
  71. // ]
  72. // },
  73. window: {
  74. "backgroundTextStyle": "light",
  75. "navigationBarBackgroundColor": "#000000",
  76. "navigationBarTitleText": "Weixin",
  77. "navigationBarTextStyle": "white",
  78. "backgroundColor": "#000000"
  79. },
  80. // darkmode: true
  81. })
  82. process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
  83. custom: true,
  84. backgroundColor: '#000',
  85. color: '#ffffff66',
  86. selectedColor: '#ffffff',
  87. borderStyle: 'black',
  88. list: [
  89. {
  90. // pagePath: 'pages/clock/Clock',
  91. pagePath: 'pages/clock/Clock',
  92. text: '生物钟',
  93. },
  94. {
  95. pagePath: 'pages/explore/Index',
  96. text: '发现',
  97. },
  98. {
  99. pagePath: 'pages/metric/Metric',
  100. text: '指标',
  101. },
  102. // {
  103. // pagePath: 'pages/food/Food',
  104. // text: '饮食',
  105. // },
  106. // {
  107. // // pagePath: 'pages/activity/Activity',
  108. // pagePath: 'pages/workout/Workout',
  109. // text: '运动',
  110. // },
  111. {
  112. pagePath: 'pages/account/Profile',
  113. text: '更多',
  114. }
  115. ]
  116. })
  117. //src/pages/rn/RNMain.tsx
  118. process.env.TARO_ENV === 'rn' && (appConfig.pages = [
  119. 'pages/rn/RNMain'
  120. ])
  121. export default appConfig;