pages.config.ts 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353
  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. needLogin: true,
  97. style: {
  98. navigationBarTitleText: '%income.title%',
  99. navigationBarBackgroundColor: '#fff',
  100. },
  101. },
  102. {
  103. path: 'pages/login/login',
  104. type: 'page',
  105. layout: 'default',
  106. style: {
  107. navigationStyle: 'custom',
  108. },
  109. },
  110. {
  111. path: 'pages/mine/addressBook',
  112. type: 'page',
  113. layout: 'default',
  114. style: {
  115. navigationBarTitleText: '%addressBook.title%',
  116. navigationBarBackgroundColor: '#fff',
  117. },
  118. },
  119. {
  120. path: 'pages/mine/addressBookOperate',
  121. type: 'page',
  122. layout: 'default',
  123. style: {
  124. navigationBarTitleText: '%addressBook.title%',
  125. navigationBarBackgroundColor: '#fff',
  126. },
  127. },
  128. {
  129. path: 'pages/mine/mine',
  130. type: 'page',
  131. layout: 'tabbar',
  132. needLogin: true,
  133. style: {
  134. navigationStyle: 'custom',
  135. },
  136. },
  137. {
  138. path: 'pages/mine/myFavorite',
  139. type: 'page',
  140. layout: 'default',
  141. style: {
  142. navigationBarTitleText: '%mine.pages.myFavorite.title%',
  143. navigationBarBackgroundColor: '#fff',
  144. },
  145. },
  146. {
  147. path: 'pages/mine/myProfile',
  148. type: 'page',
  149. layout: 'default',
  150. style: {
  151. navigationBarTitleText: '%myProfile.title%',
  152. navigationBarBackgroundColor: '#fff',
  153. },
  154. },
  155. {
  156. path: 'pages/mine/setting',
  157. type: 'page',
  158. layout: 'default',
  159. style: {
  160. navigationBarTitleText: '%setting.title%',
  161. navigationBarBackgroundColor: '#fff',
  162. },
  163. },
  164. {
  165. path: 'pages/mine/share',
  166. type: 'page',
  167. layout: 'default',
  168. style: {
  169. navigationStyle: 'custom',
  170. navigationBarTitleText: '%mine.pages.share.title%',
  171. },
  172. },
  173. {
  174. path: 'pages/missionCenter/missionCenter',
  175. type: 'page',
  176. layout: 'default',
  177. needLogin: true,
  178. style: {
  179. navigationBarTitleText: '%missionCenter.title%',
  180. navigationBarBackgroundColor: '#fff',
  181. },
  182. },
  183. {
  184. path: 'pages/myOrders/myOrders',
  185. type: 'page',
  186. layout: 'default',
  187. style: {
  188. navigationBarTitleText: '%myOrders.title%',
  189. navigationBarBackgroundColor: '#fff',
  190. },
  191. },
  192. {
  193. path: 'pages/myOrders/orderDetail',
  194. type: 'page',
  195. layout: 'default',
  196. style: {
  197. navigationBarTitleText: '%orderDetail.title%',
  198. navigationBarBackgroundColor: '#fff',
  199. },
  200. },
  201. {
  202. path: 'pages/notifications/notifications',
  203. type: 'page',
  204. layout: 'default',
  205. needLogin: true,
  206. style: {
  207. navigationStyle: 'custom',
  208. },
  209. },
  210. {
  211. path: 'pages/productDetail/checkOut',
  212. type: 'page',
  213. layout: 'default',
  214. needLogin: true,
  215. style: {
  216. navigationBarTitleText: '%checkout.title%',
  217. navigationBarBackgroundColor: '#fff',
  218. },
  219. },
  220. {
  221. path: 'pages/productDetail/productDetail',
  222. type: 'page',
  223. layout: 'default',
  224. style: {
  225. navigationStyle: 'custom',
  226. },
  227. },
  228. {
  229. path: 'pages/referEarn/referEarn',
  230. type: 'page',
  231. layout: 'default',
  232. style: {
  233. navigationStyle: 'custom',
  234. },
  235. },
  236. {
  237. path: 'pages/register/register',
  238. type: 'page',
  239. layout: 'default',
  240. style: {
  241. navigationStyle: 'custom',
  242. },
  243. },
  244. {
  245. path: 'pages/search/search',
  246. type: 'page',
  247. layout: 'default',
  248. style: {
  249. navigationStyle: 'custom',
  250. },
  251. },
  252. {
  253. path: 'pages/topChampions/topChampions',
  254. type: 'page',
  255. layout: 'default',
  256. style: {
  257. navigationStyle: 'custom',
  258. },
  259. },
  260. {
  261. path: 'pages/vipMembership/vipMembership',
  262. type: 'page',
  263. layout: 'default',
  264. needLogin: true,
  265. style: {
  266. navigationBarTitleText: '%vipMembership.title%',
  267. navigationBarBackgroundColor: '#FFFFFF',
  268. },
  269. },
  270. {
  271. path: 'pages/wallet/myWallet',
  272. type: 'page',
  273. layout: 'default',
  274. needLogin: true,
  275. style: {
  276. navigationBarTitleText: '%wallet.myWallet.title%',
  277. navigationBarBackgroundColor: '#fff',
  278. },
  279. },
  280. {
  281. path: 'pages/wallet/recharge',
  282. type: 'page',
  283. layout: 'default',
  284. style: {
  285. 'navigationBarTitleText': '%wallet.recharge.title%',
  286. 'navigationBarBackgroundColor': '#fff',
  287. 'app-plus': {
  288. titleNView: {
  289. buttons: [
  290. {
  291. text: 'Record',
  292. fontSize: '28rpx',
  293. width: '85px',
  294. },
  295. ],
  296. },
  297. },
  298. },
  299. },
  300. {
  301. path: 'pages/wallet/rechargeRecord',
  302. type: 'page',
  303. layout: 'default',
  304. style: {
  305. navigationBarTitleText: '%wallet.rechargeRecord.title%',
  306. navigationBarBackgroundColor: '#fff',
  307. },
  308. },
  309. {
  310. path: 'pages/wallet/withdraw',
  311. type: 'page',
  312. layout: 'default',
  313. style: {
  314. navigationStyle: 'custom',
  315. navigationBarTitleText: '%wallet.withdraw.title%',
  316. },
  317. },
  318. {
  319. path: 'pages/wallet/withdrawRecord',
  320. type: 'page',
  321. layout: 'default',
  322. style: {
  323. navigationBarTitleText: '%wallet.withdrawRecord.title%',
  324. navigationBarBackgroundColor: '#fff',
  325. },
  326. },
  327. {
  328. path: 'pages/webLink/webLink',
  329. type: 'page',
  330. layout: 'default',
  331. style: {
  332. navigationBarTitleText: '',
  333. navigationBarBackgroundColor: '#fff',
  334. },
  335. },
  336. {
  337. path: 'uni_modules/uni-upgrade-center-app/pages/upgrade-popup',
  338. style: {
  339. 'disableScroll': true,
  340. 'app-plus': {
  341. backgroundColorTop: 'transparent',
  342. background: 'transparent',
  343. titleNView: false,
  344. scrollIndicator: false,
  345. popGesture: 'none',
  346. animationType: 'fade-in',
  347. animationDuration: 200,
  348. },
  349. },
  350. },
  351. ],
  352. })