许成详 6 年前
父节点
当前提交
05b9b1d3f1

+ 2104
- 1014
package-lock.json
文件差异内容过多而无法显示
查看文件


+ 6
- 1
package.json 查看文件

@@ -9,7 +9,12 @@
9 9
     "build": "node build/build.js"
10 10
   },
11 11
   "dependencies": {
12
-    "vue": "^2.0.1"
12
+    "node-sass": "^4.9.3",
13
+    "sass-loader": "^7.1.0",
14
+    "vant": "^1.1.16",
15
+    "vue": "^2.0.1",
16
+    "vue-router": "^3.0.1",
17
+    "vuex": "^3.0.1"
13 18
   },
14 19
   "devDependencies": {
15 20
     "autoprefixer": "^6.4.0",

+ 4
- 0
src/module/sales/sales.js 查看文件

@@ -1,5 +1,9 @@
1 1
 import Vue from 'vue'
2 2
 import App from './App'
3
+import Vant from 'vant'
4
+import 'vant/lib/vant-css/index.css'
5
+
6
+Vue.use(Vant)
3 7
 
4 8
 /* eslint-disable no-new */
5 9
 new Vue({

+ 3
- 1
src/module/user/App.vue 查看文件

@@ -1,5 +1,7 @@
1 1
 <template>
2
-  <div id="app"></div>
2
+  <div id="app">
3
+    <router-view></router-view>
4
+  </div>
3 5
 </template>
4 6
 
5 7
 <script>

+ 17
- 0
src/module/user/router.js 查看文件

@@ -0,0 +1,17 @@
1
+import Vue from 'vue'
2
+import Router from 'vue-router'
3
+
4
+import userCenter from './userCenter/index'
5
+
6
+Vue.use(Router)
7
+
8
+const router = new Router({
9
+  routes: [{
10
+    path: '/userCenter',
11
+    name: 'userCenter',
12
+    component: userCenter,
13
+    children: []
14
+  }]
15
+})
16
+
17
+export default router

+ 2
- 1
src/module/user/user.html 查看文件

@@ -2,7 +2,8 @@
2 2
 <html>
3 3
 <head>
4 4
   <meta charset="utf-8">
5
-  <title>vue-demo</title>
5
+  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" charset="utf-8" />
6
+  <title>城的空间</title>
6 7
 </head>
7 8
 <body>
8 9
 <div id="app"></div>

+ 11
- 1
src/module/user/user.js 查看文件

@@ -1,9 +1,19 @@
1 1
 import Vue from 'vue'
2 2
 import App from './App'
3
+import Vant from 'vant'
4
+import 'vant/lib/vant-css/index.css'
5
+import router from './router'
6
+import store from '../../store/index'
7
+import Vuex from 'vuex'
8
+
9
+Vue.use(Vant)
10
+Vue.use(Vuex)
3 11
 
4 12
 /* eslint-disable no-new */
5 13
 new Vue({
6 14
   el: '#app',
7 15
   template: '<App/>',
8
-  components: { App }
16
+  components: { App },
17
+  router,
18
+  store,
9 19
 })

+ 34
- 0
src/module/user/userCenter/index.vue 查看文件

@@ -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/userCenter/page.scss 查看文件


+ 1
- 0
src/store/index.js 查看文件

@@ -0,0 +1 @@
1
+