张延森 4 anos atrás
pai
commit
647c7f13ee

+ 24
- 3
src/app.config.js Ver arquivo

@@ -1,13 +1,34 @@
1
+import { getPages } from './routes'
2
+
3
+const { pages } = getPages()
4
+
1 5
 export default {
2
-  pages: [
3
-    'pages/index/index'
4
-  ],
6
+  pages,
5 7
   window: {
6 8
     backgroundTextStyle: 'light',
7 9
     navigationBarBackgroundColor: '#fff',
8 10
     navigationBarTitleText: 'WeChat',
9 11
     navigationBarTextStyle: 'black'
10 12
   },
13
+  tabBar: {
14
+    color: '#666',
15
+    selectedColor: '#BB9C79',
16
+
17
+    list: [
18
+      {
19
+        pagePath: "pages/index/index",
20
+        text: "首页",
21
+        iconPath: './assets/tabbar/index1.png',
22
+        selectedIconPath: './assets/tabbar/index2.png',
23
+      },
24
+      {
25
+        pagePath: "pages/mine/index",
26
+        text: "我是",
27
+        iconPath: './assets/tabbar/mine1.png',
28
+        selectedIconPath: './assets/tabbar/mine2.png',
29
+      }
30
+    ]
31
+  },
11 32
   permission: {
12 33
     "scope.userLocation": {
13 34
       desc: "你的位置信息将用于显示当前区域信息"

BIN
src/assets/tabbar/index1.png Ver arquivo


BIN
src/assets/tabbar/index2.png Ver arquivo


BIN
src/assets/tabbar/mine1.png Ver arquivo


BIN
src/assets/tabbar/mine2.png Ver arquivo


+ 0
- 4
src/pages/index/index.scss Ver arquivo

@@ -1,4 +0,0 @@
1
-.index {
2
-  flex-direction: column;
3
-  width: 100%;
4
-}

+ 3
- 0
src/pages/mine/index.config.js Ver arquivo

@@ -0,0 +1,3 @@
1
+export default {
2
+  navigationBarTitleText: '我是'
3
+}

+ 9
- 0
src/pages/mine/index.jsx Ver arquivo

@@ -0,0 +1,9 @@
1
+import React from 'react'
2
+import withLayout from '@/layout'
3
+
4
+export default withLayout((props) => {
5
+  // props 里面包含了一些基本的信息
6
+  console.log('-----props---->', props)
7
+
8
+  return '这里是小程序首页';
9
+})

+ 0
- 0
src/pages/mine/index.scss Ver arquivo


+ 7
- 7
src/routes.js Ver arquivo

@@ -26,13 +26,13 @@ const routes = [
26 26
   //   isTab: true,
27 27
   //   type: 'activity',
28 28
   // },
29
-  // {
30
-  //   name: '个人中心',
31
-  //   page: 'pages/person/index',
32
-  //   pkg: 'main',
33
-  //   isTab: true,
34
-  //   type: 'center',
35
-  // },
29
+  {
30
+    name: '个人中心',
31
+    page: 'pages/mine/index',
32
+    pkg: 'main',
33
+    isTab: true,
34
+    type: 'center',
35
+  },
36 36
 
37 37
   // /********************************
38 38
   //  * 项目相关