app.config.ts 3.3 KB

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