rule_order_confirm.js 1.39 KB
const {
  ANDROID_ORDER_CONFIRM
} = require('../../scene-types/scene-types');

module.exports = {
  [ANDROID_ORDER_CONFIRM]: [

        { op: 'YB_PAGE_ENTER', name: '进入商品详情页', equals: { PAGE_ID: 'spxqy' } },
        {
          op: 'YB_GDS_DT_INFO', name: '请求商品数据成功', validate: (log) => {
            return log.param.PRD_SKN.length > 0;
          }
        },
        {
          op: 'YB_GDS_COLOR_C', name: '点击颜色(可以没有 如果只有一个颜色是不可点击的)', validate: (log) => {
            return log.param.PRD_ID.length > 0 && log.param.COLOR.length > 0;
          }
        },
        {
          op: 'YB_GDS_SIZE_C', name: '点击尺码(可以没有 如果只有一个尺码是不可点击的)', validate: (log) => {
            return log.param.PRD_ID.length > 0 && log.param.SIZE.length > 0;
          }
        },
        {
          op: 'YB_GDS_DT_SEL', name: '加入购物车', validate: (log) => {
            return log.param.PRD_SKU > 0;
          }
        },

        {
          op: 'YB_CHOOSE_FOR_YOU', name: '店铺推荐的商品列表', equals: { REC_POSE: '100029', ACTION_ID: '0' }, validate: (log) => {
            return log.param.PRD_ID.length > 0;
          }
        },
        {
          op: 'YB_GDS_DT_BUY', name: '点击商品详情', validate: (log) => {
            return log.param.PRD_ID.length > 0;
          }
        },
  ]
};