weixin-report.js 931 Bytes

let cookie = require('yoho-cookie');
let C_ID = window._ChannelVary[window.cookie('_Channel')];

(() => {
    if (cookie.get('_LOGIN_IS_REPORT') === 'false' && cookie.get('_LOGIN_TYPE')) {
        setTimeout(() => {
            if (window._yas && window._yas.sendCustomInfo) {
                window._yas.sendCustomInfo({
                    op: 'YB_LOGIN_SUCCESS_L',
                    param: JSON.stringify({
                        C_ID: C_ID,
                        LOGIN_TYPE: cookie.get('_LOGIN_TYPE'),
                        APP_TYPE: 1,
                        UNIONID: cookie.get('_WX_UNIONID') || void 0,
                        OPENID: cookie.get('_WX_OPENID') || void 0
                    })
                }, true);
                cookie.set('_LOGIN_IS_REPORT', true, {
                    domain: '.m.yohobuy.com',
                    path: '/'
                });
            }
        }, 1000);
    }
})();