Authored by shuaiguo

Merge branch 'refs/heads/develop'

... ... @@ -14,6 +14,7 @@ const config = require('../../../config/common');
const simpleHeaderModel = require('../../../doraemon/models/simple-header');
let helpers = global.yoho.helpers;
let cookie = global.yoho.cookie;
let logger = global.yoho.logger;
class BaiduSDK {
/*
... ... @@ -27,6 +28,7 @@ class BaiduSDK {
token = '7GULUkX90QLZU6cHO9OEqUsRKttGNqpN@O62eFfb91OUVhmkakV1bQHIxF8xURBvP',
conversionTypes = [{ logidUrl: '', newType: null }]
}) {
logger.info('--------------百度ocpc--------------');
request({
method: 'POST',
uri: 'http://ocpc.baidu.com/ocpcapi/api/uploadConvertData',
... ... @@ -36,9 +38,9 @@ class BaiduSDK {
},
json: true
}).then((result) => {
console.log(`[账号注册成功后上报 百度ocpc返回信息:${JSON.stringify(result)}`);
logger.info(`[账号注册成功后上报 百度ocpc返回信息:${JSON.stringify(result)}`);
}).catch((error) => {
console.log(`[账号注册成功后上报 百度ocpc失败 错误信息:${error}`);
logger.info(`[账号注册成功后上报 百度ocpc失败 错误信息:${error}`);
});
}
}
... ... @@ -226,6 +228,7 @@ let mobileRegister = (req, res, next) => {
*/
const logidUrl = req.cookies.bd_vid_path;
logger.info('-------logidUrl--------', `${logidUrl}:${mobile}`);
if (logidUrl) {
BaiduSDK.reportOcpcApi({
conversionTypes: {
... ...
{
"name": "yohobuy-node",
"version": "6.9.19",
"version": "6.9.20",
"private": true,
"description": "A New Yohobuy Project With Express",
"repository": {
... ...