Commit 2d20a8ce by luyt

fix:处理买点数据value为空换为null

1 parent eee4872a
...@@ -42,27 +42,27 @@ const reportTrack = (id, view = 1, share_channel = '', url = commonUrl, method = ...@@ -42,27 +42,27 @@ const reportTrack = (id, view = 1, share_channel = '', url = commonUrl, method =
} }
let data = { let data = {
open_id: userInfo.openid || userInfo.uuid, open_id: userInfo.openid || userInfo.uuid,
staff_id: (params && params.staffId) || '', staff_id: (params && params.staffId) || null,
staff_uuid: (params && params.shareStaffUuid) || '', staff_uuid: (params && params.shareStaffUuid) || null,
user_phone: (params && params.userPhone) || '', user_phone: (params && params.userPhone) || null,
create_time: firstEnter ? enter_time : new Date().format('yyyy-MM-dd hh:mm:ss'), // 离开时间 create_time: firstEnter ? enter_time : new Date().format('yyyy-MM-dd hh:mm:ss'), // 离开时间
enter_time, // 进入时间 enter_time, // 进入时间
item_type: 3, item_type: 3,
customer_phone: userInfo.phone || '', customer_phone: userInfo.phone || null,
action_type: view, action_type: view,
item_id: id, item_id: id,
business_type: 1, business_type: 1,
add_way: 104, add_way: 104,
merchant_id: (params && params.merchantId) || '', merchant_id: (params && params.merchantId) || null,
user_open_id: (params && params.openId) || '', user_open_id: (params && params.openId) || null,
share_channel, share_channel: share_channel ? share_channel : null,
sharedTime sharedTime: sharedTime ? sharedTime : null
} }
// 数据上报兼容 // 数据上报兼容
data = { data = {
// method: 'entmicro.api.customercollect.reportCustomerList', // method: 'entmicro.api.customercollect.reportCustomerList',
method, method: method ? method : null,
jsonList: [JSON.stringify(data)] jsonList: [JSON.stringify(data)]
} }
firstEnter = false firstEnter = false
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!