app.config.ts 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. import { kIsIOS } from "./utils/tools";
  2. const appConfig = defineAppConfig({
  3. pages: [
  4. // 'pages/clock/Index',
  5. 'pages/clock/Clock',
  6. // 'pages/clock/Suggest',
  7. // 'pages/clock/SetGoal',
  8. // 'pages/demo',
  9. // 'pages/food/Food',
  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. 'pages/store/product_list',
  32. 'pages/account/Album',
  33. 'pages/account/Journal',
  34. 'pages/account/JournalDetail',
  35. 'pages/account/PhotoWall'
  36. ],
  37. entryPagePath: 'pages/clock/Clock',
  38. // subPackages: [
  39. // {
  40. // root: 'moduleA',
  41. // pages: [
  42. // 'pages/third'
  43. // ]
  44. // }
  45. // ],
  46. subPackages: [
  47. {
  48. root: '_health',
  49. pages: [
  50. 'pages/schedules',
  51. 'pages/add_moment',
  52. 'pages/schedules_list',
  53. 'pages/schedules_del',
  54. 'pages/schedules_order',
  55. 'pages/schedules_reminder',
  56. 'pages/schedules_conflict',
  57. 'pages/schedules_time',
  58. 'pages/schedules_edit',
  59. 'pages/setting_reminder',
  60. 'pages/moment_detail',
  61. 'pages/timeline_detail',
  62. 'pages/archive',
  63. 'pages/move',
  64. 'pages/move_detail',
  65. 'pages/move_schedule',
  66. 'pages/move_setting',
  67. 'pages/move_setting_reminder',
  68. 'pages/move_setting_time',
  69. 'pages/active_plan'
  70. ]
  71. }
  72. ],
  73. usingComponents: {
  74. 'mysvg': './components/basic/svg',
  75. // 't-popup':'tdesgin-miniprogram/popup/popup'
  76. },
  77. "requiredPrivateInfos": [
  78. "chooseLocation"
  79. ],
  80. // "componentFramework": "glass-easel",
  81. // "lazyCodeLoading": "requiredComponents",
  82. // "renderer": "skyline",
  83. // "rendererOptions": {
  84. // "skyline": {
  85. // "disableABTest": true,
  86. // "defaultDisplayBlock": true
  87. // }
  88. // },
  89. "permission": {
  90. "scope.userLocation": {
  91. "desc": "获取您选择的位置...."
  92. },
  93. // "scope.addPhoneCalendar":{
  94. // "desc":"需要添加日历..."
  95. // }
  96. },
  97. // tabBar: {
  98. // custom: true,
  99. // list:[
  100. // {
  101. // pagePath: 'pages/Clock',
  102. // text: '首页',
  103. // },
  104. // {
  105. // pagePath: 'pages/Metric',
  106. // text: '第二页',
  107. // },
  108. // {
  109. // pagePath: 'pages/Activity',
  110. // text: '第三页',
  111. // },
  112. // {
  113. // pagePath: 'pages/Profile',
  114. // text: '第二页',
  115. // }
  116. // ]
  117. // },
  118. window: {
  119. "backgroundTextStyle": "dark",
  120. "navigationBarBackgroundColor": "#ffffff",
  121. "navigationBarTitleText": "Weixin",
  122. "navigationBarTextStyle": "black",
  123. "backgroundColor": "#f5f5f5"
  124. },
  125. // darkmode: true
  126. })
  127. process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
  128. custom: true,
  129. backgroundColor: '#fff',
  130. color: '#ffffff66',
  131. selectedColor: '#ffffff',
  132. borderStyle: 'black',
  133. list: [
  134. {
  135. pagePath: 'pages/clock/Clock',
  136. text: '生物钟',
  137. },
  138. {
  139. pagePath: 'pages/explore/Index',
  140. text: '发现',
  141. },
  142. {
  143. pagePath: 'pages/notification/setting',
  144. text: '提醒',
  145. },
  146. {
  147. pagePath: 'pages/metric/Metric',
  148. text: '指标',
  149. },
  150. {
  151. pagePath: 'pages/account/Profile',
  152. text: '更多',
  153. }
  154. ]
  155. })
  156. //src/pages/rn/RNMain.tsx
  157. process.env.TARO_ENV === 'rn' && (appConfig.pages = [
  158. 'pages/rn/RNMain'
  159. ])
  160. export default appConfig;