app.config.ts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. 'pages/notification/setting'
  31. ],
  32. entryPagePath: 'pages/clock/Clock',
  33. // subPackages: [
  34. // {
  35. // root: 'moduleA',
  36. // pages: [
  37. // 'pages/third'
  38. // ]
  39. // }
  40. // ],
  41. usingComponents: {
  42. 'mysvg': './components/basic/svg',
  43. // 't-popup':'tdesgin-miniprogram/popup/popup'
  44. },
  45. "requiredPrivateInfos": [
  46. "chooseLocation"
  47. ],
  48. "permission": {
  49. "scope.userLocation": {
  50. "desc": "获取您选择的位置...."
  51. }
  52. },
  53. // tabBar: {
  54. // custom: true,
  55. // list:[
  56. // {
  57. // pagePath: 'pages/Clock',
  58. // text: '首页',
  59. // },
  60. // {
  61. // pagePath: 'pages/Metric',
  62. // text: '第二页',
  63. // },
  64. // {
  65. // pagePath: 'pages/Activity',
  66. // text: '第三页',
  67. // },
  68. // {
  69. // pagePath: 'pages/Profile',
  70. // text: '第二页',
  71. // }
  72. // ]
  73. // },
  74. window: {
  75. "backgroundTextStyle": "light",
  76. "navigationBarBackgroundColor": "#000000",
  77. "navigationBarTitleText": "Weixin",
  78. "navigationBarTextStyle": "white",
  79. "backgroundColor": "#000000"
  80. },
  81. // darkmode: true
  82. })
  83. process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
  84. custom: true,
  85. backgroundColor: '#000',
  86. color: '#ffffff66',
  87. selectedColor: '#ffffff',
  88. borderStyle: 'black',
  89. list: [
  90. {
  91. // pagePath: 'pages/clock/Clock',
  92. pagePath: 'pages/clock/Clock',
  93. text: '生物钟',
  94. },
  95. {
  96. pagePath: 'pages/explore/Index',
  97. text: '发现',
  98. },
  99. {
  100. pagePath: 'pages/metric/Metric',
  101. text: '指标',
  102. },
  103. // {
  104. // pagePath: 'pages/food/Food',
  105. // text: '饮食',
  106. // },
  107. // {
  108. // // pagePath: 'pages/activity/Activity',
  109. // pagePath: 'pages/workout/Workout',
  110. // text: '运动',
  111. // },
  112. {
  113. pagePath: 'pages/account/Profile',
  114. text: '更多',
  115. }
  116. ]
  117. })
  118. //src/pages/rn/RNMain.tsx
  119. process.env.TARO_ENV === 'rn' && (appConfig.pages = [
  120. 'pages/rn/RNMain'
  121. ])
  122. export default appConfig;