Collapse portal under src/, unify pnpm workspace/scripts, thin VIP topic re-exports, drop orphan vip scaffolds and one-shot scripts, ignore xhs/release, document root commands. Co-authored-by: Cursor <cursoragent@cursor.com>
71 lines
1.8 KiB
TypeScript
71 lines
1.8 KiB
TypeScript
const tabBar = {
|
||
color: '#8b93a7',
|
||
selectedColor: '#4ecdc4',
|
||
backgroundColor: '#0c0c0f',
|
||
borderStyle: 'black',
|
||
list: [
|
||
{
|
||
pagePath: 'pages/index/index',
|
||
text: '首页',
|
||
iconPath: 'assets/tab/home.png',
|
||
selectedIconPath: 'assets/tab/home-active.png',
|
||
},
|
||
{
|
||
pagePath: 'pages/nav/index',
|
||
text: '导航',
|
||
iconPath: 'assets/tab/nav.png',
|
||
selectedIconPath: 'assets/tab/nav-active.png',
|
||
},
|
||
{
|
||
pagePath: 'pages/book/index',
|
||
text: '小册',
|
||
iconPath: 'assets/tab/book.png',
|
||
selectedIconPath: 'assets/tab/book-active.png',
|
||
},
|
||
{
|
||
pagePath: 'pages/community/index',
|
||
text: '社群',
|
||
iconPath: 'assets/tab/community.png',
|
||
selectedIconPath: 'assets/tab/community-active.png',
|
||
},
|
||
{
|
||
pagePath: 'pages/mine/index',
|
||
text: '我的',
|
||
iconPath: 'assets/tab/mine.png',
|
||
selectedIconPath: 'assets/tab/mine-active.png',
|
||
},
|
||
],
|
||
}
|
||
|
||
/**
|
||
* H5 / 微信:默认无原生 tabBar(首页入口卡片跳转)。
|
||
* 仅当显式 TARO_APP_TABBAR=1 时才挂五 Tab。
|
||
*/
|
||
const isH5 =
|
||
process.env.TARO_ENV === 'h5' || process.env.TARO_APP_TARGET === 'h5'
|
||
const wantTabBar = !isH5 && process.env.TARO_APP_TABBAR === '1'
|
||
|
||
export default defineAppConfig({
|
||
pages: [
|
||
'pages/index/index',
|
||
'pages/nav/index',
|
||
'pages/community/index',
|
||
'pages/mine/index',
|
||
'pages/book/index',
|
||
'pages/reader/index',
|
||
'pages/destinations/index',
|
||
'pages/destination/index',
|
||
'pages/meetups/index',
|
||
'pages/vip/index',
|
||
'pages/game/index',
|
||
],
|
||
window: {
|
||
backgroundTextStyle: 'light',
|
||
navigationBarBackgroundColor: '#0c0c0f',
|
||
navigationBarTitleText: 'nomadro',
|
||
navigationBarTextStyle: 'white',
|
||
backgroundColor: '#0c0c0f',
|
||
},
|
||
...(wantTabBar ? { tabBar } : {}),
|
||
})
|