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 @@