diff --git a/src/App.vue b/src/App.vue index 66b7daa..41a8856 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,6 +1,8 @@ diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 8502e78..8d6db3d 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -1,9 +1,11 @@ #bookshelf{ width: 100%; - height: 100vh; + height: 1920px; + padding-top: 60px; font-size: 30px; background: url('~@/assets/images/home/bg.png') no-repeat left top; background-size: cover; + overflow: hidden; } //c-s壳占位 @@ -76,75 +78,79 @@ } } -.current-rack{ +// 本架图书 +.book-rack{ height: 770px; margin: 0 40px; padding: 0 40px 40px 40px; background-color: #fff; border-radius: 30px; box-shadow: 0px 0px 20px 1px #B8D3FF; - .rack-top{ +} +.list-top{ + display: flex; + justify-content: space-between; + justify-items: center; + align-items: center; + padding: 30px 0 25px 0; + font-size: 36px; + .list-top-title{ display: flex; - justify-content: space-between; - justify-items: center; - align-items: center; - padding: 30px 0 25px 0; - font-size: 36px; - .rack-top-title{ - display: flex; - justify-content: flex-start; - font-size: 40px; - line-height: 50px; - .icon{ - width: 50px; - height: 50px; - margin-right: 20px; - } + justify-content: flex-start; + font-size: 40px; + line-height: 50px; + .icon{ + width: 50px; + height: 50px; + margin-right: 20px; } - .more{ - .iconfont{ - font-size: 30px; - margin-left: 20px; - } + } + .more{ + .iconfont{ + font-size: 30px; + margin-left: 20px; } } } +// 本架图书list .rack-list{ display: flex; justify-content: space-between; +} - .list-item{ - border: 1px solid #A2CCFF; - border-radius: 4px; - overflow: hidden; - .book-info{ - position: relative; - } - .book-title{ - font-weight: normal; - line-height: 40px; - margin-bottom: 10px; - } - .book-author{ - font-size: 24px; - } - .book-num{ - position: absolute; - bottom: 20px; - display: flex; - justify-content: flex-start; - font-size: 20px; - color: #999; - .icon{ - width: 20px; - height: 22px; - margin-right: 10px; - } +.list-item{ + border: 1px solid #A2CCFF; + border-radius: 4px; + overflow: hidden; + .book-info{ + position: relative; + } + .book-title{ + font-weight: normal; + line-height: 40px; + margin-bottom: 10px; + } + .book-author{ + font-size: 24px; + } + .book-num{ + position: absolute; + bottom: 20px; + display: flex; + justify-content: flex-start; + font-size: 20px; + color: #999; + .icon{ + width: 20px; + height: 22px; + margin-right: 10px; } } +} - .list-big{ +.list-big{ + .list-item{ width: 435px; height: 625px; margin-right: 45px; @@ -161,30 +167,55 @@ right: 16px; } } +} - .list-right{ - flex: 1; +.list-middle{ + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; + height: 625px; + .list-item{ display: flex; - flex-direction: column; + height: calc(100%/2 - 20px); justify-content: space-between; - height: 625px; - .list-middle{ - display: flex; - height: calc(100%/2 - 20px); - justify-content: space-between; - img{ - display: block; - width: 244px; - height: 100%; - margin-right: 20px; - } - .book-info{ - padding: 20px 0 0 0; - } - .book-num{ - left: 0; - bottom: 12px; - } + img{ + display: block; + width: 244px; + height: 100%; + margin-right: 20px; + } + .book-info{ + padding: 20px 0 0 0; + } + .book-num{ + left: 0; + bottom: 12px; } } } + +// 新书推荐 +.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; + } + } +} \ No newline at end of file diff --git a/src/router/index.js b/src/router/index.js index f9ef8a9..cbab4e9 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -3,14 +3,24 @@ import VueRouter from 'vue-router' Vue.use(VueRouter) -const routes = [{ - path: '/', - name: 'index', - component: () => import('../views/index.vue'), - meta: { - title: '智慧大屏' +const routes = [ + { + path: '/', + name: 'index', + component: () => import('@/views/index.vue'), + meta: { + title: '智慧书架' + } + }, + { + path: '/CurrentRackBook', + name: 'CurrentRackBook', + component: () => import('@/views/bookRackList.vue'), + meta: { + title: '本架图书' + } } -}] +] const router = new VueRouter({ mode: 'history', diff --git a/src/views/bookRackList.vue b/src/views/bookRackList.vue new file mode 100644 index 0000000..04cdd3b --- /dev/null +++ b/src/views/bookRackList.vue @@ -0,0 +1,32 @@ + + + + + diff --git a/src/views/data.json b/src/views/data.json new file mode 100644 index 0000000..c622ed2 --- /dev/null +++ b/src/views/data.json @@ -0,0 +1,55 @@ +{ + "bookList":[ + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定1", + "ranking": 1, + "num": 2000 + }, + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定2", + "ranking": 2, + "num": 1200 + }, + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定3", + "ranking": 3, + "num": 1100 + } + ], + "newList":[ + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定1", + "ranking": 1, + "num": 2000 + }, + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定2", + "ranking": 2, + "num": 1200 + }, + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定3", + "ranking": 3, + "num": 1100 + }, + { + "img":"https://qiniu.aiyxlib.com/bg.png", + "title": "大个子狗与小个子猫", + "author": "高小定4", + "ranking": 4, + "num": 1100 + } + ] +} \ No newline at end of file diff --git a/src/views/index.vue b/src/views/index.vue index f01ea48..e50862d 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -1,14 +1,16 @@ diff --git a/src/views/module/bookListItem.vue b/src/views/module/bookListItem.vue new file mode 100644 index 0000000..252d6ef --- /dev/null +++ b/src/views/module/bookListItem.vue @@ -0,0 +1,66 @@ + + + + +