fix:修改裁剪后的大小
This commit is contained in:
parent
4a5df1227c
commit
1781f0ccce
@ -1027,7 +1027,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog_content" style="height: 400px">
|
<div class="dialog_content" style="height: 400px">
|
||||||
<!-- <vue-scroll> -->
|
<!-- <vue-scroll> -->
|
||||||
<vueCropper
|
<!-- <vueCropper
|
||||||
ref="cropper"
|
ref="cropper"
|
||||||
:img="cropperOption.img"
|
:img="cropperOption.img"
|
||||||
:outputType="cropperOption.outputType"
|
:outputType="cropperOption.outputType"
|
||||||
@ -1037,6 +1037,17 @@
|
|||||||
:fixedBox="true"
|
:fixedBox="true"
|
||||||
:outputSize="0.7"
|
:outputSize="0.7"
|
||||||
:maxImgSize="300"
|
:maxImgSize="300"
|
||||||
|
></vueCropper> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:outputSize="1"
|
||||||
|
:maxImgSize="300"
|
||||||
|
mode="contain"
|
||||||
|
:autoCrop="true"
|
||||||
></vueCropper>
|
></vueCropper>
|
||||||
<!-- </vue-scroll> -->
|
<!-- </vue-scroll> -->
|
||||||
</div>
|
</div>
|
||||||
@ -2990,6 +3001,12 @@ export default {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("aaaaa", res);
|
console.log("aaaaa", res);
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (res.data.status == "SUCCESS") {
|
if (res.data.status == "SUCCESS") {
|
||||||
if (this.isSzProject == 1) {
|
if (this.isSzProject == 1) {
|
||||||
this.checkImgLibrary(res.data.data[0].imageUrl);
|
this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
|
|||||||
@ -945,7 +945,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog_content" style="height: 400px">
|
<div class="dialog_content" style="height: 400px">
|
||||||
<!-- <vue-scroll> -->
|
<!-- <vue-scroll> -->
|
||||||
<vueCropper
|
<!-- <vueCropper
|
||||||
ref="cropper"
|
ref="cropper"
|
||||||
:img="cropperOption.img"
|
:img="cropperOption.img"
|
||||||
:outputType="cropperOption.outputType"
|
:outputType="cropperOption.outputType"
|
||||||
@ -955,6 +955,17 @@
|
|||||||
:fixedBox="true"
|
:fixedBox="true"
|
||||||
:outputSize="0.7"
|
:outputSize="0.7"
|
||||||
:maxImgSize="300"
|
:maxImgSize="300"
|
||||||
|
></vueCropper> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:outputSize="1"
|
||||||
|
:maxImgSize="300"
|
||||||
|
mode="contain"
|
||||||
|
:autoCrop="true"
|
||||||
></vueCropper>
|
></vueCropper>
|
||||||
<!-- </vue-scroll> -->
|
<!-- </vue-scroll> -->
|
||||||
</div>
|
</div>
|
||||||
@ -2793,6 +2804,18 @@ export default {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("aaaaa", res);
|
console.log("aaaaa", res);
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (res.data.status == "SUCCESS") {
|
if (res.data.status == "SUCCESS") {
|
||||||
if (this.isSzProject == 1) {
|
if (this.isSzProject == 1) {
|
||||||
this.checkImgLibrary(res.data.data[0].imageUrl);
|
this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
|
|||||||
@ -488,7 +488,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog_content" style="height: 400px">
|
<div class="dialog_content" style="height: 400px">
|
||||||
<!-- <vue-scroll> -->
|
<!-- <vue-scroll> -->
|
||||||
<vueCropper
|
<!-- <vueCropper
|
||||||
ref="cropper"
|
ref="cropper"
|
||||||
:img="cropperOption.img"
|
:img="cropperOption.img"
|
||||||
:outputType="cropperOption.outputType"
|
:outputType="cropperOption.outputType"
|
||||||
@ -498,6 +498,17 @@
|
|||||||
:fixedBox="true"
|
:fixedBox="true"
|
||||||
:outputSize="0.7"
|
:outputSize="0.7"
|
||||||
:maxImgSize="300"
|
:maxImgSize="300"
|
||||||
|
></vueCropper> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:outputSize="1"
|
||||||
|
:maxImgSize="300"
|
||||||
|
mode="contain"
|
||||||
|
:autoCrop="true"
|
||||||
></vueCropper>
|
></vueCropper>
|
||||||
<!-- </vue-scroll> -->
|
<!-- </vue-scroll> -->
|
||||||
</div>
|
</div>
|
||||||
@ -2476,6 +2487,12 @@ export default {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("aaaaa", res);
|
console.log("aaaaa", res);
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (res.data.status == "SUCCESS") {
|
if (res.data.status == "SUCCESS") {
|
||||||
if (this.isSzProject == 1) {
|
if (this.isSzProject == 1) {
|
||||||
this.checkImgLibrary(res.data.data[0].imageUrl);
|
this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
|
|||||||
@ -2299,7 +2299,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog_content" style="height: 400px">
|
<div class="dialog_content" style="height: 400px">
|
||||||
<!-- <vue-scroll> -->
|
<!-- <vue-scroll> -->
|
||||||
<vueCropper
|
<!-- <vueCropper
|
||||||
ref="cropper"
|
ref="cropper"
|
||||||
:img="cropperOption.img"
|
:img="cropperOption.img"
|
||||||
:outputType="cropperOption.outputType"
|
:outputType="cropperOption.outputType"
|
||||||
@ -2309,6 +2309,17 @@
|
|||||||
:fixedBox="true"
|
:fixedBox="true"
|
||||||
:outputSize="0.7"
|
:outputSize="0.7"
|
||||||
:maxImgSize="300"
|
:maxImgSize="300"
|
||||||
|
></vueCropper> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:outputSize="1"
|
||||||
|
:maxImgSize="300"
|
||||||
|
mode="contain"
|
||||||
|
:autoCrop="true"
|
||||||
></vueCropper>
|
></vueCropper>
|
||||||
<!-- </vue-scroll> -->
|
<!-- </vue-scroll> -->
|
||||||
</div>
|
</div>
|
||||||
@ -3446,6 +3457,12 @@ export default {
|
|||||||
// this.checkFace(res.data.data[0].imageUrl);
|
// this.checkFace(res.data.data[0].imageUrl);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (res.data.status == "SUCCESS") {
|
if (res.data.status == "SUCCESS") {
|
||||||
// this.checkImgLibrary(res.data.data[0].imageUrl);
|
// this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
if (this.isSzProject == 1) {
|
if (this.isSzProject == 1) {
|
||||||
|
|||||||
@ -2242,7 +2242,7 @@
|
|||||||
>
|
>
|
||||||
<div class="dialog_content" style="height: 400px">
|
<div class="dialog_content" style="height: 400px">
|
||||||
<!-- <vue-scroll> -->
|
<!-- <vue-scroll> -->
|
||||||
<vueCropper
|
<!-- <vueCropper
|
||||||
ref="cropper"
|
ref="cropper"
|
||||||
:img="cropperOption.img"
|
:img="cropperOption.img"
|
||||||
:outputType="cropperOption.outputType"
|
:outputType="cropperOption.outputType"
|
||||||
@ -2252,6 +2252,17 @@
|
|||||||
:fixedBox="true"
|
:fixedBox="true"
|
||||||
:outputSize="0.7"
|
:outputSize="0.7"
|
||||||
:maxImgSize="300"
|
:maxImgSize="300"
|
||||||
|
></vueCropper> -->
|
||||||
|
<vueCropper
|
||||||
|
ref="cropper"
|
||||||
|
:img="cropperOption.img"
|
||||||
|
:outputType="cropperOption.outputType"
|
||||||
|
:autoCropWidth="cropperOption.autoCropWidth"
|
||||||
|
:autoCropHeight="cropperOption.autoCropHeight"
|
||||||
|
:outputSize="1"
|
||||||
|
:maxImgSize="300"
|
||||||
|
mode="contain"
|
||||||
|
:autoCrop="true"
|
||||||
></vueCropper>
|
></vueCropper>
|
||||||
<!-- </vue-scroll> -->
|
<!-- </vue-scroll> -->
|
||||||
</div>
|
</div>
|
||||||
@ -4430,6 +4441,12 @@ export default {
|
|||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("aaaaa", res);
|
console.log("aaaaa", res);
|
||||||
|
let imgSize = Number(res.data.data[0].fileInfo.size / 1024);
|
||||||
|
console.log('经过vueCropper裁剪后', imgSize);
|
||||||
|
if (imgSize <= 10 || imgSize >= 200) {
|
||||||
|
this.$message.error("图片裁剪后大小不能超过200kb小于10kb,请重新裁剪或重新上传图片!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (res.data.status == "SUCCESS") {
|
if (res.data.status == "SUCCESS") {
|
||||||
if (this.isSzProject == 1) {
|
if (this.isSzProject == 1) {
|
||||||
this.checkImgLibrary(res.data.data[0].imageUrl);
|
this.checkImgLibrary(res.data.data[0].imageUrl);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user