Blame view

public/js/home/burying-point.js 924 Bytes
1
require('common');
王水玲 authored
2
沈志敏 authored
3
function setContYas(operid, params, flag) {
王水玲 authored
4 5 6 7 8
    params = $.extend({
        C_ID: window.queryString.yh_channel || window.cookie('yhChannel')
    }, params);

    if (window._yas && window._yas.sendCustomInfo) {
陈峰 authored
9
        let op,
沈志敏 authored
10 11 12 13 14 15 16 17 18
            appop;

        if (typeof operid === 'object') {
            op = operid.op;
            appop = operid.appop;
        } else if (typeof operid === 'string') {
            op = operid;
        }
王水玲 authored
19 20
        window._yas.sendCustomInfo({
            op: op,
沈志敏 authored
21
            appop: appop,
王水玲 authored
22
            param: JSON.stringify(params)
王水玲 authored
23
        }, flag);
王水玲 authored
24 25 26 27
    }
}

function countGoodsId() {
陈峰 authored
28
    let idStr = '';
王水玲 authored
29
王水玲 authored
30 31 32 33 34
    $('.installment-only .good-info').each(function(key, item) {
        if (key !== 0) {
            idStr += ',';
        }
王水玲 authored
35
        idStr += $(item).data('goodId');
王水玲 authored
36 37 38 39 40 41 42
    });

    return idStr;
}

exports.setContYas = setContYas;
exports.countGoodsId = countGoodsId;