Bladeren bron

no message

zhujindu 1 jaar geleden
bovenliggende
commit
d101e0f9f1
1 gewijzigde bestanden met toevoegingen van 39 en 19 verwijderingen
  1. 39 19
      src/components/uploadVNormal.vue

+ 39 - 19
src/components/uploadVNormal.vue

@@ -193,10 +193,10 @@ export default {
               });
               wx.chooseImage({
                 count: 1,
-                sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
+                sizeType: ['original'], // 可以指定是原图还是压缩图,默认二者都有
                 sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
                 defaultCameraMode: 'normal', //表示进入拍照界面的默认模式,目前有normal与batch两种选择,normal表示普通单拍模式,batch表示连拍模式,不传该参数则为normal模式。从3.0.26版本开始支持front和batch_front两种值,其中front表示默认为前置摄像头单拍模式,batch_front表示默认为前置摄像头连拍模式。(注:用户进入拍照界面仍然可自由切换两种模式)
-                isSaveToAlbum: 0,
+                isSaveToAlbum: 0, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
                 success: function (res) {
                   var localIds = '';
                   if (res.localIds != undefined) {
@@ -244,34 +244,54 @@ export default {
       }
       this.meidaId = meidaId;
       this.addressesRemark = addressesRemark;
+      // var form = {
+      //   mediaId: meidaId,
+      //   collectionItemId: that.collectionId,
+      //   objectType: that.objectType,
+      //   storeGroupId: that.storeGroupId,
+      //   taskId: that.taskId,
+      //   visitsId: localStorage.getItem('visitId'),
+      //   visitModel: that.visitModel,
+      //   visitSource: '1',
+      //   locationRemark: addressesRemark,
+      //   parentCollectionId: parentCollectionId,
+      //   secondCollectionId: secondCollectionId,
+      //   firstCollectionId: firstCollectionId,
+      //   fourthCollectionId: fourthCollectionId,
+      //   thirdCollectionId: thirdCollectionId,
+      //   deviceCode: that.deviceCode, //设备编号
+      //   putInCode: that.putInCode, //投放编号
+      // };
       var form = {
-        mediaId: meidaId,
-        collectionItemId: that.collectionId,
-        objectType: that.objectType,
-        storeGroupId: that.storeGroupId,
-        taskId: that.taskId,
-        visitsId: localStorage.getItem('visitId'),
-        visitModel: that.visitModel,
+        mediaId:
+          '3Ym3Ar_cKnYOwQc2pmIawrXn52u4isqyU3AP3eUP_tt37WjC_emMpLIo8TY25wmMkQqZrV1oBGsAck6T0H6jA1A',
+        collectionItemId: '2459',
+        objectType: 'rw-mdz',
+        storeGroupId: '490,486,482,353,340',
+        taskId: '487',
+        visitsId: '5846476',
+        visitModel: '1',
         visitSource: '1',
-        locationRemark: addressesRemark,
-        parentCollectionId: parentCollectionId,
-        secondCollectionId: secondCollectionId,
-        firstCollectionId: firstCollectionId,
-        fourthCollectionId: fourthCollectionId,
-        thirdCollectionId: thirdCollectionId,
-        deviceCode: that.deviceCode, //设备编号
-        putInCode: that.putInCode, //投放编号
+        locationRemark: '洛龙区正大国际中心西座(金城寨街东50米)',
+        parentCollectionId: null,
+        secondCollectionId: null,
+        firstCollectionId: null,
+        fourthCollectionId: null,
+        thirdCollectionId: null,
+        deviceCode: '',
+        putInCode: '',
+        photoIdentifyType: '1',
       };
       this.controller = null;
       // 需要图匠校验的添加参数和loading
       if (this.photoIdentifyType) {
         form.photoIdentifyType = this.photoIdentifyType;
         this.progress();
-        this.controller = null; //取消请求
+        this.controller = new AbortController(); //取消请求
       } else {
         this.toastLoading(0, '上传中...', true);
       }
-      addstorePhoto(form, this.controller)
+      addstorePhoto(form, this.controller ? this.controller.signal : null)
         .then((res) => {
           this.toastLoading().clear();
           if (res.code == -1) {