app.config.ts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. import { kIsIOS } from "./utils/tools";
  2. const appConfig = defineAppConfig({
  3. pages: [
  4. 'pages/clock/Clock',
  5. 'pages/common/H5',
  6. 'pages/account/Profile',
  7. 'pages/metric/Metric',
  8. 'pages/notification/setting',
  9. 'pages/store/product_list',
  10. 'pages/account/Journal',
  11. 'pages/account/JournalDetail',
  12. 'pages/discover/discover',
  13. 'pages/moment/moment'
  14. ],
  15. entryPagePath: 'pages/clock/Clock',
  16. // subPackages: [
  17. // {
  18. // root: 'moduleA',
  19. // pages: [
  20. // 'pages/third'
  21. // ]
  22. // }
  23. // ],
  24. subPackages: [
  25. {
  26. root: '_health',
  27. pages: [
  28. 'pages/schedules',
  29. 'pages/add_moment',
  30. 'pages/schedules_edit',
  31. 'pages/schedules_order',
  32. 'pages/moment_detail',
  33. 'pages/timeline_detail',
  34. 'pages/archive',
  35. 'pages/move',
  36. 'pages/move_detail',
  37. 'pages/move_schedule',
  38. 'pages/move_setting',
  39. 'pages/move_setting_reminder',
  40. 'pages/move_setting_time',
  41. 'pages/active_plan',
  42. 'pages/log_time',
  43. 'pages/fast_sleep',
  44. 'pages/long_fast',
  45. 'pages/long_fast_setting',
  46. 'pages/post_result',
  47. 'pages/streak_calendar',
  48. 'pages/streak_weekly',
  49. 'pages/guide_begin',
  50. 'pages/guide_fast',
  51. 'pages/guide_eat',
  52. 'pages/guide_sleep',
  53. 'pages/guide_active',
  54. 'pages/guide_full',
  55. ]
  56. },
  57. {
  58. root: '_account',
  59. pages: [
  60. 'pages/Login',
  61. 'pages/Auth',
  62. 'pages/ChooseAuth',
  63. 'pages/ProfileSetting',
  64. 'pages/Setting',
  65. 'pages/EditPage',
  66. 'pages/Member',
  67. 'pages/Album',
  68. 'pages/PhotoWall',
  69. ]
  70. },
  71. {
  72. root: '_moment',
  73. pages: [
  74. 'pages/home',
  75. 'pages/message',
  76. 'pages/relation',
  77. 'pages/long_full',
  78. 'pages/long_detail'
  79. ]
  80. },
  81. {
  82. root: '_common',
  83. pages: [
  84. 'pages/map'
  85. ]
  86. }
  87. ],
  88. usingComponents: {
  89. 'mysvg': './components/basic/svg',
  90. // 't-popup':'tdesgin-miniprogram/popup/popup'
  91. },
  92. "requiredPrivateInfos": [
  93. "chooseLocation",
  94. "getLocation",
  95. "choosePoi"
  96. ],
  97. // "componentFramework": "glass-easel",
  98. // "lazyCodeLoading": "requiredComponents",
  99. // "renderer": "skyline",
  100. // "rendererOptions": {
  101. // "skyline": {
  102. // "disableABTest": true,
  103. // "defaultDisplayBlock": true
  104. // }
  105. // },
  106. "permission": {
  107. "scope.userLocation": {
  108. "desc": "获取您选择的位置...."
  109. },
  110. // "scope.addPhoneCalendar":{
  111. // "desc":"需要添加日历..."
  112. // }
  113. },
  114. // tabBar: {
  115. // custom: true,
  116. // list:[
  117. // {
  118. // pagePath: 'pages/Clock',
  119. // text: '首页',
  120. // },
  121. // {
  122. // pagePath: 'pages/Metric',
  123. // text: '第二页',
  124. // },
  125. // {
  126. // pagePath: 'pages/Activity',
  127. // text: '第三页',
  128. // },
  129. // {
  130. // pagePath: 'pages/Profile',
  131. // text: '第二页',
  132. // }
  133. // ]
  134. // },
  135. window: {
  136. "backgroundTextStyle": "dark",
  137. "navigationBarBackgroundColor": "#ffffff",
  138. "navigationBarTitleText": "Weixin",
  139. "navigationBarTextStyle": "black",
  140. "backgroundColor": "#f5f5f5"
  141. },
  142. // darkmode: true
  143. })
  144. process.env.TARO_ENV === 'weapp' && (appConfig.tabBar = {
  145. custom: true,
  146. backgroundColor: '#fff',
  147. color: '#ffffff66',
  148. selectedColor: '#ffffff',
  149. borderStyle: 'black',
  150. list: [
  151. {
  152. pagePath: 'pages/clock/Clock',
  153. text: '生物钟',
  154. },
  155. {
  156. pagePath: 'pages/discover/discover',
  157. text: '发现',
  158. },
  159. {
  160. pagePath: 'pages/moment/moment',
  161. text: '搭子圈',
  162. },
  163. {
  164. pagePath: 'pages/notification/setting',
  165. text: '提醒',
  166. },
  167. // {
  168. // pagePath: 'pages/metric/Metric',
  169. // text: '指标',
  170. // },
  171. {
  172. pagePath: 'pages/account/Profile',
  173. text: '更多',
  174. }
  175. ]
  176. })
  177. //src/pages/rn/RNMain.tsx
  178. process.env.TARO_ENV === 'rn' && (appConfig.pages = [
  179. 'pages/rn/RNMain'
  180. ])
  181. export default appConfig;