From 245065274b2a568dc9f460105d8712b23e61979f Mon Sep 17 00:00:00 2001 From: x_ying <2438792676@qq.com> Date: Mon, 19 Sep 2022 17:37:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E5=9B=BE=E4=B9=A6=20?= =?UTF-8?q?=E5=9B=BE=E4=B9=A6=E8=AF=A6=E6=83=85=20=E5=BD=93=E5=89=8D?= =?UTF-8?q?=E6=97=B6=E9=97=B4=20/=20=E5=85=B6=E4=BB=96=E5=90=84=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E9=A1=B5=E9=9D=A2=20/=20=E6=A0=B7=E5=BC=8F=E6=81=A2?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/styles/index.scss | 69 ++++++++------ src/main.js | 4 + src/router/index.js | 25 +++++ src/views/authorRecommend.vue | 31 ++++++ src/views/bookRackList.vue | 53 ++++++++--- src/views/data1.json | 6 +- src/views/hotBook.vue | 31 ++++++ src/views/index.vue | 21 ++++- src/views/module/bookDetails.vue | 156 +++++++++++++++++++++++++++++++ src/views/module/headerTop.vue | 51 ++++++++++ src/views/newBook.vue | 29 ++++++ 11 files changed, 431 insertions(+), 45 deletions(-) create mode 100644 src/views/authorRecommend.vue create mode 100644 src/views/hotBook.vue create mode 100644 src/views/module/bookDetails.vue create mode 100644 src/views/module/headerTop.vue create mode 100644 src/views/newBook.vue diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 9850c82..27dc97f 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -120,6 +120,7 @@ } .list-item{ + border: 1px solid #A2CCFF; border-radius: 4px; overflow: hidden; .book-info{ @@ -195,17 +196,42 @@ } } +// 新书推荐 +.new-recommend{ + height: 448px; + margin: 30px 40px 0 40px; +} + +.list-small{ + display: flex; + justify-content: space-between; + justify-items: center; + .list-item{ + width: 200px; + border: none; + img{ + display: block; + width: 100%; + height: 240px; + margin-bottom: 10px; + } + .book-title{ + margin-bottom: 0; + } + } +} + //本架图书页面 .rack-box{ padding: 30px 0; width: 100%; - overflow: hidden; .rack-item{ position: relative; margin-bottom: 30px; + overflow: hidden; .rack-box-list{ - display: flex; - justify-content: space-between; + // display: flex; + // justify-content: space-between; height: 314px; padding: 0 40px; width: 1080px; @@ -214,6 +240,9 @@ overflow-x: auto; white-space: nowrap; .list-item{ + margin-right: 1.7px; + display: inline-block; + border: none; height: 254px; width: 65px; background-size: 93px 266px; @@ -253,6 +282,14 @@ } } +.bookshelf-header .icon-l{ + color: #fff; + font-size: 40px; + position: absolute; + left: 40px; + top: 50%; + transform: translateY(-50%); +} .bookshelf-header .rack-direct{ position: absolute; top: 30px; @@ -327,28 +364,4 @@ } } -// 新书推荐 -.new-recommend{ - height: 448px; - margin: 30px 40px 0 40px; -} - -.list-small{ - display: flex; - justify-content: space-between; - justify-items: center; - .list-item{ - width: 200px; - border: none; - img{ - display: block; - width: 100%; - height: 240px; - margin-bottom: 10px; - } - .book-title{ - margin-bottom: 0; - } - } -} - +// 新书推荐页面 diff --git a/src/main.js b/src/main.js index e24caa5..b552072 100644 --- a/src/main.js +++ b/src/main.js @@ -3,6 +3,10 @@ import App from './App.vue' import router from './router' import store from './store' +// element-ui +import ElementUI from 'element-ui' +import 'element-ui/lib/theme-chalk/index.css' +Vue.use(ElementUI) // 适配flex import '@/common/flexible.js' diff --git a/src/router/index.js b/src/router/index.js index cbab4e9..23cbc31 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -19,7 +19,32 @@ const routes = [ meta: { title: '本架图书' } + }, + { + path: '/NewBook', + name: 'NewBook', + component: () => import('@/views/newBook.vue'), + meta: { + title: '新书推荐' + } + }, + { + path: '/HotBook', + name: 'HotBook', + component: () => import('@/views/hotBook.vue'), + meta: { + title: '热门图书' + } + }, + { + path: '/AuthorRecommend', + name: 'AuthorRecommend', + component: () => import('@/views/authorRecommend.vue'), + meta: { + title: '作者推荐' + } } + ] const router = new VueRouter({ diff --git a/src/views/authorRecommend.vue b/src/views/authorRecommend.vue new file mode 100644 index 0000000..10f685d --- /dev/null +++ b/src/views/authorRecommend.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/views/bookRackList.vue b/src/views/bookRackList.vue index be247b9..82b2255 100644 --- a/src/views/bookRackList.vue +++ b/src/views/bookRackList.vue @@ -1,19 +1,23 @@ diff --git a/src/views/data1.json b/src/views/data1.json index a4bbebe..7ae8c91 100644 --- a/src/views/data1.json +++ b/src/views/data1.json @@ -1,6 +1,10 @@ { "listData":[ - { "id": 1 }, + [ + { + "id":1 + } + ], { "id": 2 }, { "id": 3 }, { "id": 4 }, diff --git a/src/views/hotBook.vue b/src/views/hotBook.vue new file mode 100644 index 0000000..374de71 --- /dev/null +++ b/src/views/hotBook.vue @@ -0,0 +1,31 @@ + + + + + diff --git a/src/views/index.vue b/src/views/index.vue index cbe3e56..e13f978 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,6 +1,7 @@