diff --git a/package.json b/package.json index 43d6c46..8d3ec8c 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,9 @@ "element-ui": "^2.15.9", "vue": "^2.6.11", "vue-awesome": "^4.0.2", + "vue-count-to": "^1.0.13", "vue-router": "^3.1.5", + "vue-seamless-scroll": "^1.1.23", "vuex": "^3.1.2" }, "devDependencies": { @@ -31,6 +33,7 @@ "eslint-plugin-vue": "^6.1.2", "sass": "^1.25.0", "sass-loader": "^8.0.2", + "vue-awesome-swiper": "^3.1.3", "vue-template-compiler": "^2.6.11" }, "eslintConfig": { diff --git a/src/assets/images/header-bg.png b/src/assets/images/header-bg.png new file mode 100644 index 0000000..84d92c1 Binary files /dev/null and b/src/assets/images/header-bg.png differ diff --git a/src/assets/images/header-left.png b/src/assets/images/header-left.png new file mode 100644 index 0000000..c713888 Binary files /dev/null and b/src/assets/images/header-left.png differ diff --git a/src/assets/images/header-right.png b/src/assets/images/header-right.png new file mode 100644 index 0000000..18abf63 Binary files /dev/null and b/src/assets/images/header-right.png differ diff --git a/src/assets/images/notice.gif b/src/assets/images/notice.gif new file mode 100644 index 0000000..17f9f0d Binary files /dev/null and b/src/assets/images/notice.gif differ diff --git a/src/assets/images/title-big.png b/src/assets/images/title-big.png new file mode 100644 index 0000000..2d5a0b9 Binary files /dev/null and b/src/assets/images/title-big.png differ diff --git a/src/assets/images/top-line.png b/src/assets/images/top-line.png new file mode 100644 index 0000000..33beb85 Binary files /dev/null and b/src/assets/images/top-line.png differ diff --git a/src/assets/styles/ball-running-animate.css b/src/assets/styles/ball-running-animate.css new file mode 100644 index 0000000..703374d --- /dev/null +++ b/src/assets/styles/ball-running-animate.css @@ -0,0 +1,116 @@ +.ball-running-dots { + position: absolute; + top: 0.2rem; +} +.left-dots { + left: 136px; +} +.right-dots { + right: 200px; +} +.ball-running-dots > div { + position: relative; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.ball-running-dots { + display: block; + font-size: 0; + color: #316fd9; +} +.ball-running-dots > div { + display: inline-block; + float: none; + background-color: currentColor; + border: 0 solid currentColor; +} +.ball-running-dots { + width: 12px; + height: 12px; +} +.ball-running-dots > div { + position: absolute; + margin-left: 30px; + border-radius: 100%; +} +.left-dots > div { + animation: ball-running-dots-animate 2s linear infinite; +} +.right-dots > div { + animation: ball-running-dots-animate2 2s linear infinite; +} +.ball-running-dots > div:nth-child(1) { + animation-delay: 0s; +} +.ball-running-dots > div:nth-child(2) { + animation-delay: -0.8s; +} +.ball-running-dots > div:nth-child(3) { + animation-delay: -1.2s; +} +.ball-running-dots > div:nth-child(4) { + animation-delay: -1.6s; +} +@keyframes ball-running-dots-animate { + 0%{ + width: 100%; + height: 100%; + transform: translateY(0) translateX(-500%) scale(50%,50%); + opacity: 0.5; + } + 80% { + transform: translateY(0) translateX(0); + } + 85% { + width: 100%; + height: 100%; + transform: translateY(-125%) translateX(0); + } + 90% { + width: 200%; + height: 75%; + } + 95% { + width: 100%; + height: 100%; + transform: translateY(-100%) translateX(-500%); + } + 100% { + width: 100%; + height: 100%; + transform: translateY(0) translateX(-500%) scale(50%,50%); + opacity: 1; + } +} +@keyframes ball-running-dots-animate2 { + 0%{ + width: 100%; + height: 100%; + transform: translateY(0) translateX(500%) scale(50%,50%); + opacity: 0.5; + } + 80% { + transform: translateY(0) translateX(0); + } + 85% { + width: 100%; + height: 100%; + transform: translateY(-125%) translateX(0); + } + 90% { + width: 200%; + height: 75%; + } + 95% { + width: 100%; + height: 100%; + transform: translateY(-100%) translateX(500%); + } + 100% { + width: 100%; + height: 100%; + transform: translateY(0) translateX(500%); + opacity: 1; + } +} diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index 597b3e3..ca4180c 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -12,12 +12,32 @@ // 头部主题标题 .header-container{ position: relative; + width: 100%; + height: 1.125rem; font-size: 0.3rem; color: #fff; + &::before, + &::after{ + content: ""; + position: absolute; + top: 0; + width: 6.2rem; + height: 1.05rem; + } + &::before{ + left: 0; + background: url('~@/assets/images/header-left.png') no-repeat top center; + } + &::after{ + right: 0; + background: url('~@/assets/images/header-right.png') no-repeat top center; + } .header-title{ - width: 100%; - height: 1.125rem; - background: url('~@/assets/images/top.png') no-repeat center -5px; + position: relative; + width: 15.85rem; + height: 1.075rem; + margin: 0 auto; + background: url('~@/assets/images/header-bg.png') no-repeat top center; background-size: cover; h2{ font-size: 0.6rem; @@ -37,20 +57,62 @@ } .header-weather { left: 1rem; - // top: 0.32rem; } .header-date { right: 0.375rem; } } +// 头部动态效果 +.line1, +.line2{ + position: absolute; + top: 0; +} + +.line1{ + right: 632px; + transform: rotateY(-180deg); +} + +.line2{ + left: 632px; +} + +.top-line1, +.top-line2{ + display: block; + width: 7.925rem; + height: 1.075rem; + animation: topline 4s linear infinite both; +} + +.top-line1{ + background: url('~@/assets/images/top-line.png') no-repeat; +} + +.top-line2{ + background: url('~@/assets/images/top-line.png') no-repeat; +} + +@keyframes topline { + from { + width: 0; + } + 50%, + to { + width: 643px; + } +} + // 主题内部部分 .screen-main{ display: flex; justify-content: space-between; - height: calc(100% - 155px); + height: calc(100% - 91px); margin: 0.0625rem 0 0.5rem 0; padding: 0 0.325rem; + overflow: hidden; .screen-left, .screen-right{ width: 6.375rem; @@ -88,12 +150,13 @@ } .big-module{ height: 6.675rem; + margin:0.1625rem 0; } //排行榜-推荐 - list .lending-ranking{ .module-content{ - padding: 0.1625rem 0.25rem; + padding: 0 0.25rem; overflow: hidden; } } @@ -102,7 +165,6 @@ justify-content: space-between; align-items: center; padding: 0.1rem 0.25rem; - // background-color: #09194B; .book-img{ display: block; width: 0.825rem; @@ -141,7 +203,8 @@ margin: 0.375rem 0 .25rem 0; .accessToLib-item{ width: 2.75rem; - p{ + .panel-num{ + display: block; height: 0.85rem; margin-top: 0.125rem; line-height: 0.85rem; @@ -158,11 +221,16 @@ // 视频 .video-box{ width: 100%; - height: 5.075rem; + height: 5.225rem; } // 阅读之星 .read-star{ + flex: 1; + .common-title{ + background: url('~@/assets/images/title-big.png') no-repeat center center; + background-size: cover; + } .module-content{ padding: .25rem; overflow: hidden; @@ -231,17 +299,18 @@ display: flex; justify-content: space-between; padding: 0.25rem 0.375rem 0.5rem 0.375rem; - .icon-tongzhi{ + .notice-icon-gif{ + display: block; + width: 3.375rem; + height: 2.875rem; + background: url('~@/assets/images/notice.gif') no-repeat left top; + background-size: contain; margin-right: 0.15rem; - font-size: 0.325rem; - color: #1AC9FF; } - p{ + .seamless-warp{ height: 3.1rem; overflow: hidden; - // overflow-y: auto; } } } - } \ No newline at end of file diff --git a/src/main.js b/src/main.js index e24caa5..ff320ee 100644 --- a/src/main.js +++ b/src/main.js @@ -18,6 +18,9 @@ Vue.prototype.$axios = axios import echarts from 'echarts' Vue.prototype.$echarts = echarts +import scroll from 'vue-seamless-scroll' +Vue.use(scroll) + Vue.config.productionTip = false new Vue({ diff --git a/src/views/accessToLibrary.vue b/src/views/accessToLibrary.vue index 4e8c8f4..e9af46a 100644 --- a/src/views/accessToLibrary.vue +++ b/src/views/accessToLibrary.vue @@ -2,22 +2,26 @@
总进馆人数 -

2,125,462

+
月进馆人数 -

10,062

+
今日进馆人数 -

2,462

+