From e33e775380000afcae48e9334a24d67dd8807469 Mon Sep 17 00:00:00 2001 From: donqi Date: Wed, 3 Aug 2022 11:13:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E7=89=87=E8=A3=81=E5=89=AA=E5=90=8E?= =?UTF-8?q?=E8=BF=87=E4=BA=8E=E6=A8=A1=E7=B3=8A=E9=97=AE=E9=A2=98=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/new-serv.vue | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/pages/my/new-serv.vue b/pages/my/new-serv.vue index 32f0260..c4b53a3 100644 --- a/pages/my/new-serv.vue +++ b/pages/my/new-serv.vue @@ -204,7 +204,7 @@ - @@ -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'], //可以指定是原图还是压缩图,默认二者都有