header.js
740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/**
* router of sub app guang
* @author: biao<bill.zhao@yoho.cn>
* @date: 2016/05/12
*/
'use strict';
const _ = require('lodash');
const getChannle = () => ('kids');
/**
* 设置头部
* @param {String} title 标题
* @param {Boolen} backUrl 返回的url
* @param {Boolen} navBtn 是否显示导航
* @param {Boolen} navBack 是否显示返回箭头
*/
exports.setNavHeader = (title, navBack, backUrl, navBtn) => {
let header = {
navTitle: title,
backUrl: backUrl,
navBack: navBack,
navBtn: navBtn
};
header[getChannle()] = true;
return _.merge({
navTitle: '',
backUrl: true,
navBack: true,
navBtn: true,
boys: true
}, header);
};