zhanghui 2 жил өмнө
parent
commit
610b3d9ff8
2 өөрчлөгдсөн 36 нэмэгдсэн , 1 устгасан
  1. 27 1
      App.vue
  2. 9 0
      common/js/api.js

+ 27 - 1
App.vue

@@ -49,12 +49,38 @@
                                         }
                                     ).then(res1 => {
                                         console.log('拓客端推广用户绑定成功!')
+
+                                        that.$api.addRecordForAttach({
+                                            ...expandParam,
+                                            isNew:1,
+                                            isBindSuccess:1,
+                                        }).then(res=>{
+                                            console.log('+++++++++新用户,扫码推广成功记录!++++++++++++++++')
+                                        })
+
                                         uni.removeStorageSync('expandParam');
                                     }).catch(err=>{
+
+                                        that.$api.addRecordForAttach({
+                                            ...expandParam,
+                                            isNew:1,
+                                            isBindSuccess:0,
+                                        }).then(res=>{
+                                            console.log('+++++++++新用户,扫码推广失败记录!++++++++++++++++')
+                                        })
+
                                         uni.removeStorageSync('expandParam');
                                     })
                                 }else {
-                                    console.log("老用户,删除拓客端携带的参数")
+
+                                    that.$api.addRecordForAttach({
+                                        ...expandParam,
+                                        isNew:0,
+                                        isBindSuccess:0,
+                                    }).then(res=>{
+                                        console.log('+++++++++老用户,扫码推广失败记录!++++++++++++++++')
+                                    })
+
                                     uni.removeStorageSync('expandParam');
                                 }
 

+ 9 - 0
common/js/api.js

@@ -3,6 +3,15 @@ import request from '../js/request.js';
 
 export default {
 
+    //拓客专员二维码被扫记录
+    addRecordForAttach(data) {
+        return request({
+            url: '/expand/userScanRecord/addRecordForAttach',
+            method: 'POST',
+            data: data,
+        })
+    },
+
     //用户绑定推广专员
     userBindMember(data) {
         return request({