diff --git a/miniprogram/src/app.config.js b/miniprogram/src/app.config.js index ccf2398..9723aba 100644 --- a/miniprogram/src/app.config.js +++ b/miniprogram/src/app.config.js @@ -30,9 +30,11 @@ export default { backgroundColor: '#ffffff', borderStyle: 'white', list: [ - { pagePath: 'pages/booking/index', text: '预约' }, + { pagePath: 'pages/booking/index', text: '活动' }, { pagePath: 'pages/test/index', text: '测评' }, - { pagePath: 'pages/park-apply/index', text: '入驻' } + { pagePath: 'pages/index/index', text: '首页' }, + { pagePath: 'pages/content/index', text: '资讯' }, + { pagePath: 'pages/mine/index', text: '我的' } ] } }; diff --git a/miniprogram/src/custom-tab-bar/index.jsx b/miniprogram/src/custom-tab-bar/index.jsx index 49444d0..8dbf000 100644 --- a/miniprogram/src/custom-tab-bar/index.jsx +++ b/miniprogram/src/custom-tab-bar/index.jsx @@ -3,16 +3,18 @@ import { View, Text } from '@tarojs/components'; import Taro from '@tarojs/taro'; import './index.scss'; -/* 与 app.config.js tabBar.list 保持一致;仅 3 项:预约 / 测评 / 入驻 */ +/* 与 app.config.js tabBar.list 保持一致;首页(index)居中并做特殊凸起按钮 */ const LIST = [ - { pagePath: '/pages/booking/index', text: '预约', icon: 'book' }, + { pagePath: '/pages/booking/index', text: '活动', icon: 'book' }, { pagePath: '/pages/test/index', text: '测评', icon: 'compass' }, - { pagePath: '/pages/park-apply/index', text: '入驻', icon: 'shield' } + { pagePath: '/pages/index/index', text: '首页', icon: 'star', center: true }, + { pagePath: '/pages/content/index', text: '资讯', icon: 'shield' }, + { pagePath: '/pages/mine/index', text: '我的', icon: 'user' } ]; export default class CustomTabBar extends Component { state = { - selected: 0 // 默认预约 + selected: 2 // 默认首页(居中) }; switchTab = (item, index) => { diff --git a/miniprogram/src/pages/index/index.jsx b/miniprogram/src/pages/index/index.jsx index dd1ef7a..6df6348 100644 --- a/miniprogram/src/pages/index/index.jsx +++ b/miniprogram/src/pages/index/index.jsx @@ -23,11 +23,9 @@ export default function Index() { {MK_HERO.subhead} - + - - - + diff --git a/miniprogram/src/pages/park-apply/index.jsx b/miniprogram/src/pages/park-apply/index.jsx index 57fd57b..45cec78 100644 --- a/miniprogram/src/pages/park-apply/index.jsx +++ b/miniprogram/src/pages/park-apply/index.jsx @@ -1,6 +1,5 @@ import { View, Text, Input, Textarea, Button, Radio, RadioGroup, Checkbox, CheckboxGroup, Picker } from '@tarojs/components'; import Taro from '@tarojs/taro'; -import { useTabIndex } from '@/utils/tab'; import { useState, useEffect } from 'react'; import { phoneLogin, bindPhone, isAuthed, getUser } from '@/utils/auth'; import { @@ -20,7 +19,6 @@ const EMPTY = () => ({ }); export default function ParkApply() { - useTabIndex(2); const [authed, setAuthed] = useState(isAuthed()); const [gatePhone, setGatePhone] = useState(''); const [gateCode, setGateCode] = useState('');