pages.config.ts 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360
  1. import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages'
  2. export default defineUniPages({
  3. globalStyle: {
  4. 'navigationStyle': 'default',
  5. 'navigationBarTitleText': 'BandhuBuy',
  6. 'navigationBarBackgroundColor': '#f8f8f8',
  7. 'navigationBarTextStyle': 'black',
  8. 'backgroundColor': '#FFFFFF',
  9. 'pageOrientation': 'auto',
  10. 'app-plus': {
  11. scrollIndicator: 'none',
  12. screenOrientation: [
  13. 'portrait-primary', // 可选,字符串类型,支持竖屏
  14. 'portrait-secondary', // 可选,字符串类型,支持反向竖屏
  15. 'landscape-primary', // 可选,字符串类型,支持横屏
  16. 'landscape-secondary', // 可选,字符串类型,支持反向横屏
  17. ],
  18. },
  19. },
  20. easycom: {
  21. autoscan: true,
  22. custom: {
  23. '^fg-(.*)': '@/components/fg-$1/fg-$1.vue',
  24. '^wd-(.*)': 'wot-design-uni/components/wd-$1/wd-$1.vue',
  25. '^(?!z-paging-refresh|z-paging-load-more)z-paging(.*)': 'z-paging/components/z-paging$1/z-paging$1.vue',
  26. },
  27. },
  28. /**
  29. * 2025-06-25 v3.3.0版(重新梳理tabbar配置)
  30. *
  31. * 1)原生tabbar,不需要关心 `layouts/fg-tabbar` 文件夹里面的内容。(这是默认配置)
  32. * 2)自定义tabbar(带缓存),保留下面的配置和修改 `/layouts/fg-tabbar/tabbarList.ts` 对应的代码。
  33. * 3)自定义tabbar(不带缓存),删除下面的配置和修改 `/layouts/fg-tabbar/tabbarList.ts` 对应的代码。
  34. * 4)无tabbar,直接删除下面的tabBar配置即可。
  35. *
  36. * 温馨提示:本文件的任何代码更改了之后,都需要重新运行,否则 pages.json 还是旧的,导致不是预期效果。
  37. */
  38. tabBar: {
  39. color: '#999999',
  40. selectedColor: '#e61b28',
  41. backgroundColor: '#ffffff',
  42. // backgroundColor: 'rgba(255, 255, 255, 0.6)',
  43. // blurEffect: 'extralight',
  44. borderStyle: '#c1c1c1',
  45. height: '50px',
  46. fontSize: '10px',
  47. iconWidth: '24px',
  48. spacing: '3px',
  49. list: [
  50. {
  51. iconPath: 'static/tabbar/home.png',
  52. selectedIconPath: 'static/tabbar/homeHL.png',
  53. pagePath: 'pages/index/index',
  54. },
  55. {
  56. iconPath: 'static/tabbar/income.png',
  57. selectedIconPath: 'static/tabbar/incomeHL.png',
  58. pagePath: 'pages/income/income',
  59. },
  60. {
  61. iconPath: 'static/tabbar/mine.png',
  62. selectedIconPath: 'static/tabbar/mineHL.png',
  63. pagePath: 'pages/mine/mine',
  64. },
  65. ],
  66. },
  67. pages: [
  68. {
  69. path: 'pages/index/index',
  70. type: 'home',
  71. layout: 'tabbar',
  72. style: {
  73. navigationStyle: 'custom',
  74. },
  75. },
  76. {
  77. path: 'pages/bestSellers/bestSellers',
  78. type: 'page',
  79. layout: 'default',
  80. style: {
  81. navigationStyle: 'custom',
  82. },
  83. },
  84. {
  85. path: 'pages/forgotPassword/forgotPassword',
  86. type: 'page',
  87. layout: 'default',
  88. style: {
  89. navigationStyle: 'custom',
  90. },
  91. },
  92. {
  93. path: 'pages/income/income',
  94. type: 'page',
  95. layout: 'tabbar',
  96. style: {
  97. navigationBarTitleText: '%income.title%',
  98. navigationBarBackgroundColor: '#fff',
  99. },
  100. },
  101. {
  102. path: 'pages/login/login',
  103. type: 'page',
  104. layout: 'default',
  105. style: {
  106. navigationStyle: 'custom',
  107. },
  108. },
  109. {
  110. path: 'pages/mine/addressBook',
  111. type: 'page',
  112. layout: 'default',
  113. style: {
  114. navigationBarTitleText: '%addressBook.title%',
  115. navigationBarBackgroundColor: '#fff',
  116. },
  117. },
  118. {
  119. path: 'pages/mine/addressBookOperate',
  120. type: 'page',
  121. layout: 'default',
  122. style: {
  123. navigationBarTitleText: '%addressBook.title%',
  124. navigationBarBackgroundColor: '#fff',
  125. },
  126. },
  127. {
  128. path: 'pages/mine/mine',
  129. type: 'page',
  130. layout: 'tabbar',
  131. style: {
  132. navigationStyle: 'custom',
  133. },
  134. },
  135. {
  136. path: 'pages/mine/myFavorite',
  137. type: 'page',
  138. layout: 'default',
  139. style: {
  140. navigationBarTitleText: '%mine.pages.myFavorite.title%',
  141. navigationBarBackgroundColor: '#fff',
  142. },
  143. },
  144. {
  145. path: 'pages/mine/myProfile',
  146. type: 'page',
  147. layout: 'default',
  148. style: {
  149. navigationBarTitleText: '%myProfile.title%',
  150. navigationBarBackgroundColor: '#fff',
  151. },
  152. },
  153. {
  154. path: 'pages/mine/setting',
  155. type: 'page',
  156. layout: 'default',
  157. style: {
  158. navigationBarTitleText: '%setting.title%',
  159. navigationBarBackgroundColor: '#fff',
  160. },
  161. },
  162. {
  163. path: 'pages/mine/share',
  164. type: 'page',
  165. layout: 'default',
  166. style: {
  167. navigationStyle: 'custom',
  168. navigationBarTitleText: '%mine.pages.share.title%',
  169. },
  170. },
  171. {
  172. path: 'pages/missionCenter/missionCenter',
  173. type: 'page',
  174. layout: 'default',
  175. needLogin: true,
  176. style: {
  177. navigationBarTitleText: '%missionCenter.title%',
  178. navigationBarBackgroundColor: '#fff',
  179. },
  180. },
  181. {
  182. path: 'pages/myOrders/myOrders',
  183. type: 'page',
  184. layout: 'default',
  185. style: {
  186. navigationBarTitleText: '%myOrders.title%',
  187. navigationBarBackgroundColor: '#fff',
  188. },
  189. },
  190. {
  191. path: 'pages/myOrders/orderDetail',
  192. type: 'page',
  193. layout: 'default',
  194. style: {
  195. navigationBarTitleText: '%orderDetail.title%',
  196. navigationBarBackgroundColor: '#fff',
  197. },
  198. },
  199. {
  200. path: 'pages/notifications/notifications',
  201. type: 'page',
  202. layout: 'default',
  203. needLogin: true,
  204. style: {
  205. navigationStyle: 'custom',
  206. },
  207. },
  208. {
  209. path: 'pages/productDetail/checkOut',
  210. type: 'page',
  211. layout: 'default',
  212. needLogin: true,
  213. style: {
  214. navigationBarTitleText: '%checkout.title%',
  215. navigationBarBackgroundColor: '#fff',
  216. },
  217. },
  218. {
  219. path: 'pages/productDetail/productDetail',
  220. type: 'page',
  221. layout: 'default',
  222. style: {
  223. navigationStyle: 'custom',
  224. },
  225. },
  226. {
  227. path: 'pages/referEarn/referEarn',
  228. type: 'page',
  229. layout: 'default',
  230. style: {
  231. navigationStyle: 'custom',
  232. },
  233. },
  234. {
  235. path: 'pages/register/register',
  236. type: 'page',
  237. layout: 'default',
  238. style: {
  239. navigationStyle: 'custom',
  240. },
  241. },
  242. {
  243. path: 'pages/search/search',
  244. type: 'page',
  245. layout: 'default',
  246. style: {
  247. navigationStyle: 'custom',
  248. },
  249. },
  250. {
  251. path: 'pages/topChampions/topChampions',
  252. type: 'page',
  253. layout: 'default',
  254. style: {
  255. navigationStyle: 'custom',
  256. },
  257. },
  258. {
  259. path: 'pages/vipMembership/vipMembership',
  260. type: 'page',
  261. layout: 'default',
  262. needLogin: true,
  263. style: {
  264. navigationBarTitleText: '%vipMembership.title%',
  265. navigationBarBackgroundColor: '#FFFFFF',
  266. },
  267. },
  268. {
  269. path: 'pages/wallet/frozenRecord',
  270. type: 'page',
  271. layout: 'default',
  272. style: {
  273. navigationBarTitleText: '%wallet.frozenRecord.title%',
  274. navigationBarBackgroundColor: '#fff',
  275. },
  276. },
  277. {
  278. path: 'pages/wallet/myWallet',
  279. type: 'page',
  280. layout: 'default',
  281. needLogin: true,
  282. style: {
  283. navigationBarTitleText: '%wallet.myWallet.title%',
  284. navigationBarBackgroundColor: '#fff',
  285. },
  286. },
  287. {
  288. path: 'pages/wallet/recharge',
  289. type: 'page',
  290. layout: 'default',
  291. style: {
  292. 'navigationBarTitleText': '%wallet.recharge.title%',
  293. 'navigationBarBackgroundColor': '#fff',
  294. 'app-plus': {
  295. titleNView: {
  296. buttons: [
  297. {
  298. text: 'Record',
  299. fontSize: '28rpx',
  300. width: '85px',
  301. },
  302. ],
  303. },
  304. },
  305. },
  306. },
  307. {
  308. path: 'pages/wallet/rechargeRecord',
  309. type: 'page',
  310. layout: 'default',
  311. style: {
  312. navigationBarTitleText: '%wallet.rechargeRecord.title%',
  313. navigationBarBackgroundColor: '#fff',
  314. },
  315. },
  316. {
  317. path: 'pages/wallet/withdraw',
  318. type: 'page',
  319. layout: 'default',
  320. style: {
  321. navigationStyle: 'custom',
  322. navigationBarTitleText: '%wallet.withdraw.title%',
  323. },
  324. },
  325. {
  326. path: 'pages/wallet/withdrawRecord',
  327. type: 'page',
  328. layout: 'default',
  329. style: {
  330. navigationBarTitleText: '%wallet.withdrawRecord.title%',
  331. navigationBarBackgroundColor: '#fff',
  332. },
  333. },
  334. {
  335. path: 'pages/webLink/webLink',
  336. type: 'page',
  337. layout: 'default',
  338. style: {
  339. navigationBarTitleText: '',
  340. navigationBarBackgroundColor: '#fff',
  341. },
  342. },
  343. {
  344. path: 'uni_modules/uni-upgrade-center-app/pages/upgrade-popup',
  345. style: {
  346. 'disableScroll': true,
  347. 'app-plus': {
  348. backgroundColorTop: 'transparent',
  349. background: 'transparent',
  350. titleNView: false,
  351. scrollIndicator: false,
  352. popGesture: 'none',
  353. animationType: 'fade-in',
  354. animationDuration: 200,
  355. },
  356. },
  357. },
  358. ],
  359. })