yuantianjiao 6 years ago
parent
commit
522ab9e998

+ 6
- 0
src/common/css/reset.css View File

@@ -54,4 +54,10 @@ select option {
54 54
 	width: 100%;
55 55
 	height: 100%;
56 56
 	object-fit: contain;
57
+}
58
+
59
+.mainPage{
60
+	width: 100%;
61
+	height: 100%;
62
+	position: relative;
57 63
 }

BIN
src/common/icon/logo.png View File


BIN
src/common/icon/status-icon-1.png View File


BIN
src/common/icon/status-icon-2.png View File


BIN
src/common/icon/status-icon-3.png View File


BIN
src/common/icon/tabBar-icon-1.png View File


BIN
src/common/icon/tabBar-icon-2.png View File


BIN
src/common/icon/tabBar-icon-3.png View File


BIN
src/common/icon/userCenter-icon-1.png View File


BIN
src/common/icon/userCenter-icon-2.png View File


BIN
src/common/icon/userCenter-icon-3.png View File


+ 34
- 0
src/module/user/mainPage/coffeeIndex/index.vue View File

@@ -0,0 +1,34 @@
1
+<template>
2
+  <div class="mainPage">
3
+    城咖啡
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+
9
+export default {
10
+  name: '',
11
+  data () {
12
+    return {
13
+      
14
+    }
15
+  },
16
+  computed: {
17
+    
18
+  },
19
+  components: {
20
+    
21
+  },
22
+  created () {
23
+    
24
+  },
25
+  methods: {
26
+    
27
+  }
28
+}
29
+</script>
30
+
31
+<!-- Add "scoped" attribute to limit CSS to this component only -->
32
+<style lang="scss" scoped>
33
+@import "page.scss";
34
+</style>

src/module/user/userCenter/page.scss → src/module/user/mainPage/coffeeIndex/page.scss View File


+ 57
- 0
src/module/user/mainPage/index.vue View File

@@ -0,0 +1,57 @@
1
+<template>
2
+  <div class="mainPage flex-v">
3
+    <div class="subPage flex-item">
4
+      <div>
5
+        <router-view></router-view>
6
+      </div>
7
+    </div>
8
+    <nav class="flex-h">
9
+      <router-link :to="{name:item.pathName,query:{}}" class="flex-item" active-class="active" v-for="(item, index) in tabBar" :key="index">
10
+        <div>
11
+          <img v-if="index==0" class="centerLabel" src="../../../common/icon/tabBar-icon-1.png" alt="">
12
+          <img v-if="index==1" class="centerLabel" src="../../../common/icon/tabBar-icon-2.png" alt="">
13
+          <img v-if="index==2" class="centerLabel" src="../../../common/icon/tabBar-icon-3.png" alt="">
14
+        </div>
15
+        <span>{{item.name}}</span>
16
+      </router-link>
17
+    </nav>
18
+  </div>
19
+</template>
20
+
21
+<script>
22
+
23
+export default {
24
+  name: '',
25
+  data () {
26
+    return {
27
+      tabBar: [{
28
+        pathName:'indexPage',
29
+        name:'会所'
30
+      },{
31
+        pathName:'coffeeIndex',
32
+        name:'城咖啡'
33
+      },{
34
+        pathName:'userCenter',
35
+        name:'会员'
36
+      }]
37
+    }
38
+  },
39
+  computed: {
40
+    
41
+  },
42
+  components: {
43
+    
44
+  },
45
+  created () {
46
+    
47
+  },
48
+  methods: {
49
+    
50
+  }
51
+}
52
+</script>
53
+
54
+<!-- Add "scoped" attribute to limit CSS to this component only -->
55
+<style lang="scss" scoped>
56
+@import "page.scss";
57
+</style>

+ 34
- 0
src/module/user/mainPage/indexPage/index.vue View File

@@ -0,0 +1,34 @@
1
+<template>
2
+  <div class="mainPage">
3
+    首页
4
+  </div>
5
+</template>
6
+
7
+<script>
8
+
9
+export default {
10
+  name: '',
11
+  data () {
12
+    return {
13
+      
14
+    }
15
+  },
16
+  computed: {
17
+    
18
+  },
19
+  components: {
20
+    
21
+  },
22
+  created () {
23
+    
24
+  },
25
+  methods: {
26
+    
27
+  }
28
+}
29
+</script>
30
+
31
+<!-- Add "scoped" attribute to limit CSS to this component only -->
32
+<style lang="scss" scoped>
33
+@import "page.scss";
34
+</style>

+ 0
- 0
src/module/user/mainPage/indexPage/page.scss View File


+ 46
- 0
src/module/user/mainPage/page.scss View File

@@ -0,0 +1,46 @@
1
+.mainPage{
2
+  .subPage{
3
+    &>div{
4
+      width: 100%;
5
+      position: absolute;
6
+      left: 0;
7
+      top: 0;
8
+      bottom: 0;
9
+      z-index: 1;
10
+    }
11
+  }
12
+  &>nav{
13
+    background: #fff;
14
+    position: relative;
15
+    z-index: 100;
16
+    box-shadow: 0 0 .1rem .02rem rgba(0, 0, 0, .05);
17
+    a{
18
+      text-align: center;
19
+      div{
20
+        width: 100%;
21
+        height: .2rem;
22
+        position: relative;
23
+        margin-top: .06rem;
24
+      }
25
+      img{
26
+        max-height: .2rem;
27
+        max-width: .2rem;
28
+        filter: grayscale(100%);
29
+        -webkit-filter: grayscale(100%);
30
+      }
31
+      span{
32
+        width: 100%;
33
+        display: inline-block;
34
+        text-align: center;
35
+        line-height: .2rem;
36
+        font-size: .1rem;
37
+      }
38
+    }
39
+    a.active{
40
+      img{
41
+        filter: grayscale(0);
42
+        -webkit-filter: grayscale(0);
43
+      }
44
+    }
45
+  }
46
+}

src/module/user/userCenter/index.vue → src/module/user/mainPage/userCenter/index.vue View File


+ 0
- 0
src/module/user/mainPage/userCenter/page.scss View File


+ 30
- 6
src/module/user/router.js View File

@@ -1,17 +1,41 @@
1 1
 import Vue from 'vue'
2 2
 import Router from 'vue-router'
3 3
 
4
-import userCenter from './userCenter/index'
4
+import mainPage from './mainPage/index' // 主页
5
+import indexPage from './mainPage/indexPage/index' // 首页
6
+import coffeeIndex from './mainPage/coffeeIndex/index' // 城咖啡
7
+import userCenter from './mainPage/userCenter/index' // 个人中心
5 8
 
6 9
 Vue.use(Router)
7 10
 
8 11
 const router = new Router({
9 12
   routes: [{
10
-    path: '/userCenter',
11
-    name: 'userCenter',
12
-    component: userCenter,
13
-    children: []
14
-  }]
13
+    path: '/mainPage',
14
+    name: 'mainPage',
15
+    component: mainPage,
16
+    children: [{
17
+      path: 'indexPage',
18
+      name: 'indexPage',
19
+      component: indexPage,
20
+      children: []
21
+    },{
22
+      path: 'coffeeIndex',
23
+      name: 'coffeeIndex',
24
+      component: coffeeIndex,
25
+      children: []
26
+    },{
27
+      path: 'userCenter',
28
+      name: 'userCenter',
29
+      component: userCenter,
30
+      children: []
31
+    }]
32
+  }],
33
+  linkActiveClass: 'active',
34
+})
35
+
36
+router.beforeEach((to, from, next) => {
37
+  
38
+  next()
15 39
 })
16 40
 
17 41
 export default router