|
@@ -1,4 +1,5 @@
|
|
|
import Vue from 'vue'
|
|
|
+
|
|
|
//判断进入的场景值
|
|
|
function sceneInfo(scene) {
|
|
|
const sceneList = {
|
|
@@ -149,24 +150,25 @@ function sceneInfo(scene) {
|
|
|
'1252': '搜一搜小程序搜索页「小功能」模块进入小程序'
|
|
|
}
|
|
|
let channel = sceneList[scene ? scene + '' : uni.getLaunchOptionsSync().scene + ''] || '未知';
|
|
|
- console.log("channel", channel)
|
|
|
return channel;
|
|
|
}
|
|
|
|
|
|
-function winTheCustomer(shareUserid = 0, appname, scene = '') {
|
|
|
+function winTheCustomer(shareUserid = 0, appname, replenish = {}, scene = '') {
|
|
|
if (!shareUserid) return uni.getStorageSync('userMsg').userid;
|
|
|
Vue.prototype.$Http.basic({
|
|
|
"id": "2024061113525202",
|
|
|
"content": {
|
|
|
shareuserid: shareUserid,
|
|
|
- "channel": sceneInfo(scene), //渠道
|
|
|
- appname //应用名称
|
|
|
+ channel: sceneInfo(scene), //渠道
|
|
|
+ appname, //应用名称
|
|
|
+ ...replenish
|
|
|
}
|
|
|
}).then(res => {
|
|
|
- console.log("记录获客", res)
|
|
|
+ console.log(`${appname}记录获客`, res)
|
|
|
})
|
|
|
return shareUserid;
|
|
|
}
|
|
|
+
|
|
|
module.exports = {
|
|
|
winTheCustomer
|
|
|
}
|