升级写法兼容
This commit is contained in:
@ -44,7 +44,7 @@ export default {
|
||||
let Articels = []
|
||||
const nowPage = params.page ? parseInt(params.page) : 1
|
||||
|
||||
const { data } = await $axios.$get('/public/article/list', {
|
||||
const data = await $axios.$get('/public/article/list', {
|
||||
params: {
|
||||
page: nowPage,
|
||||
num: 8,
|
||||
@ -91,7 +91,7 @@ export default {
|
||||
for (const n in this.Articels) {
|
||||
if (this.Articels[n].postimages.length !== 0) {
|
||||
for (const i in this.Articels[n].postimages) {
|
||||
const { data } = await this.$axios.$get(this.Articels[n].postimages[i].guid + '?x-oss-process=image/info')
|
||||
const data = await this.$axios.$get(this.Articels[n].postimages[i].guid + '?x-oss-process=image/info')
|
||||
const widthValue = data.ImageWidth.value
|
||||
const heightValue = data.ImageHeight.value
|
||||
if (widthValue > articleImgsWidth && (articleImgsWidth * heightValue / widthValue > this.imageHeight) && this.Articels[n].postImages.length < 10) {
|
||||
|
Reference in New Issue
Block a user