Bläddra i källkod

Merge branch 'master' of http://git.cc-lotus.info/service-platform/mobile-official

wuhongyu 4 år sedan
förälder
incheckning
99c220266f
3 ändrade filer med 41 tillägg och 1 borttagningar
  1. 8 1
      src/router/index.js
  2. 30 0
      src/views/home/error.vue
  3. 3 0
      vue.config.js

+ 8 - 1
src/router/index.js

@@ -7,11 +7,18 @@ Vue.use(VueRouter);
 const routes = [
   // 首页
   {
-    path: '/',
+    path: '/home/index',
     name: '',
     meta: { title: '首页', isleftarrow: false },
     component: () => import('../views/home/index.vue'),
   },
+  // 错误
+  {
+    path: '/home/error',
+    name: '',
+    meta: { title: '错误页面', isleftarrow: false },
+    component: () => import('../views/home/error.vue'),
+  },
   // 直播大厅
   {
     path: '/live/index',

+ 30 - 0
src/views/home/error.vue

@@ -0,0 +1,30 @@
+<template>
+  <div id="error">
+    <p>错误页面</p>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'error',
+  props: {},
+  components: {},
+  data: function() {
+    return {};
+  },
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less" scoped></style>

+ 3 - 0
vue.config.js

@@ -31,6 +31,9 @@ module.exports = {
         target: 'http://free.liaoningdoupo.com',
         changeOrigin: true,
         ws: true,
+        pathRewrite: {
+          '^/wxtoken': 'http://localhost:8002',
+        },
       },
       '/ws': {
         target: 'http://free.liaoningdoupo.com',