add user page structure

yhy
Dawn_Ocean 2024-03-04 22:19:54 +08:00
parent b9c20c1dfd
commit 419a66fd2b
9 changed files with 68 additions and 6 deletions

View File

@ -5,8 +5,8 @@
"appid": "wx636eb7cf2b84f305", "appid": "wx636eb7cf2b84f305",
"setting": { "setting": {
"urlCheck": true, "urlCheck": true,
"es6": true, "es6": false,
"enhance": true, "enhance": false,
"compileHotReLoad": false, "compileHotReLoad": false,
"postcss": false, "postcss": false,
"minified": false, "minified": false,
@ -29,4 +29,4 @@
"tabIndent": "insertSpaces", "tabIndent": "insertSpaces",
"tabSize": 2 "tabSize": 2
} }
} }

View File

@ -1,5 +1,11 @@
export default defineAppConfig({ export default defineAppConfig({
pages: ['pages/index/index', 'pages/repair/repair', 'pages/user/user'], pages: [
'pages/index/index',
'pages/repair/repair',
'pages/user/user',
'pages/user/inform/inform',
'pages/user/settings/settings',
],
window: { window: {
backgroundTextStyle: 'light', backgroundTextStyle: 'light',
navigationBarBackgroundColor: '#fff', navigationBarBackgroundColor: '#fff',

View File

@ -0,0 +1,3 @@
export default definePageConfig({
usingComponents: {},
});

View File

View File

@ -0,0 +1,10 @@
import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro';
import './inform.scss';
export default class InformPage extends Component {
render(): ReactNode {
return <View></View>;
}
}

View File

@ -0,0 +1,4 @@
export default definePageConfig({
navigationBarTitleText: '设置',
usingComponents: {},
});

View File

@ -0,0 +1,10 @@
import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro';
import './settings.scss';
export default class SettingsPage extends Component {
render(): ReactNode {
return <View></View>;
}
}

View File

@ -1,8 +1,9 @@
import { View, Text } from '@tarojs/components'; import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react'; import { Component, ReactNode } from 'react';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import type CustomTabBar from '../../custom-tab-bar'; import type CustomTabBar from '../../custom-tab-bar';
import './user.scss'; import './user.scss';
import { AtList, AtListItem } from 'taro-ui';
export default class UserPage extends Component { export default class UserPage extends Component {
// 以下是TabBar相关 // 以下是TabBar相关
@ -13,10 +14,38 @@ export default class UserPage extends Component {
} }
// 以上是TabBar相关 // 以上是TabBar相关
informPage() {
Taro.navigateTo({
url: '/pages/user/inform/inform',
});
}
settingsPage() {
Taro.navigateTo({
url: '/pages/user/settings/settings',
});
}
render(): ReactNode { render(): ReactNode {
return ( return (
<View> <View>
<Text>User Page</Text> <AtList>
<AtListItem
title='我的信息'
note='能帮助亦可更好地找到你哦!'
arrow='right'
iconInfo={{ size: 25, color: '#78A4FA', value: 'user' }}
onClick={this.informPage}
/>
<AtListItem
title='设置'
note='配置小程序'
extraText=''
arrow='right'
iconInfo={{ size: 25, color: '#FF4949', value: 'filter' }}
onClick={this.settingsPage}
/>
</AtList>
</View> </View>
); );
} }