diff --git a/src/api/library.js b/src/api/library.js index 8781791..30ec0a7 100644 --- a/src/api/library.js +++ b/src/api/library.js @@ -91,6 +91,33 @@ export function FetchReadRanking(params) { }) } +// page4 获取通知 +export function FetchNoticeList(params) { + return request({ + url: '/qyzt/getNoticeList' + '?' + qs.stringify(params, { indices: false }), + method: 'get', + urlType: 'local' + }) +} + +// page4 文献排行榜 +export function FetchSync36(params) { + return request({ + url: '/qyzt/sync36' + '?' + qs.stringify(params, { indices: false }), + method: 'get', + urlType: 'local' + }) +} + +// page4 获取总馆资料 +export function FetchTotalResource(params) { + return request({ + url: '/qyzt/getTotalResource' + '?' + qs.stringify(params, { indices: false }), + method: 'get', + urlType: 'local' + }) +} + export default { FetchInitToken, FetchLibBookTotal, @@ -101,5 +128,8 @@ export default { FetchHotSearch, FetchNewBook, FetchReadRanking, - FetchLibcodeDetails + FetchLibcodeDetails, + FetchNoticeList, + FetchSync36, + FetchTotalResource } diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss index aebb12d..0d39b27 100644 --- a/src/assets/styles/index.scss +++ b/src/assets/styles/index.scss @@ -1460,30 +1460,48 @@ margin-top: .125rem; overflow: hidden; .notice-text{ - position: absolute; - padding: .4125rem .375rem; + position: relative; + padding: 0 .375rem; + margin-bottom: .25rem; font-size: .225rem; color: #ADC7FF; line-height: .375rem; - // height: 1.625rem; - text-indent: 2em; font-weight: bold; - // animation: myMove 20s linear infinite; - // animation-fill-mode: forwards; - span{ - display: block; - text-align: right; + .notice-title{ + position: absolute; + left: 0; + top: 0; + z-index: 9999; + display: flex; + justify-content: space-between; + flex-wrap: nowrap; + width: calc(100%); + height: .5rem; + line-height: .5rem; + padding: 0 .375rem; color: #7D93C2; font-size: .2rem; + background-color: #011244; + span{ + display: block; + } } + p{ + color: #fff; + text-indent: 2em; + } + } + .scroll-animation { + animation: myMove 15s linear infinite; + animation-fill-mode: forwards; } @keyframes myMove { 0% { - transform: translateY(2rem); + transform: translateY(1rem); } 100% { - transform: translateY(-3rem); + transform: translateY(calc(-1 * var(--container-height))); } } } @@ -1534,6 +1552,7 @@ overflow: hidden; img{ display: block; + padding: .125rem; width: 100%; } } diff --git a/src/main.js b/src/main.js index d5c32e3..f564836 100644 --- a/src/main.js +++ b/src/main.js @@ -29,6 +29,13 @@ Vue.prototype.$message = Message // Vue.prototype.libcode = 'FTZN' Vue.prototype.libcode = '1201' +// 全局注册过滤 - 时间 +import { parseTime, getFormattedDate } from '@/utils/index.js' +Vue.filter('parseTime', function(time, cFormat) { + return parseTime(time, cFormat) +}) +Vue.prototype.getFormattedDate = getFormattedDate + import axios from 'axios' Vue.prototype.$axios = axios diff --git a/src/utils/index.js b/src/utils/index.js index 65f1862..d7ed7b6 100644 --- a/src/utils/index.js +++ b/src/utils/index.js @@ -91,6 +91,14 @@ export function getCurrentTime() { return time } +export function getFormattedDate(date, yearOffset = 0) { + date.setFullYear(date.getFullYear() + yearOffset) + const year = date.getFullYear() + const month = (date.getMonth() + 1).toString().padStart(2, '0') + const day = date.getDate().toString().padStart(2, '0') + return `${year}-${month}-${day}` +} + export function isExternal(path) { return /^(https?:|mailto:|tel:)/.test(path) } diff --git a/src/views/index.vue b/src/views/index.vue index c35ce93..60ccf1f 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -55,7 +55,7 @@ export default { }, data() { return { - currentIndex: 2, // 当前显示的页面索引 + currentIndex: 1, // 当前显示的页面索引 currentPage: null, // 当前显示的页面数据 isLoading: false, height: '', @@ -75,7 +75,8 @@ export default { todayTimer: null, yearTimer: null, intervalId: null, - orderIds: [] + orderIds: [], + wecharQrCodeSrc: null } }, computed: { @@ -100,7 +101,7 @@ export default { // meta.callback = (r) => { // console.log(r, '回调') // } - // this.getInitSetting() + this.getInitSetting() }, beforeDestroy() { clearInterval(this.timer2) @@ -145,9 +146,12 @@ export default { // selectorder 显示的屏和顺序 1第一屏 2第二屏 // show1 第一屏显示时间 // show2 第二屏显示时间 + const linkSrc = process.env.VUE_APP_BASE_API FetchInitSetting().then(res => { const result = JSON.parse(res.data) console.log(result) + this.wecharQrCodeSrc = linkSrc + '/downloadFile' + result.wecharQrCode + localStorage.setItem('wecharQrCodeSrc', this.wecharQrCodeSrc) const selectorder = result.selectorder const showDurations = { 1: result.show1, 2: result.show2, 3: result.show3, 4: result.show4 } diff --git a/src/views/map/index.vue b/src/views/map/index.vue index d9f0969..5cabeaa 100644 --- a/src/views/map/index.vue +++ b/src/views/map/index.vue @@ -51,7 +51,7 @@
累计办证人数
+本年累计办证人数
{{ cardTotal }}人