图片裁剪后过于模糊问题修复

This commit is contained in:
donqi 2022-08-03 11:13:35 +08:00
parent ff8b497c04
commit e33e775380
1 changed files with 8 additions and 6 deletions

View File

@ -204,7 +204,7 @@
</view>
</view>
</view>
<ksp-cropper mode="fixed" :width="cropWidth" :height="cropHeight" :maxWidth="1024" :maxHeight="1024" :url="url2Crop"
<ksp-cropper mode="fixed" :width="cropWidth" :height="cropHeight" :maxWidth="cropWidth" :maxHeight="cropHeight" :url="url2Crop"
@cancel="oncancel" @ok="onok"></ksp-cropper>
<view class="cu-bar bg-white solid-top">
<view class="action text-black">
@ -272,9 +272,10 @@
coverImgList: [],
videoList: []
},
sysInfo: null,
url2Crop: '',
cropWidth: 200,
cropHeight: 300,
cropWidth: 0,
cropHeight: 0,
curImgListField: '',
categoryList: [],
categoryMultiIndex: [0, 0],
@ -327,7 +328,8 @@
this.loadData(goodId);
},
methods: {
async loadData(goodId) {
async loadData(goodId) {
this.sysInfo = uni.getSystemInfoSync();
this.curUserInfo = this.$request.getCurUserInfo();
this.checkBankAndCertify();
this.loadCategoryList();
@ -489,8 +491,8 @@
}
},
chooseImgList(e, imgListField, cropWidth, cropHeight) {
this.cropWidth = cropWidth && cropWidth > 0 ? cropWidth : 200;
this.cropHeight = cropHeight && cropHeight > 0 ? cropHeight : 300;
this.cropWidth = cropWidth && cropWidth > 0 ? cropWidth : this.sysInfo.windowWidth * 2;
this.cropHeight = cropHeight && cropHeight > 0 ? cropHeight : this.sysInfo.windowWidth * 2 * 1.5;
uni.chooseImage({
count: 1, //9
sizeType: ['original', 'compressed'], //