|
@ -4,10 +4,10 @@ |
|
|
<div class="swiper mySwiper"> |
|
|
<div class="swiper mySwiper"> |
|
|
<div class="swiper-wrapper"> |
|
|
<div class="swiper-wrapper"> |
|
|
<div v-for="(item,index) in swiperListTemp" :key="index" class="swiper-slide img-module"> |
|
|
<div v-for="(item,index) in swiperListTemp" :key="index" class="swiper-slide img-module"> |
|
|
<div v-for="(cell,i) in item" :key="i" :class="{'item-big': i % 4 === 0 || i % 4 === 3, 'item-small': i % 4 === 1 || i % 4 === 2, 'main-item': true}"> |
|
|
|
|
|
<img :src="cell.bgImg"> |
|
|
|
|
|
|
|
|
<div v-for="(cell,i) in item" :key="i" :class="{'item-big': i % 4 === 0 || i % 4 === 3, 'item-small': i % 4 === 1 || i % 4 === 2, 'main-item': true}" @click="jump(cell.nrsUrl)"> |
|
|
|
|
|
<img :src="'data:image/png;base64,' + cell.nrsImages"> |
|
|
<div class="title"> |
|
|
<div class="title"> |
|
|
{{ cell.title }} |
|
|
|
|
|
|
|
|
{{ cell.nrsTitle }} |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
@ -20,6 +20,7 @@ |
|
|
import data from './digitalResourceJson' |
|
|
import data from './digitalResourceJson' |
|
|
import { Swiper } from 'vue-awesome-swiper' |
|
|
import { Swiper } from 'vue-awesome-swiper' |
|
|
import 'swiper/swiper-bundle.css' |
|
|
import 'swiper/swiper-bundle.css' |
|
|
|
|
|
import { initNumberResoures } from '@/api/inquiryMachine' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
|
name: 'DigitalResource', |
|
|
name: 'DigitalResource', |
|
@ -46,6 +47,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
created() { |
|
|
created() { |
|
|
|
|
|
this.getInfo() |
|
|
this.rankingList = data.srcList1 |
|
|
this.rankingList = data.srcList1 |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
@ -56,6 +58,23 @@ export default { |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
new Swiper('.swiper', {}) |
|
|
new Swiper('.swiper', {}) |
|
|
}) |
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
getInfo() { |
|
|
|
|
|
initNumberResoures({ libcode: this.libcode }).then(data => { |
|
|
|
|
|
this.rankingList = data |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
jump(url) { |
|
|
|
|
|
window.location.href = url |
|
|
|
|
|
}, |
|
|
|
|
|
arrayBufferToBase64(buffer) { |
|
|
|
|
|
var binary = '' |
|
|
|
|
|
var bytes = new Uint8Array(buffer) |
|
|
|
|
|
var len = bytes.byteLength |
|
|
|
|
|
for (var i = 0; i < len; i++) { |
|
|
|
|
|
binary += String.fromCharCode(bytes[i]) |
|
|
|
|
|
} |
|
|
|
|
|
return window.btoa(binary) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|