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'], //可以指定是原图还是压缩图,默认二者都有