Baozhangchao 3 vuotta sitten
vanhempi
commit
fbcc7b919f

+ 17
- 0
jsconfig.json Näytä tiedosto

@@ -0,0 +1,17 @@
1
+{
2
+  "compilerOptions": {
3
+    "baseUrl": "./",
4
+    "paths": {
5
+      "@/components/*": [
6
+        "src/components/*"
7
+      ],
8
+      "@/util/*": [
9
+        "src/util/*"
10
+      ],
11
+    }
12
+  },
13
+  "exclude": [
14
+    "node_modules",
15
+    "dist"
16
+  ]
17
+}

+ 11703
- 0
package-lock.json
File diff suppressed because it is too large
Näytä tiedosto


+ 4
- 1
package.json Näytä tiedosto

@@ -9,7 +9,10 @@
9 9
   },
10 10
   "dependencies": {
11 11
     "core-js": "^3.6.5",
12
-    "vue": "^2.6.11"
12
+    "less": "^4.0.0",
13
+    "less-loader": "^5.0.0",
14
+    "vue": "^2.6.11",
15
+    "vue-router": "^3.5.3"
13 16
   },
14 17
   "devDependencies": {
15 18
     "@vue/cli-plugin-babel": "~4.5.0",

+ 9
- 4
src/App.vue Näytä tiedosto

@@ -1,22 +1,27 @@
1 1
 <template>
2 2
   <div id="app">
3
-    <img alt="Vue logo" src="./assets/logo.png">
4
-    <HelloWorld msg="Welcome to Your Vue.js App"/>
3
+    <!-- <img alt="Vue logo" src="./assets/logo.png" /> -->
4
+    <router-view></router-view>
5 5
   </div>
6 6
 </template>
7 7
 
8 8
 <script>
9
-import HelloWorld from './components/HelloWorld.vue'
9
+import Honghe from './components/Honghe.vue'
10 10
 
11 11
 export default {
12 12
   name: 'App',
13 13
   components: {
14
-    HelloWorld
14
+    Honghe
15 15
   }
16 16
 }
17 17
 </script>
18 18
 
19 19
 <style>
20
+html,
21
+body {
22
+  margin: 0;
23
+  padding: 0;
24
+}
20 25
 #app {
21 26
   font-family: Avenir, Helvetica, Arial, sans-serif;
22 27
   -webkit-font-smoothing: antialiased;

BIN
src/assets/backgroung.jpg Näytä tiedosto


BIN
src/assets/coverIndex.jpg Näytä tiedosto


BIN
src/assets/hareTop.png Näytä tiedosto


+ 0
- 58
src/components/HelloWorld.vue Näytä tiedosto

@@ -1,58 +0,0 @@
1
-<template>
2
-  <div class="hello">
3
-    <h1>{{ msg }}</h1>
4
-    <p>
5
-      For a guide and recipes on how to configure / customize this project,<br>
6
-      check out the
7
-      <a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
8
-    </p>
9
-    <h3>Installed CLI Plugins</h3>
10
-    <ul>
11
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
12
-      <li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
13
-    </ul>
14
-    <h3>Essential Links</h3>
15
-    <ul>
16
-      <li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
17
-      <li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
18
-      <li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
19
-      <li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
20
-      <li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
21
-    </ul>
22
-    <h3>Ecosystem</h3>
23
-    <ul>
24
-      <li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
25
-      <li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
26
-      <li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
27
-      <li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
28
-      <li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
29
-    </ul>
30
-  </div>
31
-</template>
32
-
33
-<script>
34
-export default {
35
-  name: 'HelloWorld',
36
-  props: {
37
-    msg: String
38
-  }
39
-}
40
-</script>
41
-
42
-<!-- Add "scoped" attribute to limit CSS to this component only -->
43
-<style scoped>
44
-h3 {
45
-  margin: 40px 0 0;
46
-}
47
-ul {
48
-  list-style-type: none;
49
-  padding: 0;
50
-}
51
-li {
52
-  display: inline-block;
53
-  margin: 0 10px;
54
-}
55
-a {
56
-  color: #42b983;
57
-}
58
-</style>

+ 40
- 0
src/components/Honghe.vue Näytä tiedosto

@@ -0,0 +1,40 @@
1
+<template>
2
+  <div class="index-box">
3
+    <div v-for="item in indexJPG" :key="item">
4
+      <img src="../assets/coverIndex.jpg" />
5
+    </div>
6
+  </div>
7
+</template>
8
+
9
+<script>
10
+// const indexJPG = new Array(12).fill(0)
11
+
12
+export default {
13
+  name: 'Honghe',
14
+  data() {
15
+    return {
16
+      indexJPG: new Array(12).fill(0)
17
+      // indexJPG: [
18
+      //   {
19
+      //     id: 1,
20
+      //     img: "background: url('../assets/coverIndex.jpg') no-repeat;"
21
+      //   }
22
+      // ]
23
+    }
24
+  }
25
+}
26
+</script>
27
+
28
+<style lang="less" scoped>
29
+.index-box {
30
+  background: url('../assets/backgroung.jpg') no-repeat;
31
+  background-size: 100% 100%;
32
+  width: 100%;
33
+  height: 100%;
34
+  position: fixed;
35
+  top: 0;
36
+  left: 0;
37
+  right: 0;
38
+  bottom: 0;
39
+}
40
+</style>

+ 4
- 0
src/main.js Näytä tiedosto

@@ -1,8 +1,12 @@
1 1
 import Vue from 'vue'
2 2
 import App from './App.vue'
3 3
 
4
+import router from './router/index'//路由
5
+
4 6
 Vue.config.productionTip = false
5 7
 
6 8
 new Vue({
9
+  router,
10
+
7 11
   render: h => h(App),
8 12
 }).$mount('#app')

+ 34
- 0
src/router/index.js Näytä tiedosto

@@ -0,0 +1,34 @@
1
+
2
+
3
+import Vue from 'vue'
4
+import Router from 'vue-router'
5
+import Honghe from '@/components/Honghe'
6
+
7
+// import Login from '@/Login.vue'
8
+
9
+Vue.use(Router)
10
+
11
+export default new Router({
12
+
13
+
14
+  routes: [
15
+    //Loading
16
+    // {
17
+    //   path: '/',
18
+    //   name: 'Login',
19
+    //   component: Login
20
+    // },
21
+    //面页
22
+    {
23
+      path: '/',
24
+      name: 'Honghe',
25
+      component: Honghe,
26
+
27
+    },
28
+
29
+
30
+
31
+
32
+  ]
33
+})
34
+

+ 32
- 0
vue.config.js Näytä tiedosto

@@ -0,0 +1,32 @@
1
+// vue.config.js
2
+
3
+
4
+// vue.config.js
5
+const path = require('path')
6
+const resolve = dir => path.join(__dirname, dir)
7
+
8
+
9
+module.exports = {
10
+
11
+  devServer: {
12
+    proxy: {
13
+      '/api': {
14
+        target: "http://192.168.89.147:8080/",
15
+        // ws: true,
16
+        changeOrigin: true,
17
+        // pathRewrite: {
18
+        //   // 路径重写
19
+        //   "/api": "" // 这个意思就是以api开头的,定向到哪里, 如果你的后边还有路径的话, 会自动拼接上
20
+        // }
21
+      },
22
+    },
23
+
24
+
25
+  },
26
+  lintOnSave: false,
27
+  publicPath: "./",//在vue-cli.3.3版本后 baseUrl被废除了,因此这边要写成 publicPath。 https://cli.vuejs.org/zh/config/#vue-config-js
28
+  runtimeCompiler: true,
29
+  chainWebpack: config => {
30
+    config.resolve.alias.set("@", resolve("src"));
31
+  }
32
+}

+ 12
- 0
yarn.lock Näytä tiedosto

@@ -5127,6 +5127,11 @@ kind-of@^6.0.0, kind-of@^6.0.2:
5127 5127
   resolved "https://registry.nlark.com/kind-of/download/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd"
5128 5128
   integrity sha1-B8BQNKbDSfoG4k+jWqdttFgM5N0=
5129 5129
 
5130
+klona@^2.0.4:
5131
+  version "2.0.5"
5132
+  resolved "https://registry.yarnpkg.com/klona/-/klona-2.0.5.tgz#d166574d90076395d9963aa7a928fabb8d76afbc"
5133
+  integrity sha512-pJiBpiXMbt7dkzXe8Ghj/u4FfXOOa98fPW+bihOJ4SjnoijweJrNThJfd3ifXpXhREjpoF2mZVH1GfS9LV3kHQ==
5134
+
5130 5135
 launch-editor-middleware@^2.2.1:
5131 5136
   version "2.3.0"
5132 5137
   resolved "https://registry.npmmirror.com/launch-editor-middleware/download/launch-editor-middleware-2.3.0.tgz#edd0ed45a46f5f1cf27540f93346b5de9e8c3be0"
@@ -5142,6 +5147,13 @@ launch-editor@^2.2.1, launch-editor@^2.3.0:
5142 5147
     picocolors "^1.0.0"
5143 5148
     shell-quote "^1.6.1"
5144 5149
 
5150
+less-loader@^10.2.0:
5151
+  version "10.2.0"
5152
+  resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-10.2.0.tgz#97286d8797dc3dc05b1d16b0ecec5f968bdd4e32"
5153
+  integrity sha512-AV5KHWvCezW27GT90WATaDnfXBv99llDbtaj4bshq6DvAihMdNjaPDcUMa6EXKLRF+P2opFenJp89BXg91XLYg==
5154
+  dependencies:
5155
+    klona "^2.0.4"
5156
+
5145 5157
 levn@^0.3.0, levn@~0.3.0:
5146 5158
   version "0.3.0"
5147 5159
   resolved "https://registry.nlark.com/levn/download/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"