Преглед изворни кода

默认首页调整为积分商城

sunlupeng пре 1 година
родитељ
комит
a89ed9df23

+ 1 - 1
src/components/AppHeader.vue

@@ -4,7 +4,7 @@
             <img class="logo" src="./../assets/image/logo.png"/>
             <router-link to="/home">
                 <div class="header-item">
-                    <i class="icon-mall-gongnengguanli"></i>功能列表
+                    <i class="icon-mall-gongnengguanli"></i>首页
                 </div>
             </router-link>
             <router-link to="/noticeCenter">

+ 8 - 8
src/components/AppSidebar.vue

@@ -20,9 +20,16 @@ export default {
   data() {
     return {
         sideBarList:[
+            {
+                value:'pointsMall',
+                name:'积分商城',
+                path:'/home/pointsMall',
+                icon:'icon-mall-jifenshangcheng',
+                checked:false,
+            },
             {
                 value:'index',
-                name:'首页',
+                name:'最新通知',
                 path:'/home/index',
                 icon:'icon-mall-shouye',
                 checked:false,
@@ -34,13 +41,6 @@ export default {
                 icon:'icon-mall-qiandao',
                 checked:false,
             },
-            {
-                value:'pointsMall',
-                name:'积分商城',
-                path:'/home/pointsMall',
-                icon:'icon-mall-jifenshangcheng',
-                checked:false,
-            },
             {
                 value:'festiveEvents',
                 name:'节日活动',

+ 1 - 1
src/router/index.js

@@ -13,7 +13,7 @@ const routes = [
   {
     path: '/home',
     component: HomeView,
-    redirect:'/home/index',
+    redirect:'/home/pointsMall',
     children: [
       {
         path: '/home/index',

+ 4 - 4
src/views/HomeView/Index.vue

@@ -2,16 +2,16 @@
     <div class="timeline-container">
         <div class="timeline-content">
             <div class="timeline-entry-list">
-                <div class="hot-list-wrap">
+                <!-- <div class="hot-list-wrap">
                     <el-empty :image-size="200" v-if="bannerList.length < 1"></el-empty>
                     <el-carousel arrow="never" indicator-position="none" height="207px" :interval="5000" v-if="bannerList.length > 0">
                         <el-carousel-item v-for="(item, index) in bannerList" :key="index">
-                            <!-- <router-link to="/productTrials"> -->
+                            <router-link to="/productTrials">
                                 <img style="width: 100%; height: 100%" :src="item.url" />
-                            <!-- </router-link> -->
+                            </router-link>
                         </el-carousel-item>
                     </el-carousel>
-                </div>
+                </div> -->
                 <div class="entry-list-container">
                     <div class="tab-header">
                         <span class="tab-title">最新通知</span>

+ 22 - 1
src/views/HomeView/PointsMall.vue

@@ -1,6 +1,16 @@
 <template>
     <div class="right-wrap">
-        <img src="@/assets/image/banner4.png" alt="banner" class="banner">
+        <!-- <img src="@/assets/image/banner4.png" alt="banner" class="banner"> -->
+        <div class="hot-list-wrap">
+                    <el-empty :image-size="200" v-if="bannerList.length < 1"></el-empty>
+                    <el-carousel arrow="never" indicator-position="none" height="207px" :interval="5000" v-if="bannerList.length > 0">
+                        <el-carousel-item v-for="(item, index) in bannerList" :key="index">
+                            <!-- <router-link to="/productTrials"> -->
+                                <img style="width: 100%; height: 100%" :src="item.url" class="banner" />
+                            <!-- </router-link> -->
+                        </el-carousel-item>
+                    </el-carousel>
+                </div>
         <div class="notice-board">
             <div class="notice-header">
                 <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"
@@ -153,6 +163,14 @@ import { debounce } from '@/utils/index'
 export default {
     data() {
         return {
+            bannerList: [
+            {
+                url: require('@/assets/image/banner.png')
+            },
+            {
+                url: require('@/assets/image/banner.jpg')
+            },
+        ],
             page: 1,
             pages: 1,
             // tab 列表
@@ -387,6 +405,9 @@ export default {
 };
 </script>
 <style scoped>
+.hot-list-wrap{
+    margin-bottom: 10px;
+}
 button {
     -webkit-appearance: none;
     -moz-appearance: none;