fix(tab): 恢复底部菜单5项(活动/测评/首页/资讯/我的),首页首屏按钮收敛为预约/测评/入驻
- 底部自定义 tabBar 恢复原 5 项,首页居中,重设默认选中=首页 - app.config.js tabBar.list 同步恢复 5 项 - 首页 Hero CTA 收敛为三枚按钮:预约公益课/沙龙、先做OPC测评、入驻申请 - 入驻申请改为 navigateTo(不再作 tab),park-apply 移除 useTabIndex
This commit is contained in:
@@ -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: '我的' }
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -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) => {
|
||||
|
||||
@@ -23,11 +23,9 @@ export default function Index() {
|
||||
</View>
|
||||
<Text className="mk-subhead">{MK_HERO.subhead}</Text>
|
||||
<View className="mk-cta">
|
||||
<Button className="btn btn-cta" onClick={goTab(MK_HERO.ctaPrimary.tab)}>{MK_HERO.ctaPrimary.label} →</Button>
|
||||
<Button className="btn btn-cta" onClick={goTab(MK_HERO.ctaPrimary.tab)}>{MK_HERO.ctaPrimary.label}</Button>
|
||||
<Button className="btn btn-ghost" onClick={goTab(MK_HERO.ctaSecondary.tab)}>{MK_HERO.ctaSecondary.label}</Button>
|
||||
<Button className="btn btn-ghost" onClick={() => Taro.switchTab({ url: '/pages/park-apply/index' })}>申请入驻</Button>
|
||||
<Button className="btn btn-ghost" onClick={() => Taro.navigateTo({ url: '/pages/cert-apply/index' })}>OPC认证</Button>
|
||||
<Button className="btn btn-ghost" onClick={() => Taro.navigateTo({ url: '/pages/park-transfer/index' })}>转园申请</Button>
|
||||
<Button className="btn btn-ghost" onClick={() => Taro.navigateTo({ url: '/pages/park-apply/index' })}>入驻申请</Button>
|
||||
</View>
|
||||
</View>
|
||||
|
||||
|
||||
@@ -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('');
|
||||
|
||||
Reference in New Issue
Block a user