wws преди 1 година
родител
ревизия
1875e97396
променени са 2 файла, в които са добавени 29 реда и са изтрити 1 реда
  1. 4 1
      src/router/index.js
  2. 25 0
      src/views/home/HomePage.vue

+ 4 - 1
src/router/index.js

@@ -5,8 +5,11 @@ Vue.use(VueRouter)
 
 const routes = [
   {
-    // path: '/live',
     path: '/',
+    component: () => import( '../views/home/HomePage.vue')
+  },
+  {
+    path: '/live',
     component: () => import( '../views/live/LiveItem.vue')
   },
   {

+ 25 - 0
src/views/home/HomePage.vue

@@ -0,0 +1,25 @@
+<script>
+export default {
+  name: "HomePage"
+}
+</script>
+
+<template>
+  <div class="page">
+    <van-button type="primary" @click="$router.push('/live')">直播</van-button>
+    <van-button @click="$router.push('/feed')">点播</van-button>
+  </div>
+</template>
+
+<style scoped>
+
+.page {
+  height: 80vh;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  column-gap: 16px;
+  row-gap: 16px;
+}
+
+</style>