diff --git a/components/vc-upload-async/vc-upload-async.vue b/components/vc-upload-async/vc-upload-async.vue index 854d95f..43ab6a4 100644 --- a/components/vc-upload-async/vc-upload-async.vue +++ b/components/vc-upload-async/vc-upload-async.vue @@ -142,7 +142,7 @@ var tempFilePaths = upImgRes.tempFilePaths[0] that.imgList.push(tempFilePaths); that.$forceUpdate(); - //#ifdef H5 + TanslateImage.translate(tempFilePaths, (base64) => { let _objData = { uploadFile: base64, @@ -152,19 +152,6 @@ that.photos.push(res); }) }) - //#endif - - //#ifndef H5 - factory.base64.urlTobase64(tempFilePaths).then(function(base64) { - let _objData = { - uploadFile: base64, - communityId: that.communityId - } - uploadImageAsync(_objData, that).then((res) => { - that.photos.push(res); - }) - }); - //#endif } }); }, diff --git a/pages/excuteOneInspection/excuteOneInspection.vue b/pages/excuteOneInspection/excuteOneInspection.vue index df27ae2..97ce1a6 100644 --- a/pages/excuteOneInspection/excuteOneInspection.vue +++ b/pages/excuteOneInspection/excuteOneInspection.vue @@ -29,7 +29,7 @@ - + 当前位置 @@ -86,19 +86,17 @@ maxPhotoNum: 4, imgTitle: '巡检图片', canEdit: true - } + }, + sourceType:[ 'camera'] } }, components: { uploadImageAsync }, - onLoad(option) { this.java110Context.onLoad(); - let that = this; - this.mapKey = conf.QQMapKey; wx.getLocation({ type: 'gcj02', @@ -198,45 +196,7 @@ this.patrolTypeName = selected.name; this.patrolType = selected.statusCd; }, - removePhoto: function(e) { - let _imgList = []; - this.imgList.forEach(function(item, index) { - if (index != e) { - _imgList.push(item); - } - }); - let _photos = []; - this.photos.forEach(function(item, index) { - if (index != e) { - _photos.push(item); - } - }); - this.photos = _photos; - this.imgList = _imgList; - }, - deleteImage: function(e) { - let imageArr = this.$data.imgList; - imageArr.splice(e, 1); - this.photos.splice(e, 1); - }, - ChooseImage: function(e) { - let that = this; - wx.chooseImage({ - count: 4, //默认9 - sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 - sourceType: ['camera'], //手机拍照 - success: (res) => { - - that.$data.imgList.push(res.tempFilePaths[0]); - var tempFilePaths = res.tempFilePaths[0] - - TanslateImage.translate(tempFilePaths, (url) => { - that.photos.push(url); - }) - - } - }); - }, + _submitExcuteInspection: function() { let _that = this; uni.showLoading({