随机数
This commit is contained in:
@@ -43,8 +43,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}).then(res=> {
|
}).then(res=> {
|
||||||
if(res?.data) {
|
if(res?.data) {
|
||||||
let nums = res.data.records.length
|
let nums = res.data.records
|
||||||
let index = Math.random() * nums.length
|
let index = Math.floor(Math.random() * nums.length)
|
||||||
this.picUrl = nums[index].picUrl
|
this.picUrl = nums[index].picUrl
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user