Parcourir la source

feature_20260427_图片上传增加埋点记录

zhujindu il y a 7 heures
Parent
commit
e1c6a6895a
1 fichiers modifiés avec 18 ajouts et 1 suppressions
  1. 18 1
      src/components/uploadVNormalTaskPhoto.vue

+ 18 - 1
src/components/uploadVNormalTaskPhoto.vue

@@ -35,7 +35,7 @@
 </template>
 </template>
 
 
 <script>
 <script>
-import { addPhotoBatch, addVisitsPosition, addPhotoToDB } from '@/api/index';
+import { addPhotoBatch, addVisitsPosition, addPhotoToDB, buryingPoint } from '@/api/index';
 import imageAIVerifyErr from './imageAIVerifyErr';
 import imageAIVerifyErr from './imageAIVerifyErr';
 import imageWhiteStore from './imageWhiteStore';
 import imageWhiteStore from './imageWhiteStore';
 import H5Camera from '@/components/H5Camera';
 import H5Camera from '@/components/H5Camera';
@@ -114,6 +114,7 @@ export default {
       imageWhiteStoreData: null,
       imageWhiteStoreData: null,
       imageWhiteStoreFlag: false,
       imageWhiteStoreFlag: false,
       localIdsArr: [],
       localIdsArr: [],
+      interfaceUsageTime: null,
     };
     };
   },
   },
   methods: {
   methods: {
@@ -224,6 +225,7 @@ export default {
                 isSaveToAlbum: 0, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
                 isSaveToAlbum: 0, //整型值,0表示拍照时不保存到系统相册,1表示自动保存,默认值是1
                 success: function (res) {
                 success: function (res) {
                   let localIds = res.localIds;
                   let localIds = res.localIds;
+                  that.interfaceUsageTime = Date.now();
                   that.localIdsArr = [];
                   that.localIdsArr = [];
                   // that.$emit('newimgarr', {
                   // that.$emit('newimgarr', {
                   //   localIds: localIds,
                   //   localIds: localIds,
@@ -292,6 +294,21 @@ export default {
       }
       }
       addPhotoBatch(form, this.controller ? this.controller.signal : null)
       addPhotoBatch(form, this.controller ? this.controller.signal : null)
         .then((res) => {
         .then((res) => {
+          if (this.userInfo.photoMethod == '0') {
+            if (this.interfaceUsageTime) {
+              this.interfaceUsageTime = Number(
+                ((Date.now() - this.interfaceUsageTime) / 1000).toFixed(3),
+              );
+            }
+            buryingPoint({
+              systemModel: '门店拜访',
+              buryingPointType: 8,
+              buryingPointValue: form.mediaIds.length,
+              buryingPointName: '陈列奖励案图片上传',
+              buryingPointPosition: '门店拜访-陈列奖励案任务',
+              interfaceUsageTime: this.interfaceUsageTime,
+            });
+          }
           this.requestThen(res);
           this.requestThen(res);
         })
         })
         .catch((error) => {
         .catch((error) => {