import { defineUniPages } from '@uni-helper/vite-plugin-uni-pages' export default defineUniPages({ // UniPages preserves these platform app.json fields while the current // uni-app compiler drops their manifest equivalents. permission: { 'scope.userLocation': { desc: '用于地图定位、行程优化和到点打卡判断', }, }, requiredPrivateInfos: ['getLocation', 'startLocationUpdate', 'onLocationChange'], // 微信小程序仅在页面实际使用组件时注入对应代码,减少启动开销。 lazyCodeLoading: 'requiredComponents', easycom: { // 注意一定要放在custom里,否则无效,https://ask.dcloud.net.cn/question/131175 custom: { '^u--(.*)': 'uview-plus/components/u-$1/u-$1.vue', '^up-(.*)': 'uview-plus/components/u-$1/u-$1.vue', '^u-([^-].*)': 'uview-plus/components/u-$1/u-$1.vue', }, }, // 你也可以定义 pages 字段,它具有最高的优先级。 pages: [], globalStyle: { 'navigationBarBackgroundColor': '#ffffff', 'backgroundColor': '#f5f7f6', 'navigationBarTextStyle': 'black', 'navigationBarTitleText': '光明文旅地图', 'app-plus': { titleNView: false, // 移除 H5、APP 顶部导航 }, }, tabBar: { color: '#718078', selectedColor: '#167a5b', backgroundColor: '#ffffff', // 微信小程序只接受 black 或 white,不支持自定义边框色。 borderStyle: 'white', list: [ { pagePath: 'pages/map/index', text: '全域地图', iconPath: 'static/tabbar/map.png', selectedIconPath: 'static/tabbar/map-selected.png', }, { pagePath: 'pages/assistant/index', text: '文旅助手', iconPath: 'static/tabbar/assistant.png', selectedIconPath: 'static/tabbar/assistant-selected.png', }, { pagePath: 'pages/planner/index', text: '路线规划', iconPath: 'static/tabbar/planner.png', selectedIconPath: 'static/tabbar/planner-selected.png', }, ], }, })