ソースを参照

Merge branch 'feature_20260427_图片上传增加埋点记录' into uat(dev)

zhujindu 5 時間 前
コミット
f4edad2450
1 ファイル変更18 行追加1 行削除
  1. 18 1
      src/components/uploadVNormalTaskPhoto.vue

+ 18 - 1
src/components/uploadVNormalTaskPhoto.vue

@@ -35,7 +35,7 @@
 </template>
 
 <script>
-import { addPhotoBatch, addVisitsPosition, addPhotoToDB } from '@/api/index';
+import { addPhotoBatch, addVisitsPosition, addPhotoToDB, buryingPoint } from '@/api/index';
 import imageAIVerifyErr from './imageAIVerifyErr';
 import imageWhiteStore from './imageWhiteStore';
 import H5Camera from '@/components/H5Camera';
@@ -114,6 +114,7 @@ export default {
       imageWhiteStoreData: null,
       imageWhiteStoreFlag: false,
       localIdsArr: [],
+      interfaceUsageTime: null,
     };
   },
   methods: {
@@ -225,6 +226,7 @@ export default {
                 success: function (res) {
                   that.toastLoading(0, '上传中...', true);
                   let localIds = res.localIds;
+                  that.interfaceUsageTime = Date.now();
                   that.localIdsArr = [];
                   // that.$emit('newimgarr', {
                   //   localIds: localIds,
@@ -293,6 +295,21 @@ export default {
       }
       addPhotoBatch(form, this.controller ? this.controller.signal : null)
         .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);
         })
         .catch((error) => {