home.js 1.61 KB
'use strict'

function getChannelCode(channel) {
    let config = {
        boy: 1,
        girl: 2,
        child: 3,
        lifestyle: 4,
    };

    return config[channel] ? config[channel] : config['boy'];
}


function getGenderCode(channel) {
    let config = {
        boy: '1,3',
        girl: '2,3',
        child: '',
        lifestyle: '',
    };

    return config[channel] ? config[channel] : config['boy'];
}


function getRecPosCode(channel) {
    let config = {
        boy: '100001',
        girl: '100002',
        child: '',
        lifestyle: '',
    };

    return config[channel] ? config[channel] : config['boy'];
}


function getRecommandContentCode(channel) {
    let config = {
        boy: '201504091403001',
        girl: '201504091403002',
        child: '201504091403002',
        lifestyle: '201504091403002',
    };

    return config[channel] ? config[channel] : config['boy'];
}

function getResourceCode(channel){
  let config = {
    boy: '9cb6138be8e60c96f48107da481816c2',
    girl: 'b1fa86320d3f9d9e89153129aeea1b3e',
    child: 'e9875682c1599a886bfbdb965b740022',
    lifestyle: '9aa25f5133f011ec96c2045eb15ae425',
  };
  return config[channel] ? config[channel] : config['boy'];
}

//获取首页的contentcode
function getHomeContentCode(channel){
  let config = {
    boy:'5857d247888b8a603a22a221386fd8e9',
    // boy: '9cb6138be8e60c96f48107da481816c2',
    girl:'fc6fece83dfa2b347555fff5c87a2178 '
  }
  return config[channel]?config[channel]:config['boy'];
}
module.exports = {
  getChannelCode,
  getGenderCode,
  getRecPosCode,
  getRecommandContentCode,
  getResourceCode,
  getHomeContentCode
}