You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
519 B
16 lines
519 B
import http from './index.js';
|
|
const checkSize = src => {
|
|
return new Promise((resolve, reject) => {
|
|
uni.getImageInfo({
|
|
src,
|
|
success: async ({width, height}) => {
|
|
console.log(width > 4000, height > 4000)
|
|
if (width > 4000 || height > 4000) return reject('图片尺寸过大,请上传小于4000*4000的图片')
|
|
resolve(true)
|
|
},
|
|
complete: res => {
|
|
console.log(res)
|
|
}
|
|
})
|
|
})
|
|
}
|