function fileport() {

$('.mui-content').find('.Pegam').remove()

var filest = document.getElementById('file').files[0];

let bianb = filest.name.substring(filest.name.length - 3).toLowerCase();

let panduan = ['jpg', 'png', 'pdf', 'jpeg'];

for(let i = 0; i < panduan.length; i++) {

if(bianb == panduan[i]) {

mui.toast('上传成功')

$('.noneshuju').hide()

$('.clicbas').show()

let pop = ''

$('.mui-content').append(pop)

$('.mui-content').css('margin-bottom', '40px')

return

} else {

mui.toast('上传失败')

return

}

}

}

这是mui里的。

但是在uni中又什么方法可以直接获取到。请官方大人明察

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐