Browse Source

页面优化

master
xuhuajiao 3 weeks ago
parent
commit
eace8727da
  1. 2
      src/views/map/index.vue
  2. 8
      src/views/mixins/index.js
  3. 4
      src/views/pageFour/index.vue
  4. 6
      src/views/pageOne/index.vue
  5. 15
      src/views/pageThree/index.vue

2
src/views/map/index.vue

@ -148,7 +148,7 @@ export default {
}, { immediate: true })
},
activated() {
this.getLibBookTotal(this.activatedBaseSetting)
// this.getLibBookTotal(this.activatedBaseSetting)
if (this.rankingData.length !== 0) {
this.currentHover = -1
this.rankInterval = setInterval(() => {

8
src/views/mixins/index.js

@ -4,7 +4,7 @@ export const pageCrud = {
// 组件共用属性
data() {
return {
headerTitle: '智慧大屏',
headerTitle: '数字智慧大屏',
baseSetting: {},
currentIndex: 0, // 当前显示的页面索引
currentPage: null, // 当前显示的页面数据
@ -74,9 +74,9 @@ export const pageCrud = {
},
getInitSetting() {
// const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API
// const doorCodes = this.$route.query.doorCodes
// console.log('doorCodes:', doorCodes)
FetchInitScreenData({ libcode: this.libcode }).then(res => {
const doorCodes = this.$route.query.doorCodes
console.log('doorCodes:', doorCodes)
FetchInitScreenData({ 'libcode': this.libcode, 'doorCodes': doorCodes || null }).then(res => {
const result = res.data.settings
this.baseSetting = res.data.settings
this.welcomeData = res.data.screenWelcomePromotions

4
src/views/pageFour/index.vue

@ -201,7 +201,9 @@ export default {
// wecharQrCode /downloadFile/+wecharQrCode
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API
console.log('linkSrc', linkSrc)
FetchInitScreenData({ libcode: this.libcode }).then(res => {
const doorCodes = this.$route.query.doorCodes
console.log('doorCodes:', doorCodes)
FetchInitScreenData({ 'libcode': this.libcode, 'doorCodes': doorCodes || null }).then(res => {
const result = res.data.settings
// this.wecharQrCodeSrc = linkSrc + '/downloadFile' + result.wecharQrCode
this.wecharQrCodeSrc = result.wechar_qr_code.context

6
src/views/pageOne/index.vue

@ -215,14 +215,11 @@ export default {
watch: {
baseSetting: {
handler(result) {
// result
if (!result) return
// 访undefined
this.pageOneVisitBase = result.visit_base?.context || '0'
this.wecharQrCodeSrc = result.wechar_qr_code?.context || ''
//
if (result.visit_base && result.wechar_qr_code) {
this.initLeftPreview(result)
}
@ -273,8 +270,7 @@ export default {
// iNotice
const linkSrc = process.env.NODE_ENV === 'production' ? window.g.ApiUrl : process.env.VUE_APP_BASE_API
console.log('linkSrc', linkSrc)
// const doorCodes = this.$route.query.doorCodes
FetchInitScreenData({ libcode: this.libcode }).then(res => {
FetchInitScreenData({ 'libcode': this.libcode, 'doorCodes': doorCodes || null }).then(res => {
const result = res.data.settings
this.pageOneVisitBase = result.visit_base.context
this.wecharQrCodeSrc = result.wechar_qr_code.context

15
src/views/pageThree/index.vue

@ -193,7 +193,7 @@ export default {
},
activated() {
// this.getLendingTotal(this.activatedBaseSetting)
this.getTodayJH()
// this.getTodayJH()
this.isKeep = true
// if (this.rankingYearWithPercentage.length !== 0) {
// this.currentHover = -1
@ -271,12 +271,19 @@ export default {
},
//
getLibcodeDetails(data) {
FetchLibcodeDetails().then(res => {
const result = JSON.parse(res.data)
console.log('getLibcodeDetails:', data)
const params = {
'libcode': this.libcode
}
FetchLibcodeDetails(params).then(res => {
console.log('fff:', res)
// const result = JSON.parse(res.data)
const result = res.data
console.log('result:', result)
if (result.length !== 0) {
const newDataArray = []
data.forEach(item => {
const foundItem = result.find(library => library.tcId === item.LIBCODE)
const foundItem = result.find(library => (library.branchType === 1 ? library.libcode : library.tcId) === item.LIBCODE)
if (foundItem) {
const yearValue = item.JCC_YEAR || 0

Loading…
Cancel
Save