|
|
@ -197,6 +197,12 @@ Page({ |
|
|
|
wx.showToast({ title: '图片大于15M,不可上传', icon: 'none' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
const fileNameArr = res.tempFiles[i].tempFilePath.split('.'); |
|
|
|
const extension = res.tempFiles[i].tempFilePath.split('.')[fileNameArr.length - 1]; |
|
|
|
if (extension !== 'jpg' && extension !== 'png' && extension !== 'jpeg') { |
|
|
|
wx.showToast({ title: '只能上传jpg、jpeg、png格式的图片', icon: 'none' }); |
|
|
|
return; |
|
|
|
} |
|
|
|
pics.push(imgs[i].tempFilePath) |
|
|
|
} |
|
|
|
that.uploadimg({ |
|
|
|