解决ios下拍照自动旋转问题
<input class="sr-only" id="inputImage" name="file" type="file" accept="image/*" onchange="getFile()"> 上传照片 <canvas id="canvas" style="height: 0px"></canvas> 需要引入EXIF.js function getFile() { // alert(1111); let _this = this let img = document.getElementById('image') let file = document.getElementById('inputImage').files[0] let reader = new FileReader() _this.finish = 1 EXIF.getData(file, function () { console.log(1111); let orientation = EXIF.getTag(this, 'Orientation') console.log(orientation); reader.addEventListener('load', function () { console.log(1111); let image = new Image() image.src =